feat: 新增 commitlint,修改部分规则

This commit is contained in:
奔跑的面条 2022-06-15 17:09:40 +08:00
parent 29fd85254b
commit 5522837b00
6 changed files with 880 additions and 4 deletions

3
.commitlintrc.js Normal file
View File

@ -0,0 +1,3 @@
module.exports = {
extends: ["@commitlint/config-conventional"]
};

4
.husky/commit-msg Normal file
View File

@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
npx --no-install commitlint -e

View File

@ -109,10 +109,22 @@ yarn run build
make dist
```
## 代码提交
* feat: 新功能
* fix: 修复 Bug
* docs: 文档修改
* perf: 性能优化
* revert: 版本回退
* ci: CICD集成相关
* test: 添加测试代码
* refactor: 代码重构
* build: 影响项目构建或依赖修改
* style: 不影响程序逻辑的代码修改
* chore: 不属于以上类型的其他类型(日常事务)
## 交流
QQ 群1030129384
![QQ群](readme/goView-QQ.png)

View File

@ -4,7 +4,8 @@
"scripts": {
"dev": "vite --host",
"build": "vue-tsc --noEmit && vite build",
"new": "plop --plopfile ./plop/plopfile.js"
"new": "plop --plopfile ./plop/plopfile.js",
"postinstall": "husky install"
},
"dependencies": {
"@types/color": "^3.0.3",
@ -30,6 +31,8 @@
"vuedraggable": "^4.1.0"
},
"devDependencies": {
"@commitlint/cli": "^17.0.2",
"@commitlint/config-conventional": "^17.0.2",
"@types/node": "^16.11.26",
"@typescript-eslint/eslint-plugin": "^5.18.0",
"@typescript-eslint/parser": "^5.18.0",
@ -39,6 +42,7 @@
"@vitejs/plugin-vue-jsx": "^1.3.9",
"@vue/compiler-sfc": "^3.2.31",
"@vueuse/core": "^7.7.1",
"commitlint": "^17.0.2",
"default-passive-events": "^2.0.0",
"echarts": "^5.3.2",
"eslint": "^8.12.0",
@ -46,6 +50,7 @@
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-vue": "^8.5.0",
"husky": "^8.0.1",
"lodash": "~4.17.21",
"mockjs": "^1.1.0",
"plop": "^3.0.5",

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +1,10 @@
module.exports = {
printWidth: 80,
printWidth: 120,
tabWidth: 2,
useTabs: false,
singleQuote: true,
semi: false,
trailingComma: "es5",
trailingComma: "none",
bracketSpacing: true,
jsxSingleQuote: true,
jsxBracketSameLine: false,