Skip to content

Commit

Permalink
tools: enable no-useless-catch lint rule
Browse files Browse the repository at this point in the history
This commit enables ESLint's no-useless-catch rule.

PR-URL: #25236
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
cjihrig authored and MylesBorins committed May 16, 2019
1 parent 0098cde commit b7095ba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ module.exports = {
variables: false,
}],
'no-useless-call': 'error',
'no-useless-catch': 'error',
'no-useless-concat': 'error',
'no-useless-constructor': 'error',
'no-useless-escape': 'error',
Expand Down
2 changes: 1 addition & 1 deletion lib/vm.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class Script extends ContextifyScript {
// Calling `ReThrow()` on a native TryCatch does not generate a new
// abort-on-uncaught-exception check. A dummy try/catch in JS land
// protects against that.
try {
try { // eslint-disable-line no-useless-catch
super(code,
filename,
lineOffset,
Expand Down

0 comments on commit b7095ba

Please sign in to comment.