Commit 9cdb58cc by 无尘

chore: 增加 git commit 校验

parent f45128fd
/*
* @Descripttion: 当前组件信息
* @version: 1.0.0
* @Author: 无尘
* @Date: 2020-08-14 10:52:37
* @LastEditors: 无尘
* @LastEditTime: 2020-08-14 11:00:35
*/
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'type-enum': [
2,
'always',
[
'add', // 新功能
'feat', // 新功能
'fix', // 修改问题
'update', // 更新
'style', // 样式
'test', // 测试
'docs', // 文档
'refactor', // 重构
'chore' // 依赖包/辅助工具的变动
]
]
}
};
......@@ -23,6 +23,8 @@
"vuex": "^3.0.1"
},
"devDependencies": {
"@commitlint/cli": "^9.1.1",
"@commitlint/config-conventional": "^9.1.1",
"@vue/cli-plugin-babel": "^3.8.0",
"@vue/cli-plugin-eslint": "^3.8.0",
"@vue/cli-service": "^3.8.0",
......@@ -43,7 +45,8 @@
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
"pre-commit": "lint-staged",
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
},
"lint-staged": {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment