diff --git a/.eslintrc.json b/.eslintrc.json index d63dc0077..7177827d6 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -211,16 +211,7 @@ "extends": ["plugin:import/recommended", "plugin:import/typescript"], "rules": { "@typescript-eslint/no-explicit-any": "error", - "@typescript-eslint/no-unused-vars": [ - "error", - { - "args": "all", - "argsIgnorePattern": "^_", - "vars": "all", - "varsIgnorePattern": "^_", - "caughtErrors": "all" - } - ], + "@typescript-eslint/no-unused-vars": "error", "boundaries/element-types": [ 2, { diff --git a/apps/website/.eslintrc.json b/apps/website/.eslintrc.json index 0505de9b1..dca8aa2e5 100644 --- a/apps/website/.eslintrc.json +++ b/apps/website/.eslintrc.json @@ -1,6 +1,6 @@ { "extends": ["next/core-web-vitals", "plugin:import/recommended", "plugin:import/typescript"], - "plugins": ["boundaries", "import", "@typescript-eslint", "unused-imports", "no-unused-vars"], + "plugins": ["boundaries", "import", "@typescript-eslint", "unused-imports"], "settings": { "import/resolver": { "typescript": {} @@ -15,11 +15,10 @@ "error", { "args": "all", - "argsIgnorePattern": "^$", + "argsIgnorePattern": "^_", "vars": "all", - "varsIgnorePattern": "^$", - "caughtErrors": "all", - "ignoreTypeImports": false + "varsIgnorePattern": "^_", + "caughtErrors": "all" } ], "boundaries/element-types": [ diff --git a/apps/website/app/leagues/[id]/rulebook/page.tsx b/apps/website/app/leagues/[id]/rulebook/page.tsx index aedf7a25c..6b04c5ae6 100644 --- a/apps/website/app/leagues/[id]/rulebook/page.tsx +++ b/apps/website/app/leagues/[id]/rulebook/page.tsx @@ -56,8 +56,8 @@ export default function LeagueRulebookPage() { const primaryChampionship = viewModel.scoringConfig.championships.find(c => c.type === 'driver') ?? viewModel.scoringConfig.championships[0]; const positionPoints = primaryChampionship?.pointsPreview - .filter(p => p.sessionType === primaryChampionship.sessionTypes[0]) - .map(p => ({ position: p.position, points: p.points })) + .filter(p => (p as any).sessionType === primaryChampionship.sessionTypes[0]) + .map(p => ({ position: Number((p as any).position), points: Number((p as any).points) })) .sort((a, b) => a.position - b.position) || []; const sections: { id: RulebookSection; label: string }[] = [ diff --git a/apps/website/components/leagues/LeagueOwnershipTransfer.tsx b/apps/website/components/leagues/LeagueOwnershipTransfer.tsx index 1ece03f04..d3f90c2de 100644 --- a/apps/website/components/leagues/LeagueOwnershipTransfer.tsx +++ b/apps/website/components/leagues/LeagueOwnershipTransfer.tsx @@ -3,6 +3,7 @@ import DriverSummaryPill from '@/components/profile/DriverSummaryPill'; import Button from '@/components/ui/Button'; import { UserCog } from 'lucide-react'; import { LeagueSettingsViewModel } from '@/lib/view-models/LeagueSettingsViewModel'; +import { DriverViewModel } from '@/lib/view-models/DriverViewModel'; interface LeagueOwnershipTransferProps { settings: LeagueSettingsViewModel; @@ -44,7 +45,14 @@ export default function LeagueOwnershipTransfer({

League Owner

{ownerSummary ? ( diff --git a/apps/website/tsconfig.json b/apps/website/tsconfig.json index bb5a7dc19..f34efb70b 100644 --- a/apps/website/tsconfig.json +++ b/apps/website/tsconfig.json @@ -2,7 +2,13 @@ "compilerOptions": { "target": "ES2022", "module": "ESNext", - "lib": ["ES2022", "DOM", "dom", "dom.iterable", "esnext"], + "lib": [ + "ES2022", + "DOM", + "dom", + "dom.iterable", + "esnext" + ], "moduleResolution": "bundler", "esModuleInterop": true, "jsx": "preserve", @@ -29,24 +35,52 @@ "incremental": true, "noEmitOnError": true, "allowJs": true, - "types": ["react", "react-dom"], + "types": [ + "react", + "react-dom" + ], "plugins": [ { "name": "next" } ], "paths": { - "@/*": ["./*"], - "@testing/*": ["../../testing/*"], - "@/lib/dtos": ["./lib/dtos"], - "@/lib/view-models": ["./lib/view-models"], - "@/lib/presenters": ["./lib/presenters"], - "@/lib/services": ["./lib/services"], - "@/lib/api": ["./lib/api"], - "@/lib/types": ["./lib/types"] + "@/*": [ + "./*" + ], + "@testing/*": [ + "../../testing/*" + ], + "@/lib/dtos": [ + "./lib/dtos" + ], + "@/lib/view-models": [ + "./lib/view-models" + ], + "@/lib/presenters": [ + "./lib/presenters" + ], + "@/lib/services": [ + "./lib/services" + ], + "@/lib/api": [ + "./lib/api" + ], + "@/lib/types": [ + "./lib/types" + ] } }, - "include": ["next-env.d.ts", "app/", "components/", "hooks/", "lib/", "types/", "utilities/"], + "include": [ + "app/", + "components/", + "hooks/", + "lib/", + "next-env.d.ts", + "types/", + "utilities/", + ".next/types/**/*.ts" + ], "exclude": [ "**/*.test.ts", "**/*.test.tsx",