-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Closed
Labels
Description
Describe the bug
Love that you are putting out an eslint plugin!! It already found several issues in our codebase.
However, we have a custom hook where a generic can be passed along in order to type the response of an api call. The linter is incorrectly thinking that the TS generic should be a dependency.
error The following dependencies are missing in your queryKey: Result @tanstack/query/exhaustive-deps
Your minimal, reproducible example
https://stackblitz.com/edit/vitejs-vite-wgscv2?file=src/useGenericHook.ts
Steps to reproduce
- Open up terminal in stackblitz
- Run
yarn lint - Check out error in console from file
useGenericHook.ts
Expected behavior
I expect that types shouldn't be a dependency for a query key
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
- OS Mac ventura M1
- node 18.12.0
react-query version
v4.14.3
TypeScript version
4.8.4
Additional context
No response