-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathcommitlint.config.cjs
More file actions
26 lines (21 loc) · 845 Bytes
/
commitlint.config.cjs
File metadata and controls
26 lines (21 loc) · 845 Bytes
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
// Header must follow the pattern: type(scope?): subject (e.g., 'feat(parser): add new feature')
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
// Enforce type to be one of the specified types
'type-enum': [
2,
'always',
['feat', 'fix', 'docs', 'style', 'refactor', 'perf', 'test', 'chore'],
],
// Scope is optional and can be any case (uppercase, lowercase, or Chinese)
'scope-case': [0],
// Subject can include uppercase, lowercase, or Chinese
// Setting to 0 disables the lowercase enforcement
'subject-case': [0],
// Subject must be at least 5 characters long (since Chinese takes fewer characters)
'subject-min-length': [2, 'always', 5],
// Enforce maximum header length of 100 characters
'header-max-length': [2, 'always', 100],
},
};