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:
@@ -105,6 +105,7 @@ export class BookCollectionState {
|
||||
|
||||
this.view = next;
|
||||
|
||||
// eslint-disable-next-line svelte/prefer-svelte-reactivity -- local temporary, not reactive state
|
||||
const url = new URL(page.url);
|
||||
url.searchParams.set('view', next);
|
||||
// Not a route to resolve — this is the current URL with one query param
|
||||
@@ -138,6 +139,7 @@ export class BookCollectionState {
|
||||
|
||||
updateSearchParams() {
|
||||
// Update URL
|
||||
// eslint-disable-next-line svelte/prefer-svelte-reactivity -- local temporary, not reactive state
|
||||
const url = new URL(window.location.href);
|
||||
|
||||
Object.entries(this.filters).forEach(([filter, values]) => {
|
||||
@@ -215,6 +217,7 @@ export class BookCollectionState {
|
||||
// and skips every page in between.
|
||||
this.currentBookPage = 1;
|
||||
|
||||
// eslint-disable-next-line svelte/prefer-svelte-reactivity -- local temporary, not reactive state
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
|
||||
// Re-read sort and filter state from URL
|
||||
|
||||
Reference in New Issue
Block a user