chore(format): run prettier over src/ and scripts/

Formatting was configured but never enforced: `bun run format:check`
reported 199 unformatted files and ran in no workflow and in no git hook,
so .prettierrc (printWidth 100, trailing commas) described an intention
rather than the tree.

This is the one-time sweep that makes the check gateable. Whitespace and
token-reflow only -- no behavioural change: `bun run check` reports 0
errors and all 1053 frontend tests pass before and after.

Kept out of every other commit on purpose. A 199-file diff mixed with
real changes is unreviewable, and the next commit turns format:check
into a hard CI gate so this cannot silently accumulate again.
This commit is contained in:
2026-08-21 17:41:44 +02:00
parent d095e1f410
commit ad48d89dfe
199 changed files with 4698 additions and 3453 deletions
+9 -9
View File
@@ -51,7 +51,7 @@ function createMoviesStore() {
!!(i.backdropImageTags && i.backdropImageTags.length > 0) || !!i.imageId;
async function loadSections(libraryId: string) {
update(s => ({
update((s) => ({
...s,
isLoading: s.continueWatching.length === 0 && s.recentlyAdded.length === 0,
error: null,
@@ -72,7 +72,7 @@ function createMoviesStore() {
recursive: true,
limit: SECTION_LIMIT,
})
.then(r => r.items)
.then((r) => r.items)
.catch(() => [] as MediaItem[]),
]);
@@ -80,7 +80,7 @@ function createMoviesStore() {
// additions, then random picks from across the library.
const heroItems = buildHeroMix([resume, latest, surprise], hasArt);
update(s => ({
update((s) => ({
...s,
continueWatching: resume,
recentlyAdded: latest,
@@ -93,7 +93,7 @@ function createMoviesStore() {
loadGenreRows(libraryId);
} catch (error) {
const message = error instanceof Error ? error.message : "Failed to load movie sections";
update(s => ({ ...s, isLoading: false, error: message }));
update((s) => ({ ...s, isLoading: false, error: message }));
log.error("Failed to load movie sections:", error);
}
}
@@ -126,15 +126,15 @@ function createMoviesStore() {
log.warn(`Failed to load genre row "${genre.name}":`, e);
return { id: genre.id, name: genre.name, items: [] };
}
})
}),
);
const genreRows = rows
.filter(row => row.items.length > 0)
.filter((row) => row.items.length > 0)
.sort((a, b) => b.items.length - a.items.length)
.slice(0, MAX_GENRE_ROWS);
update(s => ({ ...s, genreRows }));
update((s) => ({ ...s, genreRows }));
} catch (e) {
log.warn("Failed to load movie genre rows:", e);
}
@@ -153,5 +153,5 @@ function createMoviesStore() {
export const movies = createMoviesStore();
export const moviesHeroItems = derived(movies, $m => $m.heroItems);
export const isMoviesLoading = derived(movies, $m => $m.isLoading);
export const moviesHeroItems = derived(movies, ($m) => $m.heroItems);
export const isMoviesLoading = derived(movies, ($m) => $m.isLoading);