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