| title | Commitlint | |
|---|---|---|
| type | guide | |
| status | published | |
| summary | Enforce conventional commit messages | |
| related |
|
|
| locale | en-US |
Validates commit messages against the conventional format via Git hooks. Rules are centralized in @regardio/dev.
At the workspace root, create .commitlintrc.json:
{
"extends": ["@regardio/dev/commitlint"]
}Or use a JavaScript config:
// commitlint.config.cjs
module.exports = require('@regardio/dev/commitlint');<type>(<scope>): <subject>
[optional body]
[optional footer]
| Type | Description |
|---|---|
feat |
New feature |
fix |
Bug fix |
docs |
Documentation only |
style |
Formatting, no code change |
refactor |
Code change that neither fixes nor adds |
perf |
Performance improvement |
test |
Adding or updating tests |
build |
Build system or dependencies |
ci |
CI configuration |
chore |
Other changes (tooling, etc.) |
revert |
Revert a previous commit |
feat: add user authentication
fix: resolve login redirect loop
docs: update API documentation
refactor: simplify payment processing
test: add unit tests for date utilities
chore: update dependencies
feat(auth): implement OAuth2 flow
fix(api): handle null response gracefullyThe preset enforces:
- Header max length: 100 characters
- Body leading blank: Blank line before body
- Footer leading blank: Blank line before footer
- Type enum: Must be one of the allowed types
Commitlint runs automatically via Husky on commit. See Husky for setup.
Related documents:
- Commit Conventions — Conventional commits and changelog generation
- Husky — Git hooks for quality gates