Skip to content

fix: perserve parentheses of lhs id with rhs unamed fn#14524

Merged
JLHwung merged 2 commits intobabel:mainfrom
JLHwung:fix-lhs-identifier-parentheses
May 6, 2022
Merged

fix: perserve parentheses of lhs id with rhs unamed fn#14524
JLHwung merged 2 commits intobabel:mainfrom
JLHwung:fix-lhs-identifier-parentheses

Conversation

@JLHwung
Copy link
Contributor

@JLHwung JLHwung commented May 4, 2022

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

Detect the pattern (f) = function () {} and preserve the parentheses around f.

@JLHwung JLHwung added PR: Bug Fix 🐛 A type of pull request used for our changelog categories pkg: generator labels May 4, 2022
@babel-bot
Copy link
Collaborator

babel-bot commented May 4, 2022

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

nicolo-ribaudo
nicolo-ribaudo previously approved these changes May 5, 2022
@nicolo-ribaudo nicolo-ribaudo dismissed their stale review May 5, 2022 14:42

We should also handle class expressions: (x) = class {}

@JLHwung JLHwung merged commit 9c1774a into babel:main May 6, 2022
@JLHwung JLHwung deleted the fix-lhs-identifier-parentheses branch May 6, 2022 14:18
@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 Aug 6, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 6, 2022
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 pkg: generator 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]: original assignment statement inside of braces is not transpiled properly

4 participants