Skip to content

Latest commit

 

History

History
78 lines (58 loc) · 2.71 KB

README.md

File metadata and controls

78 lines (58 loc) · 2.71 KB

Lint commit messages

<style> .tuohi3 {fill: #50b3dd} .tZ1XQohX {fill: #d4d6d6} .t1b70aa {fill: #1d262b} .tZLMqtg {fill: #9fcc4e} </style>

commitlint

npm latest npm next Travis branch AppVeyor branch

commitlint helps your team adhering to a commit convention. By supporting npm-installed configurations it makes sharing of commit conventions easy.

Getting started

Install

npm install -g @commitlint/cli @commitlint/config-angular

Configure

echo "module.exports = {extends: ['@commitlint/config-angular']}" > commitlint.config.js

Test

# Lint from stdin
echo 'foo: bar' | commitlint
⧗   input: foo: bar
✖   type must be one of [build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test] [type-enum]
✖   found 1 problems, 0 warnings

# Lint last commit from history
commitlint --from=HEAD~1

?> To get the most out of commitlint you'll want to automate it in your project lifecycle. See our Local setup guide for next steps.

Documentation

  • Guides - Common use cases explained in a step-by-step pace
  • Concepts - Overarching topics important to understand the use of commitlint
  • Reference - Mostly technical documentation