Rules
June 30, 2025 ยท View on GitHub
This configuration is extending @commitlint/config-conventional. Only the changed and added rules, compared to @commitlint/config-conventional, are documented here.
body-max-line-length
- condition:
bodyeach line hasvalueor less characters. - level:
disabled.
footer-max-line-length
- condition:
footerlines hasvalueor less characters. - level:
disabled. - value: n/a
header-max-length
- condition:
headerhasvalueor less characters. - level:
disabled. - value: n/a
function-rules/header-max-length
- condition:
headerhasvalueor less characters. - level:
error. - rule:
always. - value:
The value is dependent on the commit header and has the following values.
- Default.
100 - If
headerhas one of the prefixes listed below.chore(deps), for Renovate and Dependabot.fix(deps), for Renovate.build(deps), for Dependabot.chore(deps-dev), for Dependabot.build(deps-dev), for Dependabot.
200
- Default.
Note
Regular commits have the default header length and fail if the header is too long.
$ echo 'chore: knowledge, like air, is vital to life. Like air, no one should be denied it. - Alan Moore' | npx commitlint # passes, 96 characters
$ echo 'chore: knowledge, like air, is vital to life. Like air, no one should be denied it. - Alan Moore, V for Vendetta' | npx commitlint # fails, 112 characters
Renovate and Dependabot commits have extended header length.
$ echo 'chore(deps): we are told to remember the idea, not the man. Because a man can fail. He can be caught, he can be killed and forgotten. But 400 years later, an idea can still change the world - A. Moore' | npx commitlint # passes, 200 characters
$ echo 'chore(deps): we are told to remember the idea, not the man. Because a man can fail. He can be caught, he can be killed and forgotten. But 400 years later, an idea can still change the world - Alan Moore' | npx commitlint # fails, 202 characters