@bcw-research/prettier-config
v0.0.2
Published
BCW prettier config
Downloads
1
Readme
@bcw-research/prettier-config
Prettier Config for BCW Repositories
Usage
With the CLI tool
npx @bcw-research/create-config
# or
npm init @bcw-research/config
The CLI will install Prettier together with ESLint. If you only want to install the Prettier config, follow the manual instructions below.
Manually
Install the shared prettier config along with it's dependencies:
npm install -D @bcw-research/prettier-config prettier
To consume the config choose one of the following options:
- Add
"prettier": "@bcw-research/prettier-config"
to yourpackage.json
- At the root of your project, create a
.prettierrc.json
file containing a single line at the top:"@bcw-research/prettier-config"
- At the root of your project, create a
prettier.config.cjs
file and spread therequire
d config:
module.exports = {
...require("@bcw-research/prettier-config"),
};
Note: This is the only method that allows for overriding options.
Overriding Options
If you need to override some of the options in the config or in Prettier's default, choose option 3 when consuming the config and extend as needed:
module.exports = {
...require("@bcw-research/prettier-config"),
semi: false,
};
Refer to Prettier's documentation on how to override options.
Integration with VS Code
Install the Prettier VS Code extension to integrate with VS Code.