From 830244c3c100025d5c8eef68341e144203bb9a78 Mon Sep 17 00:00:00 2001 From: Mark Lundin Date: Thu, 26 Sep 2024 09:45:44 +0100 Subject: [PATCH] linting --- src/utils/ts-utils.js | 6 +++--- test/fixtures/enum.valid.js | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/utils/ts-utils.js b/src/utils/ts-utils.js index 392726f..56689e6 100644 --- a/src/utils/ts-utils.js +++ b/src/utils/ts-utils.js @@ -518,9 +518,9 @@ const resolvePropertyAccess = (node, typeChecker) => { if (ts.isVariableDeclaration(declaration) && declaration.initializer) { return getLiteralValue(declaration.initializer, typeChecker); } - - if(ts.isEnumMember(declaration)) { - return declaration.initializer ? getLiteralValue(declaration.initializer, typeChecker) : declaration.name.getText() + + if (ts.isEnumMember(declaration)) { + return declaration.initializer ? getLiteralValue(declaration.initializer, typeChecker) : declaration.name.getText(); } } diff --git a/test/fixtures/enum.valid.js b/test/fixtures/enum.valid.js index 89a3bd8..8c75042 100644 --- a/test/fixtures/enum.valid.js +++ b/test/fixtures/enum.valid.js @@ -12,6 +12,7 @@ const NumberEnum = { /** * @enum {string} */ +// eslint-disable-next-line const StringEnum = { A: 'a', B: 'b',