From 48f0c30d47d62e4f35706edb93a1bb2f97eba14c Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.net>
Date: Sun, 1 Mar 2026 16:04:11 -0800
Subject: chore(biome): enable svelte formatting

---
 src/lib/List/Anime/UpcomingAnimeList.svelte | 140 ++++++++++++++--------------
 1 file changed, 69 insertions(+), 71 deletions(-)

(limited to 'src/lib/List/Anime/UpcomingAnimeList.svelte')

diff --git a/src/lib/List/Anime/UpcomingAnimeList.svelte b/src/lib/List/Anime/UpcomingAnimeList.svelte
index a2cc963d..109584f0 100644
--- a/src/lib/List/Anime/UpcomingAnimeList.svelte
+++ b/src/lib/List/Anime/UpcomingAnimeList.svelte
@@ -1,88 +1,86 @@
 <script lang="ts">
-  import Spacer from '$lib/Layout/Spacer.svelte';
-  import { mediaListCollection, Type, type Media } from '$lib/Data/AniList/media';
-  import type { AniListAuthorisation } from '$lib/Data/AniList/identity';
-  import { onMount } from 'svelte';
-  import anime from '$stores/anime';
-  import lastPruneTimes from '$stores/lastPruneTimes';
-  import AnimeList from './AnimeListTemplate.svelte';
-  import settings from '$stores/settings';
-  import type { SubsPlease } from '$lib/Media/Anime/Airing/Subtitled/subsPlease';
-  import { addNotification } from '$lib/Notification/store';
-  import locale from '$stores/locale';
-  import identity from '$stores/identity';
-  import { injectAiringTime } from '$lib/Media/Anime/Airing/Subtitled/match';
-  import { hasDueEpisodes, hasNoAiredEpisodes } from '$lib/Media/Anime/Airing/classify';
-  import revalidateAnime from '$stores/revalidateAnime';
+import Spacer from '$lib/Layout/Spacer.svelte';
+import { mediaListCollection, Type, type Media } from '$lib/Data/AniList/media';
+import type { AniListAuthorisation } from '$lib/Data/AniList/identity';
+import { onMount } from 'svelte';
+import anime from '$stores/anime';
+import lastPruneTimes from '$stores/lastPruneTimes';
+import AnimeList from './AnimeListTemplate.svelte';
+import settings from '$stores/settings';
+import type { SubsPlease } from '$lib/Media/Anime/Airing/Subtitled/subsPlease';
+import { addNotification } from '$lib/Notification/store';
+import locale from '$stores/locale';
+import identity from '$stores/identity';
+import { injectAiringTime } from '$lib/Media/Anime/Airing/Subtitled/match';
+import { hasDueEpisodes, hasNoAiredEpisodes } from '$lib/Media/Anime/Airing/classify';
+import revalidateAnime from '$stores/revalidateAnime';
 
-  export let user: AniListAuthorisation;
-  let animeLists: Promise<Media[]>;
-  let startTime: number;
-  let endTime: number;
+export let user: AniListAuthorisation;
+let animeLists: Promise<Media[]>;
+let startTime: number;
+let endTime: number;
 
-  onMount(async () => {
-    startTime = performance.now();
-    animeLists = mediaListCollection(user, $identity, Type.Anime, $anime, $lastPruneTimes.anime, {
-      addNotification,
-      notificationType: 'Upcoming Episodes'
-    });
+onMount(async () => {
+  startTime = performance.now();
+  animeLists = mediaListCollection(user, $identity, Type.Anime, $anime, $lastPruneTimes.anime, {
+    addNotification,
+    notificationType: 'Upcoming Episodes'
   });
+});
 
-  const cleanMedia = (
-    anime: Media[],
-    displayUnresolved: boolean,
-    subsPlease: SubsPlease | null,
-    plannedOnly = true
-  ) => {
-    if (anime === undefined) return [];
+const cleanMedia = (
+  anime: Media[],
+  displayUnresolved: boolean,
+  subsPlease: SubsPlease | null,
+  plannedOnly = true
+) => {
+  if (anime === undefined) return [];
 
-    const filterAnime = (status: 'RELEASING' | 'NOT_YET_RELEASED') =>
-      anime
-        .filter((media: Media) => media.status === status && media.nextAiringEpisode !== null)
-        .map((media) => injectAiringTime(media, subsPlease))
-        .filter(
-          (media: Media) =>
-            // Outdated media
-            ($settings.displayPlannedAnime ? media.mediaListEntry?.status === 'PLANNING' : false) ||
-            !hasDueEpisodes(media)
+  const filterAnime = (status: 'RELEASING' | 'NOT_YET_RELEASED') =>
+    anime
+      .filter((media: Media) => media.status === status && media.nextAiringEpisode !== null)
+      .map((media) => injectAiringTime(media, subsPlease))
+      .filter(
+        (media: Media) =>
+          // Outdated media
+          ($settings.displayPlannedAnime ? media.mediaListEntry?.status === 'PLANNING' : false) ||
+          !hasDueEpisodes(media)
+      )
+      .map((media: Media) => {
+        // Adjust for planned anime
+        if (
+          ($settings.displayPlannedAnime ? media.episodes !== 1 : true) &&
+          hasNoAiredEpisodes(media)
         )
-        .map((media: Media) => {
-          // Adjust for planned anime
-          if (
-            ($settings.displayPlannedAnime ? media.episodes !== 1 : true) &&
-            hasNoAiredEpisodes(media)
-          )
-            media.nextAiringEpisode = { episode: -1 };
+          media.nextAiringEpisode = { episode: -1 };
 
-          return media;
-        });
-    let upcomingAnime = filterAnime(plannedOnly ? 'NOT_YET_RELEASED' : 'RELEASING');
+        return media;
+      });
+  let upcomingAnime = filterAnime(plannedOnly ? 'NOT_YET_RELEASED' : 'RELEASING');
 
-    if (!displayUnresolved)
-      upcomingAnime = upcomingAnime.filter(
-        (media: Media) => media.nextAiringEpisode?.episode !== -1
-      );
+  if (!displayUnresolved)
+    upcomingAnime = upcomingAnime.filter((media: Media) => media.nextAiringEpisode?.episode !== -1);
 
-    upcomingAnime.sort(
-      (a: Media, b: Media) =>
-        (a.nextAiringEpisode?.airingAt || 9999) - (b.nextAiringEpisode?.airingAt || 9999)
-    );
+  upcomingAnime.sort(
+    (a: Media, b: Media) =>
+      (a.nextAiringEpisode?.airingAt || 9999) - (b.nextAiringEpisode?.airingAt || 9999)
+  );
 
-    if (!endTime) endTime = performance.now() - startTime;
+  if (!endTime) endTime = performance.now() - startTime;
 
-    return upcomingAnime;
-  };
+  return upcomingAnime;
+};
 
-  $: {
-    if ($revalidateAnime) {
-      $revalidateAnime = false;
-      $lastPruneTimes.anime = -1;
-      animeLists = mediaListCollection(user, $identity, Type.Anime, $anime, $lastPruneTimes.anime, {
-        addNotification,
-        notificationType: 'Upcoming Episodes'
-      });
-    }
+$: {
+  if ($revalidateAnime) {
+    $revalidateAnime = false;
+    $lastPruneTimes.anime = -1;
+    animeLists = mediaListCollection(user, $identity, Type.Anime, $anime, $lastPruneTimes.anime, {
+      addNotification,
+      notificationType: 'Upcoming Episodes'
+    });
   }
+}
 </script>
 
 <AnimeList
-- 
cgit v1.2.3

