Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
marklundin committed Sep 26, 2024
1 parent 926a780 commit 830244c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/utils/ts-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

}
Expand Down
1 change: 1 addition & 0 deletions test/fixtures/enum.valid.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const NumberEnum = {
/**
* @enum {string}
*/
// eslint-disable-next-line
const StringEnum = {
A: 'a',
B: 'b',
Expand Down

0 comments on commit 830244c

Please sign in to comment.