Skip to content

refactor(eslint): remove compat layers for ESLint < 9#17944

Merged
nicolo-ribaudo merged 12 commits into
babel:mainfrom
JLHwung:refactor-babel-eslint-plugin
Apr 24, 2026
Merged

refactor(eslint): remove compat layers for ESLint < 9#17944
nicolo-ribaudo merged 12 commits into
babel:mainfrom
JLHwung:refactor-babel-eslint-plugin

Conversation

@JLHwung
Copy link
Copy Markdown
Contributor

@JLHwung JLHwung commented Apr 22, 2026

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

In this PR we clean up the babel-eslint-plugin and the eslint test fixtures. We also remove compatibility layers for ESLint < 9.

This PR also cleans up typings in babel/eslint-parser, and delegates @babel/no-undef to the builtin no-undef rule.

JLHwung added 4 commits April 22, 2026 14:32
Rewrite rule composer to remove most compatibiliti layers for older ESLint version. Babel-eslint-plugin only supports ESLint 9 and above.
It was previously removed in babel#17914.
@babel-bot
Copy link
Copy Markdown
Collaborator

babel-bot commented Apr 22, 2026

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

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 22, 2026

Open in StackBlitz

commit: 708757c

@JLHwung JLHwung force-pushed the refactor-babel-eslint-plugin branch from e9e00ef to 47d92c0 Compare April 22, 2026 19:46
@JLHwung JLHwung added the PR: Internal 🏠 A type of pull request used for our changelog categories label Apr 22, 2026
@JLHwung JLHwung force-pushed the refactor-babel-eslint-plugin branch from 2cfdf6c to e743bff Compare April 23, 2026 15:31
JLHwung added 3 commits April 23, 2026 11:36
The builtin no-undef rule already supports accessor property when babel/eslint-parser is used, thanks to babel#16884.
rule,
problem => !isAccessorFieldName(problem.node),
);
export default rule;
Copy link
Copy Markdown
Contributor Author

@JLHwung JLHwung Apr 23, 2026

Choose a reason for hiding this comment

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

We can also remove this rule now that it supports accessor properties, as such errors should have been handled by the referencer in the eslint-parser. I keep the rule as a delegate such that this PR still falls to the refactor category. Hence the tests of @babel/no-undef are still kept.

@nicolo-ribaudo nicolo-ribaudo merged commit 508caa2 into babel:main Apr 24, 2026
92 of 101 checks passed
@nicolo-ribaudo nicolo-ribaudo deleted the refactor-babel-eslint-plugin branch April 24, 2026 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: Internal 🏠 A type of pull request used for our changelog categories

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants