Skip to content

Conversation

@JLHwung
Copy link
Contributor

@JLHwung JLHwung commented May 30, 2025

Q                       A
Fixed Issues? Fixes #17347
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 support the sourceType: "commonjs" option introduced in ESLint 9. Since Babel parser does not have a commonjs source type, here we change the commonjs to the script source type.

@JLHwung JLHwung added PR: Bug Fix 🐛 A type of pull request used for our changelog categories area: eslint labels May 30, 2025
@babel-bot
Copy link
Collaborator

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

@nicolo-ribaudo nicolo-ribaudo changed the title initial support for ESLint sourceType: commonjs Map ESLint's sourceType: commonjs to script May 31, 2025
@JLHwung JLHwung merged commit 0c51d8f into babel:main Jun 1, 2025
57 of 58 checks passed
@JLHwung JLHwung deleted the support-eslint-source-type-commonjs branch June 1, 2025 12:00
noelportillo

This comment was marked as spam.

@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 Sep 14, 2025
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area: eslint outdated A closed issue/PR that is archived due to age. Recommended to make a new issue PR: Bug Fix 🐛 A type of pull request used for our changelog categories

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] When sourceType is unspecified then babel gives "Parsing error" with ESLint 9 flat config on '.cjs' files

5 participants