fix(52050): The space before satisfies after an array expression is removed when auto-formatting the statements (#52053)

This commit is contained in:
Oleksandr T
2023-01-05 23:30:11 +02:00
committed by GitHub
parent aae3115838
commit c57fea2a0d
2 changed files with 19 additions and 1 deletions

View File

@@ -57,7 +57,11 @@ export function getAllRules(): RuleSpec[] {
const anyTokenIncludingEOF = tokenRangeFrom([...allTokens, SyntaxKind.EndOfFileToken]);
const keywords = tokenRangeFromRange(SyntaxKind.FirstKeyword, SyntaxKind.LastKeyword);
const binaryOperators = tokenRangeFromRange(SyntaxKind.FirstBinaryOperator, SyntaxKind.LastBinaryOperator);
const binaryKeywordOperators = [SyntaxKind.InKeyword, SyntaxKind.InstanceOfKeyword, SyntaxKind.OfKeyword, SyntaxKind.AsKeyword, SyntaxKind.IsKeyword];
const binaryKeywordOperators = [
SyntaxKind.InKeyword, SyntaxKind.InstanceOfKeyword,
SyntaxKind.OfKeyword, SyntaxKind.AsKeyword,
SyntaxKind.IsKeyword, SyntaxKind.SatisfiesKeyword,
];
const unaryPrefixOperators = [SyntaxKind.PlusPlusToken, SyntaxKind.MinusMinusToken, SyntaxKind.TildeToken, SyntaxKind.ExclamationToken];
const unaryPrefixExpressions = [
SyntaxKind.NumericLiteral, SyntaxKind.BigIntLiteral, SyntaxKind.Identifier, SyntaxKind.OpenParenToken,