From 67e7e87986c44d1f97156a76fb6dee5048c27b98 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 29 May 2021 08:16:02 -0700 Subject: [PATCH] tools: remove exception for Node.js 8 and earlier MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove exception in .eslintrc.js to accommodate versions of Node.js prior to 10.x. 10.x and later all support omitting catch block arguments. PR-URL: https://github.com/nodejs/node/pull/38840 Reviewed-By: Michaƫl Zasso Reviewed-By: Richard Lau Reviewed-By: Luigi Pinca Reviewed-By: Darshan Sen Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Michael Dawson --- .eslintrc.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 9340889b83dc5d..f5b3dfa61a8064 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -25,10 +25,7 @@ Module._findPath = (request, paths, isMain) => { if (!r && hacks.includes(request)) { try { return require.resolve(`./tools/node_modules/${request}`); - // Keep the variable in place to ensure that ESLint started by older Node.js - // versions work as expected. - // eslint-disable-next-line no-unused-vars - } catch (e) { + } catch { return require.resolve( `./tools/node_modules/eslint/node_modules/${request}`); }