aboutsummaryrefslogtreecommitdiff
path: root/src/stores
diff options
context:
space:
mode:
authorFuwn <[email protected]>2026-05-29 23:44:08 +0000
committerFuwn <[email protected]>2026-05-29 23:44:08 +0000
commit49879c43ebd9f36ec19f4c02fa2b121314126286 (patch)
treebbf1e42eba5996640ffcc7f44d07245cdf2c5e5c /src/stores
parentchore(biome): scope linting to remove Svelte false positives (diff)
downloaddue.moe-49879c43ebd9f36ec19f4c02fa2b121314126286.tar.xz
due.moe-49879c43ebd9f36ec19f4c02fa2b121314126286.zip
style: apply biome autofixes and resolve remaining lint findingsHEADmain
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.
Diffstat (limited to 'src/stores')
-rw-r--r--src/stores/airingNow.ts2
-rw-r--r--src/stores/announcementHash.ts4
-rw-r--r--src/stores/identity.ts4
-rw-r--r--src/stores/lastPruneTimes.ts4
-rw-r--r--src/stores/locale.ts3
-rw-r--r--src/stores/settings.ts4
-rw-r--r--src/stores/stateBin.ts4
-rw-r--r--src/stores/subsPlease.ts2
8 files changed, 13 insertions, 14 deletions
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<number>(
- 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<SubsPlease>(undefined);