verify-commit-msg
v0.0.14
Published
Verify commit message format
Downloads
623
Readme
Verify Commit Messgae
Git Commit Message Convention
This is adapted from Commit convention.
Installation
npm i verify-commit-msg -D
Update script package.json
- Bash
npm pkg set scripts.verify-commit=verify-commit-msg
- Or manually update
package.json
"scripts": {
"verify-commit": "verify-commit-msg"
},
Usage with husky
Config .husky/commit-msg
- Bash
npx husky add .husky/commit-msg "npm run verify-commit"
- Or manually update
.husky/commit-msg
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
npm run verify-commit
Usage with git-scm-hooks
Update package.json
"git-hooks": {
"commit-msg": "npm run verify-commit"
},