Skip to content

Commit

Permalink
fix: fix getting enum members in eslint v8
Browse files Browse the repository at this point in the history
  • Loading branch information
azat-io committed Aug 5, 2024
1 parent 00b2cc3 commit 3f3d77c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rules/sort-enums.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export default createEslintRule<Options, MESSAGE_ID>({
let getMembers = (nodeValue: TSESTree.TSEnumDeclaration) =>
/* v8 ignore next 2 */
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
node.body.members || nodeValue.members
node.body?.members ?? nodeValue.members ?? []
if (
getMembers(node).length > 1 &&
getMembers(node).every(({ initializer }) => initializer)
Expand Down

0 comments on commit 3f3d77c

Please sign in to comment.