diff --git a/package.json b/package.json index 27133c436..b5c014198 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "scripts": { "lint": "eslint ./packages --max-warnings 0", "lint:fix": "eslint ./packages --max-warnings 0 --fix", - "build":"tsc", + "build": "tsc", "dev": "cross-env NODE_ENV=dev nodemon", "prod": "npm run build && npx pm2 start ecosystem.config.cjs --env production", "reload": "npm run build && pm2 reload ecosystem.config.cjs --env production --update-env", @@ -22,14 +22,14 @@ "api:configurable": "node packages/scripts/configurable-props" }, "dependencies": { + "@koa/bodyparser": "catalog:", + "@koa/cors": "catalog:", "@koa/router": "catalog:", + "@koa/send": "catalog:", "koa": "catalog:", "koa-body": "catalog:", - "@koa/bodyparser": "catalog:", - "@koa/cors": "catalog:", "koa-json": "catalog:", "koa-logger": "catalog:", - "@koa/send": "catalog:", "koa-static": "catalog:", "lodash": "catalog:", "moment": "catalog:", @@ -39,10 +39,10 @@ }, "devDependencies": { "@types/koa": "catalog:", - "@types/koa__cors": "catalog:", "@types/koa-json": "catalog:", "@types/koa-logger": "catalog:", "@types/koa-static": "catalog:", + "@types/koa__cors": "catalog:", "@types/lodash": "catalog:", "@types/node": "catalog:", "@types/validator": "catalog:", @@ -54,6 +54,7 @@ "eslint": "catalog:", "eslint-plugin-import-x": "catalog:", "globals": "catalog:", + "lint-staged": "catalog:", "nodemon": "catalog:", "pm2": "catalog:", "prettier": "catalog:", @@ -62,6 +63,12 @@ "tsconfig-paths": "catalog:", "typescript": "catalog:" }, + "lint-staged": { + "*.{js,ts,vue,tsx}": [ + "prettier --write --cache", + "eslint --fix --cache" + ] + }, "author": "TDesign", "license": "ISC" } diff --git a/packages/frontend/package.json b/packages/frontend/package.json index 0ad646496..6447f1c85 100644 --- a/packages/frontend/package.json +++ b/packages/frontend/package.json @@ -37,7 +37,6 @@ "eslint-plugin-vue": "catalog:", "globals": "catalog:", "less": "catalog:", - "lint-staged": "catalog:", "postcss": "catalog:", "prismjs": "catalog:", "typescript": "catalog:", @@ -48,12 +47,6 @@ "path": "./node_modules/cz-conventional-changelog" } }, - "lint-staged": { - "*.{js,ts,vue,tsx}": [ - "npm run lint:fix", - "git add" - ] - }, "author": "tdesign", "license": "MIT" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index da60e3116..d1c03ebb0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -127,8 +127,8 @@ catalogs: specifier: ^4.6.4 version: 4.6.4 lint-staged: - specifier: ^17.0.6 - version: 17.0.6 + specifier: ^17.0.7 + version: 17.0.7 lodash: specifier: ^4.18.1 version: 4.18.1 @@ -291,6 +291,9 @@ importers: globals: specifier: 'catalog:' version: 17.6.0 + lint-staged: + specifier: 'catalog:' + version: 17.0.7 nodemon: specifier: 'catalog:' version: 3.1.14 @@ -397,9 +400,6 @@ importers: less: specifier: 'catalog:' version: 4.6.4 - lint-staged: - specifier: 'catalog:' - version: 17.0.6 postcss: specifier: 'catalog:' version: 8.5.15 @@ -2563,8 +2563,8 @@ packages: lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} - lint-staged@17.0.6: - resolution: {integrity: sha512-xTowloQX5tfs9TC6SUHnKuBSx/TUx+9w39zRTbVrB70DxUJZh3OZWnOa0LbejxVX9adYuioGJoP4dpQ04QHehg==} + lint-staged@17.0.7: + resolution: {integrity: sha512-JrSobt+tW3rH8IOMi8tDZd3foorM5yPEkLD/V2NxobgHrFfHWGee4MOLVuZeScgxftEwbHrPHIFA/ZL+nUJeuA==} engines: {node: '>=22.22.1'} hasBin: true @@ -3486,8 +3486,8 @@ packages: resolution: {integrity: sha512-dAqSqE/RabpBKI8+h26GfLq6Vb3JVXs30XYQjdMjaj/c2tS8IYYMbIzP599KtRj7c57/wYApb3QjgRgXmrCukA==} engines: {node: '>=18'} - tinyexec@1.2.2: - resolution: {integrity: sha512-M/Q0B2cp4K7kynaT/vnED1j8TlLY+Pp7C6Wl2bl/7u/F0mUVwdyOpwomQb8JpYLitHUssAJRmLZdMCGsrx7i+g==} + tinyexec@1.2.4: + resolution: {integrity: sha512-SHf/r48b7vOrjve9PxJo3MN5v5yuyjHvdUcrQffT3WXMUfnGmHDVbC4k3sHJaJTgZCwpUplIaAo5ANtMyp3YHg==} engines: {node: '>=18'} tinyglobby@0.2.16: @@ -6101,12 +6101,12 @@ snapshots: lines-and-columns@1.2.4: {} - lint-staged@17.0.6: + lint-staged@17.0.7: dependencies: listr2: 10.2.1 picomatch: 4.0.4 string-argv: 0.3.2 - tinyexec: 1.2.2 + tinyexec: 1.2.4 optionalDependencies: yaml: 2.9.0 @@ -7022,7 +7022,7 @@ snapshots: tinyexec@1.1.2: {} - tinyexec@1.2.2: {} + tinyexec@1.2.4: {} tinyglobby@0.2.16: dependencies: diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 22dd87283..a60da6e1a 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -46,7 +46,7 @@ catalog: koa-logger: "^4.0.0" koa-static: "^5.0.0" less: "^4.6.4" - lint-staged: "^17.0.6" + lint-staged: "^17.0.7" lodash: "^4.18.1" lodash-es: "^4.18.1" moment: "^2.30.1"