From dbd6af745c69e010b6611299fe19774738a94f31 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Wed, 9 Mar 2022 10:09:00 +0000 Subject: [PATCH] Add lint for unused locals (#2223) --- src/client.ts | 34 ------------------- .../request/VerificationRequest.ts | 2 +- src/http-api.ts | 2 +- tsconfig.json | 1 + 4 files changed, 3 insertions(+), 36 deletions(-) diff --git a/src/client.ts b/src/client.ts index b56c2052bb9..c6960df22f5 100644 --- a/src/client.ts +++ b/src/client.ts @@ -4924,40 +4924,6 @@ export class MatrixClient extends TypedEventEmitter; constructor( diff --git a/src/http-api.ts b/src/http-api.ts index 2879ea68159..0b8cd41c802 100644 --- a/src/http-api.ts +++ b/src/http-api.ts @@ -1079,7 +1079,7 @@ export class MatrixError extends Error { * @constructor */ export class ConnectionError extends Error { - constructor(message: string, private readonly cause: Error = undefined) { + constructor(message: string, cause: Error = undefined) { super(message + (cause ? `: ${cause.message}` : "")); } diff --git a/tsconfig.json b/tsconfig.json index 3a0e0cee7ff..caf28e26391 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -6,6 +6,7 @@ "module": "commonjs", "moduleResolution": "node", "noImplicitAny": false, + "noUnusedLocals": true, "noEmit": true, "declaration": true },