mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-27 10:32:58 +02:00
Tools: Fixed linter and tsc errors
This commit is contained in:
parent
57e46711f6
commit
c7d0d659a0
@ -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/');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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() {
|
||||
|
@ -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
|
||||
|
@ -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) => {
|
||||
|
@ -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));
|
||||
|
@ -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());
|
||||
},
|
||||
|
||||
|
@ -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 {
|
||||
|
@ -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() {
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user