-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommitlint.config.mjs
More file actions
71 lines (71 loc) · 3.19 KB
/
commitlint.config.mjs
File metadata and controls
71 lines (71 loc) · 3.19 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
/** @type {import('cz-git').UserConfig} */
export default {
rules: {
'body-leading-blank': [2, 'always'],
'footer-leading-blank': [1, 'always'],
'header-max-length': [2, 'always', 300],
'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']],
},
prompt: {
alias: { fd: 'docs: fix typos' },
messages: {
type: '选择你要提交的类型 :',
scope: '选择一个提交范围(可选):',
customScope: '请输入自定义的提交范围 :',
subject: '填写简短精炼的变更描述 :\n',
body: '填写更加详细的变更描述(可选)。使用 "|" 换行 :\n',
breaking: '列举非兼容性重大的变更(可选)。使用 "|" 换行 :\n',
footerPrefixesSelect: '选择关联issue前缀(可选):',
customFooterPrefix: '输入自定义issue前缀 :',
footer: '列举关联issue (可选) 例如: #31, #I3244 :\n',
generatingByAI: '正在通过 AI 生成你的提交简短描述...',
generatedSelectByAI: '选择一个 AI 生成的简短描述:',
confirmCommit: '是否提交或修改commit ?',
},
types: [
{ value: 'feat', name: 'feat: 新增功能', emoji: ':sparkles:' },
{ value: 'fix', name: 'fix: 修复缺陷', emoji: ':bug:' },
{ value: 'docs', name: 'docs: 文档更新', emoji: ':memo:' },
{ value: 'style', name: 'style: 不影响代码含义的更改', emoji: ':lipstick:' },
{ value: 'refactor', name: 'refactor: 既不修复错误也不添加功能的代码更改', emoji: ':recycle:' },
{ value: 'perf', name: 'perf: 提高性能的代码更改', emoji: ':zap:' },
{ value: 'test', name: 'test: 添加缺少的测试或更正现有测试', emoji: ':white_check_mark:' },
{ value: 'build', name: 'build: 影响生成系统或外部依赖项的更改', emoji: ':package:' },
{ value: 'ci', name: 'ci: 对我们的CI配置文件和脚本的更改', emoji: ':ferris_wheel:' },
{ value: 'chore', name: 'chore: 不修改src或测试文件的其他更改', emoji: ':hammer:' },
{ value: 'revert', name: 'revert: 还原上一个提交', emoji: ':rewind:' },
],
useEmoji: false,
emojiAlign: 'left',
useAI: false,
aiNumber: 1,
themeColorCode: '',
scopes: [],
allowCustomScopes: true,
allowEmptyScopes: true,
customScopesAlign: 'bottom',
customScopesAlias: '以上都不是?我要自定义',
emptyScopesAlias: '跳过',
upperCaseSubject: false,
markBreakingChangeMode: false,
allowBreakingChanges: ['feat', 'fix'],
breaklineNumber: 300,
breaklineChar: '|',
skipQuestions: [],
issuePrefixes: [{ value: 'closed', name: 'closed: ISSUES has been processed' }],
customIssuePrefixAlign: 'top',
emptyIssuePrefixAlias: '跳过',
customIssuePrefixAlias: '自定义前缀',
allowCustomIssuePrefix: true,
allowEmptyIssuePrefix: true,
confirmColorize: true,
scopeOverrides: undefined,
defaultBody: '',
defaultIssues: '',
defaultScope: '',
defaultSubject: '',
},
};