-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathcommitlint.config.js
123 lines (123 loc) · 3.23 KB
/
commitlint.config.js
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
112
113
114
115
116
117
118
119
120
121
122
123
module.exports = {
extends: ["@commitlint/config-conventional"],
defaultIgnores: false,
rules: {},
prompt: {
settings:{
enableMultipleScopes:true,
"scope-enum":[1,"always",[
"string",
"object",
"func",
"events",
"collection",
"tree",
"typecheck",
"misc",
"other"
]]
},
messages: {
skip: "跳过",
max: "最大支持%d个字符",
min: "不能少于%d个字符",
emptyWarning: "不能为空",
upperLimitWarning: "over limit",
lowerLimitWarning: "below limit",
},
questions: {
type: {
description: "选择你要提交的类型:",
enum: {
feat: {
title: "特性",
description: " 🚀 新增功能",
emoji: "🚀",
},
fix: {
title: "修复",
description: " 🐛 修复缺陷",
emoji: "🐛",
},
docs: {
title: "文档",
description: " 📚 文档变更",
emoji: "📚",
},
style: {
title: "格式",
description:" 🎨 代码格式(不影响功能,例如空格、分号等格式修正)",
emoji: "🎨",
},
refactor: {
title: "重构",
description:" 🛠 代码重构(不包括 bug 修复、功能新增)",
emoji: "🛠",
},
perf: {
title: "性能",
description: " ⚡️ 性能优化",
emoji: "⚡️",
},
test: {
title: "测试",
description: " ✅ 添加测试或已有测试改动",
emoji: "✅",
},
build: {
title: "构建",
description:
" 📦 构建流程、外部依赖变更(如升级 npm 包、修改 webpack 配置等)",
emoji: "📦",
},
ci: {
title: "集成",
description: " 🎡 修改 CI 配置、脚本",
emoji: "🎡",
},
chore: {
description: " ♻️ 除源代码文件和测试文件之外的改变",
title: 'Chores',
emoji: '♻️',
},
revert: {
title: "回退",
description: " ⏪️ 回滚 commit",
emoji: "⏪️",
},
other: {
title: "其他",
description:" 🔨 对构建过程或辅助工具和库的更改(不影响源文件、测试用例)",
emoji: "🔨",
},
},
},
scope: {
description: "选择提交范围(可选):"
},
subject: {
description: "填写简短精炼的变更描述 :\n",
},
body: {
description:
'填写更加详细的变更描述(可选)。使用 "|" 换行 :\n',
},
breaking: {
description:
'列举非兼容性重大的变更(可选)。使用 "|" 换行 :\n',
},
isBreaking: {
description: '本次提交是一个不兼容的变更?', // Are there any breaking changes?
},
issues: {
description: "选择关联issue(可选):",
},
isIssueAffected:{
description:"是否会影响任何未解决的issue问题?"
},
issues: {
description: "列举关联issue (可选) 例如: #31, #I3244 :\n",
},
},
},
};