-
Notifications
You must be signed in to change notification settings - Fork 12
/
commitlint.config.js
45 lines (41 loc) · 1000 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
const commonScopes = [
'create-artifact-worker',
'deployments',
'deviceauth',
'deviceconfig',
'deviceconnect',
'inventory',
'iot-manager',
'reporting',
'useradm',
'workflows',
'gui',
null
];
module.exports = {
extends: ['@commitlint/config-conventional'],
plugins: ['selective-scope'],
rules: {
'body-max-line-length': [1, 'always', 100],
'selective-scope': [
2,
'always',
{
feat: commonScopes,
fix: commonScopes,
test: commonScopes,
perf: [], // scope is not allowed
ci: [] // scope is not allowed
}
],
'subject-case': [1, 'always', ['lower-case', 'sentence-case']],
},
helpUrl: `
Commit messages must follow conventional commit format:
https://www.conventionalcommits.org/en/v1.0.0/#summary
type(optional-scope): subject
[optional body]
* To bypass pre-commit hooks run 'git commit --no-verify'
>>> Use "npm run commit" for interactive prompt. <<<
`
};