tools: enable no-useless-catch lint rule

This commit enables ESLint's no-useless-catch rule.

PR-URL: https://github.com/nodejs/node/pull/25236
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
cjihrig 2018-12-26 21:05:21 -05:00
parent 1d3a414519
commit baf03962c1
No known key found for this signature in database
GPG Key ID: 7434390BDBE9B9C5
2 changed files with 2 additions and 1 deletions

View File

@ -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',

View File

@ -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,