1
- module . exports = {
1
+ import {
2
+ RuleConfigCondition ,
3
+ RuleConfigSeverity ,
4
+ TargetCaseType ,
5
+ } from '@commitlint/types' ;
6
+
7
+ export const config = {
2
8
parserPreset : 'conventional-changelog-conventionalcommits' ,
3
9
rules : {
4
- 'body-leading-blank' : [ 1 , 'always' ] ,
5
- 'body-max-line-length' : [ 2 , 'always' , 100 ] ,
6
- 'footer-leading-blank' : [ 1 , 'always' ] ,
7
- 'footer-max-line-length' : [ 2 , 'always' , 100 ] ,
8
- 'header-max-length' : [ 2 , 'always' , 100 ] ,
9
- 'header-trim' : [ 2 , 'always' ] ,
10
+ 'body-leading-blank' : [ RuleConfigSeverity . Warning , 'always' ] as const ,
11
+ 'body-max-line-length' : [ RuleConfigSeverity . Error , 'always' , 100 ] as const ,
12
+ 'footer-leading-blank' : [ RuleConfigSeverity . Warning , 'always' ] as const ,
13
+ 'footer-max-line-length' : [
14
+ RuleConfigSeverity . Error ,
15
+ 'always' ,
16
+ 100 ,
17
+ ] as const ,
18
+ 'header-max-length' : [ RuleConfigSeverity . Error , 'always' , 100 ] as const ,
19
+ 'header-trim' : [ RuleConfigSeverity . Error , 'always' ] as const ,
10
20
'subject-case' : [
11
- 2 ,
21
+ RuleConfigSeverity . Error ,
12
22
'never' ,
13
23
[ 'sentence-case' , 'start-case' , 'pascal-case' , 'upper-case' ] ,
14
- ] ,
15
- 'subject-empty' : [ 2 , 'never' ] ,
16
- 'subject-full-stop' : [ 2 , 'never' , '.' ] ,
17
- 'type-case' : [ 2 , 'always' , 'lower-case' ] ,
18
- 'type-empty' : [ 2 , 'never' ] ,
24
+ ] as [ RuleConfigSeverity , RuleConfigCondition , TargetCaseType [ ] ] ,
25
+ 'subject-empty' : [ RuleConfigSeverity . Error , 'never' ] as const ,
26
+ 'subject-full-stop' : [ RuleConfigSeverity . Error , 'never' , '.' ] as const ,
27
+ 'type-case' : [ RuleConfigSeverity . Error , 'always' , 'lower-case' ] as const ,
28
+ 'type-empty' : [ RuleConfigSeverity . Error , 'never' ] as const ,
19
29
'type-enum' : [
20
- 2 ,
30
+ RuleConfigSeverity . Error ,
21
31
'always' ,
22
32
[
23
33
'build' ,
@@ -32,7 +42,7 @@ module.exports = {
32
42
'style' ,
33
43
'test' ,
34
44
] ,
35
- ] ,
45
+ ] as [ RuleConfigSeverity , RuleConfigCondition , string [ ] ] ,
36
46
} ,
37
47
prompt : {
38
48
questions : {
0 commit comments