-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommitlint.config.js
More file actions
56 lines (56 loc) · 2.02 KB
/
commitlint.config.js
File metadata and controls
56 lines (56 loc) · 2.02 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
export default {
extends: ['@commitlint/config-conventional'],
rules: {
'type-enum': [
2,
'always',
[
'feat',
'fix',
'docs',
'style',
'refactor',
'perf',
'test',
'build',
'ci',
'chore',
'revert',
'release'
]
],
'type-empty': [2, 'never'],
'type-case': [2, 'always', 'lower-case'],
'subject-empty': [2, 'never'],
'subject-case': [0, 'never'],
'subject-full-stop': [2, 'never', '.'],
'body-leading-blank': [1, 'always'],
'footer-leading-blank': [1, 'always'],
'header-max-length': [2, 'always', 72]
},
prompt: {
messages: {
type: '请选择提交类型:',
scope: '请输入影响范围(可选):',
subject: '请输入简短描述(必填):',
body: '请输入详细描述(可选):',
footer: '请输入关闭的 issue(可选,格式:Closes #123):',
confirmCommit: '确认提交以上信息?'
},
types: [
{ value: 'feat', name: 'feat: 新功能' },
{ value: 'fix', name: 'fix: 修复 bug' },
{ value: 'docs', name: 'docs: 文档修改' },
{ value: 'style', name: 'style: 代码格式' },
{ value: 'refactor', name: 'refactor: 代码重构' },
{ value: 'perf', name: 'perf: 性能优化' },
{ value: 'test', name: 'test: 测试相关' },
{ value: 'build', name: 'build: 构建/打包' },
{ value: 'ci', name: 'ci: CI/CD 配置' },
{ value: 'chore', name: 'chore: 杂项修改' },
{ value: 'revert', name: 'revert: 回滚提交' },
{ value: 'release', name: 'release: 发布版本' }
],
skipQuestions: ['scope']
}
}