Skip to content

Commit

Permalink
tools: lint for unused catch bindings
Browse files Browse the repository at this point in the history
PR-URL: #24079
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Wyatt Preul <wpreul@gmail.com>
  • Loading branch information
cjihrig authored and MylesBorins committed Dec 3, 2018
1 parent eed47b0 commit a67e04e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
}
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion lib/buffer.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const {
let isAnyArrayBuffer;
try {
isAnyArrayBuffer = internalBinding('types').isAnyArrayBuffer;
} catch (e) {
} catch {
isAnyArrayBuffer = require('util').types.isAnyArrayBuffer;
}
const {
Expand Down
4 changes: 2 additions & 2 deletions lib/stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ try {
// returns undefined for Node < 7.4.0.
Stream._isUint8Array = process.binding('util').isUint8Array;
}
} catch (e) {
} catch (e) { // eslint-disable-line no-unused-vars
}

if (!Stream._isUint8Array) {
Expand All @@ -71,7 +71,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) {
Expand Down

0 comments on commit a67e04e

Please sign in to comment.