Husky
Husky
Install
npm install husky -DUsage
Edit package.json > prepare script and run it once:
npm pkg set scripts.prepare="husky install"npm run prepareAdd a hook:
npx husky add .husky/pre-commit "npm test"git add .husky/pre-commitMake a commit:
git commit -m "Keep calm and commit"# `npm test` will run every time you commit