1.1.0 • Published 12 months ago
@keepthesmoke/prettier-config v1.1.0
prettier-config
Shared Prettier config for my projects
Install
$ npm install --save-dev @keepthesmoke/prettier-config
Usage
Reference this module in "prettier"
configuration field in your package.json
:
{
// ...
"prettier": "@keepthesmoke/prettier-config"
}
Alternatively, export the name of this module from separate Prettier config files like this:
// .prettierrc / .prettierrc.json
"@keepthesmoke/prettier-config"
or like this for JavaScript files:
// .prettierrc.cjs
module.exports = require('@keepthesmoke/prettier-config')
Extending
Prettier does not offer an "extends" mechanism as you might be familiar from tools such as ESLint.
To extend a configuration you will need to use a prettier.config.js
or .prettierrc.js
file that exports an object:
module.exports = {
...require('@keepthesmoke/prettier-config'),
semi: false
};