Remove needless conditions for YeildExpression in needs-parens (#13790)
Remove needless condition
This commit is contained in:
1 parent
8ae1fb69bd
commit
fb55c39c00
1 file changed
+1
-6
@@ -349,12 +349,7 @@ function needsParens(path, options) {
|
||||
}
|
||||
|
||||
case "YieldExpression":
|
||||
if (
|
||||
parent.type === "UnaryExpression" ||
|
||||
parent.type === "AwaitExpression" ||
|
||||
parent.type === "TSAsExpression" ||
|
||||
parent.type === "TSNonNullExpression"
|
||||
) {
|
||||
if (parent.type === "AwaitExpression") {
|
||||
return true;
|
||||
}
|
||||
// else fallthrough
|
||||
|
||||
Reference in new issue
Block a user