1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-07-13 00:10:37 +02:00

Tools: Apply rule @typescript-eslint/ban-types

This commit is contained in:
Laurent Cozic
2023-06-30 10:30:29 +01:00
parent 48ef6db4a5
commit dd6eec6a03
153 changed files with 296 additions and 9 deletions

View File

@ -9,6 +9,7 @@ const { createCachedSelector } = require('re-reselect');
export interface MenuItem {
id?: string;
label?: string;
// eslint-disable-next-line @typescript-eslint/ban-types -- Old code before rule was applied
click?: Function;
role?: any;
type?: string;
@ -74,6 +75,7 @@ export default class MenuUtils {
return KeymapService.instance();
}
// eslint-disable-next-line @typescript-eslint/ban-types -- Old code before rule was applied
public commandToMenuItem(commandName: string, onClick: Function): MenuItem {
const command = this.service.commandByName(commandName);
@ -99,6 +101,7 @@ export default class MenuUtils {
});
}
// eslint-disable-next-line @typescript-eslint/ban-types -- Old code before rule was applied
public commandsToMenuItems(commandNames: string[], onClick: Function, locale: string): MenuItems {
const key = `${this.keymapService.lastSaveTime}_${commandNames.join('_')}_${locale}`;
if (this.menuItemCache_[key]) return this.menuItemCache_[key];