This document explains the commitlint configuration in .commitlintrc.json.
- Uses
@commitlint/config-conventionalas the base configuration - Provides standard conventional commit rules
- Format:
[level, condition, value] - Level:
2(Error - will fail commit if violated) - Condition:
"always"(Rule is always enforced)
| Type | Description |
|---|---|
feat |
New features or functionality |
fix |
Bug fixes |
docs |
Documentation changes |
style |
Code style changes (formatting, missing semicolons, etc.) |
refactor |
Code refactoring without changing functionality |
perf |
Performance improvements |
test |
Adding or updating tests |
build |
Build system or dependency changes |
ci |
CI/CD configuration changes |
chore |
Maintenance tasks |
revert |
Reverts a previous commit |
hotfix |
Critical fixes for production (custom addition) |
0= Disabled1= Warning (won't fail commit)2= Error (will fail commit)
"always"= Rule must be satisfied"never"= Rule must not be satisfied
{
"scope-enum": [2, "always", ["admin", "hackathon", "user", "auth", "ui", "shared", "api", "core"]],
"subject-case": [2, "always", "lower-case"],
"subject-max-length": [2, "always", 50],
"header-max-length": [2, "always", 72],
"body-leading-blank": [2, "always"],
"footer-leading-blank": [2, "always"]
}feat(auth): add login functionalityfix(ui): resolve button alignment issuehotfix(api): fix critical security vulnerabilitydocs: update API documentation
update stuff(invalid type)feature: new login(should befeat)Fix: button issue(type should be lowercase)
.commitlintrc.json- Main configuration