semantic-release-commitlint
v1.2.2
Published
Plugin for validating commit message formats
Downloads
984
Maintainers
Readme
semantic-release-commitlint
This plugin is a thin layer on top of conventional-changelog/commitlint packages allowing it to be used together with semantic-release tool to enforce conventional commits style guide. The reasoning to this is, that it is more beneficial to automate the enforcing than having it as a manual part of code review process. This takes some load away from developers and allows them to prevent merges to release branches when commits do not follow the convention.
Installation
npm install --save-dev semantic-release-commitlint
Add semantic-release-commitlint
to semantic-release configuration after @semantic-release/commit-analyzer
.
The plugin is run in analyzeCommits
-lifecycle and will throw an error with linting results if linting fails.
Configuration
Currently the plugin has only one configuration setting:
failOnWarning
- Type: Boolean
- Default:
undefined
(falsy) - Description: Normally commitlint warnings are considered as valid, but by setting this to true the plugin will throw an error if any warnings have been found.
rules
- Type: Object
- Default:
{}
- Description: Object containing rules as listed at https://github.com/conventional-changelog/commitlint/blob/master/docs/reference-rules.md
warnOnly
- Type: Boolean
- Default:
undefined
(falsy) - Description: Instead of throwing errors, set maximum level to be warning.
THREE, three configuration settings... oh blast it!