generated from didikmulyadi/node-package-creator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommitlint.config.ts
74 lines (72 loc) · 2.25 KB
/
commitlint.config.ts
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
71
72
73
74
import { RuleConfigSeverity } from '@commitlint/types/'
/**
* CONFIG AND CI/CD CHANGES
* build: development changes, e.g. tsconfig.json
* ci: development changes, e.g. workflow file
*
* DOCUMENTATION CHANGES
* docs: documentation changes, e.g. readme file or adding a jsdoc
*
* PRODUCTION CHANGES
* feat: production changes - new feature
* fix: production changes - bug fix
* perf: production changes - improve performance
*
* DEVELOPMENT CHANGES
* refactor: development changes - neither adds a feature nor fixes a bug
* chore: development changes - the user cant see the changes, e.g. changes in gitignore
* style: development changes - pure styling changes
* test: development changes - affecting any tests
* feat: development changes - new code
* fix: development changes - fix bug issue in the existing code
* perf: development changes - improve performance
*/
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'body-leading-blank': [RuleConfigSeverity.Warning, 'always'],
'body-max-line-length': [RuleConfigSeverity.Error, 'always', 100],
'footer-leading-blank': [RuleConfigSeverity.Warning, 'always'],
'footer-max-line-length': [RuleConfigSeverity.Error, 'always', 100],
'header-max-length': [RuleConfigSeverity.Error, 'always', 100],
'scope-case': [RuleConfigSeverity.Error, 'always', 'lower-case'],
'scope-enum': [
RuleConfigSeverity.Error,
'always',
[
'page',
'shared-component',
'layout',
'redux',
'config',
'development-needs',
'readme',
],
],
'subject-case': [
RuleConfigSeverity.Error,
'never',
['sentence-case', 'start-case', 'pascal-case', 'upper-case'],
],
'subject-empty': [RuleConfigSeverity.Error, 'never'],
'subject-full-stop': [RuleConfigSeverity.Error, 'never', '.'],
'type-case': [RuleConfigSeverity.Error, 'always', 'lower-case'],
'type-empty': [RuleConfigSeverity.Error, 'never'],
'type-enum': [
RuleConfigSeverity.Error,
'always',
[
'build',
'ci',
'docs',
'feat',
'fix',
'perf',
'refactor',
'chore',
'style',
'test',
],
],
},
}