fix(57303): no space between new line and from keyword

This commit is contained in:
Sola Samuel 2024-02-06 20:35:31 +00:00
Родитель 763b5ebfd4
Коммит 60f77902e8
1 изменённых файлов: 7 добавлений и 0 удалений

Просмотреть файл

@ -235,6 +235,13 @@ export function getAllRules(): RuleSpec[] {
[isNonJsxSameLineTokenContext],
RuleAction.InsertSpace,
),
rule(
"NoSpaceBetweenFromKeywordAndLineStart",
SyntaxKind.NewLineTrivia,
SyntaxKind.FromKeyword,
[isNonJsxSameLineTokenContext],
RuleAction.DeleteSpace
),
// Treat string literals in module names as identifiers, and add a space between the literal and the opening Brace braces, e.g.: module "m2" {
rule("SpaceAfterModuleName", SyntaxKind.StringLiteral, SyntaxKind.OpenBraceToken, [isModuleDeclContext], RuleAction.InsertSpace),