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 think this is because the rule currently treats the enclosing function as the component (a la React). In the Svelte adapter, that function is always the createQuery accessor, which declares nothing in the function body, so every $props/$state/$derived in the actual top level gets ignored.
Observe that the @tanstack/query/exhaustive-deps rule only fails when createQuery is nested inside a function.
Expected behavior
The lint rule should've flagged at the top-level createQuery.
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
N/A because the issue points to a non-platform-dependent parser/traversal bug.
Tanstack Query adapter
svelte-query
TanStack Query version
6.4.1
TypeScript version
No response
Additional context
Note that the .vue fallback added in #10011 (for #9962) doesn't apply to .svelte files. Some logic can be shared/adapted, though! That would be great place to start.
Activity