Repository navigation
Expand file tree
/
Copy pathcommitlint.config.mjs
More file actions
63 lines (63 loc) · 1.57 KB
/
Copy pathcommitlint.config.mjs
File metadata and controls
63 lines (63 loc) · 1.57 KB
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
// commitlint.config.mjs — @commitlint/config-conventional + cospec overrides.
// See CONTRIBUTING.md "Commit format" for documentation on valid types and scopes.
// The 11 types are the same set cospec exposes as change schemas (`cospec new <type>`).
export default {
extends: ['@commitlint/config-conventional'],
plugins: [
{
rules: {
// A scope names an AREA the commit touches; it must never just repeat
// the type (e.g. `chore(chore):`), which carries no information.
'scope-not-type': ({ type, scope }) =>
scope === undefined || scope !== type
? [true]
: [false, `scope must not repeat the type '${type}' — omit the scope instead`],
},
},
],
rules: {
'type-enum': [
2,
'always',
[
'build',
'chore',
'ci',
'docs',
'feat',
'fix',
'perf',
'refactor',
'revert',
'style',
'test',
],
],
'scope-enum': [
2,
'always',
[
'cli',
'canon',
'schemas',
'harness',
'validate',
'apply',
'archive',
'eval',
'bench',
'docs',
'ci',
'deps',
'hooks',
'agents',
],
],
'scope-not-type': [2, 'always'],
'subject-max-length': [2, 'always', 72],
'subject-case': [2, 'never', ['sentence-case', 'start-case', 'pascal-case', 'upper-case']],
'subject-empty': [2, 'never'],
'type-empty': [2, 'never'],
'body-max-line-length': [2, 'always', 100],
},
}