From 37f5a42581a5e0f93fcc576d5ef0446e5071389e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Zugmeyer?= Date: Tue, 21 May 2024 21:54:58 +0200 Subject: [PATCH] chore: remove Jest leftovers --- src/index.js | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/index.js b/src/index.js index ccaf2f5..b250196 100644 --- a/src/index.js +++ b/src/index.js @@ -35,10 +35,6 @@ function getLinterFromModule(moduleExports) { : moduleExports // ESLint 5- } -function getModuleFromRequire() { - return getLinterFromModule(require("eslint/lib/linter")) -} - function getModuleFromCache(key) { if (!needles.some((needle) => key.endsWith(needle))) return @@ -55,12 +51,6 @@ function getModuleFromCache(key) { } function iterateESLintModules(fn) { - if (!require.cache || Object.keys(require.cache).length === 0) { - // Jest is replacing the node "require" function, and "require.cache" isn't available here. - fn(getModuleFromRequire()) - return - } - let found = false for (const key in require.cache) {