feature: Adds eslint rules.

This commit is contained in:
greysoh 2024-05-10 17:37:04 -04:00
parent 09f7987e75
commit 3c95c23369
No known key found for this signature in database
GPG key ID: FE0F173B8FC01571
26 changed files with 124 additions and 95 deletions

View file

@ -5,7 +5,7 @@ export class SSHCommand extends Command {
hasRecievedExitSignal: boolean;
println: PrintLine;
exitEventHandlers: ((...any: any[]) => void)[];
exitEventHandlers: ((...any: unknown[]) => void)[];
parent: SSHCommand | null;
/**
@ -81,11 +81,11 @@ export class SSHCommand extends Command {
action(fn: (...args: any[]) => void | Promise<void>): this {
super.action(fn);
// @ts-expect-error
// @ts-expect-error: This parameter is private, but we need control over it.
// prettier-ignore
const oldActionHandler: (...args: any[]) => void | Promise<void> = this._actionHandler;
// @ts-expect-error
// @ts-expect-error: Overriding private parameters (but this works)
this._actionHandler = async (...args: any[]): Promise<void> => {
if (this.hasRecievedExitSignal) return;
await oldActionHandler(...args);