Skip to content

Conversation

@schiller-manuel
Copy link
Contributor

@schiller-manuel schiller-manuel commented Nov 10, 2025

Summary by CodeRabbit

  • Chores
    • Updated core development dependencies including React, React DOM, type definitions, testing frameworks, and build tooling to latest versions for improved stability and enhanced compatibility.
    • Updated query management library dependencies and package analysis tools to latest patch releases.
    • Adjusted linting configuration rules to better accommodate code patterns throughout the framework codebase.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 10, 2025

Walkthrough

Dependencies updated across React, React DOM, TanStack Query, TypeScript type definitions, and development tools. ESLint directives added to disable react-hooks/rules-of-hooks rule in two route-related files for specific compatibility reasons.

Changes

Cohort / File(s) Summary
Dependency Updates
package.json
Updated 9 dependencies: @arethetypeswrong/cli (^0.17.3 → ^0.18.2), @playwright/test (^1.52.0 → ^1.56.1), @tanstack/react-query and @tanstack/query-core (^5.90.0 → ^5.90.7), @types/react (^19.0.8 → ^19.2.2), @types/react-dom (^19.0.3 → ^19.2.2), publint (^0.3.12 → ^0.3.15), react (^19.0.0 → ^19.2.0), react-dom (^19.0.0 → ^19.2.0)
ESLint Directives
packages/react-router/src/fileRoute.ts, packages/react-router/src/route.tsx
Added top-level ESLint disable directive for react-hooks/rules-of-hooks rule in both files

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Dependency updates are straightforward version bumps with no logic changes
  • ESLint directives are cosmetic additions; verify why the react-hooks rule needs to be disabled in these specific route files to ensure architectural intent

Suggested reviewers

  • brenelz

Poem

🐰 Dependencies hop, React bounds high,
Types align, versions fly,
Linter whispers soft their say,
Hooks-of-hooks yield the way! ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'chore: bump deps' is vague and generic. While it correctly categorizes the PR as a chore and indicates dependency updates, it lacks specificity about which dependencies were updated or the scope of changes. The title doesn't convey meaningful information about the actual changes made (e.g., which packages, versions, or why ESLint directives were added). Consider a more descriptive title such as 'chore: update dependencies and disable react-hooks linting' or 'chore: bump React, TanStack, and dev dependencies' to better communicate the scope and nature of changes.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch bump-deps

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9e310e3 and 4b52a14.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (3)
  • package.json (2 hunks)
  • packages/react-router/src/fileRoute.ts (1 hunks)
  • packages/react-router/src/route.tsx (1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/package.json

📄 CodeRabbit inference engine (AGENTS.md)

Use workspace:* protocol for internal dependencies in package.json files

Files:

  • package.json
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Use TypeScript in strict mode with extensive type safety across the codebase

Files:

  • packages/react-router/src/fileRoute.ts
  • packages/react-router/src/route.tsx
packages/{react-router,solid-router}/**

📄 CodeRabbit inference engine (AGENTS.md)

Implement React and Solid bindings/components only in packages/react-router/ and packages/solid-router/

Files:

  • packages/react-router/src/fileRoute.ts
  • packages/react-router/src/route.tsx
🧠 Learnings (8)
📓 Common learnings
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to packages/{react-router,solid-router}/** : Implement React and Solid bindings/components only in packages/react-router/ and packages/solid-router/
Learnt from: nlynzaad
Repo: TanStack/router PR: 5732
File: packages/start-client-core/src/client/hydrateStart.ts:6-9
Timestamp: 2025-11-02T16:16:24.898Z
Learning: In packages/start-client-core/src/client/hydrateStart.ts, the `import/no-duplicates` ESLint disable is necessary for imports from `#tanstack-router-entry` and `#tanstack-start-entry` because both aliases resolve to the same placeholder file (`fake-start-entry.js`) in package.json during static analysis, even though they resolve to different files at runtime.
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to **/*.{ts,tsx} : Use TypeScript in strict mode with extensive type safety across the codebase
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to packages/{react-router,solid-router}/** : Implement React and Solid bindings/components only in packages/react-router/ and packages/solid-router/

Applied to files:

  • packages/react-router/src/fileRoute.ts
  • packages/react-router/src/route.tsx
📚 Learning: 2025-11-02T16:16:24.898Z
Learnt from: nlynzaad
Repo: TanStack/router PR: 5732
File: packages/start-client-core/src/client/hydrateStart.ts:6-9
Timestamp: 2025-11-02T16:16:24.898Z
Learning: In packages/start-client-core/src/client/hydrateStart.ts, the `import/no-duplicates` ESLint disable is necessary for imports from `#tanstack-router-entry` and `#tanstack-start-entry` because both aliases resolve to the same placeholder file (`fake-start-entry.js`) in package.json during static analysis, even though they resolve to different files at runtime.

Applied to files:

  • packages/react-router/src/fileRoute.ts
  • packages/react-router/src/route.tsx
📚 Learning: 2025-10-08T08:11:47.088Z
Learnt from: nlynzaad
Repo: TanStack/router PR: 5402
File: packages/router-generator/tests/generator/no-formatted-route-tree/routeTree.nonnested.snapshot.ts:19-21
Timestamp: 2025-10-08T08:11:47.088Z
Learning: Test snapshot files in the router-generator tests directory (e.g., files matching the pattern `packages/router-generator/tests/generator/**/routeTree*.snapshot.ts` or `routeTree*.snapshot.js`) should not be modified or have issues flagged, as they are fixtures used to verify the generator's output and are intentionally preserved as-is.

Applied to files:

  • packages/react-router/src/fileRoute.ts
  • packages/react-router/src/route.tsx
📚 Learning: 2025-10-01T18:31:35.420Z
Learnt from: schiller-manuel
Repo: TanStack/router PR: 5330
File: e2e/react-start/custom-basepath/src/routeTree.gen.ts:58-61
Timestamp: 2025-10-01T18:31:35.420Z
Learning: Do not review files named `routeTree.gen.ts` in TanStack Router repositories, as these are autogenerated files that should not be manually modified.

Applied to files:

  • packages/react-router/src/fileRoute.ts
  • packages/react-router/src/route.tsx
📚 Learning: 2025-10-01T18:30:26.591Z
Learnt from: schiller-manuel
Repo: TanStack/router PR: 5330
File: packages/router-core/src/router.ts:2231-2245
Timestamp: 2025-10-01T18:30:26.591Z
Learning: In `packages/router-core/src/router.ts`, the `resolveRedirect` method intentionally strips the router's origin from redirect URLs when they match (e.g., `https://foo.com/bar` → `/bar` for same-origin redirects) while preserving the full URL for cross-origin redirects. This logic should not be removed or simplified to use `location.publicHref` directly.

Applied to files:

  • packages/react-router/src/fileRoute.ts
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to packages/{router-cli,router-generator,router-plugin,virtual-file-routes}/** : Keep CLI, generators, bundler plugins, and virtual file routing utilities in their dedicated tooling package directories

Applied to files:

  • packages/react-router/src/fileRoute.ts
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to **/*.{ts,tsx} : Use TypeScript in strict mode with extensive type safety across the codebase

Applied to files:

  • packages/react-router/src/route.tsx
🪛 ESLint
packages/react-router/src/fileRoute.ts

[error] 1-1: Definition for rule 'react-hooks/rules-of-hooks' was not found.

(react-hooks/rules-of-hooks)

packages/react-router/src/route.tsx

[error] 1-1: Definition for rule 'react-hooks/rules-of-hooks' was not found.

(react-hooks/rules-of-hooks)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Test
  • GitHub Check: Preview

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

@nx-cloud
Copy link

nx-cloud bot commented Nov 10, 2025

View your CI Pipeline Execution ↗ for commit 4b52a14

Command Status Duration Result
nx affected --targets=test:eslint,test:unit,tes... ✅ Succeeded 9m 37s View ↗
nx run-many --target=build --exclude=examples/*... ✅ Succeeded 57s View ↗

☁️ Nx Cloud last updated this comment at 2025-11-11 00:38:26 UTC

@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 10, 2025

More templates

@tanstack/arktype-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/arktype-adapter@5813

@tanstack/directive-functions-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/directive-functions-plugin@5813

@tanstack/eslint-plugin-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/eslint-plugin-router@5813

@tanstack/history

npm i https://pkg.pr.new/TanStack/router/@tanstack/history@5813

@tanstack/nitro-v2-vite-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/nitro-v2-vite-plugin@5813

@tanstack/react-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router@5813

@tanstack/react-router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router-devtools@5813

@tanstack/react-router-ssr-query

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router-ssr-query@5813

@tanstack/react-start

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start@5813

@tanstack/react-start-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-client@5813

@tanstack/react-start-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-server@5813

@tanstack/router-cli

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-cli@5813

@tanstack/router-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-core@5813

@tanstack/router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-devtools@5813

@tanstack/router-devtools-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-devtools-core@5813

@tanstack/router-generator

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-generator@5813

@tanstack/router-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-plugin@5813

@tanstack/router-ssr-query-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-ssr-query-core@5813

@tanstack/router-utils

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-utils@5813

@tanstack/router-vite-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-vite-plugin@5813

@tanstack/server-functions-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/server-functions-plugin@5813

@tanstack/solid-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router@5813

@tanstack/solid-router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router-devtools@5813

@tanstack/solid-router-ssr-query

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router-ssr-query@5813

@tanstack/solid-start

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start@5813

@tanstack/solid-start-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-client@5813

@tanstack/solid-start-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-server@5813

@tanstack/start-client-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-client-core@5813

@tanstack/start-plugin-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-plugin-core@5813

@tanstack/start-server-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-core@5813

@tanstack/start-static-server-functions

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-static-server-functions@5813

@tanstack/start-storage-context

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-storage-context@5813

@tanstack/valibot-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/valibot-adapter@5813

@tanstack/virtual-file-routes

npm i https://pkg.pr.new/TanStack/router/@tanstack/virtual-file-routes@5813

@tanstack/zod-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/zod-adapter@5813

commit: 4b52a14

Copy link
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: 2

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1b87767 and 2ed515d.

📒 Files selected for processing (3)
  • packages/react-router/eslint.config.ts (0 hunks)
  • packages/react-router/src/fileRoute.ts (1 hunks)
  • packages/react-router/src/route.tsx (1 hunks)
💤 Files with no reviewable changes (1)
  • packages/react-router/eslint.config.ts
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Use TypeScript in strict mode with extensive type safety across the codebase

Files:

  • packages/react-router/src/route.tsx
  • packages/react-router/src/fileRoute.ts
packages/{react-router,solid-router}/**

📄 CodeRabbit inference engine (AGENTS.md)

Implement React and Solid bindings/components only in packages/react-router/ and packages/solid-router/

Files:

  • packages/react-router/src/route.tsx
  • packages/react-router/src/fileRoute.ts
🧠 Learnings (8)
📓 Common learnings
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to packages/{react-router,solid-router}/** : Implement React and Solid bindings/components only in packages/react-router/ and packages/solid-router/
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to packages/{router-cli,router-generator,router-plugin,virtual-file-routes}/** : Keep CLI, generators, bundler plugins, and virtual file routing utilities in their dedicated tooling package directories
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to packages/{router-devtools,*-router-devtools}/** : Keep router devtools packages in packages/router-devtools/ and packages/*-router-devtools/
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to packages/{react-router,solid-router}/** : Implement React and Solid bindings/components only in packages/react-router/ and packages/solid-router/

Applied to files:

  • packages/react-router/src/route.tsx
  • packages/react-router/src/fileRoute.ts
📚 Learning: 2025-11-02T16:16:24.898Z
Learnt from: nlynzaad
Repo: TanStack/router PR: 5732
File: packages/start-client-core/src/client/hydrateStart.ts:6-9
Timestamp: 2025-11-02T16:16:24.898Z
Learning: In packages/start-client-core/src/client/hydrateStart.ts, the `import/no-duplicates` ESLint disable is necessary for imports from `#tanstack-router-entry` and `#tanstack-start-entry` because both aliases resolve to the same placeholder file (`fake-start-entry.js`) in package.json during static analysis, even though they resolve to different files at runtime.

Applied to files:

  • packages/react-router/src/route.tsx
  • packages/react-router/src/fileRoute.ts
📚 Learning: 2025-10-08T08:11:47.088Z
Learnt from: nlynzaad
Repo: TanStack/router PR: 5402
File: packages/router-generator/tests/generator/no-formatted-route-tree/routeTree.nonnested.snapshot.ts:19-21
Timestamp: 2025-10-08T08:11:47.088Z
Learning: Test snapshot files in the router-generator tests directory (e.g., files matching the pattern `packages/router-generator/tests/generator/**/routeTree*.snapshot.ts` or `routeTree*.snapshot.js`) should not be modified or have issues flagged, as they are fixtures used to verify the generator's output and are intentionally preserved as-is.

Applied to files:

  • packages/react-router/src/route.tsx
  • packages/react-router/src/fileRoute.ts
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to **/*.{ts,tsx} : Use TypeScript in strict mode with extensive type safety across the codebase

Applied to files:

  • packages/react-router/src/route.tsx
📚 Learning: 2025-10-01T18:31:35.420Z
Learnt from: schiller-manuel
Repo: TanStack/router PR: 5330
File: e2e/react-start/custom-basepath/src/routeTree.gen.ts:58-61
Timestamp: 2025-10-01T18:31:35.420Z
Learning: Do not review files named `routeTree.gen.ts` in TanStack Router repositories, as these are autogenerated files that should not be manually modified.

Applied to files:

  • packages/react-router/src/route.tsx
  • packages/react-router/src/fileRoute.ts
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to packages/{router-cli,router-generator,router-plugin,virtual-file-routes}/** : Keep CLI, generators, bundler plugins, and virtual file routing utilities in their dedicated tooling package directories

Applied to files:

  • packages/react-router/src/fileRoute.ts
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR
Repo: TanStack/router PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to **/src/routes/** : Place file-based routes under src/routes/ directories

Applied to files:

  • packages/react-router/src/fileRoute.ts
🪛 ESLint
packages/react-router/src/route.tsx

[error] 1-1: Definition for rule 'react-hooks/rules-of-hooks' was not found.

(react-hooks/rules-of-hooks)

packages/react-router/src/fileRoute.ts

[error] 1-1: Definition for rule 'react-hooks/rules-of-hooks' was not found.

(react-hooks/rules-of-hooks)

@@ -1,3 +1,4 @@
/* eslint-disable react-hooks/rules-of-hooks */
Copy link
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

ESLint rule 'react-hooks/rules-of-hooks' is not defined.

Same issue as in packages/react-router/src/route.tsx: the ESLint directive references a rule that doesn't exist in the current configuration, rendering the directive ineffective.

Verify that eslint-plugin-react-hooks is properly installed and configured. See the verification script provided in the review comment for packages/react-router/src/route.tsx (Line 1).


🏁 Script executed:

#!/bin/bash
# Find ESLint configuration files and check for eslint-plugin-react-hooks
echo "=== ESLint Config Files ===" 
fd -e 'js' -e 'json' -e 'cjs' -e 'mjs' --type f | grep -E '(eslint|\.eslintrc)' | head -20

echo -e "\n=== Looking for eslintrc in root and common locations ==="
find . -maxdepth 2 -type f \( -name '.eslintrc*' -o -name 'eslint.config.*' \) 2>/dev/null

echo -e "\n=== Checking package.json for react-hooks plugin ==="
if [ -f "package.json" ]; then
  cat package.json | grep -A 5 -B 5 "react-hooks" || echo "Not found in root package.json"
fi

echo -e "\n=== Checking packages/react-router/package.json ==="
if [ -f "packages/react-router/package.json" ]; then
  cat packages/react-router/package.json | grep -A 5 -B 5 "react-hooks" || echo "Not found in react-router package.json"
fi

echo -e "\n=== Viewing fileRoute.ts line 1 ==="
if [ -f "packages/react-router/src/fileRoute.ts" ]; then
  head -5 packages/react-router/src/fileRoute.ts
else
  echo "File not found"
fi

echo -e "\n=== Viewing route.tsx line 1 ==="
if [ -f "packages/react-router/src/route.tsx" ]; then
  head -5 packages/react-router/src/route.tsx
else
  echo "File not found"
fi

Length of output: 1770


🏁 Script executed:

#!/bin/bash
# Check eslint.config.js for react-hooks plugin configuration
echo "=== Content of eslint.config.js ==="
cat eslint.config.js

echo -e "\n=== Searching for react-hooks references ==="
grep -n "react-hooks" eslint.config.js || echo "No react-hooks found in root eslint.config.js"

echo -e "\n=== Checking if react-router has its own eslint config ==="
if [ -f "packages/react-router/eslint.config.js" ]; then
  echo "=== packages/react-router/eslint.config.js exists ==="
  cat packages/react-router/eslint.config.js
else
  echo "No eslint.config.js in packages/react-router"
fi

echo -e "\n=== Checking for node_modules/eslint-plugin-react-hooks ==="
if [ -d "node_modules/eslint-plugin-react-hooks" ]; then
  echo "Plugin directory exists"
  ls -la node_modules/eslint-plugin-react-hooks/ | head -15
else
  echo "Plugin not found in node_modules"
fi

Length of output: 1552


🏁 Script executed:

#!/bin/bash
# Check @tanstack/config for react-hooks plugin
echo "=== Looking for @tanstack/config eslint export ==="
find node_modules/@tanstack/config -name '*.js' -o -name '*.ts' | head -20

echo -e "\n=== Checking @tanstack/config/eslint ==="
if [ -f "node_modules/@tanstack/config/eslint.js" ]; then
  cat node_modules/@tanstack/config/eslint.js
elif [ -f "node_modules/@tanstack/config/dist/eslint.js" ]; then
  cat node_modules/@tanstack/config/dist/eslint.js
elif [ -f "node_modules/@tanstack/config/eslint/index.js" ]; then
  cat node_modules/@tanstack/config/eslint/index.js
else
  echo "Checking package.json exports"
  if [ -f "node_modules/@tanstack/config/package.json" ]; then
    cat node_modules/@tanstack/config/package.json | grep -A 20 '"exports"'
  fi
fi

echo -e "\n=== Searching for react-hooks in @tanstack/config directory ==="
grep -r "react-hooks" node_modules/@tanstack/config 2>/dev/null | head -10 || echo "Not found"

Length of output: 650


🏁 Script executed:

#!/bin/bash
# Read the actual eslint.js file
echo "=== Content of @tanstack/config/dist/esm/eslint.js ==="
cat node_modules/@tanstack/config/dist/esm/eslint.js

echo -e "\n=== Verify if react-hooks/rules-of-hooks rule is available ==="
grep -i "rules-of-hooks" node_modules/@tanstack/config/dist/esm/eslint.js || echo "Not found in eslint.js"

Length of output: 263


🏁 Script executed:

#!/bin/bash
# Find @tanstack/eslint-config and check for react-hooks
echo "=== Looking for @tanstack/eslint-config ==="
find node_modules/@tanstack/eslint-config -type f \( -name '*.js' -o -name 'package.json' \) 2>/dev/null | head -20

echo -e "\n=== Checking for main export in @tanstack/eslint-config/package.json ==="
if [ -f "node_modules/@tanstack/eslint-config/package.json" ]; then
  cat node_modules/@tanstack/eslint-config/package.json | grep -E '"main"|"exports"|"type"' | head -10
fi

echo -e "\n=== Looking for index file ==="
for f in node_modules/@tanstack/eslint-config/index.js node_modules/@tanstack/eslint-config/dist/index.js node_modules/@tanstack/eslint-config/dist/esm/index.js; do
  if [ -f "$f" ]; then
    echo "Found: $f"
    cat "$f" | head -100
    break
  fi
done

echo -e "\n=== Grep for react-hooks in entire @tanstack/eslint-config ==="
grep -r "react-hooks" node_modules/@tanstack/eslint-config 2>/dev/null | head -5 || echo "Not found"

Length of output: 213


🏁 Script executed:

#!/bin/bash
# Find what @tanstack packages exist
echo "=== Available @tanstack packages ==="
ls -la node_modules/@tanstack 2>/dev/null | head -30

echo -e "\n=== Search for tanstackConfig definition ==="
grep -r "export.*tanstackConfig" node_modules/@tanstack 2>/dev/null | head -20

echo -e "\n=== Check package.json for @tanstack/eslint-config or similar ==="
grep -r "@tanstack/eslint-config" node_modules 2>/dev/null | head -5 || echo "Not found"

echo -e "\n=== Try to resolve the import ==="
node -e "try { const mod = require.resolve('@tanstack/eslint-config'); console.log('Resolved to:', mod); } catch(e) { console.log('Not found:', e.message); }"

Length of output: 1797


🏁 Script executed:

#!/bin/bash
# Find @tanstack/eslint-config in pnpm structure
ESLINT_CONFIG_PATH=$(find node_modules/.pnpm -name "@tanstack+eslint-config*" -type d | head -1)

if [ -z "$ESLINT_CONFIG_PATH" ]; then
  echo "Not found"
  exit 1
fi

ESLINT_CONFIG_PATH="$ESLINT_CONFIG_PATH/node_modules/@tanstack/eslint-config"

echo "=== Found @tanstack/eslint-config at: $ESLINT_CONFIG_PATH ==="

echo -e "\n=== Files in directory ==="
ls -la "$ESLINT_CONFIG_PATH" 2>/dev/null | head -20

echo -e "\n=== Looking for main/dist files ==="
for f in "$ESLINT_CONFIG_PATH"/index.js "$ESLINT_CONFIG_PATH"/dist/index.js "$ESLINT_CONFIG_PATH"/dist/esm/index.js; do
  if [ -f "$f" ]; then
    echo "=== Found and reading: $f ==="
    cat "$f" | head -150
    break
  fi
done

echo -e "\n=== Grep for react-hooks in config ==="
grep -r "react-hooks" "$ESLINT_CONFIG_PATH" 2>/dev/null || echo "Not found"

Length of output: 616


🏁 Script executed:

#!/bin/bash
# Find @tanstack/eslint-config source files
ESLINT_CONFIG_PATH=$(find node_modules/.pnpm -name "@tanstack+eslint-config*" -type d | head -1)
ESLINT_CONFIG_PATH="$ESLINT_CONFIG_PATH/node_modules/@tanstack/eslint-config"

echo "=== Files in src directory ==="
ls -la "$ESLINT_CONFIG_PATH/src" 2>/dev/null

echo -e "\n=== Content of src files ==="
for f in "$ESLINT_CONFIG_PATH"/src/*; do
  if [ -f "$f" ]; then
    echo "=== $f ==="
    cat "$f" | head -200
  fi
done

echo -e "\n=== Check package.json exports ==="
cat "$ESLINT_CONFIG_PATH/package.json"

Length of output: 10928


Enable ESLint's react-hooks plugin in the configuration.

The eslint-plugin-react-hooks package is installed, but the plugin is not registered in the ESLint configuration (@tanstack/eslint-config). The react-hooks/rules-of-hooks rule is therefore undefined, making the /* eslint-disable react-hooks/rules-of-hooks */ directive ineffective.

Add the plugin to the ESLint configuration to resolve this issue in both fileRoute.ts and route.tsx.

🧰 Tools
🪛 ESLint

[error] 1-1: Definition for rule 'react-hooks/rules-of-hooks' was not found.

(react-hooks/rules-of-hooks)

🤖 Prompt for AI Agents
In packages/react-router/src/fileRoute.ts (and similarly
packages/react-router/src/route.tsx), the file-level eslint-disable for
react-hooks is ineffective because the react-hooks plugin isn't registered;
update the @tanstack/eslint-config configuration to add "react-hooks" to the
plugins array and enable the canonical rules (e.g., set
"react-hooks/rules-of-hooks": "error" and "react-hooks/exhaustive-deps": "warn"
or your preferred severities) so those rules are defined project-wide, then
remove the local /* eslint-disable react-hooks/rules-of-hooks */ comments from
the two files.

@@ -1,3 +1,4 @@
/* eslint-disable react-hooks/rules-of-hooks */
Copy link
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

ESLint rule 'react-hooks/rules-of-hooks' is not defined.

The ESLint directive references a rule that doesn't exist in the current configuration. This means the directive has no effect and any violations it was intended to suppress will still be reported (or the linting will fail if strict mode is enabled).

This issue likely stems from the dependency updates in this PR. Verify that eslint-plugin-react-hooks is properly installed and configured in the ESLint configuration.

Run the following script to verify the ESLint configuration and plugin installation:


🏁 Script executed:

#!/bin/bash
# Check if eslint-plugin-react-hooks is installed and verify available rules

echo "=== Checking package.json for eslint-plugin-react-hooks ==="
cat package.json | jq '.devDependencies["eslint-plugin-react-hooks"], .dependencies["eslint-plugin-react-hooks"]'

echo -e "\n=== Checking workspace package.json files ==="
fd -t f "package.json" -x sh -c 'echo "File: {}"; cat {} | jq -r "select(.devDependencies[\"eslint-plugin-react-hooks\"] or .dependencies[\"eslint-plugin-react-hooks\"]) | \"Found in: \" + (input_filename // \"\")"' 2>/dev/null || fd -t f "package.json" -x sh -c 'echo "{}:"; cat {} | jq ".devDependencies[\"eslint-plugin-react-hooks\"], .dependencies[\"eslint-plugin-react-hooks\"]" | grep -v null'

echo -e "\n=== Checking ESLint config for react-hooks plugin ==="
fd -t f "eslint.config" -x cat {}

echo -e "\n=== Attempting to list available rules from plugin (if Node.js available) ==="
node -e "try { const plugin = require('eslint-plugin-react-hooks'); console.log('Available rules:', Object.keys(plugin.rules || {})); } catch(e) { console.log('Could not load plugin:', e.message); }" 2>&1 || echo "Node.js check skipped"

Length of output: 22819


Configure eslint-plugin-react-hooks in packages/react-router/eslint.config.js or remove the unnecessary directive.

The react-hooks/rules-of-hooks rule is unavailable in the packages/react-router configuration because the plugin is not registered. In packages/react-router/eslint.config.js, the eslint-plugin-react-hooks import and plugin registration are commented out, rendering the eslint-disable directive at line 1 of route.tsx ineffective.

Either uncomment the plugin configuration in eslint.config.js to enable the rule, or remove the directive if the rule is not needed for this package.

🧰 Tools
🪛 ESLint

[error] 1-1: Definition for rule 'react-hooks/rules-of-hooks' was not found.

(react-hooks/rules-of-hooks)

🤖 Prompt for AI Agents
In packages/react-router/src/route.tsx around line 1, there's an unnecessary
eslint-disable comment for react-hooks/rules-of-hooks because
eslint-plugin-react-hooks is not registered in
packages/react-router/eslint.config.js (its import and plugin registration are
commented out); fix by either uncommenting and properly importing/registering
eslint-plugin-react-hooks in packages/react-router/eslint.config.js so the rule
is active, or remove the top-line eslint-disable directive from route.tsx if you
decide the rule should not apply in this package.

@schiller-manuel schiller-manuel merged commit d0e33fa into main Nov 11, 2025
6 checks passed
@schiller-manuel schiller-manuel deleted the bump-deps branch November 11, 2025 00:43
roduyemi pushed a commit to roduyemi/oss-router that referenced this pull request Nov 19, 2025
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.

2 participants