perf(prefer-importing-jest-globals): stop collecting import specifiers for no reason by eryue0220 · Pull Request #1646 · jest-community/eslint-plugin-jest (original) (raw)

Can you explain why this isn't needed? It must have been being covered by at least one test so it can't have been unused, though the fact that our suite still passes would suggest it's not needed but it would be good to understand why

I have two thoughts about that, the variables importedFunctionsWithSource only collect import elements from import statement, but what it really check is here, another is performance, if we don't use that, but it still iterates the AST nodes to collect something, it's a little worthless.