Skip to content

commit-lint: bespoke subject-case rejects proper nouns, fails after squash merge #186

Description

@0xKT

Problem

The commitlint config uses a bespoke subject-case: [2, "always", ["lower-case"]]
rule that forces the whole subject to lower-case and rejects proper nouns /
acronyms (EverOS, HTTP, API, WhatsApp).

Since the repo squash-merges and uses the PR title as the squash commit subject,
a title like feat(importer): ... with EverOS HTTP backend passes the pre-merge
PR-title check but fails commit-lint on the squash commit once it lands on main
(push event) -- i.e. "passes the PR, fails after merge".

Concrete occurrence: PR #170's squash commit failed the commit messages job
with subject must be lower-case [subject-case].

Root cause

The always lower-case value deviates from the Conventional Commits standard.
@commitlint/config-conventional uses
subject-case: [2, "never", ["sentence-case", "start-case", "pascal-case", "upper-case"]],
which forbids Title Case / ALL CAPS / Sentence case but allows lower-case
subjects with mid-sentence proper nouns.

Fix

Switch the single subject-case line in commitlint.config.cjs to the standard
value. Deliberately NOT extends: @commitlint/config-conventional, to avoid
pulling in body-max-line-length / footer-max-line-length (100, error), which
would newly reject long PR-description lines on the squash body. All other rules
unchanged.

Out of scope

A separate, pre-existing length inconsistency (PR-title subject length vs the
72-char commit-subject check applied to the squash commit) is not addressed here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions