commit-lint
Lint commit messages using Angular's commit convention
What is commit-lint
commit-lint
is not the same as commitlint. It's extremely simple, doesn't support rule configuration, and enforces Angular's commit conventions. It was born inspired by Vue
related projects.
Usage
Install
npm i @alexwei/commit-lint -D
Add Hook
With husky
, add command to .husky/commit-msg
file.
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npx commit-lint $1
With simple-git-hooks
, add command to package.json
file.
"simple-git-hooks": {
"commit-msg": "npx commit-lint $1"
}
With yorkie
, add command to package.json
file.
"gitHooks": {
"commit-msg": "npx commit-lint $1"
}