A pretty cozy collection of git hooks to verify commit messages and lint your code.
- Install the package
npm i -D @pretty-cozy/git-hooks
- Add a lint-staged config to your
package.json
, for example:"lint-staged": { "*.{ts,tsx}": [ "npm run lint:fix" ], "*.{json,md,html}": [ "prettier --write" ] }
- Add a
prepare
script to yourpackage.json
to auto install the hooks onnpm i
:"scripts": { "prepare": "cozy-git-hooks install --quiet" }