Skip to content

chore: use commitlint to standardize the commit messages#902

Closed
kalu5 wants to merge 1 commit intonpmx-dev:mainfrom
kalu5:feat/commitlint
Closed

chore: use commitlint to standardize the commit messages#902
kalu5 wants to merge 1 commit intonpmx-dev:mainfrom
kalu5:feat/commitlint

Conversation

@kalu5
Copy link
Copy Markdown
Contributor

@kalu5 kalu5 commented Feb 4, 2026

Use commitlint to standardize the commit messages .
Avoid CI failures and repeated modifications of commit messages and PR titles

@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs.npmx.dev Error Error Feb 4, 2026 3:25am
npmx.dev Ready Ready Preview, Comment Feb 4, 2026 3:25am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
npmx-lunaria Ignored Ignored Feb 4, 2026 3:25am

Request Review

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 4, 2026

📝 Walkthrough

Walkthrough

A 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)
Check name Status Explanation
Description check ✅ Passed The pull request description clearly relates to the changeset, explaining the intent to standardize commit messages using commitlint.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Important

Action Needed: IP Allowlist Update

If your organization protects your Git platform with IP whitelisting, please add the new CodeRabbit IP address to your allowlist:

  • 136.113.208.247/32 (new)
  • 34.170.211.100/32
  • 35.222.179.152/32

Reviews will stop working after February 8, 2026 if the new IP is not added to your allowlist.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
commitlint.config.ts (1)

7-11: Consider adding the perf commit type.

The perf type (for performance improvements) is part of the conventional commits specification and commonly used alongside the types you've included. Its omission may cause commits like perf: optimise database queries to 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'],
     ],

Comment thread package.json
Comment on lines +104 to +106
"@commitlint/cli": "20.4.1",
"@commitlint/config-conventional": "20.4.1",
"@commitlint/types": "20.4.0",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 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/types on npm: 20.3.1 (published Jan 2026 per package indexes). [1]
  • Compatibility with commitlint@20.4.1: I can’t find any evidence that commitlint@20.4.1 is published on npm (current published commitlint I can verify is 20.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.1 depends on @commitlint/types as ^20.3.1 (so any 20.x satisfying that range works, but the intended pairing is 20.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:


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",

@danielroe
Copy link
Copy Markdown
Member

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 🙏

@danielroe danielroe closed this Feb 4, 2026
@kalu5
Copy link
Copy Markdown
Contributor Author

kalu5 commented Feb 4, 2026

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants