Skip to content
Source
Sign inSign up
TanStack/query

fix: allow useQueries with combine property in no-unstable-deps rule #9720

Mergedalimttth(GitHub profile, opens in a new tab)merged 4 commits intomain fromrefs/pull/9720/headmerged by TkDodo View on GitHub

Showing 3 changed files with 95 additions and 18 deletions.

x
0 of 3 viewed, 3 left
5 additions and 0 deletions.changeset/ten-crabs-glow.mdAdded
View file
@@ -0,0 +1,5 @@
+---
+"@tanstack/eslint-plugin-query": patch
+---
+​
+fix: allow useQueries with combine property in no-unstable-deps rule
65 additions and 18 deletionspackages/eslint-plugin-query/src/__tests__/no-unstable-deps.test.tsModified
View file
@@ -28,10 +28,11 @@
`,
},
- ].concat(
- useQueryHookNames.map((queryHook) => ({
- name: `should pass result of ${queryHook} is passed to ${reactHookInvocation} as dependency`,
- code: `
+ ]
+ .concat(
+ useQueryHookNames.map((queryHook) => ({
+ name: `should pass result of ${queryHook} is passed to ${reactHookInvocation} as dependency`,
+ code: `
${reactHookImport}
import { ${queryHook} } from "@tanstack/react-query";
​
@@ -41,8 +42,28 @@
return;
`,
- })),