Fix no-shadow lint error in scoring-event.ts
All checks were successful
🚀 Deploy / 🧪 Test (pull_request) Successful in 2m57s
🚀 Deploy / ʦ🔍 Typecheck & Lint (pull_request) Successful in 1m16s
🚀 Deploy / 🐳 Build (pull_request) Has been skipped
🚀 Deploy / 🚀 Deploy (pull_request) Has been skipped

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
This commit is contained in:
Claude 2026-06-16 21:36:54 +00:00
parent e5728fd7ed
commit ff9bc6717c
No known key found for this signature in database

View file

@ -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<string, number>();
if (eventIdsFromRows.length === 0) return maxGameNumberByEvent;
const map = new Map<string, number>();
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;
})(),
]);