Skip to content

chore: enable some ts-eslint rules#17592

Merged
JLHwung merged 7 commits intobabel:mainfrom
JLHwung:ts-eslint-rules
Nov 24, 2025
Merged

chore: enable some ts-eslint rules#17592
JLHwung merged 7 commits intobabel:mainfrom
JLHwung:ts-eslint-rules

Conversation

@JLHwung
Copy link
Copy Markdown
Contributor

@JLHwung JLHwung commented Nov 17, 2025

Q                       A
Fixed Issues? babel-standalone throws "Invalid plugin specified in Babel options: foo, [Object object]" when provided an invalid plugin with options.
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 enabled a few previously disabled ts-eslint rules.

  • array-type
  • consistent-generic-constructors
  • consistent-indexed-object-style
  • no-base-to-string
  • no-unsafe-declaration-merging

The no-base-to-string rule detects a potential bug in the babel-standalone error message handling. This bug is also fixed in this PR.

The following rules have been deprecated and replaced by third-party ts-eslint plugins. Before we install other plugins, they can be safely removed from our config:

  • ban-types
  • sort-type-constituents

@JLHwung JLHwung added PR: Polish 💅 A type of pull request used for our changelog categories pkg: standalone labels Nov 17, 2025
@babel-bot
Copy link
Copy Markdown
Collaborator

babel-bot commented Nov 17, 2025

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

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Nov 17, 2025

Open in StackBlitz

commit: 68056df

Copy link
Copy Markdown
Member

@nicolo-ribaudo nicolo-ribaudo left a comment

Choose a reason for hiding this comment

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

I would have slightly preferred the last commit to be in a separate PR.

The ban-types rule has been removed in ts-eslint v8.
This rule has been deprecated in favor of the perfectionist/sort-intersection-types and perfectionist/sort-union-types rules. Since we have installed perfectionist, removing this rule becomes no-op.
@JLHwung JLHwung removed PR: Polish 💅 A type of pull request used for our changelog categories pkg: standalone labels Nov 24, 2025
@JLHwung JLHwung changed the title Polish(standalone): improve message on invalid preset/plugin chore: enable some ts-eslint rules Nov 24, 2025
@JLHwung
Copy link
Copy Markdown
Contributor Author

JLHwung commented Nov 24, 2025

I would have slightly preferred the last commit to be in a separate PR.

OK, the last two commits are moved to #17606

@JLHwung JLHwung merged commit 99dcba5 into babel:main Nov 24, 2025
74 checks passed
@JLHwung JLHwung deleted the ts-eslint-rules branch November 24, 2025 20:56
@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Feb 24, 2026
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

outdated A closed issue/PR that is archived due to age. Recommended to make a new issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants