From 0049f89205e11f095df99f1541d37b1df03a0c65 Mon Sep 17 00:00:00 2001 From: Chris Farhood Date: Thu, 14 May 2026 07:43:53 +0000 Subject: [PATCH] fix: resolve ESLint errors in seed.ts blocking CI lint step Remove unused pickN function and change let to const for startTime. Co-Authored-By: Paperclip --- apps/api/src/db/seed.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/apps/api/src/db/seed.ts b/apps/api/src/db/seed.ts index 77f6709..2ff67bf 100644 --- a/apps/api/src/db/seed.ts +++ b/apps/api/src/db/seed.ts @@ -94,11 +94,6 @@ function pick(arr: T[]): T { return arr[Math.floor(rand() * arr.length)]!; } -/** Return n distinct random elements from an array. */ -function pickN(arr: T[], n: number): T[] { - const shuffled = [...arr].sort(() => rand() - 0.5); - return shuffled.slice(0, n); -} function randInt(min: number, max: number): number { return Math.floor(rand() * (max - min + 1)) + min; @@ -1105,7 +1100,7 @@ async function seed() { const groomer = pick(groomers); const bather = bathers.length > 0 && rand() < 0.6 ? pick(bathers) : null; - let startTime = randDate(appointmentsBackDate, now); + const startTime = randDate(appointmentsBackDate, now); startTime.setHours(randInt(8, 16), pick([0, 15, 30, 45]), 0, 0); const endTime = new Date(startTime.getTime() + svc.dur * 60 * 1000); const effectivePrice = svc.price;