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:
parent
1d3a414519
commit
baf03962c1
@ -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',
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user