From fe4acbfee58e840412ed5d496fb565843d4a8cdd Mon Sep 17 00:00:00 2001 From: Puyodead1 Date: Sun, 6 Aug 2023 23:15:35 -0400 Subject: Fix linter warnings in connections --- src/util/connections/ConnectionLoader.ts | 8 +++----- src/util/connections/RefreshableConnection.ts | 1 + 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'src/util') diff --git a/src/util/connections/ConnectionLoader.ts b/src/util/connections/ConnectionLoader.ts index 6b27baec..e9dc6973 100644 --- a/src/util/connections/ConnectionLoader.ts +++ b/src/util/connections/ConnectionLoader.ts @@ -16,9 +16,9 @@ along with this program. If not, see . */ +import { Connection } from "@spacebar/util"; import fs from "fs"; import path from "path"; -import { Connection } from "@spacebar/util"; import { ConnectionConfig } from "./ConnectionConfig"; import { ConnectionStore } from "./ConnectionStore"; @@ -48,8 +48,7 @@ export class ConnectionLoader { }); } - // eslint-disable-next-line @typescript-eslint/no-explicit-any - public static getConnectionConfig(id: string, defaults?: any): any { + public static getConnectionConfig(id: string, defaults?: unknown): T { let cfg = ConnectionConfig.get()[id]; if (defaults) { if (cfg) cfg = Object.assign({}, defaults, cfg); @@ -70,8 +69,7 @@ export class ConnectionLoader { public static async setConnectionConfig( id: string, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - config: Partial, + config: Partial, ): Promise { if (!config) console.warn(`[Connections/WARN] ${id} tried to set config=null!`); diff --git a/src/util/connections/RefreshableConnection.ts b/src/util/connections/RefreshableConnection.ts index eaa88c1b..88ad8dab 100644 --- a/src/util/connections/RefreshableConnection.ts +++ b/src/util/connections/RefreshableConnection.ts @@ -25,6 +25,7 @@ import { Connection } from "./Connection"; */ export abstract class RefreshableConnection extends Connection { refreshEnabled = true; + /** * Refreshes the token for a connected account. * @param connectedAccount The connected account to refresh -- cgit 1.4.1