chore: Update @antfu/eslint-config dependency to 2.11.4

This commit is contained in:
Joachim Van Herwegen
2024-03-29 10:18:21 +01:00
parent fa060b86f3
commit 7abca33b67
18 changed files with 2353 additions and 856 deletions

View File

@@ -300,7 +300,7 @@ export class RepresentationMetadata {
predicate: Term | string | null,
object: Term | string | null,
graph: Term | string | null) => boolean;
}).has(this.id, predicate, object, graph) as boolean;
}).has(this.id, predicate, object, graph);
}
/**

View File

@@ -84,7 +84,7 @@ export class ExtensionBasedMapper extends BaseFileIdentifierMapper {
const extension = getExtension(filePath).toLowerCase();
return mime.lookup(extension) ||
this.customTypes[extension] ||
await super.getContentTypeFromPath(filePath);
await super.getContentTypeFromPath(filePath);
}
/**

View File

@@ -55,7 +55,7 @@ function emitStoredErrors(this: Guarded, event: string, func: (error: Error) =>
if (event === 'error' && func !== guardingErrorListener) {
// Cancel an error timeout
if (this[guardedTimeout]) {
clearTimeout(this[guardedTimeout]!);
clearTimeout(this[guardedTimeout]);
this[guardedTimeout] = undefined;
}

View File

@@ -7,8 +7,8 @@ export function isError(error: unknown): error is Error {
return types.isNativeError(error) ||
(Boolean(error) &&
typeof (error as Error).name === 'string' &&
typeof (error as Error).message === 'string' &&
(typeof (error as Error).stack === 'undefined' || typeof (error as Error).stack === 'string'));
typeof (error as Error).message === 'string' &&
(typeof (error as Error).stack === 'undefined' || typeof (error as Error).stack === 'string'));
}
/**

View File

@@ -48,7 +48,7 @@ export class HttpError<T extends number = number> extends Error implements HttpE
public static isInstance(error: unknown): error is HttpError {
return isError(error) &&
typeof (error as HttpError).statusCode === 'number' &&
Boolean((error as HttpError).metadata);
Boolean((error as HttpError).metadata);
}
/**