-
Notifications
You must be signed in to change notification settings - Fork 1
/
.commitlint.js
59 lines (56 loc) · 929 Bytes
/
.commitlint.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
'use strict'
const cz = require('./.cz-config')
const level = {
warning: 1,
error: 2,
}
module.exports = {
rules: {
'body-leading-blank': [
level.error,
'always'
],
'footer-leading-blank': [
level.error,
'always'
],
'header-max-length': [
level.error,
'always',
cz.subjectLimit
],
'scope-case': [
level.error,
'always',
'kebab-case'
],
'scope-enum': [
level.warning,
'always',
cz.scopes.map(type => type.name)
],
'subject-empty':
[level.error,
'never'
],
'subject-full-stop': [
level.error,
'never',
'.'
],
'type-case': [
level.error,
'always',
'lower-case'
],
'type-empty': [
level.error,
'never'
],
'type-enum': [
level.error,
'always',
cz.types.map(type => type.value)
]
}
}