perf(projects): 优化了lint-staged命令

This commit is contained in:
‘chen.home’ 2022-08-04 23:32:48 +08:00
parent bfe90f98f5
commit 8842a87c24
2 changed files with 5 additions and 4 deletions

View File

@ -43,10 +43,10 @@ pnpm dev
pnpm build
```
- cz规范提交git
- cz插件提交git
```bash
npx cz
pnpm commit
```
## 素材来源

View File

@ -8,7 +8,8 @@
"preview": "vite preview",
"prettier": "prettier --write \"src/**/*.{js,json,tsx,css,less,scss,vue,html,md}\"",
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts,.json --fix",
"prepare": "husky install"
"prepare": "husky install",
"commit": "cz"
},
"config": {
"commitizen": {
@ -16,7 +17,7 @@
}
},
"lint-staged": {
"./src/**/*.{ts,tsx}": "lint",
"./src/**/*.{vue,js,jsx,ts,tsx,json}": "eslint --fix",
"./src/**/*.{js,jsx,ts,tsx,less,json}": "prettier --loglevel warn --write"
},
"dependencies": {