Skip to content
Source
Sign inSign up
TanStack/query

False positive in `@tanstack/query/no-unstable-deps` ESLint rule with combine property #9718

Closedluixo(GitHub profile, opens in a new tab) opened this issue 0 comments

Describe the bug

Hello, One of the key features of combine argument for useQueries (or useSuspenseQueries) is that its result if referentially stable. Though the ESLint rule @tanstack/query/no-unstable-deps is not aware of that and warns us of result of useQueries being unstable. This case should be added to the linter rule.

Your minimal, reproducible example

https://stackblitz.com/edit/tanstack-query-2ypnpvyn

Steps to reproduce

  • add useQueries with combine
  • add ESLint rule @tanstack/query/no-unstable-deps
  • use combined value in useMemo dependency array

Expected behavior

Expected to have no warning in this case

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

  • Version [5.91.0]

Tanstack Query adapter

None

TanStack Query version

5.91.0

TypeScript version

No response

Additional context

No response

  1. TkDodo added labelspackage: eslint-plugin-query

  2. TkDodo closed this

Sign in to join this conversation.