Skip to content

Commit 0660242

Browse files
authored
perf(prefer-importing-jest-globals): stop collecting import specifiers for no reason (#1646)
1 parent a789420 commit 0660242

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

src/rules/prefer-importing-jest-globals.ts

-9
Original file line numberDiff line numberDiff line change
@@ -60,19 +60,10 @@ export default createRule({
6060
defaultOptions: [{ types: allJestFnTypes }],
6161
create(context) {
6262
const { types = allJestFnTypes } = context.options[0] || {};
63-
const importedFunctionsWithSource: Record<string, string> = {};
6463
const functionsToImport = new Set<string>();
6564
let reportingNode: TSESTree.Node;
6665

6766
return {
68-
ImportDeclaration(node: TSESTree.ImportDeclaration) {
69-
node.specifiers.forEach(specifier => {
70-
if (specifier.type === AST_NODE_TYPES.ImportSpecifier) {
71-
importedFunctionsWithSource[specifier.local.name] =
72-
node.source.value;
73-
}
74-
});
75-
},
7667
CallExpression(node: TSESTree.CallExpression) {
7768
const jestFnCall = parseJestFnCall(node, context);
7869

0 commit comments

Comments
 (0)