refactor: Remove eslint-disable when possible

This commit is contained in:
Joachim Van Herwegen
2024-03-14 11:29:17 +01:00
parent 65bf2bd34e
commit fa060b86f3
12 changed files with 35 additions and 38 deletions

View File

@@ -1,4 +1,3 @@
/* eslint-disable unicorn/no-process-exit */
import { existsSync } from 'node:fs';
import type { WriteStream } from 'node:tty';
import type { IComponentsManagerBuilderOptions } from 'componentsjs';
@@ -145,6 +144,7 @@ export class AppRunner {
public runCliSync({ argv, stderr = process.stderr }: { argv?: CliArgv; stderr?: WriteStream }): void {
this.runCli(argv).catch((error): never => {
stderr.write(createErrorMessage(error));
// eslint-disable-next-line unicorn/no-process-exit
process.exit(1);
});
}

View File

@@ -76,8 +76,9 @@ export class YargsCliExtractor extends CliExtractor {
yArgv.check((args): boolean => {
for (const [ name, options ] of Object.entries(this.yargsArgOptions)) {
if (options.type !== 'array' && Array.isArray(args[name])) {
// eslint-disable-next-line ts/restrict-template-expressions
throw new Error(`Multiple values for --${name} (-${options.alias}) were provided where only one is allowed`);
throw new Error(
`Multiple values for --${name} (-${options.alias as string}) were provided where only one is allowed`,
);
}
}
return true;

View File

@@ -68,7 +68,8 @@ export interface V6MigrationInitializerArgs {
/**
* Storages for which all entries need to be removed.
*/
cleanupStorages: KeyValueStorage<string, unknown>[];
// eslint-disable-next-line ts/no-explicit-any
cleanupStorages: KeyValueStorage<string, any>[];
/**
* The storage that will contain the account data in the new format.
* Wrong typings to prevent Components.js typing issues.