SIGN IN SIGN UP
TanStack / query UNCLAIMED

🤖 Powerful asynchronous state management, server-state utilities and data fetching for the web. TS/JS, React Query, Solid Query, Svelte Query and Vue Query.

0 0 52 TypeScript

fix(eslint-plugin-query): handle array-destructured useQueries results in no-unstable-deps (fix #10746) (#10747)

* fix(eslint-plugin-query): handle array-destructured useQueries results in no-unstable-deps

The `collectVariableNames` function in the `no-unstable-deps` rule only
handled `Identifier` patterns. When users array-destructure `useQueries`
or `useSuspenseQueries` results (e.g. `const [q1, q2] = useQueries(...)`),
the individual variables were not tracked as unstable. This meant passing
them directly to React hook dependency arrays was never flagged.

Extend `collectVariableNames` to also handle `ArrayPattern` — including
plain identifier elements and rest elements.

Fixes #10746

* ci: apply automated fixes

---------

Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
V
Vinamra Bhonsle committed
2ccdae8c3724e145d1cc2e369d25a1e8d03e21ed
Parent: b9eb3af
Committed by GitHub <noreply@github.com> on 5/22/2026, 6:43:55 PM