@build-chores/commitlint
v0.9.0
Published
Committing JS projects is complicated.
Readme
@build-chores/commitlint
Committing JS projects is complicated.
Synopsis
Lint the commit messages of your JS project.
Usage
Install the @build-chores/commitlint package into your project:
yarn install --dev @build-chores/commitlintCreate a commitlint.config.js file containing the following snippet. See the example commitlint.config.js for a template.
module.exports = {
extends: ['@build-chores/commitlint']
}Use Husky to lint your commit message whenever you commit.
yarn add --dev huskyPlace a commit-msg hook in your .huskyrc. The following example hook only lints commit message when committing to the master branch. See the example .huskyrc for a template.
{
"hooks": {
"commit-msg": "! git rev-parse --abbrev-ref HEAD | grep -q master || commitlint -E HUSKY_GIT_PARAMS"
}
}You are ready to lint your commit messages.
Contribute
Check out our contributing.md to get started.
