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:
@@ -41,8 +41,15 @@ export default defineConfig(
|
||||
// no-useless-assignment joined eslint:recommended in ESLint 10, and its flow analysis
|
||||
// does not model runes: it reads `let { ref = $bindable(null) } = $props()` as a value
|
||||
// that is never read. Deleting the default, as it suggests, breaks the binding.
|
||||
//
|
||||
// no-unused-expressions is off for the same reason: a bare `book;` inside an $effect is
|
||||
// how a reactive dependency is declared when the read would otherwise be untracked.
|
||||
// Removing the statement stops the effect re-running.
|
||||
files: ['**/*.svelte'],
|
||||
rules: { 'no-useless-assignment': 'off' }
|
||||
rules: {
|
||||
'no-useless-assignment': 'off',
|
||||
'@typescript-eslint/no-unused-expressions': 'off'
|
||||
}
|
||||
},
|
||||
{
|
||||
files: ['**/*.svelte', '**/*.svelte.ts', '**/*.svelte.js'],
|
||||
|
||||
Reference in New Issue
Block a user