You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-23 22:36:32 +02:00
Tools: Implement @typescript-eslint/no-explicit-any rule
This commit is contained in:
@@ -2,6 +2,7 @@ import time from './time';
|
||||
import Setting from './models/Setting';
|
||||
import Logger, { LoggerWrapper } from '@joplin/utils/Logger';
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
|
||||
type TaskCallback = ()=> Promise<any>;
|
||||
|
||||
interface Task {
|
||||
@@ -11,6 +12,7 @@ interface Task {
|
||||
|
||||
interface TaskResult {
|
||||
id: string;
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
|
||||
result: any;
|
||||
error?: Error;
|
||||
}
|
||||
@@ -76,6 +78,7 @@ export default class TaskQueue {
|
||||
|
||||
this.processingQueue_ = true;
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
|
||||
const completeTask = (task: Task, result: any, error: Error) => {
|
||||
delete this.processingTasks_[task.id];
|
||||
|
||||
@@ -103,7 +106,7 @@ export default class TaskQueue {
|
||||
// the task to complete, but still want to capture the result.
|
||||
task
|
||||
.callback()
|
||||
// eslint-disable-next-line promise/prefer-await-to-then
|
||||
// eslint-disable-next-line promise/prefer-await-to-then, @typescript-eslint/no-explicit-any -- Old code before rule was applied
|
||||
.then((result: any) => {
|
||||
completeTask(task, result, null);
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user