-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommitlint.config.js
More file actions
111 lines (110 loc) · 3.14 KB
/
commitlint.config.js
File metadata and controls
111 lines (110 loc) · 3.14 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
module.exports = {
parserPreset: {
parserOpts: { headerPattern: /^(.*)(?:\((.*)\))?!?: (.*)$/ },
},
rules: {
'body-leading-blank': [1, 'always'],
'body-max-line-length': [2, 'always', 100],
'footer-leading-blank': [1, 'always'],
'footer-max-line-length': [2, 'always', 100],
'header-max-length': [2, 'always', 100],
'subject-case': [2, 'never', ['sentence-case', 'start-case', 'pascal-case', 'upper-case']],
'subject-empty': [2, 'never'],
'subject-full-stop': [2, 'never', '.'],
'type-case': [2, 'always', 'lower-case'],
'type-empty': [2, 'never'],
'type-enum': [
2,
'always',
[
'✨feat',
'🐛fix',
'📚docs',
'💎style',
'📦refactor',
'🚀perf',
'🚨test',
'🛠build',
'⚙️ci',
'🗑revert',
],
],
},
prompt: {
questions: {
type: {
description: '选择当前 commit 的类型',
enum: {
'✨feat': {
description: '新功能',
title: '✨Features',
emoji: '✨',
},
'🐛fix': {
description: '修复bug',
title: '🐛Bug Fixes',
emoji: '🐛',
},
'📚docs': {
description: '文档更新',
title: '📚Documentation',
emoji: '📚',
},
'💎style': {
description: '代码风格的更改(空格,逗号,缺少分号等)',
title: '💎Styles',
emoji: '💎',
},
'📦refactor': {
description: '代码重构(即不修复bug也不增加新功能)',
title: '📦Code Refactoring',
emoji: '📦',
},
'🚀perf': {
description: '性能提升',
title: '🚀Performance Improvements',
emoji: '🚀',
},
'🚨test': {
description: '添加测试文件或者更改测试文件',
title: '🚨Tests',
emoji: '🚨',
},
'🛠build': {
description: '构建系统的更改或新的依赖更新,如webpack、gulp更改或者npm',
title: '🛠Builds',
emoji: '🛠',
},
'⚙️ci': {
description: 'ci配置的更改,如 travis、gitlab-ci',
title: '⚙️Continuous Integrations',
emoji: '⚙️',
},
'🗑revert': {
description: '恢复以前的提交(如git revert)',
title: '🗑Reverts',
emoji: '🗑',
},
},
},
scope: {
description: '变动访问,模块或者文件名(可skip)',
},
subject: {
description: '写一个简短的描述',
},
body: {
description: '提供更改的详细说明(可skip)',
},
isBreaking: {
description: '是否有破坏性更新',
},
breakingBody: {
description: '破坏性变更的详细描述',
},
breaking: {
description: '破坏性变更的详细描述简短描述',
},
},
},
}