Skip to content

Commit

Permalink
tools: remove exception for Node.js 8 and earlier
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Trott committed May 29, 2021
1 parent 4c508f5 commit c90c15e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
}
Expand Down

0 comments on commit c90c15e

Please sign in to comment.