Skip to content

fix(eslint-plugin-query): add TypeScript v6 to peerDependencies#10360

Open
mixelburg wants to merge 1 commit intoTanStack:mainfrom
mixelburg:fix/eslint-plugin-query-typescript-v6-peer-dep
Open

fix(eslint-plugin-query): add TypeScript v6 to peerDependencies#10360
mixelburg wants to merge 1 commit intoTanStack:mainfrom
mixelburg:fix/eslint-plugin-query-typescript-v6-peer-dep

Conversation

@mixelburg
Copy link
Copy Markdown

@mixelburg mixelburg commented Mar 30, 2026

Summary

The @tanstack/eslint-plugin-query package currently declares typescript: "^5.4.0" as a peer dependency. This causes package managers to report a peer dependency conflict when using TypeScript v6 (released as 6.0.2).

The repo already includes a typescript60 devDependency alias and a test:types:ts60 script confirming TS v6 compatibility is tested. The @typescript-eslint/utils@^8.48.0 dependency also supports TS v6 (verified against its peerDependencies range >=4.8.4 <6.1.0 in v8.58.0).

This PR simply extends the peer dependency range to include ^6.0.0.

Fixes #10357

✅ Checklist

Summary by CodeRabbit

Release Notes

  • Chores
    • Extended TypeScript compatibility to support version 6.0.0 alongside version 5.4.0+.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 30, 2026

📝 Walkthrough

Walkthrough

Updated the TypeScript peer dependency in eslint-plugin-query to support both TypeScript v5.4.0+ and v6.0.0+, expanding compatibility with the recently released TypeScript major version while maintaining backward compatibility.

Changes

Cohort / File(s) Summary
TypeScript Peer Dependency
packages/eslint-plugin-query/package.json
Updated peerDependencies.typescript from ^5.4.0 to ^5.4.0 || ^6.0.0 to declare support for TypeScript v6 while maintaining v5 compatibility.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A hop and a skip, the versions align,
TypeScript six now shines, with five still divine,
The plugin leaps forward with compatible grace,
No breaking of code, just expanding the space! 🚀

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The PR title clearly and concisely describes the main change: adding TypeScript v6 support to the eslint-plugin-query peerDependencies.
Description check ✅ Passed The PR description provides detailed context and motivation. However, it is missing the release impact checklist section required by the template.
Linked Issues check ✅ Passed The PR directly addresses issue #10357 by extending the TypeScript peerDependency range to include v6, resolving the reported conflict for projects using TypeScript 6.
Out of Scope Changes check ✅ Passed All changes are narrowly scoped to updating the TypeScript peerDependency range in package.json, directly aligned with the linked issue requirements.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/eslint-plugin-query/package.json`:
- Line 72: The package.json currently pins `@typescript-eslint/utils` at ^8.48.0
which blocks TypeScript 6 support; update the dependency entry for
"@typescript-eslint/utils" in package.json to "^8.58.0" so its peerDependency
range includes TypeScript 6 (>=4.8.4 <6.1.0), then run install/update lockfile
to reflect the change (verify package.json's dependencies object contains
"@typescript-eslint/utils": "^8.58.0").
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9e847e2d-6ecf-4947-9e44-a18f6e16a8b6

📥 Commits

Reviewing files that changed from the base of the PR and between 7e5fe21 and f342f11.

📒 Files selected for processing (1)
  • packages/eslint-plugin-query/package.json

"peerDependencies": {
"eslint": "^8.57.0 || ^9.0.0",
"typescript": "^5.4.0"
"typescript": "^5.4.0 || ^6.0.0"
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.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify `@typescript-eslint/utils`@^8.48.0 actually supports TypeScript v6

echo "=== Checking `@typescript-eslint/utils`@8.48.0 peerDependencies ==="
npm view `@typescript-eslint/utils`@8.48.0 peerDependencies

echo -e "\n=== Checking `@typescript-eslint/utils`@8.58.0 peerDependencies (version mentioned in PR) ==="
npm view `@typescript-eslint/utils`@8.58.0 peerDependencies

echo -e "\n=== Checking latest `@typescript-eslint/utils` in 8.x range ==="
npm view `@typescript-eslint/utils`@^8.48.0 peerDependencies

Repository: TanStack/query

Length of output: 2106


🏁 Script executed:

#!/bin/bash
# Check if a changeset file exists for this PR

echo "=== Searching for changeset files ==="
fd -e md . .changeset -x cat {}

Repository: TanStack/query

Length of output: 95


🌐 Web query:

What are the breaking changes in TypeScript 6.0.0 compiler API compared to TypeScript 5.x, specifically for getTypeChecker, getTypeAtLocation, getAwaitedType, getCallSignatures, and type flags?

💡 Result:

No breaking changes found in TypeScript 6.0.0 compiler API for getTypeChecker, getTypeAtLocation, getAwaitedType, getCallSignatures, or type flags compared to 5.x. Official release notes, iteration plans, and company feedback (Google, Bloomberg) emphasize configuration defaults, deprecations like baseUrl/outFile, lib.d.ts updates, and type inference tweaks, but explicitly state API compatibility with 5.9 is maintained. The compiler API (tsserverlibrary) appears unchanged for these methods based on available sources.

Citations:


🏁 Script executed:

# Check the current `@typescript-eslint/utils` version in package.json and look for rule changes
cd packages/eslint-plugin-query
cat -n package.json | grep -A5 -B5 "@typescript-eslint/utils"

Repository: TanStack/query

Length of output: 395


🏁 Script executed:

# Search for any rule files that were modified in this PR to understand scope of changes
fd "\.rule\.ts$" packages/eslint-plugin-query/src/rules --exec basename {}

Repository: TanStack/query

Length of output: 259


🏁 Script executed:

# List the .changeset directory to see what files exist
ls -la .changeset/ 2>/dev/null || echo "No .changeset directory found"

Repository: TanStack/query

Length of output: 232


🏁 Script executed:

# Also check git status to see all modified/added files in this PR
git status --short | head -20

Repository: TanStack/query

Length of output: 71


🏁 Script executed:

# Look for any file that might document TypeScript 6 support or version bumps
git diff --name-only HEAD~1 2>/dev/null | grep -E "(changeset|package\.json)" || echo "Cannot get git diff"

Repository: TanStack/query

Length of output: 77


🏁 Script executed:

# Check if the exhaustive-deps-allowlist.md changeset mentioned in learnings exists
cat .changeset/exhaustive-deps-allowlist.md 2>/dev/null || echo "File not found"

Repository: TanStack/query

Length of output: 72


🏁 Script executed:

# List all files in .changeset directory
ls -la .changeset/

Repository: TanStack/query

Length of output: 232


🏁 Script executed:

# Check the current rule files to see if any have TypeScript 6 related changes
git log --oneline --all -- packages/eslint-plugin-query/src/rules/ 2>/dev/null | head -10 || echo "No git log available"

Repository: TanStack/query

Length of output: 815


🏁 Script executed:

# Check the exact state of the typescript peer dependency in package.json
cat packages/eslint-plugin-query/package.json | jq '.peerDependencies.typescript'

Repository: TanStack/query

Length of output: 76


🏁 Script executed:

# Check if there's a changeset in the parent directory or elsewhere
find . -name "*.md" -path "*/.changeset/*" 2>/dev/null | head -10

Repository: TanStack/query

Length of output: 40


🏁 Script executed:

# Verify the exact npm package versions that support TypeScript 6 support in `@typescript-eslint`
npm view `@typescript-eslint/utils` versions --json | jq '.[] | select(. == "8.58.0" or . == "8.57.0" or . == "8.48.0")'

Repository: TanStack/query

Length of output: 84


Update @typescript-eslint/utils to ^8.58.0 to support TypeScript v6.

The TypeScript v6 peer dependency support cannot be added without updating @typescript-eslint/utils. The current version constraint ^8.48.0 (line 61) pulls versions 8.48.0 through 8.57.x, all of which have peer dependency typescript: >=4.8.4 <6.0.0—explicitly excluding TypeScript 6.0.0. Only @typescript-eslint/utils@8.58.0+ support TypeScript 6 with constraint >=4.8.4 <6.1.0.

With the current configuration, users installing TypeScript 6.0.0 alongside this plugin will face an unmet peer dependency error and potential runtime failures.

Change @typescript-eslint/utils from ^8.48.0 to ^8.58.0 in the dependencies (line 61).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/eslint-plugin-query/package.json` at line 72, The package.json
currently pins `@typescript-eslint/utils` at ^8.48.0 which blocks TypeScript 6
support; update the dependency entry for "@typescript-eslint/utils" in
package.json to "^8.58.0" so its peerDependency range includes TypeScript 6
(>=4.8.4 <6.1.0), then run install/update lockfile to reflect the change (verify
package.json's dependencies object contains "@typescript-eslint/utils":
"^8.58.0").

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add TypeScript v6 support to eslint-plugin-query

1 participant