subject-case rule breaks ConventionalCommits spec
See original GitHub issue@commitlint/config-conventional subject-case rule breaks ConventionalCommits spec
Expected Behavior
From https://www.conventionalcommits.org/en/v1.0.0/#specification
- The units of information that make up Conventional Commits MUST NOT be treated as case sensitive by implementors, with the exception of BREAKING CHANGE which MUST be uppercase.
Current Behavior
⧗ input: fix: Gitlab CI pipeline fixed
See the TP for details
Refs #131167
✖ subject must not be sentence-case, start-case, pascal-case, upper-case [subject-case]
✖ found 1 problems, 0 warnings
ⓘ Get help: https://github.com/conventional-changelog/commitlint/#what-is-commitlint
Affected packages
- commitlint
Possible Solution
Remove the casing rule
Issue Analytics
- State:
- Created 3 years ago
- Reactions:15
- Comments:15 (1 by maintainers)
Top Results From Across the Web
Conventional Commits
The Conventional Commits specification is a lightweight convention on top of commit messages. It provides an easy set of rules for creating an...
Read more >Conventional Commit And Commit Linting | Fullstack Master
The Conventional Commits specification is a lightweight convention on top of commit messages. It provides an easy set of rules for creating an...
Read more >@commitlint/config-conventional - npm
The following rules are considered problems for @commitlint/config-conventional and will yield a non-zero exit code when not met. Consult docs/ ...
Read more >commitlint/config-conventional - npm.io
Shareable commitlint config enforcing conventional commits. ... has a message that is way too long and will break the line rule 'line-max-length' by...
Read more >Conventional Git Commit Messages and Linting - HackMD
Do you want to follow Conventional Commits and want to enforce a rule such that your ... Commit message with scope, description and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Well, from my POV @commitlint/config-conventional was from the start about setting up rules conforming to the standard. So when it does not, I see it as a bug and any change to make it conform does not break the original contract. Which strictly speaking means also removing the
type-enum
rule. I can understand your dilemma but there are many configs available and if one wanted an opinionated one, he could have chosen so. Here you have taken one that refers itself to a standard and made it opinionated.I tend to disagree. I see your point but raise that with the spec itself. All implementors are expected to conform to it. Otherwise problems arise in heterogenous environments. That’s in fact how we arrived here. One tool in one part of the system would be ok with
fix(button): Changed color
and another tool (this one) would not. Now you have to start matching configuration of multiple tools that only sort of conform to a standard.At least make the casing rules opt-in instead of opt-out.
As for consistency, the spec itself argues for consistency but does not presume what that should be. https://www.conventionalcommits.org/en/v1.0.0/#are-the-types-in-the-commit-title-uppercase-or-lowercase
There is a more demanding solution. You could pickup the preferred style from the commits themselves and make them self-consistent on contrary to all lower-case. I can imagine the inconsistencies, in type and scope in particular, could cause trouble down the line if other plugins/tool are not case-insensitive, e.g. release notes generators.