-
-
Notifications
You must be signed in to change notification settings - Fork 108
Expand file tree
/
Copy pathcommitlint.config.js
More file actions
58 lines (58 loc) · 1.51 KB
/
commitlint.config.js
File metadata and controls
58 lines (58 loc) · 1.51 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/**
* Commitlint configuration for conventional commits.
*
* Valid types: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert
*
* Examples:
* feat: add route model binding
* fix(model): correct association eager loading
* docs: update migration guide
* ci: add commit message validation to PR workflow
*/
export default {
extends: ['@commitlint/config-conventional'],
rules: {
// Wheels-specific scope allowlist (optional — empty means all scopes allowed)
'scope-enum': [
2,
'always',
[
'model',
'controller',
'view',
'router',
'middleware',
'migration',
'cli',
'test',
'config',
'di',
'job',
'mailer',
'plugin',
'sse',
'seed',
'docs',
// Static-site monorepo under web/ (wheels.dev sites)
'web',
'web/ui',
'web/landing',
'web/blog',
'web/guides',
'web/api',
'web/starlight'
]
],
// Allow empty scope (scope is optional)
'scope-empty': [0, 'never'],
// Subject must not be empty
'subject-empty': [2, 'never'],
// Type must not be empty
'type-empty': [2, 'never'],
// Max header length
'header-max-length': [2, 'always', 100],
// Allow sentence-case, pascal-case, start-case subjects (for proper nouns like
// "Giscus", "Buttondown", "CockroachDB"). Only reject ALL-CAPS ("SHOUTING").
'subject-case': [2, 'never', ['upper-case']]
}
};