From 862e4d616aee7eb02a8a9afec165e0825c8871ca Mon Sep 17 00:00:00 2001 From: MoonTestUse1 Date: Thu, 2 Jan 2025 02:46:12 +0600 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B5=D0=B4=D0=B5=D0=BB?= =?UTF-8?q?=D0=BA=D0=B03?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/tsconfig.json | 33 +++++++++++++++++++++++---------- frontend/tsconfig.node.json | 6 ++++-- frontend/vite.config.ts | 8 +++++--- 3 files changed, 32 insertions(+), 15 deletions(-) diff --git a/frontend/tsconfig.json b/frontend/tsconfig.json index b3c31df..4d1a165 100644 --- a/frontend/tsconfig.json +++ b/frontend/tsconfig.json @@ -1,29 +1,42 @@ { "compilerOptions": { - "target": "ESNext", + "target": "ES2020", "useDefineForClassFields": true, "module": "ESNext", - "moduleResolution": "node", - "strict": true, - "jsx": "preserve", + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, "resolveJsonModule": true, "isolatedModules": true, - "esModuleInterop": true, - "lib": ["ESNext", "DOM"], - "skipLibCheck": true, "noEmit": true, + "jsx": "preserve", + + /* Linting */ + "strict": true, + "noUnusedLocals": false, + "noUnusedParameters": false, + "noFallthroughCasesInSwitch": true, + + /* Paths */ "baseUrl": ".", "paths": { "@/*": ["./src/*"] }, - "types": ["node", "vite/client"] + + /* Additional Options */ + "allowJs": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "types": ["vite/client", "node"] }, "include": [ "src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", - "src/**/*.vue", - "vite.config.ts" + "src/**/*.vue" ], "references": [{ "path": "./tsconfig.node.json" }] } \ No newline at end of file diff --git a/frontend/tsconfig.node.json b/frontend/tsconfig.node.json index aac0ce5..4eb43d0 100644 --- a/frontend/tsconfig.node.json +++ b/frontend/tsconfig.node.json @@ -1,9 +1,11 @@ { "compilerOptions": { "composite": true, + "skipLibCheck": true, "module": "ESNext", - "moduleResolution": "Node", - "allowSyntheticDefaultImports": true + "moduleResolution": "bundler", + "allowSyntheticDefaultImports": true, + "strict": true }, "include": ["vite.config.ts"] } \ No newline at end of file diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index 3c69c55..66b2b5b 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -1,14 +1,16 @@ +/// + import { defineConfig } from 'vite'; import vue from '@vitejs/plugin-vue'; -import path from 'path'; +import { fileURLToPath, URL } from 'node:url'; // https://vitejs.dev/config/ export default defineConfig({ plugins: [vue()], resolve: { alias: { - '@': path.resolve(__dirname, './src'), - }, + '@': fileURLToPath(new URL('./src', import.meta.url)) + } }, server: { host: true,