Adds additional rules to commitlint inspired by conventional commits' specification.
npm install commitlint-plugin-cleanfeetfooter-format:
footer-max-occurrence-breaking-change:
BREAKING CHANGE: . You're allowed to pass in your own regex [2, 'always', { max: 1, regex: /^BREAKING CHANGE: .*$/ }]
never has no effect.
js
module.exports = {
extends: ['@commitlint/config-conventional'],
plugins: ['cleanfeet'],
rules: {
'footer-format': [
2,
'always',
[
'^BREAKING CHANGE: .*',
'^[a-zA-Z0-9-]+: .*',
'^[a-zA-Z0-9-]+ #.*'
]
],
'footer-max-occurrence-breaking-change': [2, 'always', { max: 1, regex: /^BREAKING CHANGE: .*$/ }]
}
};
`
Todo
+ Show which regular expression has been matched in case of specifying never for footer-format`