Fix all 93 ESLint issues (3 errors, 90 warnings) (#666)

This commit is contained in:
Thomas Durieux
2026-04-15 09:04:22 +02:00
committed by GitHub
parent 1d97c76e7e
commit f4209110c7
28 changed files with 77 additions and 69 deletions
+6 -5
View File
@@ -14,11 +14,12 @@ export default async function (job: SandboxedJob<Repository, void>) {
getRepository: typeof getRepositoryImport;
} = require("../../server/database");
console.log(`[QUEUE] ${job.data.repoId} is going to be downloaded`);
// eslint-disable-next-line @typescript-eslint/no-explicit-any
let statusInterval: any = null;
await connect();
const repo = await getRepository(job.data.repoId);
try {
let progress: any = null;
let progress: { status: string } | null = null;
statusInterval = setInterval(async () => {
try {
if (
@@ -37,7 +38,7 @@ export default async function (job: SandboxedJob<Repository, void>) {
);
await repo.updateStatus(repo.status, progress?.status || "");
}
} catch (_) {
} catch {
// ignore error
}
}, 1000);
@@ -61,14 +62,14 @@ export default async function (job: SandboxedJob<Repository, void>) {
}
throw error;
}
} catch (error: any) {
} catch (error: unknown) {
clearInterval(statusInterval);
console.log(`[QUEUE] ${job.data.repoId} is finished with an error`, error);
setTimeout(async () => {
// delay to avoid double saving
try {
await repo.updateStatus(RepositoryStatus.ERROR, error.message);
} catch (ignore) {}
await repo.updateStatus(RepositoryStatus.ERROR, (error as Error).message);
} catch { /* ignored */ }
}, 400);
} finally {
clearInterval(statusInterval);
+1 -1
View File
@@ -17,7 +17,7 @@ export default async function (job: SandboxedJob<Repository, void>) {
);
const repo = await getRepository(job.data.repoId);
await repo.removeCache();
} catch (error) {
} catch {
// error already handled
} finally {
console.log(`[QUEUE] Cache of ${job.data.repoId} is removed.`);
+1 -1
View File
@@ -26,7 +26,7 @@ export default async function (job: SandboxedJob<Repository, void>) {
}
throw error;
}
} catch (error) {
} catch {
// error already handled
} finally {
console.log(`[QUEUE] ${job.data.repoId} is removed`);