-
Notifications
You must be signed in to change notification settings - Fork 0
/
.commitlintrc.js
39 lines (39 loc) · 1.19 KB
/
.commitlintrc.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
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'type-enum': [
2,
'always',
[
'feat', // 增加新功能
'fix', // 修复bug
'docs', // 文档变更
'style', // 代码格式(不影响代码运行的变动)
'perf', // UI或性能优化
'release', // 发布
'refactor', // 重构(既不是增加功能,也不是修复bug)
'test', // 增加测试
'chore', // 构建过程或辅助工具的变动(更改配置文件)
'revert', // 回退
'build' // 打包
]
],
// <type> 格式 小写
'type-case': [2, 'always', 'lower-case'],
// <type> 不能为空
'type-empty': [2, 'never'],
// <scope> 范围不能为空
'scope-empty': [2, 'never'],
// <scope> 范围格式
'scope-case': [0],
// <subject> 主要 message 不能为空
'subject-empty': [2, 'never'],
// <subject> 以什么为结束标志,禁用
'subject-full-stop': [0, 'never'],
// <subject> 格式,禁用
'subject-case': [0, 'never'],
// <body> 以空行开头
'body-leading-blank': [1, 'always'],
'header-max-length': [0, 'always', 100]
}
}