mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-11-18 20:11:14 +00:00
fix(55998): Ability to Place Open Brace On New Line For Try Catch Blocks (#56021)
This commit is contained in:
1 parent
e6d0f722e0
commit
65f33a2e92
2 files changed
+29
-1
No files matched your search
@@ -91,7 +91,7 @@ export function getAllRules(): RuleSpec[] {
|
||||
const typeScriptOpenBraceLeftTokenRange = tokenRangeFrom([SyntaxKind.Identifier, SyntaxKind.MultiLineCommentTrivia, SyntaxKind.ClassKeyword, SyntaxKind.ExportKeyword, SyntaxKind.ImportKeyword]);
|
||||
|
||||
// Place a space before open brace in a control flow construct
|
||||
const controlOpenBraceLeftTokenRange = tokenRangeFrom([SyntaxKind.CloseParenToken, SyntaxKind.MultiLineCommentTrivia, SyntaxKind.DoKeyword, SyntaxKind.TryKeyword, SyntaxKind.FinallyKeyword, SyntaxKind.ElseKeyword]);
|
||||
const controlOpenBraceLeftTokenRange = tokenRangeFrom([SyntaxKind.CloseParenToken, SyntaxKind.MultiLineCommentTrivia, SyntaxKind.DoKeyword, SyntaxKind.TryKeyword, SyntaxKind.FinallyKeyword, SyntaxKind.ElseKeyword, SyntaxKind.CatchKeyword]);
|
||||
|
||||
// These rules are higher in priority than user-configurable
|
||||
const highPriorityCommonRules = [
|
||||
|
||||
Reference in new issue
Block a user