lint: remove unused imports and variables in server files (6 fixes)

Co-Authored-By: Justin Edmund <justin@jedmund.com>
This commit is contained in:
Devin AI 2025-11-23 14:41:22 +00:00
parent 29f2da61dd
commit 6caf2651ac
4 changed files with 5 additions and 8 deletions

View file

@ -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<T>(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
}

View file

@ -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

View file

@ -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 = {

View file

@ -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