chore: stop lint rules that do not model runes from reporting
no-unused-expressions is off for Svelte files: a bare `book;` in an $effect declares a dependency. The URL and Set instances it flagged are local temporaries, marked individually. The one real finding was visibleApiKeys, genuine reactive state cloned on every mutation to force an update; it is a SvelteSet now.
This commit is contained in:
@@ -21,11 +21,12 @@
|
||||
import { toast } from 'svelte-sonner';
|
||||
import { invalidateAll } from '$app/navigation';
|
||||
import type { Device } from '$lib/schema/device';
|
||||
import { SvelteSet } from 'svelte/reactivity';
|
||||
|
||||
let { data } = $props();
|
||||
|
||||
let createDialogOpen = $state(false);
|
||||
let visibleApiKeys = $state<Set<string>>(new Set());
|
||||
const visibleApiKeys = new SvelteSet<string>();
|
||||
let deleteConfirmDevice = $state<Device | null>(null);
|
||||
let regenerateConfirmDevice = $state<Device | null>(null);
|
||||
|
||||
@@ -35,7 +36,6 @@
|
||||
} else {
|
||||
visibleApiKeys.add(deviceId);
|
||||
}
|
||||
visibleApiKeys = new Set(visibleApiKeys);
|
||||
}
|
||||
|
||||
function maskApiKey(apiKey: string): string {
|
||||
|
||||
Reference in New Issue
Block a user