Skip to content

docs(config-conventional): document rules that go beyond the spec - #4910

Merged
escapedcat merged 1 commit into
masterfrom
docs/config-conventional-beyond-spec
Aug 13, 2026
Merged

escapedcat merged 1 commit into
masterfrom
docs/config-conventional-beyond-spec

Conversation

@escapedcat

@escapedcat escapedcat commented Jul 26, 2026 •

Copy link
Copy Markdown
Member

Description

Adds a short "Beyond the specification" section to the @commitlint/config-conventional README, between "Getting started" and "Rules". It states which rules are stylistic additions on top of the Conventional Commits specification (header-max-length, body-max-line-length, footer-max-line-length, type-enum, type-case, subject-case, subject-full-stop), where they come from (the Angular commit convention commitlint originates from, see #303 / #436), notes that body and footer lines containing URLs are exempt from the line-length rules (#4486, since v20) — header-max-length has no URL exemption — and shows how to override the rules for a spec-only setup.

Motivation and Context

Suggestion for #4908, which points out that the body/footer line-length defaults are not part of the Conventional Commits specification. The limits are an intentional design decision dating back to #303 and #436, but the README currently only says "enforcing conventional commits" without mentioning the additional house style. Documenting the difference was one of the outcomes proposed in the issue.

The framing "these rules narrow the specification — they do not conflict with it" is deliberate: every rule only rejects some spec-valid messages, none demands anything spec-invalid.

Usage examples

Not applicable — documentation only. The override snippet added to the README:

export default {
	extends: ["@commitlint/config-conventional"],
	rules: {
		"body-max-line-length": [0],
		"footer-max-line-length": [0],
	},
};

How Has This Been Tested?

Every claim in the section was verified against the built workspace CLI, each exemption paired with a control proving the rule fires:

  • header >100 chars containing a URL — fails (header-max-length has no URL exemption)
  • body and footer lines >100 chars containing a URL — pass (URL exemption); the same lines without a URL — fail
  • sentence-case, start-case, pascal-case and upper-case subjects — all fail; a lower-case subject passes
  • a long plain body with the README override snippet — passes

README formatted with oxfmt via lint-staged.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Documentation only.

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have verified that any documentation examples I added/changed actually work.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • For a feature/bug fix, my commits follow the test-driven flow: a failing-test commit, then the implementation.

🤖 Generated with Claude Code

@greptile-apps

greptile-apps Bot commented Aug 13, 2026 •

Copy link
Copy Markdown

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
@commitlint/config-conventional/README.md The documentation now accurately scopes URL exemptions and enumerates the subject-case restrictions, resolving both previous findings.

Reviews (2): Last reviewed commit: "docs(config-conventional): document rule..." | Re-trigger Greptile

Clarify which rules are stylistic additions on top of the Conventional
Commits specification, why they exist, and how to opt out.

Refs #4908

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@escapedcat
escapedcat force-pushed the docs/config-conventional-beyond-spec branch from c331159 to 46ad880 Compare August 13, 2026 09:18
@escapedcat
escapedcat added this pull request to the merge queue Aug 13, 2026
Merged via the queue into master with commit 3146d04 Aug 13, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant