Skip to content

Commit

Permalink
chore(config): 修改 cz 配置
Browse files Browse the repository at this point in the history
  • Loading branch information
KRISACHAN committed Jun 22, 2023
1 parent 63c4438 commit 0468b98
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 23 deletions.
15 changes: 3 additions & 12 deletions .cz-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,19 @@ const czConfig = {
{ value: 'feat', name: '特性: 新增一个功能' },
{ value: 'fix', name: '修复: 修复一个Bug' },
{ value: 'docs', name: '文档: 文档变更' },
{ value: 'style', name: '格式: 代码格式' },
{ value: 'refactor', name: '重构: 代码重构' },
{ value: 'perf', name: '性能: 改善性能' },
{ value: 'test', name: '测试: 测试代码' },
{ value: 'wip', name: '半成品: 开发中' },
{
value: 'build',
name:
'工具: 变更项目构建或外部依赖(例如scopes: webpack、gulp、npm等)',
name: '构建: 变更项目构建或外部依赖',
},
{
value: 'ci',
name:
'集成: 更改持续集成软件的配置文件和package中的scripts命令,例如scopes: Travis, Circle等',
},
{
value: 'style',
name: '代码格式(不影响功能,例如空格、分号等格式修正)',
name: '集成: 更改持续集成软件的配置文件和package中的scripts命令',
},
{
value: 'chore',
name: '构建: 变更构建流程或辅助工具',
name: '辅助: 其他变更',
},
{
value: 'revert',
Expand Down
15 changes: 5 additions & 10 deletions commitlint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,17 @@ module.exports = {
2,
'always',
[
'feat', // 新功能
'feat', // 特性
'fix', // 修复
'docs', // 文档变更
'style', // 代码格式(不影响代码运行的变动)
'refactor', // 重构(既不是增加feature),也不是修复bug
'pref', // 性能优化
'test', // 增加测试
'wip', // 半成品: 开发中
'docs', // 文档
'refactor', // 重构
'wip', // 半成品
'build', // 打包
'ci', // 集成
'style', // 代码格式
'chore', // 构建: 变更构建流程或辅助工具
'chore', // 辅助
'revert', // 回退
],
],
// subject 大小写不做校验
'subject-case': [0],
},
}
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,9 @@
},
"lint-staged": {
"src/**/*.{js,ts,jsx,tsx}": [
"eslint --fix",
"yarn jest",
"yarn lint",
"yarn prettier",
"git add ."
]
}
Expand Down

0 comments on commit 0468b98

Please sign in to comment.