From 414293561b53f57f39723e1a413fdfaeb0782990 Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Wed, 28 Sep 2022 08:22:16 +0530 Subject: [PATCH] fix: lint issues --- bin/webpack.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/bin/webpack.js b/bin/webpack.js index 2038efebd40..2cef96b2bf4 100755 --- a/bin/webpack.js +++ b/bin/webpack.js @@ -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 } }