-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcommitlint.config.js
More file actions
65 lines (65 loc) · 1.97 KB
/
commitlint.config.js
File metadata and controls
65 lines (65 loc) · 1.97 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
/** @type {import('cz-git').UserConfig} */
export default {
extends: ["@commitlint/config-conventional"],
rules: {
// @see: https://commitlint.js.org/#/reference-rules
"body-leading-blank": [2, "always"],
"footer-leading-blank": [1, "always"],
"header-max-length": [2, "always", 108],
"subject-empty": [2, "never"],
"type-empty": [2, "never"],
"subject-case": [0],
"type-enum": [
2,
"always",
[
"feat",
"fix",
"docs",
"style",
"refactor",
"perf",
"test",
"build",
"ci",
"chore",
"revert",
"wip",
"workflow",
"types",
"release"
]
]
},
prompt: {
types: [
{ value: "feat", name: "✨ 新功能: 新增功能" },
{ value: "fix", name: "🐛 修复: 修复缺陷" },
{ value: "docs", name: "📚 文档: 更新文档" },
{ value: "refactor", name: "📦 重构: 代码重构(不新增功能也不修复 bug)" },
{ value: "perf", name: "🚀 性能: 提升性能" },
{ value: "test", name: "🧪 测试: 添加测试" },
{ value: "chore", name: "🔧 工具: 更改构建流程或辅助工具" },
{ value: "revert", name: "⏪ 回滚: 代码回滚" },
{ value: "style", name: "🎨 样式: 格式调整(不影响代码运行)" }
],
scopes: [
"root",
"apps",
"nativeScript-ai",
"nativeScript-ui",
"nativeScript-http-stream",
"nativeScript-vue3-skills"
],
allowCustomScopes: true,
skipQuestions: ["body", "footerPrefix", "footer", "breaking"], // 跳过“详细描述”和“底部信息”
messages: {
type: "📌 请选择提交类型:",
scope: "🎯 请选择影响范围 (可选):",
subject: "📝 请简要描述更改:",
body: "🔍 详细描述 (可选):",
footer: "🔗 关联的 ISSUE 或 BREAKING CHANGE (可选):",
confirmCommit: "✅ 确认提交?"
}
}
};