fix: comprehensive TypeScript/build fixes and modernization

- Update tsconfig to ES2024 target and bundler moduleResolution
- Add dynamic imports for chart.js and recharts (bundle optimization)
- Consolidate 17 useState into useReducer in sessions page
- Fix 18 .js extension imports across lib files
- Add type declarations for @rapideditor/country-coder
- Fix platform user types (PlatformUserRole enum)
- Fix Calendar component prop types
- Centralize next-auth type augmentation
- Add force-dynamic to all API routes (prevent build-time prerender)
- Fix Prisma JSON null handling with Prisma.DbNull
- Fix various type mismatches (SessionMessage, ImportRecord, etc.)
- Export ButtonProps from button component
- Update next-themes import path
- Replace JSX.Element with React.ReactElement
- Remove obsolete debug scripts and pnpm lockfile
- Downgrade eslint to v8 for next compatibility
This commit is contained in:
2026-01-20 07:28:10 +01:00
parent 8b3846539f
commit 5bfd762e55
161 changed files with 14655 additions and 11682 deletions

View File

@@ -4,26 +4,26 @@
"version": "0.2.0",
"private": true,
"scripts": {
"build": "next build",
"dev": "pnpm exec tsx server.ts",
"build": "tsc --noEmit && next build",
"dev": "bun server.ts",
"dev:next-only": "next dev --turbopack",
"format": "npx prettier --write .",
"format:check": "npx prettier --check .",
"format": "bunx prettier --write .",
"format:check": "bunx prettier --check .",
"lint": "eslint .",
"lint:fix": "npx eslint --fix",
"lint:fix": "bunx eslint --fix",
"biome:check": "biome check .",
"biome:fix": "biome check --write .",
"biome:format": "biome format --write .",
"biome:lint": "biome lint .",
"prisma:generate": "prisma generate",
"prisma:migrate": "prisma migrate dev",
"prisma:seed": "pnpm exec tsx prisma/seed.ts",
"prisma:seed:platform": "pnpm exec tsx prisma/seed-platform.ts",
"prisma:seed": "bun prisma/seed.ts",
"prisma:seed:platform": "bun prisma/seed-platform.ts",
"prisma:push": "prisma db push",
"prisma:push:force": "prisma db push --force-reset",
"prisma:studio": "prisma studio",
"db:check": "pnpm exec tsx scripts/check-database-config.ts",
"start": "node server.mjs",
"db:check": "bun scripts/check-database-config.ts",
"start": "bun server.mjs",
"test": "concurrently 'vitest run' 'playwright test'",
"test:coverage": "concurrently \"vitest run --coverage\" \"echo 'To add playwright coverage thingy'\"",
"test:vitest": "vitest run",
@@ -62,6 +62,7 @@
"@types/node-fetch": "^2.6.13",
"bcryptjs": "^3.0.3",
"canvas-confetti": "^1.9.4",
"chart.js": "^4.5.1",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"csv-parse": "^5.6.0",
@@ -109,7 +110,7 @@
"@vitejs/plugin-react": "^4.7.0",
"@vitest/coverage-v8": "^3.2.4",
"concurrently": "^9.2.1",
"eslint": "^9.39.2",
"eslint": "^8.57.0",
"eslint-config-next": "^15.5.9",
"eslint-plugin-prettier": "^5.5.5",
"eslint-plugin-react-hooks": "^5.2.0",
@@ -178,7 +179,7 @@
"*.json"
]
},
"packageManager": "pnpm@10.12.4",
"packageManager": "bun@1.3.6",
"lint-staged": {
"*.{js,jsx,ts,tsx,json}": [
"biome check --write"