Lint commit messages
<style>
.tuohi3 {fill: #50b3dd}
.tZ1XQohX {fill: #d4d6d6}
.t1b70aa {fill: #1d262b}
.tZLMqtg {fill: #9fcc4e}
</style>
commitlint
helps your team adhering to a commit convention. By supporting npm-installed configurations it makes sharing of commit conventions easy.
npm install -g @commitlint/cli @commitlint/config-angular
echo "module.exports = {extends: ['@commitlint/config-angular']}" > commitlint.config.js
# 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.
- 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