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

Tools: Implement @typescript-eslint/no-explicit-any rule

This commit is contained in:
Laurent Cozic
2024-04-05 12:16:49 +01:00
parent 42900bcc66
commit 2e2a2b3193
654 changed files with 2971 additions and 170 deletions

View File

@ -1,6 +1,7 @@
import { ViewHandle } from './utils/createViewHandle';
export interface EmitMessageEvent {
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
message: any;
}
@ -8,18 +9,22 @@ export default class ViewController {
private handle_: ViewHandle;
private pluginId_: string;
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
private store_: any;
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
public constructor(handle: ViewHandle, pluginId: string, store: any) {
this.handle_ = handle;
this.pluginId_ = pluginId;
this.store_ = store;
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
protected get storeView(): any {
return this.store_.getState().pluginService.plugins[this.pluginId_].views[this.handle];
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
protected get store(): any {
return this.store_;
}
@ -40,10 +45,12 @@ export default class ViewController {
throw new Error('Must be overriden');
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
public async emitMessage(event: EmitMessageEvent): Promise<any> {
console.warn('Calling ViewController.emitMessage - but not implemented', event);
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
public postMessage(message: any) {
console.warn('Calling ViewController.postMessage - but not implemented', message);
}