forked from camunda/camunda
-
Notifications
You must be signed in to change notification settings - Fork 0
/
commitlint.config.cjs
70 lines (65 loc) · 3.16 KB
/
commitlint.config.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
module.exports = {
extends: ['@commitlint/config-conventional'],
helpUrl: 'https://github.com/camunda/camunda/blob/main/CONTRIBUTING.md/#commit-message-guidelines',
// Rules are made up by a name and a configuration array. The configuration array contains:
// - Level [0..2]: 0 disables the rule. For 1 it will be considered a warning for 2 an error.
// - Applicable always|never: never inverts the rule.
// - Value: value to use for this rule.
rules: {
// error rules
'body-max-line-length': [2, 'always', 120],
'header-max-length': [2, 'always', 120],
'type-case': [2, 'always', 'lower-case'],
'type-empty': [2, 'never'],
'type-enum': [
2,
'always',
[
`build`, // Changes that affect the build system (e.g. Maven, Docker, etc)
`ci`, // Changes to our CI configuration files and scripts (e.g. GitHub Actions, etc)
`deps`, // A change to the external dependencies (was already used by Dependabot)
`docs`, // A change to the documentation
`feat`, // A new feature (both internal or user-facing)
`fix`, // A bug fix (both internal or user-facing)
'merge', // Merges one or multiple commits
`perf`, // A code change that improves performance
`refactor`, // A code change that does not change the behavior
'revert', // Reverts any change
`style`, // A change to align the code with our style guide
`test`, // Adding missing tests or correcting existing tests
],
],
'scope-empty': [2, 'always'],
// warning rules
// disabled rules
'body-full-stop': [0, 'never', '.'],
'body-leading-blank': [0, 'always'],
'body-empty': [0, 'never'],
'body-max-length': [0, 'always', Infinity],
'body-min-length': [0, 'always', 0],
'body-case': [0, 'always', 'lower-case'],
'footer-leading-blank': [0, 'always'],
'footer-empty': [0, 'never'],
'footer-max-length': [0, 'always', Infinity],
'footer-max-line-length': [0, 'always', 100],
'footer-min-length': [0, 'always', 0],
'header-case': [0, 'always', 'lower-case'],
'header-full-stop': [0, 'never', '.'],
'header-min-length': [0, 'always', 0],
'references-empty': [0, 'never'],
'scope-enum': [0, 'always', []],
'scope-case': [0, 'always', 'lower-case'],
'scope-max-length': [0, 'always', Infinity],
'scope-min-length': [0, 'always', 0],
'subject-case': [0, 'never', ['sentence-case', 'start-case', 'pascal-case', 'upper-case']],
'subject-empty': [0, 'never'],
'subject-full-stop': [0, 'never', '.'],
'subject-max-length': [0, 'always', Infinity],
'subject-min-length': [0, 'always', 0],
'subject-exclamation-mark': [0, 'never'],
'type-max-length': [0, 'always', Infinity],
'type-min-length': [0, 'always', 0],
'signed-off-by': [0, 'always', 'Signed-off-by:'],
'trailer-exists': [0, 'always', 'Signed-off-by:'],
},
};