Configuration
Pre-shipped rules
Section titled “Pre-shipped rules”Currently, commitlint
ships with a opinionated set of rules based on the conventional commit format.
These rules can be changed in the .commitlint/commitlint.yml
file
Rules follow the same standard as the popular JS alternative commitlint.js
Configuration example
Section titled “Configuration example”This is an example of a .commitlint/commitlint.yml
file:
enabled: trueuse-emoji: true
rules: header-max-length: [2, "always", 100] header-trim: [2] type-case: [2, "always", "lowercase"] type-empty: [2, "never"] type-enum: [ 2, "always", [ "build", "chore", "ci", "docs", "feat", "fix", "perf", "refactor", "revert", "style", "test", ], ] subject-case: [2, "never", ["pascal-case", "upper-case"]] subject-empty: [2, "never"] subject-full-stop: [2, "never", "."] body-leading-blank: [1, "always"] body-max-line-length: [2, "always", 100] footer-leading-blank: [1, "always"] footer-max-line-length: [2, "always", 100]
Refer to Rules for a complete list of available rules.