Skip to content

feat(eslint-plugin): add ESLint v10 compatibility#5103

Merged
timdeschryver merged 2 commits into
ngrx:mainfrom
roli-lpci:fix/eslint-10-compat
Mar 4, 2026
Merged

feat(eslint-plugin): add ESLint v10 compatibility#5103
timdeschryver merged 2 commits into
ngrx:mainfrom
roli-lpci:fix/eslint-10-compat

Conversation

@roli-lpci
Copy link
Copy Markdown
Contributor

PR Checklist

PR Type

[x] Bugfix

What is the current behavior?

@ngrx/eslint-plugin declares "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, the prefix-selectors-with-select rule uses the deprecated context.getSourceCode() API, which was removed in ESLint v10.

Closes #5102

What is the new behavior?

  • eslint peerDependencies range extended to "^8.57.0 || ^9.0.0 || ^10.0.0"
  • Deprecated context.getSourceCode() replaced with context.sourceCode ?? context.getSourceCode() for backward compatibility

The typescript-eslint and @typescript-eslint/utils peerDeps (^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

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>
@netlify
Copy link
Copy Markdown

netlify Bot commented Feb 25, 2026

Deploy Preview for ngrx-io ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit e2a5e1d
🔍 Latest deploy log https://app.netlify.com/projects/ngrx-io/deploys/69a87d260b02ff0008bef68e
😎 Deploy Preview https://deploy-preview-5103--ngrx-io.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link
Copy Markdown

netlify Bot commented Feb 25, 2026

Deploy Preview for ngrx-site-v21 ready!

Name Link
🔨 Latest commit e2a5e1d
🔍 Latest deploy log https://app.netlify.com/projects/ngrx-site-v21/deploys/69a87d262e4d4b00080e9f63
😎 Deploy Preview https://deploy-preview-5103--ngrx-site-v21.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@roli-lpci
Copy link
Copy Markdown
Contributor Author

Hi — all CI checks are passing (tests, build, e2e, lint, schematics). Happy to make any adjustments if needed.

Copy link
Copy Markdown
Member

@timdeschryver timdeschryver left a comment

Choose a reason for hiding this comment

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

Thanks @roli-lpci 😎!

@markostanimirovic markostanimirovic changed the title fix(eslint-plugin): add ESLint v10 compatibility feat(eslint-plugin): add ESLint v10 compatibility Mar 4, 2026
@timdeschryver timdeschryver merged commit 853cbc5 into ngrx:main Mar 4, 2026
14 checks passed
@markostanimirovic markostanimirovic mentioned this pull request Mar 10, 2026
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ESLint 10 Compatibility

4 participants