@rheged-studio/commitlint-config 1.0.2 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -7,7 +7,7 @@ It **single-sources** the estate's allowed [Conventional Commit](https://www.con
7
7
  - the reusable CI workflow (`reusable-validate-commits.yml`) that validates a PR's `base..head` commit range, and
8
8
  - the local husky `pre-push` hook that runs the same range check before a push ever reaches CI.
9
9
 
10
- It extends [`@commitlint/config-conventional`](https://www.npmjs.com/package/@commitlint/config-conventional) and retains all of its defaults — only the list of allowed commit types is pinned to the estate's set.
10
+ It extends [`@commitlint/config-conventional`](https://www.npmjs.com/package/@commitlint/config-conventional) and pins `type-enum` plus the estate's length rules (`header-max-length` 72, `body-max-line-length` 256, `footer-max-line-length` 256). Everything else is inherited.
11
11
 
12
12
  ## Install
13
13
 
@@ -57,10 +57,15 @@ The `type-enum` rule is set explicitly and is aligned to the estate's release-pl
57
57
 
58
58
  A `!` marker or a `BREAKING CHANGE:` footer promotes any type to a **major** bump.
59
59
 
60
- Everything else is inherited from `@commitlint/config-conventional` unchanged, including:
60
+ Length rules are pinned explicitly ([A-1413](https://linear.app/rheged-studio/issue/A-1413)) so an upstream change to config-conventional's 100-character defaults cannot silently move the gate:
61
61
 
62
- - a non-empty commit type and subject,
63
- - the header max-length limit, and
62
+ - `header-max-length` — **72** (error). Counts the whole first line (`type(scope): subject`). Git's usual subject ceiling.
63
+ - `body-max-line-length` — **256** (error).
64
+ - `footer-max-line-length` — **256** (error), so `BREAKING CHANGE:` sentences are not left trapped at 100.
65
+
66
+ URL lines remain exempt (`/\bhttps?:\/\/\S+/`). Everything else is inherited from `@commitlint/config-conventional` unchanged, including:
67
+
68
+ - a non-empty commit type and subject, and
64
69
  - `defaultIgnores` — merge (`Merge …`), revert (`Revert …`), `fixup!` and `squash!` messages are skipped automatically, so this config never needs to blanket-ignore them by author identity.
65
70
 
66
71
  ## Bot-authored commits
@@ -76,10 +81,10 @@ Everything else is inherited from `@commitlint/config-conventional` unchanged, i
76
81
 
77
82
  Dependabot's subjects come from a `commit-message` template in each repo's `.github/dependabot.yml`, which sets `prefix` (plus `prefix-development` for the npm ecosystem) and `include: scope`. Without that template Dependabot falls back to inferring a prefix from recent commit history — which may yield a Conventional subject, but is not guaranteed to, and can leave a bare `Bump …` that would fail the gate. The explicit template is what makes the output deterministic, which is why it is a prerequisite for making the gate a required check rather than an optional nicety ([A-980](https://linear.app/rheged-studio/issue/A-980)).
78
83
 
79
- Two inherited rules are worth knowing when reading a bot commit:
84
+ The length pins are the real ceiling when reading a bot commit:
80
85
 
81
- - **`header-max-length` (100) is the one real ceiling.** This is why Dependabot bumps are grouped — a grouped subject stays short (`bump the actions group with 3 updates`), whereas an ungrouped multi-package subject can run past 100 characters and fail.
82
- - **`body-max-line-length` (100) ignores unbreakable lines.** Dependabot bodies contain compare URLs well over 100 characters; those pass, because the rule only trips on over-long lines that could have been wrapped. A long prose line still fails.
86
+ - **`header-max-length` (72) is the subject ceiling.** This is why Dependabot bumps stay grouped — a grouped subject stays short (`bump the actions group with 3 updates`), whereas an ungrouped multi-package subject can run past 72 characters and fail. An ungrouped `@rheged-studio/markdownlint-config` bump sits at exactly 72.
87
+ - **`body-max-line-length` and `footer-max-line-length` (256) ignore unbreakable lines.** Dependabot bodies contain compare URLs well over 256 characters; those pass, because the rule only trips on over-long lines that could have been wrapped (`/\bhttps?:\/\/\S+/`). A wrapable prose line still fails above 256.
83
88
 
84
89
  Should a bot ever need an exception, prefer fixing its commit template. A per-identity `ignores` entry is a documented last resort, not a first move.
85
90
 
package/dist/index.d.ts CHANGED
@@ -7,10 +7,19 @@ import type { UserConfig } from "@commitlint/types";
7
7
  * (`reusable-validate-commits.yml`) and the local husky `pre-push` range check —
8
8
  * float on the *same* list with zero drift (A-823 / A-979).
9
9
  *
10
- * The config extends `@commitlint/config-conventional` and deliberately retains
11
- * all of its defaults (header max length, non-empty type/subject, and the
12
- * `defaultIgnores` for `Merge …` / `Revert …` / `fixup!` / `squash!` messages).
13
- * Only `type-enum` is overridden.
10
+ * The config extends `@commitlint/config-conventional` and retains its
11
+ * non-empty type/subject defaults plus `defaultIgnores` for `Merge …` /
12
+ * `Revert …` / `fixup!` / `squash!` messages. It pins four rules explicitly so
13
+ * an upstream change cannot silently move the estate's gate:
14
+ *
15
+ * - `type-enum` — the estate's release-aligned types (A-823 / A-979).
16
+ * - `header-max-length` — 72 (Git's usual subject ceiling; A-1413).
17
+ * - `body-max-line-length` — 256 (A-1413).
18
+ * - `footer-max-line-length` — 256, so `BREAKING CHANGE:` sentences are not
19
+ * left trapped at config-conventional's 100 (A-1413).
20
+ *
21
+ * URL lines remain exempt via `@commitlint/ensure` (`/\bhttps?:\/\/\S+/`).
22
+ * There is no identity denylist.
14
23
  *
15
24
  * `type-enum` is set *explicitly* — even though the list currently mirrors
16
25
  * config-conventional's own default — so that an upstream change to
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD;;;;;;;;;;;;;;;;;;GAkBG;AACH,QAAA,MAAM,MAAM,EAAE,UAqBb,CAAC;AAEF,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,QAAA,MAAM,MAAM,EAAE,UAwBb,CAAC;AAEF,eAAe,MAAM,CAAC"}
package/dist/index.js CHANGED
@@ -6,10 +6,19 @@
6
6
  * (`reusable-validate-commits.yml`) and the local husky `pre-push` range check —
7
7
  * float on the *same* list with zero drift (A-823 / A-979).
8
8
  *
9
- * The config extends `@commitlint/config-conventional` and deliberately retains
10
- * all of its defaults (header max length, non-empty type/subject, and the
11
- * `defaultIgnores` for `Merge …` / `Revert …` / `fixup!` / `squash!` messages).
12
- * Only `type-enum` is overridden.
9
+ * The config extends `@commitlint/config-conventional` and retains its
10
+ * non-empty type/subject defaults plus `defaultIgnores` for `Merge …` /
11
+ * `Revert …` / `fixup!` / `squash!` messages. It pins four rules explicitly so
12
+ * an upstream change cannot silently move the estate's gate:
13
+ *
14
+ * - `type-enum` — the estate's release-aligned types (A-823 / A-979).
15
+ * - `header-max-length` — 72 (Git's usual subject ceiling; A-1413).
16
+ * - `body-max-line-length` — 256 (A-1413).
17
+ * - `footer-max-line-length` — 256, so `BREAKING CHANGE:` sentences are not
18
+ * left trapped at config-conventional's 100 (A-1413).
19
+ *
20
+ * URL lines remain exempt via `@commitlint/ensure` (`/\bhttps?:\/\/\S+/`).
21
+ * There is no identity denylist.
13
22
  *
14
23
  * `type-enum` is set *explicitly* — even though the list currently mirrors
15
24
  * config-conventional's own default — so that an upstream change to
@@ -20,6 +29,9 @@
20
29
  const config = {
21
30
  extends: ["@commitlint/config-conventional"],
22
31
  rules: {
32
+ "body-max-line-length": [2, "always", 256],
33
+ "footer-max-line-length": [2, "always", 256],
34
+ "header-max-length": [2, "always", 72],
23
35
  "type-enum": [
24
36
  2, // error
25
37
  "always",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rheged-studio/commitlint-config",
3
- "version": "1.0.2",
3
+ "version": "2.0.0",
4
4
  "description": "Shared commitlint configuration for Rheged Studio packages.",
5
5
  "keywords": [
6
6
  "commitlint",