diff options
author | cjihrig <cjihrig@gmail.com> | 2018-12-26 21:05:21 -0500 |
---|---|---|
committer | cjihrig <cjihrig@gmail.com> | 2018-12-29 13:36:57 -0500 |
commit | baf03962c1b63a25018d206dd0acc9f152452fd4 (patch) | |
tree | cfa261d8ebe444882e0e3f1268e73eb16df050c1 | |
parent | 1d3a414519a5b55eedb75ca938b54f8e6e4e79f5 (diff) | |
download | android-node-v8-baf03962c1b63a25018d206dd0acc9f152452fd4.tar.gz android-node-v8-baf03962c1b63a25018d206dd0acc9f152452fd4.tar.bz2 android-node-v8-baf03962c1b63a25018d206dd0acc9f152452fd4.zip |
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>
-rw-r--r-- | .eslintrc.js | 1 | ||||
-rw-r--r-- | lib/vm.js | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/.eslintrc.js b/.eslintrc.js index 6311c7bb5b..7333382fe3 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -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, |