-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommitlint.config.ts
More file actions
35 lines (33 loc) · 908 Bytes
/
Copy pathcommitlint.config.ts
File metadata and controls
35 lines (33 loc) · 908 Bytes
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
import type { UserConfig } from '@commitlint/types'
const config: UserConfig = {
// ref: https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional
// ref: https://www.conventionalcommits.org/en/v1.0.0/#summary
extends: ['@commitlint/config-conventional'],
// [Question] how to extend and override config-conventional settings:
// https://github.com/conventional-changelog/commitlint/issues/2232
parserPreset: {
parserOpts: {
headerPattern: /^(?:([^\w\s]{1,2})\s+)?(\w+)(?:\((.*)\))?: (.*)$/,
headerCorrespondence: ['emoji', 'type', 'scope', 'subject'],
},
},
rules: {
'type-enum': [
2,
'always',
[
'feat',
'fix',
'docs',
'style',
'refactor',
'perf',
'test',
'build',
'ci',
'chore',
],
],
},
}
export default config