Skip to content

Support ESLint v10 for babel-eslint-plugin#17811

Merged
nicolo-ribaudo merged 14 commits intobabel:mainfrom
JLHwung:bump-eslint
Feb 20, 2026
Merged

Support ESLint v10 for babel-eslint-plugin#17811
nicolo-ribaudo merged 14 commits intobabel:mainfrom
JLHwung:bump-eslint

Conversation

@JLHwung
Copy link
Copy Markdown
Contributor

@JLHwung JLHwung commented Feb 19, 2026

Q                       A
Fixed Issues? Fixes #1, Fixes #2
Patch: Bug Fix?
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes?
License MIT

As a follow up to #17796, this PR adds support of ESLint v10 to babel-eslint-plugin. We inlined the eslint-rule-composer as the library seems abandoned: The PR to address ESLint v9 deprecation has not yet been merged after 3 years: not-an-aardvark/eslint-rule-composer#13

The inlined eslint-rule-composer only supports the filterReports method, we added support for ESLint v10 and fixed a polynomial back tracking bug.

We also bumped other eslint plugins and tools.

Please carefully review the commit 4510ba4 due to the prefer-optional-chain rule. This commit has been reverted.

@JLHwung JLHwung added the PR: Bug Fix (next major) 🐛 A type of pull request used for our changelog categories for next major release label Feb 19, 2026
@babel-bot
Copy link
Copy Markdown
Collaborator

babel-bot commented Feb 19, 2026

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/60964

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Feb 19, 2026

Open in StackBlitz

commit: d5128e7

!this.container ||
// @ts-expect-error this.key should present in this.container
this.container[this.key] !== this.node
this.container?.[this.key] !== this.node
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I slightly prefer the old way of writing it because it's more readable.
I did a simple test locally, and it seems this option avoids reporting these kinds of errors.
https://typescript-eslint.io/rules/prefer-optional-chain/#requirenullish

Copy link
Copy Markdown
Member

@liuxingbaoyu liuxingbaoyu left a comment

Choose a reason for hiding this comment

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

Thanks!

@@ -9,7 +9,7 @@ module.exports = {
create(ctx) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This rule seems to be no longer needed. :)

@nicolo-ribaudo nicolo-ribaudo merged commit 5a1f755 into babel:main Feb 20, 2026
59 of 60 checks passed
@nicolo-ribaudo nicolo-ribaudo deleted the bump-eslint branch February 20, 2026 12:44
@nicolo-ribaudo nicolo-ribaudo added the PR: Bug Fix 🐛 A type of pull request used for our changelog categories label Mar 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: Bug Fix 🐛 A type of pull request used for our changelog categories PR: Bug Fix (next major) 🐛 A type of pull request used for our changelog categories for next major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants