I have found using pretty-quick
along with Prettier to be a really good combo.
npm i -D prettier pretty-quick
"format": "pretty-quick",
"precommit": "pretty-quick --staged",
{ | |
"bracketSpacing": true, | |
"jsxBracketSameLine": true, | |
"parser": "babylon", | |
"printWidth": 70, | |
"semi": false, | |
"singleQuote": true, | |
"tabWidth": 2, | |
"trailingComma": "none", | |
"useTabs": false, | |
"proseWrap": "always", | |
"overrides": [ | |
{ | |
"files": ".prettierrc", | |
"options": { "parser": "json" } | |
}, | |
{ | |
"files": ".eslintrc.json", | |
"options": { "parser": "json" } | |
}, | |
{ | |
"files": "*.json", | |
"options": { "parser": "json" } | |
}, | |
{ | |
"files": "*.md", | |
"options": { "parser": "markdown" } | |
} | |
] | |
} |
{ | |
"format": "pretty-quick", | |
"precommit": "pretty-quick --staged", | |
} |
I have found using pretty-quick
along with Prettier to be a really good combo.
npm i -D prettier pretty-quick
"format": "pretty-quick",
"precommit": "pretty-quick --staged",