chore: use commitlint to standardize the commit messages#902
chore: use commitlint to standardize the commit messages#902kalu5 wants to merge 1 commit intonpmx-dev:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
📝 WalkthroughWalkthroughA new commitlint configuration file is introduced to enforce commit message standards. The configuration specifies rules for commit type enumeration, scope maximum length of 20 characters, lowercase subject formatting, and subject maximum length of 72 characters. Three commitlint packages are added as development dependencies. A commit-msg git hook is configured to run commitlint during the commit process, alongside the existing pre-commit hook. 🚥 Pre-merge checks | ✅ 1✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Important Action Needed: IP Allowlist UpdateIf your organization protects your Git platform with IP whitelisting, please add the new CodeRabbit IP address to your allowlist:
Reviews will stop working after February 8, 2026 if the new IP is not added to your allowlist. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
commitlint.config.ts (1)
7-11: Consider adding theperfcommit type.The
perftype (for performance improvements) is part of the conventional commits specification and commonly used alongside the types you've included. Its omission may cause commits likeperf: optimise database queriesto be rejected.💡 Suggested addition
'type-enum': [ RuleConfigSeverity.Error, 'always', - ['feat', 'fix', 'docs', 'style', 'refactor', 'test', 'chore', 'revert', 'ci', 'build'], + ['feat', 'fix', 'docs', 'style', 'refactor', 'perf', 'test', 'chore', 'revert', 'ci', 'build'], ],
| "@commitlint/cli": "20.4.1", | ||
| "@commitlint/config-conventional": "20.4.1", | ||
| "@commitlint/types": "20.4.0", |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
cat -n package.json | sed -n '100,110p'Repository: npmx-dev/npmx.dev
Length of output: 458
🌐 Web query:
@commitlint/types latest version npm package compatibility commitlint 20.4.1
💡 Result:
- Latest
@commitlint/typeson npm:20.3.1(published Jan 2026 per package indexes). [1] - Compatibility with
commitlint@20.4.1: I can’t find any evidence thatcommitlint@20.4.1is published on npm (current publishedcommitlintI can verify is20.3.1). [2] - What to install / align to: commitlint packages are meant to stay on the same major and typically the same minor/patch; for example,
@commitlint/load@20.3.1depends on@commitlint/typesas^20.3.1(so any20.xsatisfying that range works, but the intended pairing is20.3.1). [3]
Recommendation: if you’re installing from npm, use @commitlint/types@^20.3.1 (or just let it be a transitive dependency via @commitlint/cli). If you truly have commitlint@20.4.1 (e.g., from a fork/tag), you’ll want the matching @commitlint/types@20.4.1—but that version doesn’t appear to be published on npm right now. [1][2]
References:
[1] Socket package index for @commitlint/types (shows latest 20.3.1). (socket.dev)
[2] jsDocs.io package page for commitlint (shows published version 20.3.1). (jsdocs.io)
[3] UNPKG @commitlint/load@20.3.1 package.json (depends on @commitlint/types: ^20.3.1). (app.unpkg.com)
Citations:
- 1: https://socket.dev/npm/package/%40commitlint/types?utm_source=openai
- 2: https://www.jsdocs.io/package/commitlint?utm_source=openai
- 3: https://app.unpkg.com/%40commitlint/load%4020.3.1/files/package.json?utm_source=openai
Commitlint package versions don't exist on npm.
The specified versions (@commitlint/cli@20.4.1, @commitlint/config-conventional@20.4.1, @commitlint/types@20.4.0) do not appear to be published on npm. The latest published versions are 20.3.1 across all commitlint packages. These dependencies will fail to install.
Update to:
"@commitlint/cli": "20.3.1",
"@commitlint/config-conventional": "20.3.1",
"@commitlint/types": "20.3.1",
|
because we squash prs, really it's only the pr title that needs to match, and we already have a test for that in ci I think this would add too much friction thank you though 🙏 |
Ok, I just think it's a bit troublesome to modify the title after the CI fails when there is non - standard submission information. It's also good to maintain a higher degree of flexibility. |
Use commitlint to standardize the commit messages .
Avoid CI failures and repeated modifications of commit messages and PR titles