@bcw-research/prettier-config
v0.0.2
Published
BCW prettier config
Downloads
120
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/configThe 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 prettierTo 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.jsonfile containing a single line at the top:"@bcw-research/prettier-config" - At the root of your project, create a
prettier.config.cjsfile and spread therequired 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.
