-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Closed
Copy link
Labels
lang:javascriptIssues affecting JSIssues affecting JSlocked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.Please open a new issue and fill out the template instead of commenting.
Description
in the latest stage 3 draft, nullish coalescing can no longer immediately contain, or be contained within, && and ||: https://tc39.es/proposal-nullish-coalescing/
so, foo ?? bar || baz is illegal, but you can write (foo ?? bar) || baz.
Input:
(foo ?? bar) || bazOutput:
foo ?? bar || bazExpected behavior:
(foo ?? bar) || bazFlow v0.106.0 implements the change to the spec, making this a parse error. So, prettier will turn valid code into invalid code by removing the parens.
Metadata
Metadata
Assignees
Labels
lang:javascriptIssues affecting JSIssues affecting JSlocked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.Please open a new issue and fill out the template instead of commenting.