-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommitlint.config.ts
More file actions
84 lines (69 loc) · 1.59 KB
/
Copy pathcommitlint.config.ts
File metadata and controls
84 lines (69 loc) · 1.59 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
import type { UserConfig } from '@commitlint/types'
const commitTypes = [
'feat',
'fix',
'refactor',
'test',
'docs',
'build',
'ci',
'chore',
'perf',
'style',
'revert',
'security',
'deps',
'release',
'wip',
'hotfix',
] as const
const commitScopes = [
'frontend',
'docs',
'devportal',
'core',
'db',
'api',
'ui',
'utils',
'config',
'flags',
'auth',
'user',
'discord',
'infra',
'cloudflare',
'nx-cloud',
'docker',
'ci',
'repo',
'deps',
'tooling',
] as const
const config: UserConfig = {
extends: ['@commitlint/config-conventional'],
// Ignore Git-generated merge and revert messages.
defaultIgnores: true,
rules: {
'type-enum': [2, 'always', [...commitTypes]],
'type-case': [2, 'always', 'lower-case'],
// A scope is optional. When present, it must be one of the approved scopes.
'scope-empty': [0],
'scope-enum': [2, 'always', [...commitScopes]],
'scope-case': [2, 'always', 'lower-case'],
// Allow lowercase or sentence-case subjects without fighting names,
// acronyms, product names, or technical terminology.
'subject-case': [0],
'subject-empty': [2, 'never'],
'subject-full-stop': [2, 'never', '.'],
'header-max-length': [2, 'always', 100],
// Bodies and footers are optional and have no length restriction.
'body-max-length': [0],
'body-max-line-length': [0],
'footer-max-length': [0],
'footer-max-line-length': [0],
// Support either `!` or a BREAKING CHANGE footer independently.
'breaking-change-exclamation-mark': [0],
},
}
export default config