From 7116a9a1b0ee782d10330d5272ed340a36b5ddb6 Mon Sep 17 00:00:00 2001 From: Puyodead1 Date: Sat, 18 Mar 2023 19:48:44 -0400 Subject: fix a few linting errors --- src/util/connections/ConnectionConfig.ts | 2 +- src/util/connections/ConnectionLoader.ts | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/util/connections/ConnectionConfig.ts b/src/util/connections/ConnectionConfig.ts index acbca026..4950ae90 100644 --- a/src/util/connections/ConnectionConfig.ts +++ b/src/util/connections/ConnectionConfig.ts @@ -54,7 +54,7 @@ function applyConfig(val: any) { } function pairsToConfig(pairs: ConnectionConfigEntity[]) { - let value: any = {}; + const value: any = {}; pairs.forEach((p) => { const keys = p.key.split("_"); diff --git a/src/util/connections/ConnectionLoader.ts b/src/util/connections/ConnectionLoader.ts index 04d7752a..0ca5b9e7 100644 --- a/src/util/connections/ConnectionLoader.ts +++ b/src/util/connections/ConnectionLoader.ts @@ -6,7 +6,7 @@ import { ConnectionConfig } from "./ConnectionConfig"; import { ConnectionStore } from "./ConnectionStore"; const root = "dist/connections"; -let connectionsLoaded = false; +const connectionsLoaded = false; export class ConnectionLoader { public static async loadConnections() { @@ -22,7 +22,7 @@ export class ConnectionLoader { }); dirs.forEach(async (x) => { - let modPath = path.resolve(path.join(root, x)); + const modPath = path.resolve(path.join(root, x)); const mod = new (require(modPath).default)() as Connection; ConnectionStore.connections.set(mod.id, mod); @@ -58,7 +58,10 @@ export class ConnectionLoader { ); await ConnectionConfig.set({ - [id]: Object.assign(config, (ConnectionLoader.getConnectionConfig(id) || {})) + [id]: Object.assign( + config, + ConnectionLoader.getConnectionConfig(id) || {}, + ), }); } } -- cgit 1.4.1