Migrate to stylistic

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2024-10-16 16:43:07 +01:00
parent d8052e6a73
commit 6c6bf811a6
No known key found for this signature in database
GPG key ID: A2B008A5F49F5D0D
124 changed files with 239 additions and 196 deletions

View file

@ -28,7 +28,7 @@ export async function getVectorConfig(relativeLocation = ""): Promise<IConfigOpt
throw new Error(); // throw to enter the catch
}
return configJson;
} catch (e) {
} catch {
return generalConfigPromise;
}
}

View file

@ -20,8 +20,10 @@ import "./modernizr";
// Require common CSS here; this will make webpack process it into bundle.css.
// Our own CSS (which is themed) is imported via separate webpack entry points
// in webpack.config.js
// eslint-disable-next-line @typescript-eslint/no-require-imports
require("katex/dist/katex.css");
// eslint-disable-next-line @typescript-eslint/no-require-imports
require("./localstorage-fix");
async function settled(...promises: Array<Promise<any>>): Promise<void> {

View file

@ -62,6 +62,7 @@ interface ExternalAPIOptions extends _ExternalAPIOptions {
}
// We have to trick webpack into loading our CSS for us.
// eslint-disable-next-line @typescript-eslint/no-require-imports
require("./index.pcss");
const JITSI_OPENIDTOKEN_JWT_AUTH = "openidtoken-jwt";

View file

@ -265,7 +265,7 @@ export default class ElectronPlatform extends VectorBasePlatform {
const notification = super.displayNotification(title, msg, avatarUrl, room, ev);
const handler = notification.onclick as Function;
const handler = notification.onclick as () => void;
notification.onclick = (): void => {
handler?.();
void this.ipc.call("focusWindow");
@ -416,7 +416,7 @@ export default class ElectronPlatform extends VectorBasePlatform {
public async getPickleKey(userId: string, deviceId: string): Promise<string | null> {
try {
return await this.ipc.call("getPickleKey", userId, deviceId);
} catch (e) {
} catch {
// if we can't connect to the password storage, assume there's no
// pickle key
return null;
@ -426,7 +426,7 @@ export default class ElectronPlatform extends VectorBasePlatform {
public async createPickleKey(userId: string, deviceId: string): Promise<string | null> {
try {
return await this.ipc.call("createPickleKey", userId, deviceId);
} catch (e) {
} catch {
// if we can't connect to the password storage, assume there's no
// pickle key
return null;
@ -436,14 +436,14 @@ export default class ElectronPlatform extends VectorBasePlatform {
public async destroyPickleKey(userId: string, deviceId: string): Promise<void> {
try {
await this.ipc.call("destroyPickleKey", userId, deviceId);
} catch (e) {}
} catch {}
}
public async clearStorage(): Promise<void> {
try {
await super.clearStorage();
await this.ipc.call("clearStorage");
} catch (e) {}
} catch {}
}
public get baseUrl(): string {