2.0.1 • Published 3 years ago
@creeation/prettier-config v2.0.1
@creeation/prettier-config
Repository holding my personal Prettier configuration.
Installation
$ npm i -D @creeation/prettier-configThen, in your package.json, set prettier to @creeation/prettier-config:
{
"prettier": "@creeation/prettier-config"
}Configuring Prettier
Package Development Scripts and Hooks
Git Hooks (using Husky and pretty-quick)
pre-commit
$ npm run git:pre-commitnpm Scripts
test
Checks if package files are formatted correctly using Prettier
Note: bound to
prepublishOnly
$ npm testformat
Formats and saves all package files using Prettier
$ npm run formatnpm Life Cycle Scripts
postinstall
$ npx husky installprepublishOnly
$ npm test && npx pinst --disablepostpublish
$ npx pinst --enable