Skip to content

Commit b7095ba

Browse files
cjihrigMylesBorins
authored andcommitted
tools: enable no-useless-catch lint rule
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>
1 parent 0098cde commit b7095ba

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

.eslintrc.js

+1
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ module.exports = {
222222
variables: false,
223223
}],
224224
'no-useless-call': 'error',
225+
'no-useless-catch': 'error',
225226
'no-useless-concat': 'error',
226227
'no-useless-constructor': 'error',
227228
'no-useless-escape': 'error',

lib/vm.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class Script extends ContextifyScript {
7979
// Calling `ReThrow()` on a native TryCatch does not generate a new
8080
// abort-on-uncaught-exception check. A dummy try/catch in JS land
8181
// protects against that.
82-
try {
82+
try { // eslint-disable-line no-useless-catch
8383
super(code,
8484
filename,
8585
lineOffset,

0 commit comments

Comments
 (0)