-
-
Notifications
You must be signed in to change notification settings - Fork 59
Closed
Description
Before You File a Bug Report Please Confirm You Have Done The Following...
- I have tried restarting my IDE and the issue persists.
- I have updated to the latest version of the packages.
What version of ESLint are you using?
9.39.1
What version of eslint-plugin-svelte are you using?
3.13.0
What did you do?
test.svelte.ts
export class Test {
private readonly a = $state(0)
private readonly b = $derived.by(() => this.a * 2)
public output(): void {
console.log(this.a, this.b)
}
}What did you expect to happen?
No linting errors
What actually happened?
test.svelte.ts
3:24 error Destructure by from $derived for better change tracking & fewer redraws svelte/prefer-destructured-store-props
It's wanting me to do this, which makes no sense:
const { by } = $derived
Link to GitHub Repo with Minimal Reproducible Example
export class Test {
private readonly a = $state(0)
private readonly b = $derived.by(() => this.a * 2)
public output(): void {
console.log(this.a, this.b)
}
}Additional comments
No response
Metadata
Metadata
Assignees
Labels
No labels