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,10 +9,12 @@ import eventManager from '../../../eventManager';
* so for now disable filters.
*/
export default class JoplinFilters {
// eslint-disable-next-line @typescript-eslint/ban-types -- Old code before rule was applied
public async on(name: string, callback: Function) {
eventManager.filterOn(name, callback);
}
// eslint-disable-next-line @typescript-eslint/ban-types -- Old code before rule was applied
public async off(name: string, callback: Function) {
eventManager.filterOff(name, callback);
}

View File

@ -76,6 +76,7 @@ export default class JoplinViewsPanels {
* demo](https://github.com/laurent22/joplin/tree/dev/packages/app-cli/tests/support/plugins/post_messages) for more details.
*
*/
// eslint-disable-next-line @typescript-eslint/ban-types -- Old code before rule was applied
public async onMessage(handle: ViewHandle, callback: Function): Promise<void> {
return this.controller(handle).onMessage(callback);
}

View File

@ -68,6 +68,7 @@ export default class JoplinWorkspace {
/**
* Called when a new note or notes are selected.
*/
// eslint-disable-next-line @typescript-eslint/ban-types -- Old code before rule was applied
public async onNoteSelectionChange(callback: Function): Promise<Disposable> {
eventManager.appStateOn('selectedNoteIds', callback);
@ -84,6 +85,7 @@ export default class JoplinWorkspace {
* Called when the content of a note changes.
* @deprecated Use `onNoteChange()` instead, which is reliably triggered whenever the note content, or any note property changes.
*/
// eslint-disable-next-line @typescript-eslint/ban-types -- Old code before rule was applied
public async onNoteContentChange(callback: Function) {
eventManager.on('noteContentChange', callback);
}
@ -116,6 +118,7 @@ export default class JoplinWorkspace {
/**
* Called when an alarm associated with a to-do is triggered.
*/
// eslint-disable-next-line @typescript-eslint/ban-types -- Old code before rule was applied
public async onNoteAlarmTrigger(handler: Function): Promise<Disposable> {
return makeListener(eventManager, 'noteAlarmTrigger', handler);
}
@ -130,6 +133,7 @@ export default class JoplinWorkspace {
/**
* Called when the synchronisation process has finished.
*/
// eslint-disable-next-line @typescript-eslint/ban-types -- Old code before rule was applied
public async onSyncComplete(callback: Function): Promise<Disposable> {
return makeListener(eventManager, 'syncComplete', callback);
}