diff --git a/packages/app-desktop/checkForUpdates.ts b/packages/app-desktop/checkForUpdates.ts index ffdf3c553..cfa18c215 100644 --- a/packages/app-desktop/checkForUpdates.ts +++ b/packages/app-desktop/checkForUpdates.ts @@ -201,11 +201,11 @@ export default async function checkForUpdates(inBackground: boolean, parentWindo }); if (buttonIndex === 0) { - bridge().openExternal(release.downloadUrl ? release.downloadUrl : release.pageUrl); + void bridge().openExternal(release.downloadUrl ? release.downloadUrl : release.pageUrl); } else if (buttonIndex === 1) { await addSkippedVersion(release.version); } else if (buttonIndex === 2) { - bridge().openExternal('https://joplinapp.org/changelog/'); + void bridge().openExternal('https://joplinapp.org/changelog/'); } } } diff --git a/packages/app-desktop/gui/ClipperConfigScreen.tsx b/packages/app-desktop/gui/ClipperConfigScreen.tsx index cce949ec9..42d0e4c41 100644 --- a/packages/app-desktop/gui/ClipperConfigScreen.tsx +++ b/packages/app-desktop/gui/ClipperConfigScreen.tsx @@ -28,11 +28,11 @@ class ClipperConfigScreenComponent extends React.Component { } chromeButton_click() { - bridge().openExternal('https://chrome.google.com/webstore/detail/joplin-web-clipper/alofnhikmmkdbbbgpnglcpdollgjjfek'); + void bridge().openExternal('https://chrome.google.com/webstore/detail/joplin-web-clipper/alofnhikmmkdbbbgpnglcpdollgjjfek'); } firefoxButton_click() { - bridge().openExternal('https://addons.mozilla.org/en-US/firefox/addon/joplin-web-clipper/'); + void bridge().openExternal('https://addons.mozilla.org/en-US/firefox/addon/joplin-web-clipper/'); } copyToken_click() { diff --git a/packages/app-desktop/gui/ConfigScreen/controls/plugins/PluginBox.tsx b/packages/app-desktop/gui/ConfigScreen/controls/plugins/PluginBox.tsx index 537e49df3..3d4e117bb 100644 --- a/packages/app-desktop/gui/ConfigScreen/controls/plugins/PluginBox.tsx +++ b/packages/app-desktop/gui/ConfigScreen/controls/plugins/PluginBox.tsx @@ -155,11 +155,11 @@ export default function(props: Props) { const onNameClick = useCallback(() => { const manifest = item.manifest; if (!manifest.homepage_url) return; - bridge().openExternal(manifest.homepage_url); + void bridge().openExternal(manifest.homepage_url); }, [item]); const onRecommendedClick = useCallback(() => { - bridge().openExternal('https://github.com/joplin/plugins/blob/master/readme/recommended.md#recommended-plugins'); + void bridge().openExternal('https://github.com/joplin/plugins/blob/master/readme/recommended.md#recommended-plugins'); }, []); // For plugins in dev mode things like enabling/disabling or diff --git a/packages/app-desktop/gui/ConfigScreen/controls/plugins/PluginsStates.tsx b/packages/app-desktop/gui/ConfigScreen/controls/plugins/PluginsStates.tsx index ac994151b..bfffb253b 100644 --- a/packages/app-desktop/gui/ConfigScreen/controls/plugins/PluginsStates.tsx +++ b/packages/app-desktop/gui/ConfigScreen/controls/plugins/PluginsStates.tsx @@ -198,7 +198,7 @@ export default function(props: Props) { }, [pluginSettings, props.onChange]); const onBrowsePlugins = useCallback(() => { - bridge().openExternal('https://github.com/joplin/plugins/blob/master/README.md#plugins'); + void bridge().openExternal('https://github.com/joplin/plugins/blob/master/README.md#plugins'); }, []); const onPluginSettingsChange = useCallback((event: OnPluginSettingChangeEvent) => { diff --git a/packages/app-desktop/gui/MainScreen/commands/openItem.ts b/packages/app-desktop/gui/MainScreen/commands/openItem.ts index 61984f5d5..01cd56e22 100644 --- a/packages/app-desktop/gui/MainScreen/commands/openItem.ts +++ b/packages/app-desktop/gui/MainScreen/commands/openItem.ts @@ -27,9 +27,9 @@ export const runtime = (): CommandRuntime => { // but doesn't on macOS, so we need to convert it to a path // before passing it to openPath. const decodedPath = fileUriToPath(urlDecode(link), shim.platformName()); - require('electron').shell.openPath(decodedPath); + void require('electron').shell.openPath(decodedPath); } else { - require('electron').shell.openExternal(link); + void require('electron').shell.openExternal(link); } } else { bridge().showErrorMessageBox(_('Unsupported link or message: %s', link)); diff --git a/packages/app-desktop/gui/MainScreen/commands/showSpellCheckerMenu.ts b/packages/app-desktop/gui/MainScreen/commands/showSpellCheckerMenu.ts index 2fb51c75c..491f37345 100644 --- a/packages/app-desktop/gui/MainScreen/commands/showSpellCheckerMenu.ts +++ b/packages/app-desktop/gui/MainScreen/commands/showSpellCheckerMenu.ts @@ -19,7 +19,7 @@ export const runtime = (): CommandRuntime => { useSpellChecker = useSpellChecker === null ? context.state.settings['spellChecker.enabled'] : useSpellChecker; const menuItems = SpellCheckerService.instance().spellCheckerConfigMenuItems(selectedLanguage, useSpellChecker); - const menu = Menu.buildFromTemplate(menuItems); + const menu = Menu.buildFromTemplate(menuItems as any); menu.popup(bridge().window()); }, diff --git a/packages/app-desktop/gui/MenuBar.tsx b/packages/app-desktop/gui/MenuBar.tsx index 9e16259a1..be4722416 100644 --- a/packages/app-desktop/gui/MenuBar.tsx +++ b/packages/app-desktop/gui/MenuBar.tsx @@ -697,13 +697,13 @@ function useMenu(props: Props) { submenu: [{ label: _('Website and documentation'), accelerator: keymapService.getAccelerator('help'), - click() { bridge().openExternal('https://joplinapp.org'); }, + click() { void bridge().openExternal('https://joplinapp.org'); }, }, { label: _('Joplin Forum'), - click() { bridge().openExternal('https://discourse.joplinapp.org'); }, + click() { void bridge().openExternal('https://discourse.joplinapp.org'); }, }, { label: _('Make a donation'), - click() { bridge().openExternal('https://joplinapp.org/donate/'); }, + click() { void bridge().openExternal('https://joplinapp.org/donate/'); }, }, { label: _('Check for updates...'), visible: shim.isMac() ? false : true, @@ -816,7 +816,7 @@ function useMenu(props: Props) { menuItemDic.textCut, menuItemDic.textPaste, menuItemDic.textSelectAll, - ], + ] as any, }, ])); } else { diff --git a/packages/app-desktop/gui/SyncWizard/Dialog.tsx b/packages/app-desktop/gui/SyncWizard/Dialog.tsx index c6cf7c721..ea67c2c00 100644 --- a/packages/app-desktop/gui/SyncWizard/Dialog.tsx +++ b/packages/app-desktop/gui/SyncWizard/Dialog.tsx @@ -224,7 +224,7 @@ export default function(props: Props) { }, [joplinCloudEmail, joplinCloudPassword, props.dispatch]); const onJoplinCloudCreateAccountClick = useCallback(() => { - bridge().openExternal('https://joplinapp.org/plans/'); + void bridge().openExternal('https://joplinapp.org/plans/'); }, []); function renderJoplinCloudLoginForm() { diff --git a/packages/app-desktop/services/plugins/PluginRunner.ts b/packages/app-desktop/services/plugins/PluginRunner.ts index 9fdd35953..6931648de 100644 --- a/packages/app-desktop/services/plugins/PluginRunner.ts +++ b/packages/app-desktop/services/plugins/PluginRunner.ts @@ -120,7 +120,7 @@ export default class PluginRunner extends BasePluginRunner { bridge().electronApp().registerPluginWindow(plugin.id, pluginWindow); - pluginWindow.loadURL(`${require('url').format({ + void pluginWindow.loadURL(`${require('url').format({ pathname: require('path').join(__dirname, 'plugin_index.html'), protocol: 'file:', slashes: true, diff --git a/packages/lib/services/plugins/api/types.ts b/packages/lib/services/plugins/api/types.ts index 9effa4ec1..c77759917 100644 --- a/packages/lib/services/plugins/api/types.ts +++ b/packages/lib/services/plugins/api/types.ts @@ -297,7 +297,7 @@ export interface MenuItem { /** * Set to "separator" to create a divider line */ - type?: string; + type?: ('normal' | 'separator' | 'submenu' | 'checkbox' | 'radio'); /** * Accelerator associated with the menu item