npm / @tanstack/eslint-plugin-query
@tanstack/eslint-plugin-query
What changed in @tanstack/eslint-plugin-query 5, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-18.
2 breaking2 new APIs and options1 behavior and defaults3 tooling11 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@tanstack/eslint-plugin-query 519 changes
Breaking changes 2
The rule now flags rest destructuring on custom hooks that return a TanStack Query result when typed linting is enabled.
The rule reports member expression dependencies more granularly for call expressions, which may cause existing code to report missing dependencies.
New APIs and options 2
Adds the recommendedStrict configuration.
The rule accepts an allowlist option with variables and types arrays to exclude specific dependencies from enforcement.
Behavior and default changes 1
Function call targets are no longer required in query keys, while values referenced in nested callbacks are still checked.
Tooling 3
The plugin is compatible with TypeScript 7.
The plugin supports ESLint v10, allowing developers using that version to use the plugin.
Adds the prefer-query-options ESLint rule.
Fixes and other changes 11
Detects unstable query dependencies in aliased React hooks imported from react.
Fixes false-positive warnings caused by Object.prototype property lookups such as toString and valueOf.
The rule now handles array-destructured useQueries and useSuspenseQueries results.
The rule no longer reports false positives for useSuspenseQueries results returned from combine.
Fixes a false positive on enum returns for TypeScript 6.
Whitespace is normalized when matching allowList variables in multiline expressions.
Resolves an issue about the excluded build directory.
Detects dependencies used inside nested queryFn callbacks and control flow, while avoiding false positives when they are already present in complex queryKey expressions.
TypeScript is declared as an optional peer dependency of the ESLint plugin, so it is not required for users who do not use TypeScript.
Fixed the exhaustive-deps rule for Vue files.
The no-unstable-deps rule now allows useQueries with the combine property.