Skip to content

Commit 50ce0ce

Browse files
committed
refactor: minor improvements
1 parent dc500c5 commit 50ce0ce

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

packages/plugins/eslint-plugin-react-web-api/src/rules/no-leaked-event-listener.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import * as VAR from "@eslint-react/var";
88
import type { Scope } from "@typescript-eslint/scope-manager";
99
import type { TSESTree } from "@typescript-eslint/utils";
1010
import { AST_NODE_TYPES } from "@typescript-eslint/utils";
11-
import { getStaticValue } from "@typescript-eslint/utils/ast-utils";
1211
import type { ReportDescriptor } from "@typescript-eslint/utils/ts-eslint";
1312
import { isMatching, match, P } from "ts-pattern";
1413

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { F, O } from "@eslint-react/tools";
22
import type { Scope, Variable } from "@typescript-eslint/scope-manager";
33
import type { TSESTree } from "@typescript-eslint/types";
4-
import { findVariable as TSEFindVariable } from "@typescript-eslint/utils/ast-utils";
4+
import * as ASTUtils from "@typescript-eslint/utils/ast-utils";
55

66
export const findVariable: {
77
(initialScope: Scope): (nameOrNode: string | TSESTree.Identifier) => O.Option<Variable>;
88
(nameOrNode: string | TSESTree.Identifier, initialScope: Scope): O.Option<Variable>;
99
} = F.dual(2, (nameOrNode: string | TSESTree.Identifier, initialScope: Scope) => {
10-
return O.fromNullable(TSEFindVariable(initialScope, nameOrNode));
10+
return O.fromNullable(ASTUtils.findVariable(initialScope, nameOrNode));
1111
});

0 commit comments

Comments
 (0)