From ff9bc6717c160a27a81fe881085c9ad970a448ed Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 16 Jun 2026 21:36:54 +0000 Subject: [PATCH] Fix no-shadow lint error in scoring-event.ts Rename the inner maxGameNumberByEvent local inside the IIFE to `map` so it no longer shadows the outer destructuring target of the same name. https://claude.ai/code/session_01NpQNGWacjg7mbnq8aaUweJ --- app/models/scoring-event.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/models/scoring-event.ts b/app/models/scoring-event.ts index 136a5b9..354fc76 100644 --- a/app/models/scoring-event.ts +++ b/app/models/scoring-event.ts @@ -627,8 +627,8 @@ export async function getUpcomingEventsForDraftedParticipants( (async () => { // Determine max game number per event across ALL games (not date-filtered) // so we can distinguish single-game matchups from multi-game series. - const maxGameNumberByEvent = new Map(); - if (eventIdsFromRows.length === 0) return maxGameNumberByEvent; + const map = new Map(); + if (eventIdsFromRows.length === 0) return map; const allGameRows = await db .selectDistinct({ @@ -648,11 +648,11 @@ export async function getUpcomingEventsForDraftedParticipants( for (const row of allGameRows) { if (row.gameNumber !== null) { - const current = maxGameNumberByEvent.get(row.eventId) ?? 0; - maxGameNumberByEvent.set(row.eventId, Math.max(current, row.gameNumber)); + const current = map.get(row.eventId) ?? 0; + map.set(row.eventId, Math.max(current, row.gameNumber)); } } - return maxGameNumberByEvent; + return map; })(), ]);