-
Notifications
You must be signed in to change notification settings - Fork 0
/
commitlint.config.ts
46 lines (45 loc) · 1.66 KB
/
commitlint.config.ts
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
import { RuleConfigCondition, RuleConfigSeverity, TargetCaseType } from '@commitlint/types'
export default {
extends: ['gitmoji'],
parserPreset: 'gitmoji-parser-opts',
rules: {
'body-leading-blank': [RuleConfigSeverity.Warning, 'always'] as const,
// not setting any max-line-length since we are writing release-notes
// in our chore(release) commit messages. @see release.config.ts '@semantic-release/git' configurations.
// 'body-max-line-length': [RuleConfigSeverity.Error, 'always', 100] as const,
'footer-leading-blank': [RuleConfigSeverity.Warning, 'always'] as const,
// 'footer-max-line-length': [
// RuleConfigSeverity.Error,
// 'always',
// 100,
// ] as const,
'header-max-length': [RuleConfigSeverity.Error, 'always', 200] as const,
'header-trim': [RuleConfigSeverity.Error, 'always'] as const,
'subject-case': [
RuleConfigSeverity.Error,
'never',
['sentence-case', 'start-case', 'pascal-case', 'upper-case'],
] as [RuleConfigSeverity, RuleConfigCondition, TargetCaseType[]],
'subject-empty': [RuleConfigSeverity.Error, 'never'] as const,
'subject-full-stop': [RuleConfigSeverity.Error, 'never', '.'] as const,
'type-case': [RuleConfigSeverity.Error, 'always', 'lower-case'] as const,
'type-empty': [RuleConfigSeverity.Error, 'never'] as const,
'type-enum': [
RuleConfigSeverity.Error,
'always',
[
'feat',
'fix',
'refactor',
'hotfix',
'wip',
'docs',
'style',
'chore',
'test',
'breaking',
'init',
],
] as [RuleConfigSeverity, RuleConfigCondition, string[]],
},
}