Husky
Author: huyikai
npm install husky -D
Edit package.json > prepare script and run it once:
package.json > prepare
npm pkg set scripts.prepare="husky install"npm run prepare
Add a hook:
npx husky add .husky/pre-commit "npm test"git add .husky/pre-commit
Make a commit:
git commit -m "Keep calm and commit"# `npm test` will run every time you commit
https://typicode.github.io/husky