chore: mark eslint peer dependency as optional#6710
chore: mark eslint peer dependency as optional#6710dotnize wants to merge 1 commit intoTanStack:mainfrom
Conversation
📝 WalkthroughWalkthroughThe eslint peer dependency in the eslint-plugin-router package is marked as optional by adding a Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
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. Comment |
|
View your CI Pipeline Execution ↗ for commit 3ce14d8
☁️ Nx Cloud last updated this comment at |
There was a problem hiding this comment.
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 | 🟠 MajorTransitive
eslintpeer dependency via@typescript-eslint/utilsmay still block ESLint-free installsMarking the direct
eslintpeer dep as optional silences the warning at this package's level, but@typescript-eslint/utils@^8(a harddependencyon line 55) itself declareseslintas 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.0declareseslint@^8.57.0 || ^9.0.0as a peer dependency. This peer dependency is not optional.In strict-mode pnpm (which this monorepo uses), the unsatisfied peer dependency from
@typescript-eslint/utilswill still generate warnings or install failures for consumers that don't haveeslintinstalled. 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
eslintbefore merging.
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