Open
Description
Describe the bug
exhaustive-deps triggers only when we use some dependency in non-nested code, but while using then/catch - it cannot detect used dependency.
Your minimal, reproducible example
Steps to reproduce
If we nest it in then/catch callbacks, error is not showing.
I know we can use "t" outside whole useQuery hook, it's just for demo. Any other function which would be part of fetchable logic won't trigger error.
Expected behavior
Error should be triggered like in example when we use "t" dependency outside then/catch clauses:
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
Windows, VSCode
Tanstack Query adapter
react-query
TanStack Query version
5.14.0
TypeScript version
5.1.3
Additional context
Version of eslint-plugin-query: 5.18.1