Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
346 B
346 B
Fix missing parentheses when an expression statement starts with let[ (#14000, #14044 by @fisker, @thorn0)
// Input
(let[0] = 2);
// Prettier stable
let[0] = 2;
// Prettier stable (second format)
SyntaxError: Unexpected token (1:5)
> 1 | let[0] = 2;
| ^
2 |
// Prettier main
(let)[0] = 2;