-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommitlint.config.js
33 lines (32 loc) · 1.09 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
const ERROR = 2
const ALWAYS = 'always'
const NEVER = 'never'
/**
* @type {import('@commitlint/types').UserConfig}
*/
export default {
rules: {
'body-leading-blank': [ERROR, ALWAYS],
'body-max-line-length': [ERROR, ALWAYS, 96],
'footer-leading-blank': [ERROR, ALWAYS],
'footer-max-line-length': [ERROR, ALWAYS, 96],
/**
* GitHub hides text beyond this length with an ellipsis
*/
'header-max-length': [ERROR, ALWAYS, 72],
'subject-case': [ERROR, ALWAYS, ['lower-case', 'kebab-case', 'snake-case']],
'subject-empty': [ERROR, NEVER],
'subject-full-stop': [ERROR, NEVER, '.'],
'type-empty': [ERROR, NEVER],
/**
* Semver commit type convention
*
* M (MAJOR) => Incompatible change
* m (MINOR) => Backward compatible feature
* p (PATCH) => Backward compatible bug fix
* r (REVISION/REFACTOR) => Backward compatible improvement
* x (MISCELLANEOUS) => Neutral change (documentation, ci/cd, dev dependencies, etc.)
*/
'type-enum': [ERROR, ALWAYS, ['M', 'm', 'p', 'r', 'x']]
}
}