-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommitlint.config.js
More file actions
38 lines (38 loc) · 1.37 KB
/
commitlint.config.js
File metadata and controls
38 lines (38 loc) · 1.37 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
/** @type {import('@commitlint/types').UserConfig} */
export default {
extends: ['@commitlint/config-conventional'],
rules: {
// 类型枚举,git提交type必须是以下类型
'type-enum': [
2,
'always',
[
'feat', // 新增功能
'fix', // 修复缺陷
'docs', // 文档变更
'style', // 代码格式(不影响功能,例如空格、分号等格式修正)
'refactor', // 代码重构(不包括 bug 修复、功能新增)
'perf', // 性能优化
'test', // 添加疏漏测试或已有测试改动
'build', // 构建流程、外部依赖变更(如升级 npm 包、修改 webpack 配置等)
'ci', // 修改 CI 配置、脚本
'chore', // 对构建过程或辅助工具和库的更改(不影响源文件、测试用例)
'revert', // 回滚 commit
'wip', // 工作进行中
'workflow', // 工作流相关文件修改
'types', // 类型声明相关
'release' // 发布新版本
]
],
// subject 大小写不做校验
'subject-case': [0],
// subject 允许为空(可选)
'subject-empty': [0],
// subject 以什么为结束标志,禁用
'subject-full-stop': [0, 'never'],
// type 必须小写
'type-case': [2, 'always', 'lower-case'],
// type 不能为空
'type-empty': [2, 'never']
}
}