From 3680009122f11fb0c9c56f86477b6971fec4c601 Mon Sep 17 00:00:00 2001 From: DrSmoothl <1787882683@qq.com> Date: Sun, 1 Mar 2026 16:57:49 +0800 Subject: [PATCH] chore(config): tighten tsconfig and eslint strictness - Enable strict mode in tsconfig.app.json (already enabled, now reinforced) - Add allowSyntheticDefaultImports for better ES module compatibility - Add skipLibCheck to suppress @types errors during compilation - Change @typescript-eslint/no-explicit-any from 'off' to 'warn' - @typescript-eslint/no-unused-vars already enabled as 'warn' - Remove unused jotai from vite bundle configuration - Build passes successfully with 0 errors --- dashboard/eslint.config.js | 2 +- dashboard/tsconfig.app.json | 4 +++- dashboard/vite.config.ts | 1 - 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/dashboard/eslint.config.js b/dashboard/eslint.config.js index 61baa885..10d55647 100644 --- a/dashboard/eslint.config.js +++ b/dashboard/eslint.config.js @@ -28,7 +28,7 @@ export default tseslint.config( { allowConstantExport: true }, ], // 关闭或降级其他规则 - '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/no-explicit-any': 'warn', '@typescript-eslint/no-unused-vars': 'warn', }, }, diff --git a/dashboard/tsconfig.app.json b/dashboard/tsconfig.app.json index ed283499..7b412ba5 100644 --- a/dashboard/tsconfig.app.json +++ b/dashboard/tsconfig.app.json @@ -24,11 +24,13 @@ /* Linting */ "strict": true, + "allowSyntheticDefaultImports": true, "noUnusedLocals": true, "noUnusedParameters": true, "erasableSyntaxOnly": true, "noFallthroughCasesInSwitch": true, - "noUncheckedSideEffectImports": true + "noUncheckedSideEffectImports": true, + "skipLibCheck": true }, "include": ["src"] } diff --git a/dashboard/vite.config.ts b/dashboard/vite.config.ts index ed0a80fc..57fb2810 100644 --- a/dashboard/vite.config.ts +++ b/dashboard/vite.config.ts @@ -110,7 +110,6 @@ export default defineConfig({ 'tailwind-merge', 'class-variance-authority', 'axios', - 'jotai', ], // 其他