From b430dbd364d5f5f0c8534e625e024c72a27e07fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?William=20S=C3=B6derberg?= Date: Wed, 11 Mar 2026 19:02:36 +0100 Subject: [PATCH] error fixing --- frontend/package-lock.json | 2 +- frontend/package.json | 2 +- frontend/src/index.css | 1 + frontend/tsconfig.app.json | 19 +++++++++++++------ frontend/vite.config.ts | 16 +++++++++++----- 5 files changed, 27 insertions(+), 13 deletions(-) diff --git a/frontend/package-lock.json b/frontend/package-lock.json index a1a2fdf..98343f4 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -30,7 +30,7 @@ "eslint-plugin-react-hooks": "^7.0.1", "eslint-plugin-react-refresh": "^0.4.24", "globals": "^16.5.0", - "jsdom": "^28.0.0", + "jsdom": "^28.1.0", "postcss": "^8.5.6", "tailwindcss": "^4.1.18", "typescript-eslint": "^8.57.0", diff --git a/frontend/package.json b/frontend/package.json index b18ff9e..736a048 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -33,7 +33,7 @@ "eslint-plugin-react-hooks": "^7.0.1", "eslint-plugin-react-refresh": "^0.4.24", "globals": "^16.5.0", - "jsdom": "^28.0.0", + "jsdom": "^28.1.0", "postcss": "^8.5.6", "tailwindcss": "^4.1.18", "typescript-eslint": "^8.57.0", diff --git a/frontend/src/index.css b/frontend/src/index.css index abda2c2..e90de6c 100644 --- a/frontend/src/index.css +++ b/frontend/src/index.css @@ -1,4 +1,5 @@ /* frontend/src/index.css */ + @import "tailwindcss"; @custom-variant dark (&:where(.dark, .dark *)); diff --git a/frontend/tsconfig.app.json b/frontend/tsconfig.app.json index a9b5a59..64ebd99 100644 --- a/frontend/tsconfig.app.json +++ b/frontend/tsconfig.app.json @@ -3,11 +3,17 @@ "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo", "target": "ES2022", "useDefineForClassFields": true, - "lib": ["ES2022", "DOM", "DOM.Iterable"], + "lib": [ + "ES2022", + "DOM", + "DOM.Iterable" + ], "module": "ESNext", - "types": ["vite/client"], + "types": [ + "vite/client", + "vitest/globals" + ], "skipLibCheck": true, - /* Bundler mode */ "moduleResolution": "bundler", "allowImportingTsExtensions": true, @@ -15,7 +21,6 @@ "moduleDetection": "force", "noEmit": true, "jsx": "react-jsx", - /* Linting */ "strict": true, "noUnusedLocals": true, @@ -24,5 +29,7 @@ "noFallthroughCasesInSwitch": true, "noUncheckedSideEffectImports": true }, - "include": ["src"] -} + "include": [ + "src" + ] +} \ No newline at end of file diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index 2b7de4c..f1174aa 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -1,10 +1,16 @@ // frontend/vite.config.ts -import { defineConfig } from 'vite' -import react from '@vitejs/plugin-react' -import tailwindcss from '@tailwindcss/vite' +import tailwindcss from '@tailwindcss/vite'; +import react from '@vitejs/plugin-react'; +import { defineConfig } from 'vitest/config'; -// https://vite.dev/config/ export default defineConfig({ - plugins: [react(), tailwindcss(),], + plugins: [ + react(), + tailwindcss() + ], + test: { + globals: true, + environment: 'jsdom', + }, })