When I try to submit a breaking-change commit with the provided conventional commit config file used, I get an error:
husky > commit-msg (node v10.15.3)
â§— input: test!: should work
✖ subject may not be empty [subject-empty]
✖ type may not be empty [type-empty]
✖ found 2 problems, 0 warnings
ⓘ Get help: https://github.com/conventional-changelog/commitlint/#what-is-commitlint
husky > commit-msg hook failed (add --no-verify to bypass)
This commit should pass the husky check because it falls in the spec of a conventional commit
The commit fails the lint, probably because the exclamation point isn't getting parsed correctly
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'type-enum': [
1,
'always',
[
'build',
'chore',
'ci',
'docs',
'feat',
'fix',
'perf',
'refactor',
'revert',
'style',
'test'
]
]
}
}
| Executable | Version |
| ---: | :--- |
| commitlint --version | 6.4.1 |
| git --version | 2.17.1 |
| node --version | v10.15.3 |
Hi @topocount! I see you are running an outdated version of commitlint (6.4.1), this doesn't have support for the new format of the conventional changelog parsers. We made some internal changes in [email protected] that includes support for these parsers.
If you upgrade to 8.3.3, the exclamation mark should be parsed as breaking change commit (without any failing type/scope/message rules).
Sorry, I have the same problem with @commitlint/cli @ 8.3.5
Still not working as of 9.x.x
"@commitlint/config-conventional": "^9.0.1",
"@commitlint/core": "^9.0.1",
const { lint, load } = require('@commitlint/core')
load().then(({ rules }) => {
console.log({ rules })
const title = 'chore!: some chores'
lint(title, rules).then(console.log)
})
Most helpful comment
Sorry, I have the same problem with
@commitlint/cli @ 8.3.5