Verify commit message format
npm install verify-commit-msg
A script to verify the commit message format.
> This is adapted from Commit convention.
``bash`
npm i verify-commit-msg -D
`bash`
npm pkg set scripts.verify-commit=verify-commit-msg
npm pkg set git-hooks.commit-msg="npm run verify-commit"
- Bash
`bash`
npm pkg set scripts.verify-commit=verify-commit-msg
npx husky add .husky/commit-msg "npm run verify-commit"
- Or manually update .husky/commit-msg
`bash
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
npm run verify-commit
``