Commit 7e84ac69 by liguokang

feat:

parent 1163c8a7
/*
* @Author: liguokang
* @Date: 2021-07-28 14:33:40
* @LastEditors: liguokang
* @LastEditTime: 2021-07-28 21:11:00
* @Description:
* @Copyrigh: ©2021 杭州杰竞科技有限公司 版权所有
*/
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'subject-case': [0, 'never'],
'type-enum': [
1,
'always',
[
'build', // 构建
'ci', // ci
'chore', // Other changes that don't modify src or test files. 改变构建流程、或者增加依赖库、工具等
'docs', // Adds or alters documentation. 仅仅修改了文档,比如README, CHANGELOG, CONTRIBUTE等等
'feat', // Adds a new feature. 新增feature
'fix', // Solves a bug. 修复bug
'perf', // Improves performance. 优化相关,比如提升性能、体验
'refactor', // Rewrites code without feature, performance or bug changes. 代码重构,没有加新功能或者修复bug
'revert', // Reverts a previous commit. 回滚到上一个版本
'style', // Improves formatting, white-space. 仅仅修改了空格、格式缩进、逗号等等,不改变代码逻辑
'test', // Adds or modifies tests. 测试用例,包括单元测试、集成测试等
],
],
},
};
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -6,6 +6,7 @@
"build": "next build",
"export": "npm run build && next export",
"start": "next start",
"prepare": "husky install",
"precommit": "pretty-quick --staged"
},
"dependencies": {
......@@ -27,9 +28,13 @@
"redux": "^4.0.1"
},
"devDependencies": {
"@commitlint/cli": "^13.1.0",
"@commitlint/config-conventional": "^13.1.0",
"@types/react": "^17.0.9",
"commitlint-config-cz": "^0.13.2",
"cross-env": "^5.2.0",
"husky": "^7.0.1",
"lint-staged": "^11.1.1",
"prettier": "2.3.2",
"pretty-quick": "^3.1.1",
"typescript": "^4.3.2",
......@@ -38,9 +43,19 @@
},
"husky": {
"hooks": {
"pre-commit": "node hooks/pre-commit.js",
"commit-msg": "node hooks/commit-msg.js",
"pre-push": "node hooks/pre-commit.js"
"pre-commit": "lint-staged",
"pre-push": "node hooks/pre-commit.js",
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
}
},
"lint-staged": {
"*.{jsx,js,ts,tsx}": [
"eslint --fix",
"git add"
]
},
"main": "index.js",
"repository": "ssh://git@xmgit.ixm5.cn:10022/liguokang/xiaomai-website-ssr-template.git",
"author": "liguokang <liguokang@xiaomai5.com>",
"license": "MIT"
}
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