mirror of
https://github.com/zebrajr/node.git
synced 2025-12-06 12:20:27 +01:00
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
0098cde626
commit
b7095ba764
|
|
@ -222,6 +222,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',
|
||||
|
|
|
|||
|
|
@ -79,7 +79,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…
Reference in New Issue
Block a user