feat(eslint-plugin): add ESLint v10 compatibility#5103
Merged
Conversation
Extend eslint peerDependencies range to include ^10.0.0 and replace the deprecated context.getSourceCode() call with the modern context.sourceCode property (with fallback for older ESLint versions). Closes ngrx#5102 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
✅ Deploy Preview for ngrx-io ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for ngrx-site-v21 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
Author
|
Hi — all CI checks are passing (tests, build, e2e, lint, schematics). Happy to make any adjustments if needed. |
markostanimirovic
approved these changes
Mar 4, 2026
rainerhahnekamp
approved these changes
Mar 4, 2026
Closed
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Checklist
PR Type
[x] Bugfix
What is the current behavior?
@ngrx/eslint-plugindeclares"eslint": "^8.57.0 || ^9.0.0"in its peerDependencies, which causes npm/pnpm peer dependency warnings or errors when used with ESLint v10. Additionally, theprefix-selectors-with-selectrule uses the deprecatedcontext.getSourceCode()API, which was removed in ESLint v10.Closes #5102
What is the new behavior?
"^8.57.0 || ^9.0.0 || ^10.0.0"context.getSourceCode()replaced withcontext.sourceCode ?? context.getSourceCode()for backward compatibilityThe
typescript-eslintand@typescript-eslint/utilspeerDeps (^8.0.0) already cover versions that support ESLint 10 (v8.56.0+), so no changes needed there.Does this PR introduce a breaking change?
[ ] Yes
[x] No