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 targos committed Jan 1, 2019
1 parent f944a75 commit e6b5232
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 @@ -234,6 +234,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 @@ -80,7 +80,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 e6b5232

Please sign in to comment.