-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathcommitlint.config.js
More file actions
68 lines (57 loc) · 1.63 KB
/
Copy pathcommitlint.config.js
File metadata and controls
68 lines (57 loc) · 1.63 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
59
60
61
62
63
64
65
66
67
68
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'type-enum': [
2,
'always',
[
'feat', // new functionality
'fix', // bug fix
'docs', // documentation changes
'style', // formatting, missing semicolons etc.
'refactor', // code refactoring
'perf', // performance improvements
'test', // adding tests
'chore', // build process or auxiliary tool changes
'ci', // CI/CD changes
'build', // build system changes
'revert', // reverting changes
],
],
// Scope must be in lower case
'scope-case': [2, 'always', 'lower-case'],
// Scope is optional, but if present - must be from the list
'scope-enum': [
2,
'always',
[
// Projects
'core',
'demos',
'cdk-interop',
'docs',
// Release
'release',
],
],
// Subject must be in lower case
'subject-case': [2, 'always', 'lower-case'],
// Subject should not end with a period
'subject-full-stop': [2, 'never', '.'],
// Maximum length of the entire message
'header-max-length': [2, 'always', 100],
// Minimum length of the subject
'subject-min-length': [2, 'always', 3],
// Maximum line length in body
'body-max-line-length': [2, 'always', 100],
// Maximum line length in footer
'footer-max-line-length': [2, 'always', 100],
},
// Ignore certain commits
ignores: [
commit => commit.includes('WIP'),
commit => commit.includes('wip'),
commit => commit.includes('Merge'),
commit => commit.includes('merge'),
],
};