fix ts linting and delint the world
This commit is contained in:
Vendored
+1
-1
@@ -23,4 +23,4 @@ declare global {
|
||||
appQuitting: boolean;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,10 +23,6 @@ limitations under the License.
|
||||
import { checkSquirrelHooks } from "./squirrelhooks";
|
||||
if (checkSquirrelHooks()) process.exit(1);
|
||||
|
||||
const argv = require('minimist')(process.argv, {
|
||||
alias: { help: "h" },
|
||||
});
|
||||
|
||||
import { app, ipcMain, powerSaveBlocker, BrowserWindow, Menu, autoUpdater, protocol, dialog } from "electron";
|
||||
import AutoLaunch from "auto-launch";
|
||||
import path from "path";
|
||||
@@ -35,6 +31,7 @@ import Store from 'electron-store';
|
||||
import fs, { promises as afs } from "fs";
|
||||
import crypto from "crypto";
|
||||
import { URL } from "url";
|
||||
import minimist from "minimist";
|
||||
|
||||
import * as tray from "./tray";
|
||||
import { buildMenuTemplate } from './vectormenu';
|
||||
@@ -43,8 +40,13 @@ import * as updater from './updater';
|
||||
import { getProfileFromDeeplink, protocolInit, recordSSOSession } from './protocol';
|
||||
import { _t, AppLocalization } from './language-helper';
|
||||
|
||||
const argv = minimist(process.argv, {
|
||||
alias: { help: "h" },
|
||||
});
|
||||
|
||||
let keytar;
|
||||
try {
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
keytar = require('keytar');
|
||||
} catch (e) {
|
||||
if (e.code === "MODULE_NOT_FOUND") {
|
||||
@@ -60,6 +62,7 @@ let SeshatRecovery;
|
||||
let ReindexError;
|
||||
|
||||
try {
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const seshatModule = require('matrix-seshat');
|
||||
Seshat = seshatModule.Seshat;
|
||||
SeshatRecovery = seshatModule.SeshatRecovery;
|
||||
@@ -176,6 +179,7 @@ async function setupGlobals() {
|
||||
]);
|
||||
|
||||
try {
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
vectorConfig = require(asarPath + 'config.json');
|
||||
} catch (e) {
|
||||
// it would be nice to check the error code here and bail if the config
|
||||
|
||||
@@ -115,6 +115,7 @@ export class AppLocalization {
|
||||
}
|
||||
});
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore - this looks like a bug but is out of scope for this conversion
|
||||
counterpart.setLocale(locales);
|
||||
this.store.set(AppLocalization.STORE_KEY, locales);
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@ function toggleWin(): void {
|
||||
}
|
||||
|
||||
interface IConfig {
|
||||
icon_path: string;
|
||||
icon_path: string; // eslint-disable-line camelcase
|
||||
brand: string;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -93,7 +93,7 @@ interface ICachedUpdate {
|
||||
releaseNotes: string;
|
||||
releaseName: string;
|
||||
releaseDate: Date;
|
||||
updateURL : string;
|
||||
updateURL: string;
|
||||
}
|
||||
|
||||
// cache the latest update which has been downloaded as electron offers no api to read it
|
||||
|
||||
@@ -170,7 +170,7 @@ function onLinkContextMenu(ev: Event, params: ContextMenuParams, webContents: We
|
||||
ev.preventDefault();
|
||||
}
|
||||
|
||||
function CutCopyPasteSelectContextMenus(params: ContextMenuParams): MenuItemConstructorOptions[] {
|
||||
function cutCopyPasteSelectContextMenus(params: ContextMenuParams): MenuItemConstructorOptions[] {
|
||||
const options: MenuItemConstructorOptions[] = [];
|
||||
|
||||
if (params.misspelledWord) {
|
||||
@@ -222,7 +222,7 @@ function CutCopyPasteSelectContextMenus(params: ContextMenuParams): MenuItemCons
|
||||
}
|
||||
|
||||
function onSelectedContextMenu(ev, params) {
|
||||
const items = CutCopyPasteSelectContextMenus(params);
|
||||
const items = cutCopyPasteSelectContextMenus(params);
|
||||
const popupMenu = Menu.buildFromTemplate(items);
|
||||
|
||||
// popup() requires an options object even for no options
|
||||
@@ -235,7 +235,7 @@ function onEditableContextMenu(ev: Event, params: ContextMenuParams) {
|
||||
{ role: 'undo' },
|
||||
{ role: 'redo', enabled: params.editFlags.canRedo },
|
||||
{ type: 'separator' },
|
||||
...CutCopyPasteSelectContextMenus(params),
|
||||
...cutCopyPasteSelectContextMenus(params),
|
||||
];
|
||||
|
||||
const popupMenu = Menu.buildFromTemplate(items);
|
||||
|
||||
Reference in New Issue
Block a user