Skip to content

[FEAT] Add Commitlint #87

@binit2-1

Description

@binit2-1

Is your feature request related to a problem? Please describe.
Our git history is becoming messy with unclear commit messages like "fix", "wip", or "update code". This makes it difficult to generate changelogs, debug regressions, or understand the history of changes.

Describe the solution you'd like
I want to implement Commitlint to enforce Conventional Commits.

  • The build should fail locally (via Husky) if a developer attempts to commit with a non-compliant message.
  • Allowed types should include: feat, fix, docs, style, refactor, test, chore.

Describe alternatives you've considered

  • Enforcing it only in CI (bad developer experience; they find out too late).
  • Manual review of commit messages (inefficient and prone to slipping through).

Additional context

  • This relies on the Husky integration being set up first.
  • We should use the standard @commitlint/config-conventional.

✅ Proof of Work

  • Install packages: npm install --save-dev @commitlint/{config-conventional,cli}
  • Create commitlint.config.js in root.
  • Add hook: .husky/commit-msg.
  • Verify: git commit -m "bad message" should fail. git commit -m "feat: valid message" should pass.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions