diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2020-02-19 12:59:39 +0100 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2020-02-19 12:59:39 +0100 |
| commit | 88957fdee24db8273fc76dec59445031099e560c (patch) | |
| tree | 39243d5a5b442b9544dc3c5043bb0a4a50a4feb3 /gui/src/main | |
| parent | 24cc696a68bd60ce0b33f218369313ef522fff4b (diff) | |
| parent | fc08f0b88c205877ec0b20f6bcae7810d9b4dde5 (diff) | |
| download | mullvadvpn-88957fdee24db8273fc76dec59445031099e560c.tar.xz mullvadvpn-88957fdee24db8273fc76dec59445031099e560c.zip | |
Merge branch 'migrate-to-eslint'
Diffstat (limited to 'gui/src/main')
| -rw-r--r-- | gui/src/main/account-data-cache.ts | 1 | ||||
| -rw-r--r-- | gui/src/main/index.ts | 3 | ||||
| -rw-r--r-- | gui/src/main/jsonrpc-client.ts | 2 | ||||
| -rw-r--r-- | gui/src/main/keyframe-animation.ts | 10 | ||||
| -rw-r--r-- | gui/src/main/window-controller.ts | 2 |
5 files changed, 9 insertions, 9 deletions
diff --git a/gui/src/main/account-data-cache.ts b/gui/src/main/account-data-cache.ts index 24f9c0453a..7ef103fe92 100644 --- a/gui/src/main/account-data-cache.ts +++ b/gui/src/main/account-data-cache.ts @@ -101,7 +101,6 @@ export default class AccountDataCache { private scheduleRetry(accountToken: AccountToken) { this.fetchAttempt += 1; - // tslint:disable-next-line const delay = Math.min(2048, 1 << (this.fetchAttempt + 2)) * 1000; log.warn(`Failed to fetch account data. Retrying in ${delay} ms`); diff --git a/gui/src/main/index.ts b/gui/src/main/index.ts index 32620c3574..6d146eb418 100644 --- a/gui/src/main/index.ts +++ b/gui/src/main/index.ts @@ -1221,6 +1221,7 @@ class ApplicationMain { } private async installDevTools() { + // eslint-disable-next-line @typescript-eslint/no-var-requires const installer = require('electron-devtools-installer'); const extensions = ['REACT_DEVELOPER_TOOLS', 'REDUX_DEVTOOLS']; const forceDownload = !!process.env.UPGRADE_EXTENSIONS; @@ -1401,9 +1402,9 @@ class ApplicationMain { // setup NSEvent monitor to fix inconsistent window.blur on macOS // see https://github.com/electron/electron/issues/8689 private installMacOsMenubarAppWindowHandlers(tray: Tray, windowController: WindowController) { + // eslint-disable-next-line @typescript-eslint/no-var-requires const { NSEventMonitor, NSEventMask } = require('nseventmonitor'); const macEventMonitor = new NSEventMonitor(); - // tslint:disable-next-line const eventMask = NSEventMask.leftMouseDown | NSEventMask.rightMouseDown; const window = windowController.window; diff --git a/gui/src/main/jsonrpc-client.ts b/gui/src/main/jsonrpc-client.ts index 357d085a14..3b33f8f566 100644 --- a/gui/src/main/jsonrpc-client.ts +++ b/gui/src/main/jsonrpc-client.ts @@ -275,7 +275,7 @@ export default class JsonRpcClient<T> extends EventEmitter { if (message.type === 'notification') { this.onNotification(message as IJsonRpcNotification); } else { - this.onReply(message as (IJsonRpcErrorResponse | IJsonRpcSuccess)); + this.onReply(message as IJsonRpcErrorResponse | IJsonRpcSuccess); } } diff --git a/gui/src/main/keyframe-animation.ts b/gui/src/main/keyframe-animation.ts index 1a95e1a106..f4ecb34743 100644 --- a/gui/src/main/keyframe-animation.ts +++ b/gui/src/main/keyframe-animation.ts @@ -8,16 +8,16 @@ export interface IKeyframeAnimationOptions { export type KeyframeAnimationRange = [number, number]; export default class KeyframeAnimation { - private speedValue: number = 200; // ms + private speedValue = 200; // ms private onFrameValue?: OnFrameFn; private onFinishValue?: OnFinishFn; - private currentFrameValue: number = 0; - private targetFrame: number = 0; + private currentFrameValue = 0; + private targetFrame = 0; - private isRunningValue: boolean = false; - private isFinishedValue: boolean = false; + private isRunningValue = false; + private isFinishedValue = false; private timeout?: NodeJS.Timeout; diff --git a/gui/src/main/window-controller.ts b/gui/src/main/window-controller.ts index e681b2a595..bed0774b5e 100644 --- a/gui/src/main/window-controller.ts +++ b/gui/src/main/window-controller.ts @@ -157,7 +157,7 @@ export default class WindowController { this.installWindowReadyHandlers(); } - public show(whenReady: boolean = true) { + public show(whenReady = true) { if (whenReady) { this.executeWhenWindowIsReady(() => this.showImmediately()); } else { |
