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',