-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
31 lines (30 loc) · 948 Bytes
/
index.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
const plugins = require('./plugins');
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'type-enum': [
2,
'always',
[
'feat', // 新功能(feature)
'fix', // 修补bug
'docs', // 文档(
'style', // 格式
'refactor', // 重构
'test', // 增加测试
'revert', // 回滚
'config', // 配置
'chore', // 其他改动
'debug', // 调试
'build', // 打包
'release', // 发布
],
],
'type-empty': [2, 'never'], // 提交不符合规范时,也可以提交,但是会有警告
'subject-empty': [2, 'never'], // 提交不符合规范时,也可以提交,但是会有警告
// 'subject-full-stop': [0, 'never'],
'subject-min-length': [2, 'always', 3], // 至少3个字符
'subject-no-number-sequence': [2, 'never'], // 禁止使用连续数字或字母
},
plugins,
};