Skip to content

refactor(ts): migrate babel-eslint-plugin-* to TS#17950

Merged
JLHwung merged 5 commits into
babel:mainfrom
JLHwung:migrate-babel-eslint-ts
Apr 30, 2026
Merged

refactor(ts): migrate babel-eslint-plugin-* to TS#17950
JLHwung merged 5 commits into
babel:mainfrom
JLHwung:migrate-babel-eslint-ts

Conversation

@JLHwung
Copy link
Copy Markdown
Contributor

@JLHwung JLHwung commented Apr 24, 2026

Q                       A
Fixed Issues? Several small errors in esling-plugin-development, see added new tests for the specifics
Patch: Bug Fix? Yes
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes?
License MIT

In this PR we migrate babel-eslint-plugin-* and fixed all typing errors. The only introduced @ts-expect-error is for an upstream typing issue.

We also fixed small bugs detected by tsc and added new tests.

@JLHwung JLHwung added the PR: Internal 🏠 A type of pull request used for our changelog categories label Apr 24, 2026
}

if (parent.type === "ExportNamedDeclaration") {
return node.id.name;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This file is renamed to is-default-export such that we don't have to deal with the typing issue here from destructuring at all.

@JLHwung JLHwung force-pushed the migrate-babel-eslint-ts branch from 015a26f to b0e7cbb Compare April 24, 2026 18:32
},
"homepage": "https://babel.dev/",
"peerDependencies": {
"eslint": "^9.0.0 || ^10.0.0"
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We add the eslint peer deps constraint to align with other eslint plugins.

@babel-bot
Copy link
Copy Markdown
Collaborator

babel-bot commented Apr 24, 2026

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

},
"homepage": "https://github.com/babel/babel/tree/master/eslint/babel-eslint-plugin-development-internal",
"peerDependencies": {
"@babel/eslint-parser": "workspace:^",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This eslint plugin does not work on any early stage features and therefore we remove the @babel/eslint-parser from the peer deps. Of course it should still work with @babel/eslint-parser.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 24, 2026

Open in StackBlitz

commit: d4de73b

"new-cap": "off",
"no-undef": "off",
"object-curly-spacing": "off",
"no-unused-expressions": "off",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is a bug fix. The object-curly-spacing rule has already been removed as ESLint has deprecated that rule.

@JLHwung JLHwung merged commit a4d31b7 into babel:main Apr 30, 2026
56 checks passed
@JLHwung JLHwung deleted the migrate-babel-eslint-ts branch April 30, 2026 23:42
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.

3 participants