diff --git a/ext/js/comm/anki-connect.js b/ext/js/comm/anki-connect.js index aa870f67e..468321a8c 100644 --- a/ext/js/comm/anki-connect.js +++ b/ext/js/comm/anki-connect.js @@ -479,9 +479,7 @@ export class AnkiConnect { if (typeof result === 'object' && result !== null && !Array.isArray(result)) { const apiError = /** @type {import('core').SerializableObject} */ (result).error; if (typeof apiError !== 'undefined') { - // eslint-disable-next-line @typescript-eslint/no-base-to-string const error = new ExtensionError(`Anki error: ${apiError}`); - // eslint-disable-next-line @typescript-eslint/no-base-to-string error.data = {action, params, status: response.status, apiError: typeof apiError === 'string' ? apiError : `${apiError}`}; throw error; } diff --git a/types/ext/core.d.ts b/types/ext/core.d.ts index a550e0253..459ede99a 100644 --- a/types/ext/core.d.ts +++ b/types/ext/core.d.ts @@ -22,7 +22,7 @@ export type TypeofResult = 'string' | 'number' | 'bigint' | 'boolean' | 'symbol' export type SafeAny = any; /** This type is used as an explicit way of permitting the `Function` type. */ -// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type +// eslint-disable-next-line @typescript-eslint/ban-types, @typescript-eslint/no-unsafe-function-type export type SafeFunction = Function; /** This type is used as an explicit way of permitting the `any` type. */