website cleanup
This commit is contained in:
@@ -211,16 +211,7 @@
|
|||||||
"extends": ["plugin:import/recommended", "plugin:import/typescript"],
|
"extends": ["plugin:import/recommended", "plugin:import/typescript"],
|
||||||
"rules": {
|
"rules": {
|
||||||
"@typescript-eslint/no-explicit-any": "error",
|
"@typescript-eslint/no-explicit-any": "error",
|
||||||
"@typescript-eslint/no-unused-vars": [
|
"@typescript-eslint/no-unused-vars": "error",
|
||||||
"error",
|
|
||||||
{
|
|
||||||
"args": "all",
|
|
||||||
"argsIgnorePattern": "^_",
|
|
||||||
"vars": "all",
|
|
||||||
"varsIgnorePattern": "^_",
|
|
||||||
"caughtErrors": "all"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"boundaries/element-types": [
|
"boundaries/element-types": [
|
||||||
2,
|
2,
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"extends": ["next/core-web-vitals", "plugin:import/recommended", "plugin:import/typescript"],
|
"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": {
|
"settings": {
|
||||||
"import/resolver": {
|
"import/resolver": {
|
||||||
"typescript": {}
|
"typescript": {}
|
||||||
@@ -15,11 +15,10 @@
|
|||||||
"error",
|
"error",
|
||||||
{
|
{
|
||||||
"args": "all",
|
"args": "all",
|
||||||
"argsIgnorePattern": "^$",
|
"argsIgnorePattern": "^_",
|
||||||
"vars": "all",
|
"vars": "all",
|
||||||
"varsIgnorePattern": "^$",
|
"varsIgnorePattern": "^_",
|
||||||
"caughtErrors": "all",
|
"caughtErrors": "all"
|
||||||
"ignoreTypeImports": false
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"boundaries/element-types": [
|
"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 primaryChampionship = viewModel.scoringConfig.championships.find(c => c.type === 'driver') ?? viewModel.scoringConfig.championships[0];
|
||||||
const positionPoints = primaryChampionship?.pointsPreview
|
const positionPoints = primaryChampionship?.pointsPreview
|
||||||
.filter(p => p.sessionType === primaryChampionship.sessionTypes[0])
|
.filter(p => (p as any).sessionType === primaryChampionship.sessionTypes[0])
|
||||||
.map(p => ({ position: p.position, points: p.points }))
|
.map(p => ({ position: Number((p as any).position), points: Number((p as any).points) }))
|
||||||
.sort((a, b) => a.position - b.position) || [];
|
.sort((a, b) => a.position - b.position) || [];
|
||||||
|
|
||||||
const sections: { id: RulebookSection; label: string }[] = [
|
const sections: { id: RulebookSection; label: string }[] = [
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import DriverSummaryPill from '@/components/profile/DriverSummaryPill';
|
|||||||
import Button from '@/components/ui/Button';
|
import Button from '@/components/ui/Button';
|
||||||
import { UserCog } from 'lucide-react';
|
import { UserCog } from 'lucide-react';
|
||||||
import { LeagueSettingsViewModel } from '@/lib/view-models/LeagueSettingsViewModel';
|
import { LeagueSettingsViewModel } from '@/lib/view-models/LeagueSettingsViewModel';
|
||||||
|
import { DriverViewModel } from '@/lib/view-models/DriverViewModel';
|
||||||
|
|
||||||
interface LeagueOwnershipTransferProps {
|
interface LeagueOwnershipTransferProps {
|
||||||
settings: LeagueSettingsViewModel;
|
settings: LeagueSettingsViewModel;
|
||||||
@@ -44,7 +45,14 @@ export default function LeagueOwnershipTransfer({
|
|||||||
<h3 className="text-sm font-semibold text-gray-400 mb-3">League Owner</h3>
|
<h3 className="text-sm font-semibold text-gray-400 mb-3">League Owner</h3>
|
||||||
{ownerSummary ? (
|
{ownerSummary ? (
|
||||||
<DriverSummaryPill
|
<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}
|
rating={ownerSummary.rating}
|
||||||
rank={ownerSummary.rank}
|
rank={ownerSummary.rank}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -2,7 +2,13 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "ES2022",
|
"target": "ES2022",
|
||||||
"module": "ESNext",
|
"module": "ESNext",
|
||||||
"lib": ["ES2022", "DOM", "dom", "dom.iterable", "esnext"],
|
"lib": [
|
||||||
|
"ES2022",
|
||||||
|
"DOM",
|
||||||
|
"dom",
|
||||||
|
"dom.iterable",
|
||||||
|
"esnext"
|
||||||
|
],
|
||||||
"moduleResolution": "bundler",
|
"moduleResolution": "bundler",
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"jsx": "preserve",
|
"jsx": "preserve",
|
||||||
@@ -29,24 +35,52 @@
|
|||||||
"incremental": true,
|
"incremental": true,
|
||||||
"noEmitOnError": true,
|
"noEmitOnError": true,
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"types": ["react", "react-dom"],
|
"types": [
|
||||||
|
"react",
|
||||||
|
"react-dom"
|
||||||
|
],
|
||||||
"plugins": [
|
"plugins": [
|
||||||
{
|
{
|
||||||
"name": "next"
|
"name": "next"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"paths": {
|
"paths": {
|
||||||
"@/*": ["./*"],
|
"@/*": [
|
||||||
"@testing/*": ["../../testing/*"],
|
"./*"
|
||||||
"@/lib/dtos": ["./lib/dtos"],
|
],
|
||||||
"@/lib/view-models": ["./lib/view-models"],
|
"@testing/*": [
|
||||||
"@/lib/presenters": ["./lib/presenters"],
|
"../../testing/*"
|
||||||
"@/lib/services": ["./lib/services"],
|
],
|
||||||
"@/lib/api": ["./lib/api"],
|
"@/lib/dtos": [
|
||||||
"@/lib/types": ["./lib/types"]
|
"./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": [
|
"exclude": [
|
||||||
"**/*.test.ts",
|
"**/*.test.ts",
|
||||||
"**/*.test.tsx",
|
"**/*.test.tsx",
|
||||||
|
|||||||
Reference in New Issue
Block a user