Skip to content

Commit e6b5232

Browse files
cjihrigtargos
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 f944a75 commit e6b5232

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
@@ -234,6 +234,7 @@ module.exports = {
234234
variables: false,
235235
}],
236236
'no-useless-call': 'error',
237+
'no-useless-catch': 'error',
237238
'no-useless-concat': 'error',
238239
'no-useless-constructor': 'error',
239240
'no-useless-escape': 'error',

lib/vm.js

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

0 commit comments

Comments
 (0)