fix: eliminate all 167 svelte-check warnings
All checks were successful
CI / update (push) Successful in 3m20s

Refactor page components to use $derived + invalidateAll() where data
is read-only or re-fetched after mutations. Suppress state_referenced_locally
for intentional patterns (form state, optimistic updates, pagination).
Fix a11y issues with role="presentation", add standard line-clamp properties,
remove unused CSS selectors and empty rulesets.
This commit is contained in:
2026-04-08 14:05:56 +02:00
parent 6a41d5fd3e
commit 20368131c5
38 changed files with 152 additions and 112 deletions

View File

@@ -1,4 +1,5 @@
<script>
import { invalidateAll } from '$app/navigation';
import { page } from '$app/stores';
import FitnessChart from '$lib/components/fitness/FitnessChart.svelte';
import MuscleHeatmap from '$lib/components/fitness/MuscleHeatmap.svelte';
@@ -35,8 +36,8 @@
const stats = $derived(data.stats ?? {});
let goalStreak = $state(data.goal?.streak ?? 0);
let goalWeekly = $state(data.goal?.weeklyWorkouts ?? null);
let goalStreak = $derived(data.goal?.streak ?? 0);
let goalWeekly = $derived(data.goal?.weeklyWorkouts ?? null);
let goalEditing = $state(false);
let goalInput = $state(4);
let goalSaving = $state(false);
@@ -57,9 +58,7 @@
body: JSON.stringify({ weeklyWorkouts: goalInput })
});
if (res.ok) {
const d = await res.json();
goalWeekly = d.weeklyWorkouts;
goalStreak = d.streak;
await invalidateAll();
goalEditing = false;
} else {
const err = await res.json().catch(() => null);