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.
Playground link
Input:
Output:
Expected behavior:
Flow 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.
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 || bazis illegal, but you can write(foo ?? bar) || baz.Playground link
Input:
Output:
Expected behavior:
Flow 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.