summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcjihrig <cjihrig@gmail.com>2018-11-04 12:42:27 -0500
committercjihrig <cjihrig@gmail.com>2018-11-06 10:59:27 -0500
commit5e6193f669c2b83031771dd794f81fdebac5e561 (patch)
tree78d71bc67beba0e41887e49d549e6a0d6ddd548f
parent5407690bd79a4aa9b5ea72acb98d1a8efd309029 (diff)
downloadandroid-node-v8-5e6193f669c2b83031771dd794f81fdebac5e561.tar.gz
android-node-v8-5e6193f669c2b83031771dd794f81fdebac5e561.tar.bz2
android-node-v8-5e6193f669c2b83031771dd794f81fdebac5e561.zip
tools: lint for unused catch bindings
PR-URL: https://github.com/nodejs/node/pull/24079 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Wyatt Preul <wpreul@gmail.com>
-rw-r--r--.eslintrc.js4
-rw-r--r--lib/stream.js4
2 files changed, 4 insertions, 4 deletions
diff --git a/.eslintrc.js b/.eslintrc.js
index 6a8403d348..0b4c170813 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -17,7 +17,7 @@ Module._findPath = (request, paths, isMain) => {
if (!r && hacks.includes(request)) {
try {
return require.resolve(`./tools/node_modules/${request}`);
- } catch (err) {
+ } catch {
return require.resolve(
`./tools/node_modules/eslint/node_modules/${request}`);
}
@@ -212,7 +212,7 @@ module.exports = {
'no-unsafe-finally': 'error',
'no-unsafe-negation': 'error',
'no-unused-labels': 'error',
- 'no-unused-vars': ['error', { args: 'none' }],
+ 'no-unused-vars': ['error', { args: 'none', caughtErrors: 'all' }],
'no-use-before-define': ['error', {
classes: true,
functions: false,
diff --git a/lib/stream.js b/lib/stream.js
index f7e47df731..dfe61aaf09 100644
--- a/lib/stream.js
+++ b/lib/stream.js
@@ -54,7 +54,7 @@ try {
// readable-stream.
Stream._isUint8Array = process.binding('util').isUint8Array;
}
-} catch (e) {
+} catch (e) { // eslint-disable-line no-unused-vars
}
if (!Stream._isUint8Array) {
@@ -74,7 +74,7 @@ if (version[0] === 0 && version[1] < 12) {
chunk.byteOffset,
chunk.byteLength);
};
- } catch (e) {
+ } catch (e) { // eslint-disable-line no-unused-vars
}
if (!Stream._uint8ArrayToBuffer) {