[Deps] Add tanstack eslint plugin - #1823
Open
Anders2303 wants to merge 3 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds TanStack’s React Query ESLint plugin to the frontend and updates a few query-related call sites to comply with the plugin’s recommended rules (primarily around stable dependencies and exhaustive query keys).
Changes:
- Add
@tanstack/eslint-plugin-queryto dev dependencies and enable itsflat/recommendedconfig ineslint.config.js. - Refactor a couple of hooks/effects to depend on stable, destructured query methods/fields rather than entire query result objects.
- Make the
useInfiniteSessionMetadataQueryquery key and query params more explicit (includingsort_lowercaseandzCacheBust) and add a targeted rule disable where the rule can’t be reasonably enforced.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| frontend/src/framework/utils/lro/longRunningApiCalls.ts | Adds a targeted TanStack query ESLint disable for a wrapper that can’t reliably satisfy exhaustive key requirements. |
| frontend/src/framework/internal/hooks/useRefreshQuery.ts | Uses a stable destructured refetch reference to avoid depending on the whole query result object. |
| frontend/src/framework/internal/components/PersistenceManagementDialog/snapshotManagementContent.tsx | Removes unstable query object deps from an effect by destructuring fetchNextPage and listing specific fields. |
| frontend/src/framework/internal/components/PersistenceManagementDialog/_utils.ts | Makes query key/query params explicit and includes additional params required for exhaustive query key compliance. |
| frontend/package.json | Adds @tanstack/eslint-plugin-query dev dependency. |
| frontend/eslint.config.js | Enables TanStack query ESLint plugin recommended flat config. |
Files not reviewed (1)
- frontend/package-lock.json: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
rubenthoms
approved these changes
Aug 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #460
Adds Tanstack's eslint plugin for queries