-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcommitlint.config.js
More file actions
38 lines (37 loc) · 1.26 KB
/
commitlint.config.js
File metadata and controls
38 lines (37 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Commitlint configuration
// Enforces Conventional Commits: https://www.conventionalcommits.org/
// Format: <type>(<scope>): <subject>
export default {
extends: ["@commitlint/config-conventional"],
rules: {
// Types allowed (matching CONTRIBUTING.md)
"type-enum": [
2,
"always",
[
"feat", // New feature
"fix", // Bug fix
"docs", // Documentation changes
"style", // Code style changes (formatting, etc.)
"refactor", // Code changes that neither fix bugs nor add features
"perf", // Performance improvements
"test", // Adding or modifying tests
"build", // Build system or external dependencies
"ci", // CI/CD configuration
"chore", // Maintenance tasks
"revert", // Revert a previous commit
],
],
// Scope is optional but encouraged
"scope-case": [2, "always", "kebab-case"],
// Subject requirements
"subject-case": [2, "always", "lower-case"],
"subject-empty": [2, "never"],
"subject-full-stop": [2, "never", "."],
// Header max length (type + scope + subject)
"header-max-length": [2, "always", 100],
// Body and footer are optional
"body-leading-blank": [2, "always"],
"footer-leading-blank": [2, "always"],
},
};