Skip to content

Commit ebb8043

Browse files
committed
fix: updated js-lint to 0.2.6, fixed a bunch of linting errors
1 parent 5ebfd20 commit ebb8043

File tree

6 files changed

+24
-16
lines changed

6 files changed

+24
-16
lines changed

package-lock.json

Lines changed: 18 additions & 9 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
@@ -58,7 +58,7 @@
5858
"@streamparser/json": "^0.0.17"
5959
},
6060
"devDependencies": {
61-
"@matrixai/lint": "^0.1.0",
61+
"@matrixai/lint": "^0.2.6",
6262
"@fast-check/jest": "^2.1.0",
6363
"@swc/core": "1.3.82",
6464
"@swc/jest": "^0.2.29",

src/RPCServer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ class RPCServer {
225225

226226
// Your existing logic for stopping active streams and other cleanup
227227
const handlerPs = new Array<PromiseCancellable<void>>();
228-
for await (const [activeStream] of this.activeStreams.entries()) {
228+
for (const [activeStream] of this.activeStreams.entries()) {
229229
if (force) activeStream.cancel(reason);
230230
handlerPs.push(activeStream);
231231
}

src/utils.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,12 +176,12 @@ function parseJSONRPCResponse<T extends JSONObject>(
176176
}
177177
try {
178178
return parseJSONRPCResponseSuccess(message);
179-
} catch (e) {
179+
} catch {
180180
// Do nothing
181181
}
182182
try {
183183
return parseJSONRPCResponseFailed(message);
184-
} catch (e) {
184+
} catch {
185185
// Do nothing
186186
}
187187
throw new errors.ErrorRPCParse('structure did not match a `JSONRPCResponse`');
@@ -452,7 +452,6 @@ function clientOutputTransformStream<O extends JSONObject>(
452452
const e = toError(chunk.error.data, clientMetadata);
453453
controller.error(e);
454454
} else {
455-
chunk.result;
456455
controller.enqueue(chunk.result as O);
457456
}
458457
},

tests/RPCServer.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -878,7 +878,7 @@ describe('RPCServer', () => {
878878
// With no handler we can only check alive connections through the server
879879
// @ts-ignore: kidnap protected property
880880
const activeStreams = rpcServer.activeStreams;
881-
for await (const [prom] of activeStreams.entries()) {
881+
for (const [prom] of activeStreams.entries()) {
882882
await prom;
883883
}
884884
await rpcServer.stop({ force: true });

tests/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ function tapTransformStream<I>(tapCallback: TapCallback<I> = async () => {}) {
240240
transform: async (chunk, controller) => {
241241
try {
242242
await tapCallback(chunk, iteration);
243-
} catch (e) {
243+
} catch {
244244
// Ignore errors here
245245
}
246246
controller.enqueue(chunk);

0 commit comments

Comments
 (0)