@ggascoigne/prettier-config
v1.6.0
Published
A shareable prettier configuration for projects.
Downloads
10
Readme
Prettier Config
My personal shareable prettier configuration.
Install
pnpm add -D prettier @ggascoigne/prettier-config
Usage
.prettierrc.js
module.exports = '@ggascoigne/prettier-config'
Extending
.prettierrc.js
module.exports = {
...require('@ggascoigne/prettier-config'),
semi: true,
}
Add an NPM Script
Running this command:
npm set-script lint:prettier "prettier --write ."
Will create:
package.json
"scripts": {
"lint:prettier": "prettier --write ."
},
Add a Pre-commit Hook
lint-staged.config.js
module.exports = {
'**/*': ['prettier --cache --write --ignore-unknown'],
}
License
MIT