-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommitlint.config.js
30 lines (29 loc) · 946 Bytes
/
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
module.exports = {
extends: ['@commitlint/config-conventional'],
// https://github.com/conventional-changelog/commitlint/issues/817
parserOpts: {
headerPattern: /^.*$/,
headerCorrespondence: ['scope'],
},
// type(scope?): subject #scope is optional; multiple scopes are supported (current delimiter options: "/", "\" and ",")
rules: {
'type-enum': [2, 'always', ['fix', 'feature', 'style', 'setup', 'perf', 'refactor', 'doc', 'test']],
'subject-case': [
1,
'always',
[
'lower-case', // default
'upper-case', // UPPERCASE
'camel-case', // camelCase
'kebab-case', // kebab-case
'pascal-case', // PascalCase
'sentence-case', // Sentence case
'snake-case', // snake_case
'start-case', // Start Case
],
],
'subject-max-length': [1, 'always', 50],
// if we want to enforce a body
// 'body-empty': [1, 'never'],
},
}