lint: remove unused imports and variables (8 fixes)

Co-Authored-By: Justin Edmund <justin@jedmund.com>
This commit is contained in:
Devin AI 2025-11-23 14:43:41 +00:00
parent 1cda37dafb
commit ee31ed9a1e
6 changed files with 3 additions and 33 deletions

View file

@ -1,4 +1,4 @@
type SerializableGameInfo = {
export type SerializableGameInfo = {
id: number | string | null
name: string
playtime: string | number | undefined

View file

@ -1,4 +1,3 @@
import type { Album } from '$lib/types/lastfm'
import { logger } from '$lib/server/logger'
export interface TrackPlayInfo {

View file

@ -1,5 +1,4 @@
<script>
import { page } from '$app/stores';
</script>
<div class="error-container">

View file

@ -40,22 +40,6 @@ async function fetchRecentAlbums(fetch: typeof window.fetch): Promise<Album[]> {
return musicData.albums
}
async function fetchRecentSteamGames(fetch: typeof window.fetch): Promise<SerializableGameInfo[]> {
const response = await fetch('/api/steam')
if (!response.ok) {
throw new Error(`Failed to fetch recent game: ${response.status}`)
}
return await response.json()
}
async function fetchRecentPSNGames(fetch: typeof window.fetch): Promise<SerializableGameInfo[]> {
const response = await fetch('/api/psn')
if (!response.ok) {
throw new Error(`Failed to fetch recent game: ${response.status}`)
}
return await response.json()
}
async function fetchProjects(
fetch: typeof window.fetch
): Promise<{ projects: Project[]; pagination: any }> {

View file

@ -43,8 +43,6 @@
let filteredAlbums = $state<Album[]>([])
let isLoading = $state(true)
let error = $state('')
let total = $state(0)
let albumTypeCounts = $state<Record<string, number>>({})
let showDeleteModal = $state(false)
let albumToDelete = $state<Album | null>(null)
let activeDropdown = $state<number | null>(null)
@ -101,15 +99,6 @@
const data = await response.json()
albums = data.albums || []
total = data.pagination?.total || albums.length
// Calculate album status counts
const counts: Record<string, number> = {
all: albums.length,
published: albums.filter((a) => a.status === 'published').length,
draft: albums.filter((a) => a.status === 'draft').length
}
albumTypeCounts = counts
// Apply initial filter and sort
applyFilterAndSort()

View file

@ -24,7 +24,6 @@
const media = $derived(data.items ?? [])
const currentPage = $derived(data.pagination?.page ?? 1)
const totalPages = $derived(data.pagination?.totalPages ?? 1)
const total = $derived(data.pagination?.total ?? 0)
// Read filter states from URL
const filterType = $derived($page.url.searchParams.get('mimeType') ?? 'all')
@ -149,7 +148,7 @@
isDetailsModalOpen = false
}
async function handleMediaUpdate(updatedMedia: Media) {
async function handleMediaUpdate(_updatedMedia: Media) {
// Invalidate to reload from server
await invalidate('admin:media')
}