0.9.0 • Published 5 years ago

@build-chores/commitlint v0.9.0

Weekly downloads
1
License
GPL-3.0
Repository
github
Last release
5 years ago

@build-chores/commitlint

Committing JS projects is complicated.

Synopsis

License: GPL v3 npm version Build Status

Lint the commit messages of your JS project.

Usage

Install the @build-chores/commitlint package into your project:

yarn install --dev @build-chores/commitlint

Create 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 husky

Place 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.

License