-
Notifications
You must be signed in to change notification settings - Fork 1
/
.commitlintrc.cjs
74 lines (73 loc) · 1.74 KB
/
.commitlintrc.cjs
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/**
* Commit Lint
*
* Rules are made up by a name and a configuration array.
* The configuration array contains:
* 1. Level: | [0..2] | 0 = disables | 1 = considered a warning | 2 an error for the rule.
* 2. Applicable: | always/never | never inverts the rule.
* 3. Value: | value to use for this rule.
*
* @link https://github.com/marionebl/commitlint/blob/master/docs/reference-rules.md
*/
module.exports = {
extends: ['@commitlint/config-conventional'],
parserPreset: {
parserOpts: {
headerPattern: /^:[a-z_]*: (\w*)(?:\((.*)\))?!?: (.*)$/,
breakingHeaderPattern: /^:boom: (\w*)(?:\((.*)\))?!: (.*)$/,
headerCorrespondence: [
'type',
'scope',
'subject'
],
noteKeywords: ['BREAKING CHANGE'],
revertPattern: /^:wastebasket: (?:revert:)\s"?([\s\S]+?)"?\s*This reverts commit (\w*)\./i,
revertCorrespondence: ['header', 'hash'],
issuePrefixes: ['#']
}
},
rules: {
'header-max-length': [2, 'always', 79],
'type-empty': [2, 'never'],
'type-case': [2, 'always', 'lower-case'],
'type-enum': [2, 'always',
[
'a11y',
'bug',
'chore',
'cleaning',
'config',
'deps',
'deprecate',
'docs',
'experiment',
'feat',
'fix',
'i18n',
'idea',
'initial',
'license',
'merge',
'perf',
'progress',
'refactor',
'release',
'revert',
'security',
'test',
'trash',
'typo',
'ui',
'ux'
]
],
'scope-case': [0, 'always', 'lower-case'],
'subject-case': [2, 'always', 'sentence-case'],
'subject-empty': [2, 'never'],
'subject-full-stop': [2, 'always', '.'],
'body-full-stop': [2, 'always', '.'],
'body-leading-blank': [2, 'always'],
'body-empty': [0, 'never'],
'footer-leading-blank': [2, 'always']
}
};