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 pnpm build
``` ```
- cz规范提交git - cz插件提交git
```bash ```bash
npx cz pnpm commit
``` ```
## 素材来源 ## 素材来源

View File

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