From 3d96fa91cd21ba62a5ea3db09e056b2c8b3d6878 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Fri, 3 Mar 2023 11:09:38 -0800 Subject: [PATCH] fix lint --- src/compiler/parser.ts | 6 +++--- src/compiler/scanner.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index c3ca7e121ad02..12d560a50301b 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -8703,9 +8703,9 @@ namespace Parser { function removeTrailingWhitespace(comments: string[]) { while (comments.length) { // TODO: Bad code is still bad; should operate on an entire string - const trimmed = comments[comments.length - 1].trim() + const trimmed = comments[comments.length - 1].trim(); if (trimmed === "") { - comments.pop() + comments.pop(); } else if (trimmed.length < comments[comments.length - 1].length) { comments[comments.length - 1] = comments[comments.length - 1].trimEnd(); @@ -8922,7 +8922,7 @@ namespace Parser { if (margin !== undefined && indent + whitespace.length > margin) { comments.push(whitespace.slice(margin - indent)); } - indent += whitespace.length; // TODO: What happens if we start saving comments here? We don't support margins like | * text text | do we? + indent += whitespace.length; // TODO: What happens if we start saving comments here? We don't support margins like | * text text | do we? } break; case SyntaxKind.OpenBraceToken: diff --git a/src/compiler/scanner.ts b/src/compiler/scanner.ts index 0e07ad19d749c..42ad6a078d4e5 100644 --- a/src/compiler/scanner.ts +++ b/src/compiler/scanner.ts @@ -2469,7 +2469,7 @@ export function createScanner(languageVersion: ScriptTarget, while (pos < end) { if (ch !== CharacterCodes.lineFeed && ch !== CharacterCodes.at && ch !== CharacterCodes.backtick && ch !== CharacterCodes.openBrace) { // TODO: We can also be smarter about openBrace, backtick and at by looking at a tiny amount of context - pos++ + pos++; } else { break;