-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathcommitlint.config.js
103 lines (103 loc) · 3.21 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
module.exports = {
extends: ["@commitlint/config-conventional"],
rules: {
"type-enum": [
2,
"always",
[
"feat",
"fix",
"docs",
"style",
"refactor",
"perf",
"test",
"build",
"ci",
"chore",
"revert",
],
],
"type-empty": [2, "never"],
"subject-empty": [2, "never"],
"subject-case": [0],
"scope-case": [2, "always", "lowerCase"],
},
prompt: {
messages: {
type: "Select the type of change that you're committing [类型]:",
scope: "Denote the SCOPE of this change (optional) [范围]:",
customScope: "Denote the SCOPE of this change [自定义范围]:",
subject:
"Write a SHORT, IMPERATIVE tense description of the change [简短描述]:\n",
body: 'Provide a LONGER description of the change (optional). Use "|" to break new line [详细描述]:\n',
breaking:
'List any BREAKING CHANGES (optional). Use "|" to break new line [非兼容性重大变更]:\n',
footerPrefixSelect:
"Select the ISSUES type of changeList by this change (optional) [关联ISSUES前缀]:",
customFooterPrefix: "Input ISSUES prefix [输入ISSUES前缀]:",
footer:
"List any ISSUES by this change. E.g.: #31, #34 [列举关联ISSUES]:\n",
generatingByAI: "Generating your AI commit subject... [生成AI描述]:",
generatedSelectByAI:
"Select suitable subject by AI generated [选择AI生成的描述]:",
confirmCommit:
"Are you sure you want to proceed with the commit above? [确认提交]:",
},
useEmoji: true,
emojiAlign: "center",
types: [
{
value: "feat",
name: "feat: ✨ A new feature [新功能]",
emoji: ":sparkles:",
},
{ value: "fix", name: "fix: 🐛 A bug fix [BUG]", emoji: ":bug:" },
{
value: "docs",
name: "docs: 📝 Documentation only changes [文档]",
emoji: ":memo:",
},
{
value: "style",
name: "style: 💄 Changes that do not affect the meaning of the code [样式]",
emoji: ":lipstick:",
},
{
value: "refactor",
name: "refactor: ♻️ A code change that neither fixes a bug nor adds a feature [重构]",
emoji: ":recycle:",
},
{
value: "perf",
name: "perf: ⚡️ A code change that improves performance [性能]",
emoji: ":zap:",
},
{
value: "test",
name: "test: ✅ Adding missing tests or correcting existing tests [测试]",
emoji: ":white_check_mark:",
},
{
value: "build",
name: "build: 📦️ Changes that affect the build system or external dependencies [构建]",
emoji: ":package:",
},
{
value: "ci",
name: "ci: 🎡 Changes to our CI configuration files and scripts [CI]",
emoji: ":ferris_wheel:",
},
{
value: "chore",
name: "chore: 🔨 Other changes that don't modify src or test files [其他]",
emoji: ":hammer:",
},
{
value: "revert",
name: "revert: ⏪️ Reverts a previous commit [回退]",
emoji: ":rewind:",
},
],
},
};