diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2020-02-19 16:34:46 +0100 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2020-02-21 14:18:21 +0100 |
| commit | 7081c2ffc2c2d228131588cf83d023a78a647c3a (patch) | |
| tree | 21aa9e49f44d956ba9cab4274ba4e483b6f3aaba | |
| parent | af69985becd9a4fd8f2b80d57dc568a0cf7d0ce5 (diff) | |
| download | mullvadvpn-7081c2ffc2c2d228131588cf83d023a78a647c3a.tar.xz mullvadvpn-7081c2ffc2c2d228131588cf83d023a78a647c3a.zip | |
Fix linter problems caused by require-await
| -rw-r--r-- | gui/.eslintrc.js | 2 | ||||
| -rw-r--r-- | gui/src/main/daemon-rpc.ts | 2 | ||||
| -rw-r--r-- | gui/src/renderer/app.tsx | 4 | ||||
| -rw-r--r-- | gui/src/renderer/components/AppButton.tsx | 2 | ||||
| -rw-r--r-- | gui/src/renderer/components/Login.tsx | 2 | ||||
| -rw-r--r-- | gui/src/renderer/components/Marquee.tsx | 2 |
6 files changed, 7 insertions, 7 deletions
diff --git a/gui/.eslintrc.js b/gui/.eslintrc.js index 01b47ee0d5..8439dbf7b3 100644 --- a/gui/.eslintrc.js +++ b/gui/.eslintrc.js @@ -37,7 +37,7 @@ module.exports = { { argsIgnorePattern: '^_', ignoreRestSiblings: true }, ], // TODO: Enable these - // 'require-await': 'error', + 'require-await': 'error', // '@typescript-eslint/no-floating-promises': 'error', '@typescript-eslint/no-use-before-define': 'off', diff --git a/gui/src/main/daemon-rpc.ts b/gui/src/main/daemon-rpc.ts index 31ac80f7e7..f593fa2271 100644 --- a/gui/src/main/daemon-rpc.ts +++ b/gui/src/main/daemon-rpc.ts @@ -555,7 +555,7 @@ export class DaemonRpc { listener: SubscriptionListener<DaemonEvent>, ): Promise<void> { if (listener.subscriptionId) { - return this.transport.unsubscribe('daemon_event', listener.subscriptionId); + return await this.transport.unsubscribe('daemon_event', listener.subscriptionId); } } diff --git a/gui/src/renderer/app.tsx b/gui/src/renderer/app.tsx index 73de4302bf..888e41120d 100644 --- a/gui/src/renderer/app.tsx +++ b/gui/src/renderer/app.tsx @@ -270,7 +270,7 @@ export default class AppRenderer { // switch to the connecting state ahead of time to make the app look more responsive this.reduxActions.connection.connecting(); - return IpcRendererEventChannel.tunnel.connect(); + return await IpcRendererEventChannel.tunnel.connect(); } } @@ -290,7 +290,7 @@ export default class AppRenderer { return IpcRendererEventChannel.settings.updateBridgeSettings(bridgeSettings); } - public async removeAccountFromHistory(accountToken: AccountToken): Promise<void> { + public removeAccountFromHistory(accountToken: AccountToken): Promise<void> { return IpcRendererEventChannel.accountHistory.removeItem(accountToken); } diff --git a/gui/src/renderer/components/AppButton.tsx b/gui/src/renderer/components/AppButton.tsx index d31194e072..8bb11972d1 100644 --- a/gui/src/renderer/components/AppButton.tsx +++ b/gui/src/renderer/components/AppButton.tsx @@ -160,7 +160,7 @@ class BaseButton extends Component<IProps, IState> { } } - private onLayout = async (containerLayout: Types.ViewOnLayoutEvent) => { + private onLayout = (containerLayout: Types.ViewOnLayoutEvent) => { this.updateTextAdjustment(containerLayout); }; } diff --git a/gui/src/renderer/components/Login.tsx b/gui/src/renderer/components/Login.tsx index 9e2ff82433..476aa5cc28 100644 --- a/gui/src/renderer/components/Login.tsx +++ b/gui/src/renderer/components/Login.tsx @@ -142,7 +142,7 @@ export default class Login extends Component<IProps, IState> { this.setState({ isActive: false }); }; - private async setLoginButtonActive(isActive: boolean) { + private setLoginButtonActive(isActive: boolean) { if (this.isLoginButtonActive === isActive) { return; } diff --git a/gui/src/renderer/components/Marquee.tsx b/gui/src/renderer/components/Marquee.tsx index dc019d74ca..04b095711e 100644 --- a/gui/src/renderer/components/Marquee.tsx +++ b/gui/src/renderer/components/Marquee.tsx @@ -45,7 +45,7 @@ export default class Marquee extends Component<IMarqueeProps> { ); } - private async startAnimation() { + private startAnimation() { this.stopAnimation(); this.animationTimeout = setTimeout(async () => { |
