Validate commit messages according to various presets
npm i validate-commit --save-dev
Even though there are a couple of other packages that do this, I wanted to release this one with a few quality of life changes.
- Uses Chalk to color messages
- Outputs all the scopes when the scope is incorrect
Using git-scripts
"git": {
"scripts": {
"commit-msg": "./node_modules/.bin/validate-commit-msg $1"
}
}
$ validate-commit-msg 'chore(package): some message'
var validateCommit = require('validate-commit');
validateCommit('chore(package): some message'); // true
npm i && typings install
Apache-2.0 © Will Soto