Husky helps you level up your commits and workflow. It automatically lints commit messages and code, and runs tests whenever you commit or push. Seamlessly integrates with tools like ESLint, Prettier, and Commitlint.

npm install --save-dev husky
// commit-msg. A file in the .husky folder

npx --no-install commitlint --edit "$1"
// post-merge. A file in the .husky folder

npm i
// pre-commit. A file in the .husky folder

npx lint-staged