mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 12:51:30 -05:00
Merge pull request #5018 from SaschaNaz/formatAssignment
Indent expression statements
This commit is contained in:
@@ -405,6 +405,7 @@ namespace ts.formatting {
|
||||
|
||||
function nodeContentIsAlwaysIndented(kind: SyntaxKind): boolean {
|
||||
switch (kind) {
|
||||
case SyntaxKind.ExpressionStatement:
|
||||
case SyntaxKind.ClassDeclaration:
|
||||
case SyntaxKind.ClassExpression:
|
||||
case SyntaxKind.InterfaceDeclaration:
|
||||
|
||||
@@ -128,7 +128,8 @@ namespace ts {
|
||||
return isCompletedNode((<IfStatement>n).thenStatement, sourceFile);
|
||||
|
||||
case SyntaxKind.ExpressionStatement:
|
||||
return isCompletedNode((<ExpressionStatement>n).expression, sourceFile);
|
||||
return isCompletedNode((<ExpressionStatement>n).expression, sourceFile) ||
|
||||
hasChildOfKind(n, SyntaxKind.SemicolonToken);
|
||||
|
||||
case SyntaxKind.ArrayLiteralExpression:
|
||||
case SyntaxKind.ArrayBindingPattern:
|
||||
|
||||
Reference in New Issue
Block a user