## Description - Enabled the rule `@typescript-eslint/no-explicit-any` - Suppressed errors with comment ``` // TODO: Fix this the next time the file is edited // eslint-disable-next-line @typescript-eslint/no-explicit-any ``` Fixes #35308 ## Automation /ok-to-test tags="@tag.All" ### 🔍 Cypress test results <!-- This is an auto-generated comment: Cypress test results --> > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/10181176984> > Commit: 7fc604e24fa234da7ab2ff56e0b1c715268796ee > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10181176984&attempt=2" target="_blank">Cypress dashboard</a>. > Tags: `@tag.All` > Spec: > <hr>Wed, 31 Jul 2024 15:00:45 UTC <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [x] No
56 lines
2.0 KiB
TypeScript
56 lines
2.0 KiB
TypeScript
import { GracefulWorkerService } from "utils/WorkerUtil";
|
||
import type {
|
||
LintTreeRequestPayload,
|
||
updateJSLibraryProps,
|
||
} from "plugins/Linting/types";
|
||
import { LINT_WORKER_ACTIONS as LINT_ACTIONS } from "plugins/Linting/types";
|
||
import type { FeatureFlags } from "@appsmith/entities/FeatureFlag";
|
||
|
||
export interface ILinter {
|
||
// TODO: Fix this the next time the file is edited
|
||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||
lintTree(args: LintTreeRequestPayload): any;
|
||
// TODO: Fix this the next time the file is edited
|
||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||
updateJSLibraryGlobals(args: updateJSLibraryProps): any;
|
||
start(): void;
|
||
shutdown(): void;
|
||
// TODO: Fix this the next time the file is edited
|
||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||
setup(args: FeatureFlags): any;
|
||
}
|
||
|
||
export class WorkerLinter implements ILinter {
|
||
server: GracefulWorkerService;
|
||
constructor() {
|
||
this.server = new GracefulWorkerService(
|
||
new Worker(new URL("./worker.ts", import.meta.url), {
|
||
type: "module",
|
||
// Note: the `Worker` part of the name is slightly important – LinkRelPreload_spec.js
|
||
// relies on it to find workers in the list of all requests.
|
||
name: "lintWorker",
|
||
}),
|
||
);
|
||
this.setup = this.setup.bind(this);
|
||
this.start = this.start.bind(this);
|
||
this.shutdown = this.shutdown.bind(this);
|
||
this.lintTree = this.lintTree.bind(this);
|
||
this.updateJSLibraryGlobals = this.updateJSLibraryGlobals.bind(this);
|
||
}
|
||
*start() {
|
||
yield* this.server.start();
|
||
}
|
||
*shutdown() {
|
||
yield* this.server.shutdown();
|
||
}
|
||
*lintTree(args: LintTreeRequestPayload) {
|
||
return yield* this.server.request(LINT_ACTIONS.LINT_TREE, args);
|
||
}
|
||
*updateJSLibraryGlobals(args: updateJSLibraryProps) {
|
||
return yield* this.server.request(LINT_ACTIONS.UPDATE_LINT_GLOBALS, args);
|
||
}
|
||
*setup(args: FeatureFlags) {
|
||
return yield* this.server.request(LINT_ACTIONS.SETUP, args);
|
||
}
|
||
}
|