This commit is contained in:
Mine Starks
2019-08-29 15:31:09 -07:00
parent ccf41ef803
commit 9781b95bdc
2 changed files with 52 additions and 1 deletions
+5 -1
View File
@@ -539,10 +539,14 @@ namespace ts.formatting {
return true;
case SyntaxKind.VariableDeclaration:
case SyntaxKind.PropertyAssignment:
case SyntaxKind.BinaryExpression:
if (!settings.indentMultiLineObjectLiteralBeginningOnBlankLine && sourceFile && childKind === SyntaxKind.ObjectLiteralExpression) { // TODO: GH#18217
return rangeIsOnOneLine(sourceFile, child!);
}
return true;
if (parent.kind !== SyntaxKind.BinaryExpression) {
return true;
}
break;
case SyntaxKind.DoStatement:
case SyntaxKind.WhileStatement:
case SyntaxKind.ForInStatement: