xo: Fix @typescript-eslint/no-confusing-void-expression.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2021-01-25 11:04:19 -08:00
parent fa6d72268f
commit cc2424e0bf
7 changed files with 54 additions and 18 deletions

View File

@@ -378,7 +378,9 @@ class ServerManagerView {
this.showLoading(this.loading.has(this.tabs[this.activeTabIndex].webview.props.url));
},
onNetworkError: (index: number) => this.openNetworkTroubleshooting(index),
onNetworkError: (index: number) => {
this.openNetworkTroubleshooting(index);
},
onTitleChange: this.updateBadge.bind(this),
nodeIntegration: false,
preload: true
@@ -543,7 +545,9 @@ class ServerManagerView {
this.showLoading(this.loading.has(this.tabs[this.activeTabIndex].webview.props.url));
},
onNetworkError: (index: number) => this.openNetworkTroubleshooting(index),
onNetworkError: (index: number) => {
this.openNetworkTroubleshooting(index);
},
onTitleChange: this.updateBadge.bind(this),
nodeIntegration: true,
preload: false
@@ -790,16 +794,36 @@ class ServerManagerView {
registerIpcs(): void {
const webviewListeners: Array<[string, (webview: WebView) => void]> = [
['webview-reload', webview => webview.reload()],
['back', webview => webview.back()],
['focus', webview => webview.focus()],
['forward', webview => webview.forward()],
['zoomIn', webview => webview.zoomIn()],
['zoomOut', webview => webview.zoomOut()],
['zoomActualSize', webview => webview.zoomActualSize()],
['log-out', webview => webview.logOut()],
['show-keyboard-shortcuts', webview => webview.showKeyboardShortcuts()],
['tab-devtools', webview => webview.openDevTools()]
['webview-reload', webview => {
webview.reload();
}],
['back', webview => {
webview.back();
}],
['focus', webview => {
webview.focus();
}],
['forward', webview => {
webview.forward();
}],
['zoomIn', webview => {
webview.zoomIn();
}],
['zoomOut', webview => {
webview.zoomOut();
}],
['zoomActualSize', webview => {
webview.zoomActualSize();
}],
['log-out', webview => {
webview.logOut();
}],
['show-keyboard-shortcuts', webview => {
webview.showKeyboardShortcuts();
}],
['tab-devtools', webview => {
webview.openDevTools();
}]
];
for (const [channel, listener] of webviewListeners) {