Skip to content

chore: mark eslint peer dependency as optional#6710

Closed
dotnize wants to merge 1 commit intoTanStack:mainfrom
dotnize:eslint-optional-peer-dep
Closed

chore: mark eslint peer dependency as optional#6710
dotnize wants to merge 1 commit intoTanStack:mainfrom
dotnize:eslint-optional-peer-dep

Conversation

@dotnize
Copy link
Contributor

@dotnize dotnize commented Feb 20, 2026

see #6706

This is to consider other linters like Oxlint that can consume ESLint plugins directly, so ESLint doesn't have to be installed for these projects.

Would it be worth mentioning Oxlint as an additional supported linter in the docs?

UPDATE: see #6706 (reply in thread)

Summary by CodeRabbit

  • Chores
    • Updated package configuration to mark ESLint as an optional peer dependency, allowing greater flexibility for users who may not require it.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 20, 2026

📝 Walkthrough

Walkthrough

The eslint peer dependency in the eslint-plugin-router package is marked as optional by adding a peerDependenciesMeta configuration block, allowing users to install the plugin without requiring eslint as a mandatory peer dependency.

Changes

Cohort / File(s) Summary
Package Configuration
packages/eslint-plugin-router/package.json
Added peerDependenciesMeta.eslint.optional set to true, marking eslint as an optional peer dependency while maintaining the existing peerDependencies entry.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A bunny's note on optional deps,
ESLint now wears freedom's step!
No longer bound by strict demands,
The plugin dances, free and unplanned,
A flexible friend for all the lands! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'chore: mark eslint peer dependency as optional' accurately describes the main change: adding peerDependenciesMeta.eslint.optional to package.json.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

@nx-cloud
Copy link

nx-cloud bot commented Feb 20, 2026

View your CI Pipeline Execution ↗ for commit 3ce14d8

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

☁️ Nx Cloud last updated this comment at 2026-02-20 00:37:11 UTC

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 20, 2026

More templates

@tanstack/arktype-adapter

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

@tanstack/eslint-plugin-router

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

@tanstack/history

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

@tanstack/nitro-v2-vite-plugin

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

@tanstack/react-router

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

@tanstack/react-router-devtools

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

@tanstack/react-router-ssr-query

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

@tanstack/react-start

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

@tanstack/react-start-client

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

@tanstack/react-start-server

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

@tanstack/router-cli

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

@tanstack/router-core

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

@tanstack/router-devtools

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

@tanstack/router-devtools-core

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

@tanstack/router-generator

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

@tanstack/router-plugin

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

@tanstack/router-ssr-query-core

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

@tanstack/router-utils

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

@tanstack/router-vite-plugin

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

@tanstack/solid-router

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

@tanstack/solid-router-devtools

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

@tanstack/solid-router-ssr-query

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

@tanstack/solid-start

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

@tanstack/solid-start-client

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

@tanstack/solid-start-server

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

@tanstack/start-client-core

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

@tanstack/start-fn-stubs

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-fn-stubs@6710

@tanstack/start-plugin-core

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

@tanstack/start-server-core

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

@tanstack/start-static-server-functions

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

@tanstack/start-storage-context

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

@tanstack/valibot-adapter

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

@tanstack/virtual-file-routes

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

@tanstack/vue-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/vue-router@6710

@tanstack/vue-router-devtools

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

@tanstack/vue-router-ssr-query

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

@tanstack/vue-start

npm i https://pkg.pr.new/TanStack/router/@tanstack/vue-start@6710

@tanstack/vue-start-client

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

@tanstack/vue-start-server

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

@tanstack/zod-adapter

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

commit: 3ce14d8

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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/eslint-plugin-router/package.json (1)

55-56: ⚠️ Potential issue | 🟠 Major

Transitive eslint peer dependency via @typescript-eslint/utils may still block ESLint-free installs

Marking the direct eslint peer dep as optional silences the warning at this package's level, but @typescript-eslint/utils@^8 (a hard dependency on line 55) itself declares eslint as a required peer dependency. The peer dependency chain is:

`@tanstack/eslint-plugin-router`
  └─ `@typescript-eslint/utils`@^8  (dependencies)
       └─ eslint  ← peer dependency (required, not optional)

@typescript-eslint/utils@8.23.0 declares eslint@^8.57.0 || ^9.0.0 as a peer dependency. This peer dependency is not optional.

In strict-mode pnpm (which this monorepo uses), the unsatisfied peer dependency from @typescript-eslint/utils will still generate warnings or install failures for consumers that don't have eslint installed. Making the direct peer dependency optional won't suppress those warnings or relax the requirement imposed by the transitive dependency.

Confirm that the target Oxlint integration installs cleanly without eslint before merging.

@dotnize dotnize marked this pull request as draft February 20, 2026 00:41
@dotnize dotnize marked this pull request as ready for review February 20, 2026 01:09
@dotnize dotnize marked this pull request as draft February 20, 2026 01:10
@dotnize
Copy link
Contributor Author

dotnize commented Feb 20, 2026

#6706 (reply in thread)

@dotnize dotnize closed this Feb 20, 2026
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.

1 participant

Comments