From 2d85961f8af23b57b022d1adce7c81bce934e511 Mon Sep 17 00:00:00 2001 From: Rebecca Stevens Date: Thu, 9 Feb 2023 17:25:08 +1300 Subject: [PATCH] refactor: use nullish coalescing instead of or operator --- src/comments.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/comments.ts b/src/comments.ts index eaa1bbf5..ba69555f 100644 --- a/src/comments.ts +++ b/src/comments.ts @@ -70,9 +70,7 @@ export function forEachComment( ts.forEachLeadingCommentRange( fullText, // skip shebang at position 0 - // TODO: Investigate - // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing - token.pos === 0 ? (ts.getShebang(fullText) || "").length : token.pos, + token.pos === 0 ? (ts.getShebang(fullText) ?? "").length : token.pos, commentCallback ); if (notJsx || canHaveTrailingTrivia(token))