refactor: 优化eslint配置,提升代码质量 (#1341)

* feat: 统一并标准化eslint

* lint: napcat.webui

* lint: napcat.webui

* lint: napcat.core

* build: fix

* lint: napcat.webui

* refactor: 重构eslint

* Update README.md
This commit is contained in:
时瑾
2025-11-03 16:30:45 +08:00
committed by GitHub
parent c9b1d3fafa
commit 2185a884b4
651 changed files with 37981 additions and 37587 deletions

View File

@@ -4,16 +4,24 @@
"type": "module",
"version": "4.9.21",
"scripts": {
"build:universal": "npm run build:webui && vite build --mode universal || exit 1",
"build:framework": "npm run build:webui && vite build --mode framework || exit 1",
"build:shell": "npm run build:webui && vite build --mode shell || exit 1",
"build:universal": "npm run build:webui && npm run dev:universal || exit 1",
"build:framework": "npm run build:webui && npm run dev:framework || exit 1",
"build:shell": "npm run build:webui && npm run dev:shell || exit 1",
"build:webui": "cd napcat.webui && npm run build",
"dev:universal": "vite build --mode universal",
"dev:framework": "vite build --mode framework",
"dev:shell": "vite build --mode shell",
"dev:shell-analysis": "vite build --mode shell-analysis",
"dev:webui": "cd napcat.webui && npm run dev",
"lint": "eslint --fix src/**/*.{js,ts,vue}",
"tsc": "npm run tsc:webui && npm run tsc:core",
"tsc:core": "tsc --noEmit",
"tsc:webui": "cd napcat.webui && tsc --noEmit",
"lint": "npm run lint:core && npm run lint:webui",
"lint:fix": "npm run lint:fix:core && npm run lint:fix:webui",
"lint:core": "eslint src/**/*",
"lint:fix:core": "eslint --fix src/**/*",
"lint:webui": "cd napcat.webui && eslint src/**/*",
"lint:fix:webui": "cd napcat.webui && eslint --fix src/**/*",
"depend": "cd dist && npm install --omit=dev",
"dev:depend": "npm i && cd napcat.webui && npm i"
},
@@ -24,9 +32,6 @@
"@babel/preset-typescript": "^7.24.7",
"@babel/traverse": "^7.28.0",
"@babel/types": "^7.28.2",
"@eslint/compat": "^1.3.1",
"@eslint/eslintrc": "^3.1.0",
"@eslint/js": "^9.33.0",
"@homebridge/node-pty-prebuilt-multiarch": "^0.12.0-beta.5",
"@log4js-node/log4js-api": "^1.0.2",
"@napneko/nap-proto-core": "^0.0.4",
@@ -42,8 +47,6 @@
"@types/react-color": "^3.0.13",
"@types/type-is": "^1.6.7",
"@types/ws": "^8.5.12",
"@typescript-eslint/eslint-plugin": "^8.3.0",
"@typescript-eslint/parser": "^8.39.0",
"ajv": "^8.13.0",
"async-mutex": "^0.5.0",
"commander": "^13.0.0",
@@ -51,15 +54,13 @@
"cors": "^2.8.5",
"esbuild": "0.25.8",
"eslint": "^9.14.0",
"eslint-import-resolver-typescript": "^4.4.4",
"eslint-plugin-import": "^2.32.0",
"express-rate-limit": "^7.5.0",
"fast-xml-parser": "^4.3.6",
"file-type": "^21.0.0",
"globals": "^16.0.0",
"json5": "^2.2.3",
"multer": "^2.0.1",
"napcat.protobuf": "^1.1.4",
"neostandard": "^0.12.2",
"typescript": "^5.3.3",
"typescript-eslint": "^8.35.1",
"vite": "^7.1.1",
@@ -72,4 +73,4 @@
"silk-wasm": "^3.6.1",
"ws": "^8.18.3"
}
}
}