danger-plugin-conventional-commitlint
A danger plugin to lint commit messages with commitlint
Usage
Install:
npm install --save-dev danger-plugin-conventional-commitlint
At a glance:
// dangerfile.js
import commitlint from 'danger-plugin-conventional-commitlint'
import configConventional from '@commitlint/config-conventional';
(async function dangerReport() {
const commitlintConfig = {
severity: 'warn'
};
await commitlint(configConventional.rules, commitlintConfig);
})();
Note: you must provide your own
rules
to the function
API
commitlint([rules], [options])
Options
severity
Type: String
Choices: 'fail' | 'warn' | 'message'
danger method to call when the commit message does not pass the linter
Changelog
See the GitHub release history.
Contributing
See CONTRIBUTING.md.