Skip to content

Commit 684cab0

Browse files
committed
fix: update js-lint to 0.2.6, fixed a bunch of linting errors
1 parent b7915a1 commit 684cab0

File tree

5 files changed

+16
-16
lines changed

5 files changed

+16
-16
lines changed

package-lock.json

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
},
6161
"devDependencies": {
6262
"@fast-check/jest": "^2.1.0",
63-
"@matrixai/lint": "^0.2.4",
63+
"@matrixai/lint": "^0.2.6",
6464
"@peculiar/asn1-pkcs8": "^2.3.0",
6565
"@peculiar/asn1-schema": "^2.3.0",
6666
"@peculiar/asn1-x509": "^2.3.0",

src/WebSocketConnection.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -692,14 +692,14 @@ class WebSocketConnection {
692692
break;
693693
case 'ECONNRESET':
694694
reason = 'WebSocket could not open due to socket closure by peer';
695-
(errorCode = utils.ConnectionErrorCode.AbnormalClosure),
696-
(e_ = new errors.ErrorWebSocketConnectionPeer(reason, {
697-
cause: e,
698-
data: {
699-
errorCode,
700-
reason,
701-
},
702-
}));
695+
errorCode = utils.ConnectionErrorCode.AbnormalClosure;
696+
e_ = new errors.ErrorWebSocketConnectionPeer(reason, {
697+
cause: e,
698+
data: {
699+
errorCode,
700+
reason,
701+
},
702+
});
703703
break;
704704
default:
705705
reason = 'WebSocket could not open due to internal error';

src/WebSocketStream.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ class WebSocketStream implements ReadableWritablePair<Uint8Array, Uint8Array> {
549549
let parsedMessage: StreamMessage;
550550
try {
551551
parsedMessage = parseStreamMessage(message);
552-
} catch (err) {
552+
} catch {
553553
const e = new errors.ErrorWebSocketStreamInternal(
554554
'Peer sent a malformed stream message',
555555
);

src/message/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ function parseVarInt(array: Uint8Array): Parsed<VarInt> {
8585
streamId = dv.getBigUint64(0, false);
8686
break;
8787
}
88-
} catch (e) {
88+
} catch {
8989
throw new errors.ErrorStreamParse('VarInt is too short');
9090
}
9191
return {

0 commit comments

Comments
 (0)