'no-floating-promises' equivalent for queries? #6050
Unanswered
panstromek
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm converting a codebase to use TanStack Query (
vue-query
in my case) and one thing I'm noticing is that before, in more procedural code, we got a lot of warnings from@typescript-eslint/no-floating-promises
that forced us to handle network errors properly, but withvue-query
, it's easy to forget these errors by ignoring the error fields in the returned query instance.Did anybody notice this already? Is there or could there be a similar rule that would ensure that errors from queries are always handled (e.g. make sure
isError
/error
fields in the response are used)? Is it even feasible to implement it?Beta Was this translation helpful? Give feedback.
All reactions