Ensure expressions wrapped in parens (#12082)

This commit is contained in:
overlookmotel
2020-09-25 21:58:04 +01:00
committed by GitHub
parent 63d9f5397b
commit 1a074ee7e6
6 changed files with 178 additions and 3 deletions

View File

@@ -293,7 +293,7 @@ function isFirstInStatement(
let node = printStack[i];
i--;
let parent = printStack[i];
while (i > 0) {
while (i >= 0) {
if (
t.isExpressionStatement(parent, { expression: node }) ||
(considerDefaultExports &&