Skip to content

Add @tanstack/eslint-plugin-query and update @typescript-eslint/eslint-plugin#2125

Merged
jeesunikim merged 8 commits into
mainfrom
tanstack/eslint-plugin-query
Jun 29, 2026
Merged

Add @tanstack/eslint-plugin-query and update @typescript-eslint/eslint-plugin#2125
jeesunikim merged 8 commits into
mainfrom
tanstack/eslint-plugin-query

Conversation

@jeesunikim

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings June 24, 2026 18:26
@github-project-automation github-project-automation Bot moved this to Backlog (Not Ready) in DevX Jun 24, 2026
@jeesunikim jeesunikim linked an issue Jun 24, 2026 that may be closed by this pull request
@socket-security

socket-security Bot commented Jun 24, 2026

Copy link
Copy Markdown

All alerts resolved. Learn more about Socket for GitHub.

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the linting toolchain (adds TanStack Query ESLint rules and bumps @typescript-eslint/*) and adjusts React Query queryKeys across the codebase so cached results correctly vary by inputs like headers, URLs, and other request parameters.

Changes:

  • Add @tanstack/eslint-plugin-query and enable plugin:@tanstack/query/recommended in ESLint config.
  • Upgrade @typescript-eslint/eslint-plugin and add @typescript-eslint/parser.
  • Update multiple React Query hooks’ queryKey definitions to include additional dependencies (notably headers), plus fix Prettier config keys.

Reviewed changes

Copilot reviewed 22 out of 23 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/query/useWasmGitHubAttestation.ts Includes headers in queryKey to prevent cache collisions across header changes.
src/query/useWasmBinaryFromRpc.ts Includes headers in queryKey for correct caching of RPC wasm binary fetches.
src/query/useRpcHealthCheckUntilReady.ts Includes headers in queryKey so health check results vary by request headers.
src/query/useLatestTxn.ts Adds headers to queryKey so latest-tx queries are keyed by network/header context.
src/query/useLatestLedger.ts Keys latest-ledger query by rpcUrl + headers instead of a global key.
src/query/useHorizonHealthCheckUntilReady.ts Includes headers in queryKey for Horizon health polling correctness.
src/query/useGetRpcTxs.ts Keys RPC tx list by rpcUrl, startLedger, and headers.
src/query/useGetRpcTxDetails.ts Keys RPC tx detail query by rpcUrl, tx, and headers.
src/query/useGetContractDataFromRpcById.ts Expands queryKey inputs to better reflect parameters that affect contract data lookup.
src/query/useFriendBot.ts Expands queryKey to include network context and headers for Friendbot funding requests.
src/query/useFetchRpcTxDetails.ts Includes headers in queryKey for JSON-RPC fetch correctness.
src/query/useEndpoint.ts Expands queryKey to include requestUrl and headers so endpoint responses aren’t cross-cached.
src/query/useCheckTxSignatures.ts Keys signature check by XDR/network inputs plus headers.
src/query/useBuildVerification.ts Includes headers in queryKey for build verification fetching.
src/query/useBuildRpcTransaction.ts Expands queryKey inputs (but currently misses rpcUrl, causing a cache bug).
src/query/useAddTrustline.ts Expands queryKey inputs to include asset/network/header context.
src/query/useAccountSequenceNumber.ts Keys by account + horizonUrl + headers to avoid cross-network cache reuse.
src/query/useAccountInfo.ts Keys by account + horizonUrl + headers.
src/query/external/useSEContractStorage.ts Includes totalEntriesCount in queryKey to keep cache aligned with expected fetch behavior.
package.json Adds TanStack Query ESLint plugin; upgrades @typescript-eslint/* deps.
.eslintrc.json Enables plugin:@tanstack/query/recommended.
.prettierrc.json Fixes Prettier option keys (arrowParens, bracketSameLine).
pnpm-lock.yaml Lockfile updates for the added/updated lint dependencies.
Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/query/useBuildRpcTransaction.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6c773ffcbd

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/query/useBuildRpcTransaction.ts
Comment thread src/query/useLatestTxn.ts
@stellar-jenkins-ci

Copy link
Copy Markdown

1 similar comment
@stellar-jenkins-ci

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e730383490

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread .eslintrc.json
@stellar-jenkins-ci

Copy link
Copy Markdown

1 similar comment
@stellar-jenkins-ci

Copy link
Copy Markdown

Comment thread src/app/(sidebar)/transactions-explorer/page.tsx
@stellar-jenkins-ci

Copy link
Copy Markdown

@jeesunikim jeesunikim requested a review from quietbits June 26, 2026 21:16
@stellar-jenkins-ci

Copy link
Copy Markdown

Comment thread src/app/(sidebar)/transactions-explorer/page.tsx Outdated
Comment thread src/query/useAccountInfo.ts
jeesunikim and others added 8 commits June 29, 2026 15:55
…eslint

Add @tanstack/eslint-plugin-query as a devDependency. It requires
@typescript-eslint/utils ^8.58.1, which would otherwise pull a second
@typescript-eslint tree (8.62) alongside the existing 8.43 used by
eslint-config-next. Align the family on a single 8.62.0 version by bumping
@typescript-eslint/eslint-plugin and adding a matching parser, so the
lockfile resolves to one tree instead of two.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Enable plugin:@tanstack/query/recommended in the ESLint config and fix the
19 exhaustive-deps violations it surfaces. Each affected hook read values in
its queryFn (most commonly headers, plus url/passphrase/asset/count inputs)
that were absent from its queryKey, so distinct inputs could collide on one
cache entry and return stale data. Add the missing values to every queryKey.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Fix the "arrowParens:" key (stray colon meant Prettier silently ignored it)
and rename the deprecated jsxBracketSameLine to bracketSameLine.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jeesunikim jeesunikim force-pushed the tanstack/eslint-plugin-query branch from 30c12d0 to 813dcb9 Compare June 29, 2026 23:06
@stellar-jenkins-ci

Copy link
Copy Markdown

@jeesunikim jeesunikim merged commit cc22a24 into main Jun 29, 2026
7 checks passed
@jeesunikim jeesunikim deleted the tanstack/eslint-plugin-query branch June 29, 2026 23:32
@github-project-automation github-project-automation Bot moved this from Backlog (Not Ready) to Done in DevX Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Add @tanstack/eslint-plugin-query

3 participants