From d9dc3391a9312becaa8bc239df7aeae4726dfbb9 Mon Sep 17 00:00:00 2001 From: eryue0220 Date: Sun, 1 Sep 2024 16:11:09 +0800 Subject: [PATCH] fix: remove unused statement check --- src/rules/prefer-importing-jest-globals.ts | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/rules/prefer-importing-jest-globals.ts b/src/rules/prefer-importing-jest-globals.ts index 9cce2d213..c9bc5dc72 100644 --- a/src/rules/prefer-importing-jest-globals.ts +++ b/src/rules/prefer-importing-jest-globals.ts @@ -60,19 +60,10 @@ export default createRule({ defaultOptions: [{ types: allJestFnTypes }], create(context) { const { types = allJestFnTypes } = context.options[0] || {}; - const importedFunctionsWithSource: Record = {}; const functionsToImport = new Set(); let reportingNode: TSESTree.Node; return { - ImportDeclaration(node: TSESTree.ImportDeclaration) { - node.specifiers.forEach(specifier => { - if (specifier.type === AST_NODE_TYPES.ImportSpecifier) { - importedFunctionsWithSource[specifier.local.name] = - node.source.value; - } - }); - }, CallExpression(node: TSESTree.CallExpression) { const jestFnCall = parseJestFnCall(node, context);