refactor(eslint): remove compat layers for ESLint < 9#17944
Merged
nicolo-ribaudo merged 12 commits intoApr 24, 2026
Conversation
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.
Collaborator
|
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/61345 |
|
commit: |
e9e00ef to
47d92c0
Compare
2cfdf6c to
e743bff
Compare
The builtin no-undef rule already supports accessor property when babel/eslint-parser is used, thanks to babel#16884.
JLHwung
commented
Apr 23, 2026
| rule, | ||
| problem => !isAccessorFieldName(problem.node), | ||
| ); | ||
| export default rule; |
Contributor
Author
There was a problem hiding this comment.
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
approved these changes
Apr 24, 2026
liuxingbaoyu
approved these changes
Apr 24, 2026
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.
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-undefto the builtinno-undefrule.