mirror of
https://github.com/algerkong/AlgerMusicPlayer.git
synced 2026-04-03 14:20:50 +08:00
feat: 优化代码提交流程 添加lint-staged
This commit is contained in:
@@ -1,2 +1,7 @@
|
||||
echo "对已暂存文件运行 lint-staged..."
|
||||
npx lint-staged
|
||||
|
||||
echo "运行类型检查..."
|
||||
npm run typecheck
|
||||
npm run typecheck
|
||||
|
||||
echo "所有检查通过,准备提交..."
|
||||
@@ -1,2 +1,7 @@
|
||||
echo "对已暂存文件运行 lint-staged..."
|
||||
npx lint-staged
|
||||
|
||||
echo "运行类型检查..."
|
||||
npm run typecheck
|
||||
npm run typecheck
|
||||
|
||||
echo "所有检查通过,准备提交..."
|
||||
13
package.json
13
package.json
@@ -7,8 +7,8 @@
|
||||
"homepage": "https://github.com/algerkong/AlgerMusicPlayer",
|
||||
"scripts": {
|
||||
"prepare": "husky",
|
||||
"format": "prettier --write .",
|
||||
"lint": "eslint . --fix",
|
||||
"format": "prettier --write ./src",
|
||||
"lint": "eslint ./src --fix",
|
||||
"typecheck:node": "tsc --noEmit -p tsconfig.node.json --composite false",
|
||||
"typecheck:web": "vue-tsc --noEmit -p tsconfig.web.json --composite false",
|
||||
"typecheck": "npm run typecheck:node && npm run typecheck:web",
|
||||
@@ -22,6 +22,14 @@
|
||||
"build:mac": "npm run build && electron-builder --mac",
|
||||
"build:linux": "npm run build && electron-builder --linux"
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.{ts,tsx,vue,js}": [
|
||||
"eslint --fix"
|
||||
],
|
||||
"*.{ts,tsx,vue,js,css,scss,md,json}": [
|
||||
"prettier --write"
|
||||
]
|
||||
},
|
||||
"dependencies": {
|
||||
"@electron-toolkit/preload": "^3.0.1",
|
||||
"@electron-toolkit/utils": "^4.0.0",
|
||||
@@ -76,6 +84,7 @@
|
||||
"eslint-plugin-vue": "^10.3.0",
|
||||
"eslint-plugin-vue-scoped-css": "^2.11.0",
|
||||
"globals": "^16.3.0",
|
||||
"lint-staged": "^15.2.10",
|
||||
"howler": "^2.2.4",
|
||||
"lodash": "^4.17.21",
|
||||
"marked": "^15.0.4",
|
||||
|
||||
Reference in New Issue
Block a user