|
| 1 | +--- |
| 2 | +extends: '@commitlint/config-conventional' |
| 3 | + |
| 4 | +rules: |
| 5 | + # See: https://commitlint.js.org/reference/rules.html |
| 6 | + # |
| 7 | + # Rules are made up by a name and a configuration array. The configuration |
| 8 | + # array contains: |
| 9 | + # |
| 10 | + # * Severity [0..2]: 0 disable rule, 1 warning if violated, or 2 error if |
| 11 | + # violated |
| 12 | + # * Applicability [always|never]: never inverts the rule |
| 13 | + # * Value: value to use for this rule (if applicable) |
| 14 | + # |
| 15 | + # Run `npx commitlint --print-config` to see the current setting for all rules. |
| 16 | + |
| 17 | + header-max-length: [2, always, 100] # Header can not exceed 100 chars |
| 18 | + |
| 19 | + type-case: [2, always, lower-case] # Type must be lower case |
| 20 | + type-empty: [2, never] # Type must not be empty |
| 21 | + |
| 22 | + # Supported conventional commit types |
| 23 | + type-enum: [2, always, [build, ci, chore, docs, feat, fix, perf, refactor, revert, style, test]] |
| 24 | + |
| 25 | + scope-case: [2, always, lower-case] # Scope must be lower case |
| 26 | + |
| 27 | + # Error if subject is one of these cases (encourages lower-case) |
| 28 | + subject-case: [2, never, [sentence-case, start-case, pascal-case, upper-case]] |
| 29 | + subject-empty: [2, never] # Subject must not be empty |
| 30 | + subject-full-stop: [2, never, "."] # Subject must not end with a period |
| 31 | + |
| 32 | + body-leading-blank: [2, always] # Body must have a blank line before it |
| 33 | + body-max-line-length: [2, always, 100] # Body lines can not exceed 100 chars |
| 34 | + |
| 35 | + footer-leading-blank: [2, always] # Footer must have a blank line before it |
| 36 | + footer-max-line-length: [2, always, 100] # Footer lines can not exceed 100 chars |
| 37 | + |
| 38 | + # ------------------------------------------------------------ |
| 39 | + # BREAKING CHANGES — guidance (informational; not enforced): |
| 40 | + # |
| 41 | + # How to mark a breaking change (either or both): |
| 42 | + # 1) Put "!" in the header after the type or scope, e.g.: |
| 43 | + # feat!: drop support for node 14 |
| 44 | + # refactor(auth)!: remove legacy token flow |
| 45 | + # |
| 46 | + # 2) Add a footer that starts with: |
| 47 | + # BREAKING CHANGE: <short summary> |
| 48 | + # Follow with impact/migration details, each line ≤ 100 chars. |
| 49 | + # |
| 50 | + # This config already allows both patterns via @commitlint/config-conventional. |
| 51 | + # Note: commitlint cannot (in YAML) *require* a BREAKING CHANGE footer only |
| 52 | + # when "!" is used. If you need that kind of conditional enforcement, use a |
| 53 | + # JS config (*.cjs) with a custom rule. |
| 54 | + # ------------------------------------------------------------ |
0 commit comments