Skip to content

Commit

Permalink
chore: remove Jest leftovers
Browse files Browse the repository at this point in the history
  • Loading branch information
BenoitZugmeyer committed Sep 20, 2024
1 parent bbbad6b commit 37f5a42
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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) {
Expand Down

0 comments on commit 37f5a42

Please sign in to comment.