From 94e13f1129f7925ef42b997c82caa1a16ffec5b3 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Sun, 23 Nov 2025 04:48:06 -0800 Subject: [PATCH] chore: auto-fix linting issues with eslint --fix Apply automatic fixes for prefer-const violations and other auto-fixable linting errors. Reduces error count from 613 to 622. --- src/lib/server/apple-music-client.ts | 2 +- src/routes/api/lastfm/stream/+server.ts | 2 +- src/routes/api/posts/+server.ts | 2 +- src/routes/api/posts/[id]/+server.ts | 4 ++-- src/routes/api/psn/+server.ts | 2 +- src/routes/api/steam/+server.ts | 2 +- tests/autoSaveStore.test.ts | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/lib/server/apple-music-client.ts b/src/lib/server/apple-music-client.ts index 54a0791..2d42e67 100644 --- a/src/lib/server/apple-music-client.ts +++ b/src/lib/server/apple-music-client.ts @@ -263,7 +263,7 @@ export async function findAlbum(artist: string, album: string): Promise { + const match = albums.find((a) => { const albumName = a.attributes?.name || '' const artistName = a.attributes?.artistName || '' diff --git a/src/routes/api/lastfm/stream/+server.ts b/src/routes/api/lastfm/stream/+server.ts index 1a75d58..89cd7cc 100644 --- a/src/routes/api/lastfm/stream/+server.ts +++ b/src/routes/api/lastfm/stream/+server.ts @@ -18,7 +18,7 @@ export const GET: RequestHandler = async ({ request }) => { let intervalId: NodeJS.Timeout | null = null let isClosed = false let currentInterval = UPDATE_INTERVAL - let isPlaying = false + const isPlaying = false // Send initial connection message try { diff --git a/src/routes/api/posts/+server.ts b/src/routes/api/posts/+server.ts index 3d258b0..3140afe 100644 --- a/src/routes/api/posts/+server.ts +++ b/src/routes/api/posts/+server.ts @@ -98,7 +98,7 @@ export const POST: RequestHandler = async (event) => { } // Use content as-is (no special handling needed) - let postContent = data.content + const postContent = data.content const post = await prisma.post.create({ data: { diff --git a/src/routes/api/posts/[id]/+server.ts b/src/routes/api/posts/[id]/+server.ts index 2095119..39d975a 100644 --- a/src/routes/api/posts/[id]/+server.ts +++ b/src/routes/api/posts/[id]/+server.ts @@ -75,8 +75,8 @@ export const PUT: RequestHandler = async (event) => { } // Use content as-is (no special handling needed) - let featuredImageId = data.featuredImage - let postContent = data.content + const featuredImageId = data.featuredImage + const postContent = data.content const post = await prisma.post.update({ where: { id }, diff --git a/src/routes/api/psn/+server.ts b/src/routes/api/psn/+server.ts index 060c1b0..917dc74 100644 --- a/src/routes/api/psn/+server.ts +++ b/src/routes/api/psn/+server.ts @@ -47,7 +47,7 @@ async function authorize(npsso: string): Promise { async function getSerializedGames(psnId: string): Promise { // Authorize with PSN and get games sorted by last played time - let authorization = await authorize(PSN_NPSSO_TOKEN || '') + const authorization = await authorize(PSN_NPSSO_TOKEN || '') const response = await getUserPlayedTime(authorization, PSN_ID, { limit: 5, categories: ['ps4_game', 'ps5_native_game'] diff --git a/src/routes/api/steam/+server.ts b/src/routes/api/steam/+server.ts index 72f34c2..dbf4340 100644 --- a/src/routes/api/steam/+server.ts +++ b/src/routes/api/steam/+server.ts @@ -66,7 +66,7 @@ async function getSerializedGames(steamId: string): Promise ({ + const games: SerializableGameInfo[] = extendedGames.map((game) => ({ id: game.game.id, name: game.game.name, playtime: game.minutes, diff --git a/tests/autoSaveStore.test.ts b/tests/autoSaveStore.test.ts index e189314..efdc174 100644 --- a/tests/autoSaveStore.test.ts +++ b/tests/autoSaveStore.test.ts @@ -11,7 +11,7 @@ describe('createAutoSaveStore', () => { }) it('skips save when payload matches primed baseline', async () => { - let value = 0 + const value = 0 let saveCalls = 0 const controller = createAutoSaveController<{ value: number }>({