|
| 1 | +# ============================================================ |
| 2 | +# commitlint — Conventional Commits enforcement |
| 3 | +# Docs: https://commitlint.js.org |
| 4 | +# ============================================================ |
| 5 | +extends: |
| 6 | + - "@commitlint/config-conventional" |
| 7 | + |
| 8 | +rules: |
| 9 | + # Header length cap |
| 10 | + header-max-length: [2, "always", 100] |
| 11 | + |
| 12 | + # Body must have a blank line above it (enforced by convention) |
| 13 | + body-leading-blank: [2, "always"] |
| 14 | + |
| 15 | + # Footer must have a blank line above it |
| 16 | + footer-leading-blank: [1, "always"] |
| 17 | + |
| 18 | + # Type must be one of the allowed types |
| 19 | + type-enum: |
| 20 | + - 2 |
| 21 | + - "always" |
| 22 | + - - feat # new feature (triggers minor bump) |
| 23 | + - fix # bug fix (triggers patch bump) |
| 24 | + - perf # performance improvement (triggers patch bump) |
| 25 | + - refactor # code change that neither fixes a bug nor adds a feature |
| 26 | + - revert # revert a previous commit |
| 27 | + - docs # documentation only |
| 28 | + - style # formatting, missing semi-colons, etc. |
| 29 | + - test # adding or fixing tests |
| 30 | + - build # changes to build system or external dependencies |
| 31 | + - ci # changes to CI/CD configuration |
| 32 | + - chore # maintenance tasks |
| 33 | + |
| 34 | + # Subject case: lower-case start is fine; forbid sentence/pascal/upper |
| 35 | + subject-case: |
| 36 | + - 2 |
| 37 | + - "never" |
| 38 | + - [sentence-case, start-case, pascal-case, upper-case] |
| 39 | + |
| 40 | + # Subject must not end with a period |
| 41 | + subject-full-stop: [2, "never", "."] |
| 42 | + |
| 43 | + # Subject must not be empty |
| 44 | + subject-empty: [2, "never"] |
| 45 | + |
| 46 | + # Type must not be empty |
| 47 | + type-empty: [2, "never"] |
0 commit comments