website cleanup
This commit is contained in:
@@ -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,
|
||||
{
|
||||
|
||||
@@ -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": [
|
||||
|
||||
@@ -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 }[] = [
|
||||
|
||||
@@ -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({
|
||||
<h3 className="text-sm font-semibold text-gray-400 mb-3">League Owner</h3>
|
||||
{ownerSummary ? (
|
||||
<DriverSummaryPill
|
||||
driver={ownerSummary.driver}
|
||||
driver={new DriverViewModel({
|
||||
id: ownerSummary.driver.id,
|
||||
name: ownerSummary.driver.name,
|
||||
iracingId: ownerSummary.driver.iracingId,
|
||||
country: ownerSummary.driver.country,
|
||||
bio: ownerSummary.driver.bio,
|
||||
joinedAt: ownerSummary.driver.joinedAt,
|
||||
})}
|
||||
rating={ownerSummary.rating}
|
||||
rank={ownerSummary.rank}
|
||||
/>
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user