mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-09-30 07:12:36 -05:00
Enable Biome rules 3
This commit is contained in:
@@ -22,8 +22,10 @@ invariant(
|
||||
async function loadTournament() {
|
||||
try {
|
||||
return await tournamentFromDB(tournamentId);
|
||||
} catch {
|
||||
throw new Error(`Tournament with id ${tournamentId} not found`);
|
||||
} catch (error) {
|
||||
throw new Error(`Tournament with id ${tournamentId} not found`, {
|
||||
cause: error,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -67,8 +67,8 @@ for (const file of fileNames) {
|
||||
let otherLanguageContent: Record<string, string>;
|
||||
try {
|
||||
otherLanguageContent = JSON.parse(otherRawContent);
|
||||
} catch {
|
||||
throw new Error(`failed to parse ${lang}/${file}`);
|
||||
} catch (error) {
|
||||
throw new Error(`failed to parse ${lang}/${file}`, { cause: error });
|
||||
}
|
||||
|
||||
const otherLanguageContentKeys = getKeysWithoutSuffix(
|
||||
@@ -276,7 +276,7 @@ function MDOverviewTable({
|
||||
(name) => name !== "weapons.json" && name !== "gear.json",
|
||||
);
|
||||
|
||||
const rows = [];
|
||||
const rows: string[] = [];
|
||||
|
||||
rows.push(
|
||||
`| Language | Total | ${relevantFiles.map(MD.inlineCode).join(" | ")} |`,
|
||||
@@ -285,7 +285,7 @@ function MDOverviewTable({
|
||||
rows.push(`| :-- | :-: | ${relevantFiles.map(() => ":-:").join(" | ")} |`);
|
||||
|
||||
for (const [lang, missingKeysObj] of Object.entries(missingTranslations)) {
|
||||
const cells = [];
|
||||
const cells: string[] = [];
|
||||
|
||||
cells.push(MD.strong(lang));
|
||||
|
||||
|
||||
@@ -123,6 +123,7 @@ async function main() {
|
||||
fs.rmSync(stagedPath, { force: true });
|
||||
throw new Error(
|
||||
`Snapshot failed verification, no checkout was touched. The archive is kept at ${archivePath}\n${(error as Error).message}`,
|
||||
{ cause: error },
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -134,6 +134,7 @@ function parseArgs(argv: string[]): {
|
||||
let duration: number | undefined;
|
||||
let outPath: string | undefined;
|
||||
let collectTelemetry = false;
|
||||
// biome-ignore lint/style/useForOf: the index advances inside the loop to consume flag values
|
||||
for (let i = 0; i < argv.length; i++) {
|
||||
const arg = argv[i]!;
|
||||
if (arg === "--fps") fps = Number(argv[++i]);
|
||||
|
||||
Reference in New Issue
Block a user