From 6caf2651acbaf0d857134eccd88d85157b66d288 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Sun, 23 Nov 2025 14:41:22 +0000 Subject: [PATCH] lint: remove unused imports and variables in server files (6 fixes) Co-Authored-By: Justin Edmund --- src/lib/server/apple-music-client.ts | 5 ++--- src/lib/server/cache-manager.ts | 4 ++-- src/lib/server/cloudinary.ts | 3 +-- src/lib/server/color-utils.ts | 1 - 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/lib/server/apple-music-client.ts b/src/lib/server/apple-music-client.ts index 2d42e67..26e84a3 100644 --- a/src/lib/server/apple-music-client.ts +++ b/src/lib/server/apple-music-client.ts @@ -2,8 +2,7 @@ import { getAppleMusicHeaders } from './apple-music-auth' import type { AppleMusicAlbum, AppleMusicTrack, - AppleMusicSearchResponse, - AppleMusicErrorResponse + AppleMusicSearchResponse } from '$lib/types/apple-music' import { isAppleMusicError } from '$lib/types/apple-music' import { ApiRateLimiter } from './rate-limiter' @@ -74,7 +73,7 @@ async function makeAppleMusicRequest(endpoint: string, identifier?: string): `Apple Music API Error: ${errorData.errors[0]?.detail || 'Unknown error'}` ) } - } catch (e) { + } catch (_e) { // If not JSON, throw the text error } diff --git a/src/lib/server/cache-manager.ts b/src/lib/server/cache-manager.ts index 2ef1458..5e16f71 100644 --- a/src/lib/server/cache-manager.ts +++ b/src/lib/server/cache-manager.ts @@ -111,7 +111,7 @@ export class CacheManager { let totalDeleted = 0 // Clear all cache types that might contain this album - for (const [type, config] of this.cacheTypes) { + for (const [type] of this.cacheTypes) { if (type.includes('album') || type.includes('notfound')) { const deleted = await this.clearPattern(type, albumKey) totalDeleted += deleted @@ -162,4 +162,4 @@ export const cache = { isNotFound: (artist: string, album: string) => CacheManager.get('apple-notfound', `${artist}:${album}`), markNotFound: (artist: string, album: string, ttl?: number) => CacheManager.set('apple-notfound', `${artist}:${album}`, '1', ttl) } -} \ No newline at end of file +} diff --git a/src/lib/server/cloudinary.ts b/src/lib/server/cloudinary.ts index f7ed2ae..d26fe38 100644 --- a/src/lib/server/cloudinary.ts +++ b/src/lib/server/cloudinary.ts @@ -1,5 +1,5 @@ import { v2 as cloudinary } from 'cloudinary' -import type { UploadApiResponse, UploadApiErrorResponse } from 'cloudinary' +import type { UploadApiResponse } from 'cloudinary' import { logger } from './logger' import { uploadFileLocally } from './local-storage' import { dev } from '$app/environment' @@ -130,7 +130,6 @@ export async function uploadFile( // Extract filename without extension const fileNameWithoutExt = file.name.replace(/\.[^/.]+$/, '') - const fileExtension = file.name.split('.').pop()?.toLowerCase() // Prepare upload options const uploadOptions = { diff --git a/src/lib/server/color-utils.ts b/src/lib/server/color-utils.ts index ce8c3b7..5371d46 100644 --- a/src/lib/server/color-utils.ts +++ b/src/lib/server/color-utils.ts @@ -109,7 +109,6 @@ export function selectBestDominantColor( ): string { const { minPercentage = 2, // Ignore colors below this percentage - preferVibrant = true, excludeGreys = false, preferBrighter = true // Avoid very dark colors } = options