@ebarooni/prettier-config
v1.1.0
Published
The standard shareable config for Prettier
Downloads
1,186
Maintainers
Readme
@ebarooni/prettier-config
This package provides custom Prettier configurations for formatting Javascript and various web-focused languages.
Prerequisites
The peer dependencies might need to be installed separately. To install the peer dependencies run the following command:
npm i -D prettier
Installation
To install the package, run the following command:
npm i -D @ebarooni/prettier-config
Usage
To use the configuration in a project, reference the module in your package.json
:
{
"name": "my-cool-library",
"version": "9000.0.1",
"prettier": "@ebarooni/prettier-config"
}
Scripts
The following helper scripts can be added to package.json
:
{
"scripts": {
"prettier:check": "npx prettier . --check",
"prettier:fix": "npx prettier . --write"
}
}
Extending
To extend the configuration or overwrite some properties from the shared configuration, import the file in a .prettierrc.js
file and export the modifications, e.g:
import ebarooniPrettierConfig from "@ebarooni/prettier-config";
export default {
...ebarooniPrettierConfig,
semi: false,
};
Ignoring Files: .prettierignore
To exclude files from formatting, create a .prettierignore
file in the root of your project.
**/ios/*.md
**/android/*.md