diff options
author | Rich Trott <rtrott@gmail.com> | 2021-05-29 08:16:02 -0700 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2021-05-31 21:13:48 -0700 |
commit | 0332d31b9424d25c8924ccdfaea92423a3267ec0 (patch) | |
tree | 665f0e0364d3d7986f88560dc8cdf12844b89d69 /.eslintrc.js | |
parent | 3457130eb623dff8c40315401485fc368aad5bc1 (diff) | |
download | node-new-0332d31b9424d25c8924ccdfaea92423a3267ec0.tar.gz |
tools: remove exception for Node.js 8 and earlier
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 <targos@protonmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Diffstat (limited to '.eslintrc.js')
-rw-r--r-- | .eslintrc.js | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/.eslintrc.js b/.eslintrc.js index 27dd8aa10c..9fda1a6839 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}`); } |