0.0.2 • Published 12 months ago

@bcw-research/prettier-config v0.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
12 months ago

@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:

  1. Add "prettier": "@bcw-research/prettier-config" to your package.json
  2. At the root of your project, create a .prettierrc.json file containing a single line at the top: "@bcw-research/prettier-config"
  3. At the root of your project, create a prettier.config.cjs file and spread the required 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.

0.0.2

12 months ago

0.0.1

12 months ago