Skip to content

Commit

Permalink
fix: lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
snitin315 committed Sep 28, 2022
1 parent fde12c3 commit 4142935
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions bin/webpack.js
Expand Up @@ -54,13 +54,14 @@ const isInstalled = packageName => {
} while (dir !== (dir = path.dirname(dir)));

// https://github.com/nodejs/node/blob/v18.9.1/lib/internal/modules/cjs/loader.js#L1274
for (const internalPath of require("module").globalPaths) {
// @ts-ignore
for (const internalPath of require("module").globalPaths) {
try {
if (fs.statSync(path.join(internalPath, packageName)).isDirectory()) {
return true;
}
if (fs.statSync(path.join(internalPath, packageName)).isDirectory()) {
return true;
}
} catch (_error) {
// Nothing
// Nothing
}
}

Expand Down

0 comments on commit 4142935

Please sign in to comment.