-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommitlint.config.js
60 lines (58 loc) · 1.46 KB
/
commitlint.config.js
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
// commitlint.config.js
const scopes = [
'app',
'infrastructure',
'ui',
'ci',
'docs',
'test',
'documentation',
].map(name => ({
name,
}));
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'type-enum': [
2,
'always',
[
'feat',
'fix',
'style',
'refactor',
'perf',
'test',
'chore',
'revert',
'release',
],
],
'subject-case': [0], // Allow any case for the subject
},
types: [
{ value: 'feat', name: 'feat:\tAdding a new feature' },
{ value: 'fix', name: 'fix:\tFixing a bug' },
{ value: 'style', name: 'style: Add or update styles' },
{
value: 'refactor',
name: 'refactor:\tCode change that neither fixes a bug nor adds a feature',
},
{ value: 'perf', name: 'perf:\tCode change that improves performance' },
{ value: 'test', name: 'test:\tAdding test cases / adds missing tests' },
{
value: 'chore',
name: 'chore:\tChanges to the build process or auxiliary tools and libraries such as documentation generation',
},
{ value: 'revert', name: 'revert:\tRevert to a commit' },
{ value: 'release', name: 'release:\tRelease a new version (e.g., 0.0.2)' },
],
scopes,
scopeOverrides: {
chore: [...scopes, { name: 'release' }],
},
allowCustomScopes: true,
allowBreakingChanges: ['feat', 'fix', 'perf', 'refactor'],
subjectLimit: 100,
skipQuestions: ['body'],
};