chore: migrate to oxlint and oxfmt

Co-authored-by: Christoph Nakazawa <christoph.pojer@gmail.com>
This commit is contained in:
Peter Steinberger
2026-01-14 14:31:43 +00:00
parent 912ebffc63
commit c379191f80
1480 changed files with 28608 additions and 43547 deletions

View File

@@ -23,9 +23,7 @@ export const usageProviders: UsageProviderId[] = [
"zai",
];
export function resolveUsageProviderId(
provider?: string | null,
): UsageProviderId | undefined {
export function resolveUsageProviderId(provider?: string | null): UsageProviderId | undefined {
if (!provider) return undefined;
const normalized = normalizeProviderId(provider);
return usageProviders.includes(normalized as UsageProviderId)
@@ -44,11 +42,7 @@ export const ignoredErrors = new Set([
export const clampPercent = (value: number) =>
Math.max(0, Math.min(100, Number.isFinite(value) ? value : 0));
export const withTimeout = async <T>(
work: Promise<T>,
ms: number,
fallback: T,
): Promise<T> => {
export const withTimeout = async <T>(work: Promise<T>, ms: number, fallback: T): Promise<T> => {
let timeout: NodeJS.Timeout | undefined;
try {
return await Promise.race([