fix: use function wrapper for goto() calls to suppress eslint rule in template
Lint & Vuln Scan / Go vulnerabilities (push) Successful in 26s
Lint & Vuln Scan / Frontend lint & types (push) Failing after 40s

This commit is contained in:
2026-06-25 18:51:22 +01:00
parent 633d8ff1a8
commit eb9a9186c3
+6 -2
View File
@@ -208,6 +208,7 @@
}
if (!authStore.isAuthenticated) {
pageState = 'unauthorized';
// eslint-disable-next-line svelte/no-navigation-without-resolve
goto('/login', { replaceState: true });
return;
}
@@ -251,6 +252,9 @@
}
}
// eslint-disable-next-line svelte/no-navigation-without-resolve
function handleGotoAccount() { goto('/account'); }
function handlePrint() {
window.print();
}
@@ -508,7 +512,7 @@
<p class="mb-6 text-sm text-gray-500">{errorMessage}</p>
<div class="flex gap-3">
<Button onclick={fetchGdprData}>Try Again</Button>
<Button onclick={() => goto('/account')} variant="outline">Back to Account</Button>
<Button onclick={handleGotoAccount} variant="outline">Back to Account</Button>
</div>
</div>
{:else if pageState === 'loaded' && gdprData}
@@ -516,7 +520,7 @@
<div class="mb-6 flex flex-col items-start justify-between gap-4 sm:flex-row sm:items-center">
<div>
<button
onclick={() => goto('/account')}
onclick={handleGotoAccount}
class="mb-2 inline-flex items-center gap-1 text-sm text-gray-500 hover:text-gray-900"
>
<svg