You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I create a property busy that's bindable and that I only set, but never read. ESLint reports an "no-unused-vars" error.
I think that's wrong, since the property might be read from a parent component.
Reproduction
use example above + eslint with no-unused-vars rule
The text was updated successfully, but these errors were encountered:
ptrxyz
changed the title
Linter error no-unused-vars if property is $bindable
Linter error no-unused-vars if property is $bindable and never read
Jun 4, 2024
As i mentioned this has nothing to do with svelte, you get the same error even in js files and it's a rule from typescript-eslint (and is also technically correct since you are assigning a property without reading from it)
This is it on a simple .ts file.Here the linter is complaining about the non-exported stuff (rightfully so) and allows the exported things.
Bindable props might still be read from outside of the components context and should thus more be treated like exports and not trigger a warning/error.
Describe the bug
Consider this component:
I create a property
busy
that's bindable and that I only set, but never read. ESLint reports an "no-unused-vars" error.I think that's wrong, since the property might be read from a parent component.
Reproduction
no-unused-vars
ruleLogs
No response
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: