From 49879c43ebd9f36ec19f4c02fa2b121314126286 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Fri, 29 May 2026 23:44:08 +0000 Subject: style: apply biome autofixes and resolve remaining lint findings Auto-fixed cosmetic findings (import ordering, obj["k"]->obj.k, optional chaining, template literals, Date.now, parseInt radix, useless ternaries/ switch cases). Resolved the non-autofixable rest by hand: - Senpy: static-only class -> object literal (no this/static reliance). - app.html: var global shim -> window.global = window (keeps the shim, drops the unused-var flag). - biome-ignore with rationale for the logout document.cookie clear and the holodule scrape non-null assertion. Verified: biome check 0 diagnostics, svelte-check 0/0, 24/24 unit tests. --- src/stores/airingNow.ts | 2 +- src/stores/announcementHash.ts | 4 ++-- src/stores/identity.ts | 4 ++-- src/stores/lastPruneTimes.ts | 4 ++-- src/stores/locale.ts | 3 +-- src/stores/settings.ts | 4 ++-- src/stores/stateBin.ts | 4 ++-- src/stores/subsPlease.ts | 2 +- 8 files changed, 13 insertions(+), 14 deletions(-) (limited to 'src/stores') diff --git a/src/stores/airingNow.ts b/src/stores/airingNow.ts index b885b7a7..52b7bbb2 100644 --- a/src/stores/airingNow.ts +++ b/src/stores/airingNow.ts @@ -1,5 +1,5 @@ -import { browser } from "$app/environment"; import { readable } from "svelte/store"; +import { browser } from "$app/environment"; const TICK_INTERVAL_MS = 30 * 1000; diff --git a/src/stores/announcementHash.ts b/src/stores/announcementHash.ts index 0a41002f..4497036c 100644 --- a/src/stores/announcementHash.ts +++ b/src/stores/announcementHash.ts @@ -1,8 +1,8 @@ -import { browser } from "$app/environment"; import { writable } from "svelte/store"; +import { browser } from "$app/environment"; const announcementHash = writable( - browser ? parseInt(localStorage.getItem("announcementHash") || "1") : 1, + browser ? parseInt(localStorage.getItem("announcementHash") || "1", 10) : 1, ); announcementHash.subscribe((value) => { diff --git a/src/stores/identity.ts b/src/stores/identity.ts index abe0b40d..230da218 100644 --- a/src/stores/identity.ts +++ b/src/stores/identity.ts @@ -1,7 +1,7 @@ +import localforage from "localforage"; +import { writable } from "svelte/store"; import { browser } from "$app/environment"; import type { UserIdentity } from "$lib/Data/AniList/identity"; -import { writable } from "svelte/store"; -import localforage from "localforage"; export const defaultIdentity: UserIdentity = { name: "", diff --git a/src/stores/lastPruneTimes.ts b/src/stores/lastPruneTimes.ts index 2a770538..9935a2b7 100644 --- a/src/stores/lastPruneTimes.ts +++ b/src/stores/lastPruneTimes.ts @@ -1,6 +1,6 @@ -import { browser } from "$app/environment"; -import { writable } from "svelte/store"; import localforage from "localforage"; +import { writable } from "svelte/store"; +import { browser } from "$app/environment"; interface LastPruneTimes { anime: number; diff --git a/src/stores/locale.ts b/src/stores/locale.ts index 1b94ea96..fc879b46 100644 --- a/src/stores/locale.ts +++ b/src/stores/locale.ts @@ -58,8 +58,7 @@ const createLocale = () => { resolved = current; } else { const fallback = $json(keyStr, FALLBACK_LOCALE); - const fallbackMissing = - fallback === keyStr || fallback == null; + const fallbackMissing = fallback === keyStr || fallback == null; if (currentMissing && fallbackMissing) return undefined; if (currentMissing) resolved = fallback; diff --git a/src/stores/settings.ts b/src/stores/settings.ts index 50dd4013..1edab858 100644 --- a/src/stores/settings.ts +++ b/src/stores/settings.ts @@ -1,10 +1,10 @@ +import { get, writable } from "svelte/store"; import { browser } from "$app/environment"; import { parseJsonStringOrDefault } from "$lib/Effect/json"; import root from "$lib/Utility/root"; -import { get, writable } from "svelte/store"; +import identity from "./identity"; import settingsSyncPulled from "./settingsSyncPulled"; import settingsSyncTimes from "./settingsSyncTimes"; -import identity from "./identity"; const VERSION = "1.0.1"; diff --git a/src/stores/stateBin.ts b/src/stores/stateBin.ts index 3fd38a99..9f5cf5fe 100644 --- a/src/stores/stateBin.ts +++ b/src/stores/stateBin.ts @@ -1,6 +1,6 @@ -import { browser } from "$app/environment"; -import { writable, get, type Writable } from "svelte/store"; import localforage from "localforage"; +import { get, type Writable, writable } from "svelte/store"; +import { browser } from "$app/environment"; interface StateBin { dueAnimeListOpen?: boolean; diff --git a/src/stores/subsPlease.ts b/src/stores/subsPlease.ts index df36ff68..a1276a1c 100644 --- a/src/stores/subsPlease.ts +++ b/src/stores/subsPlease.ts @@ -1,5 +1,5 @@ -import type { SubsPlease } from "$lib/Media/Anime/Airing/Subtitled/subsPlease"; import { writable } from "svelte/store"; +import type { SubsPlease } from "$lib/Media/Anime/Airing/Subtitled/subsPlease"; const subsPlease = writable(undefined); -- cgit v1.2.3