@eliasnorrby/prettier-config
v4.2.30
Published
My prettier config
Downloads
144
Readme
Prettier Config
My prettier config. It's very close to the defaults, but enables trailing commas to improve git diffs.
:white_check_mark: Updated for prettier v2
Setup
Using npx
Run the following command to install and configure prettier
npx @eliasnorrby/prettier-configThis will run a setup script, adding this package to devDependencies, writing
the config to prettier.config.js and writing some defaults to
.prettierignore. Entries will be appended if a .prettierignore already
exists.
--no-install
Run setup with the --no-install flag to avoid installing this package as a
dependency. Your pretter.config.js will contain a sample rule for you to add
to instead of extending this package.
Manually
Install the package
npm i -D @eliasnorrby/prettier-configand add the configuration to prettier.config.js or package.json.
prettier.config.js
module.exports = require('@eliasnorrby/prettier-config')package.json
{
"prettier": "@eliasnorrby/prettier-config"
}Overriding settings
Overriding settings requires the use of a prettier.config.js or
.prettierrc.js:
module.exports = {
...require('@eliasnorrby/prettier-config'),
semi: false,
}