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: body each line has value or less characters.
  • level: disabled.
  • condition: footer lines has value or less characters.
  • level: disabled.
  • value: n/a

header-max-length

  • condition: header has value or less characters.
  • level: disabled.
  • value: n/a

function-rules/header-max-length

  • condition: header has value or less characters.
  • level: error.
  • rule: always.
  • value: The value is dependent on the commit header and has the following values.

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