diff --git a/app/db/seed/index.ts b/app/db/seed/index.ts index 8666a428e..84b7220be 100644 --- a/app/db/seed/index.ts +++ b/app/db/seed/index.ts @@ -1450,6 +1450,7 @@ function tournamentSubs() { bestWeapons: nullFilledArray( faker.helpers.arrayElement([1, 1, 1, 2, 2, 3, 4, 5]), ) + // biome-ignore lint/suspicious/useIterableCallbackReturn: Biome 2.3.1 upgrade .map(() => { while (true) { const weaponId = R.sample(mainWeaponIds, 1)[0]!; @@ -1466,6 +1467,7 @@ function tournamentSubs() { : nullFilledArray( faker.helpers.arrayElement([1, 1, 1, 2, 2, 3, 4, 5]), ) + // biome-ignore lint/suspicious/useIterableCallbackReturn: Biome 2.3.1 upgrade .map(() => { while (true) { const weaponId = R.sample(mainWeaponIds, 1)[0]!; diff --git a/app/features/lfg/lfg-types.ts b/app/features/lfg/lfg-types.ts index b57a22e61..0f14a463a 100644 --- a/app/features/lfg/lfg-types.ts +++ b/app/features/lfg/lfg-types.ts @@ -95,7 +95,7 @@ export function smallStrToFilter(s: string): LFGFilter | null { case "w": { const weaponIds = val .split(",") - .map((x) => Number.parseInt(x) as MainWeaponId) + .map((x) => Number.parseInt(x, 10) as MainWeaponId) .filter((x) => x !== null && x !== undefined); if (weaponIds.length === 0) return null; return { @@ -112,7 +112,7 @@ export function smallStrToFilter(s: string): LFGFilter | null { }; } case "tz": { - const n = Number.parseInt(val); + const n = Number.parseInt(val, 10); if (Number.isNaN(n)) return null; return { _tag: "Timezone", @@ -127,7 +127,7 @@ export function smallStrToFilter(s: string): LFGFilter | null { }; } case "pt": { - const n = Number.parseInt(val); + const n = Number.parseInt(val, 10); if (Number.isNaN(n)) return null; return { _tag: "PlusTier", diff --git a/app/features/object-damage-calculator/core/objectDamage.test.ts b/app/features/object-damage-calculator/core/objectDamage.test.ts index 87c3bbcda..2162d36b8 100644 --- a/app/features/object-damage-calculator/core/objectDamage.test.ts +++ b/app/features/object-damage-calculator/core/objectDamage.test.ts @@ -107,6 +107,7 @@ describe("calculateDamage()", () => { const hpWithoutBRU = withoutBRU.find( (d) => d.receiver === "Wsb_Shield", )?.hitPoints; + // biome-ignore lint/suspicious/noNonNullAssertedOptionalChain: Biome 2.3.1 upgrade const hpWithBRU = withBRU.find((d) => d.receiver === "Wsb_Shield") ?.hitPoints!; @@ -124,6 +125,7 @@ describe("calculateDamage()", () => { const hpWithoutSPU = withoutSPU.find( (d) => d.receiver === "GreatBarrier_Barrier", )?.hitPoints; + // biome-ignore lint/suspicious/noNonNullAssertedOptionalChain: Biome 2.3.1 upgrade const hpWithSPU = withSPU.find((d) => d.receiver === "GreatBarrier_Barrier") ?.hitPoints!; diff --git a/app/features/tournament-bracket/core/PreparedMaps.test.ts b/app/features/tournament-bracket/core/PreparedMaps.test.ts index 635c99482..76b819c3f 100644 --- a/app/features/tournament-bracket/core/PreparedMaps.test.ts +++ b/app/features/tournament-bracket/core/PreparedMaps.test.ts @@ -297,6 +297,7 @@ describe("PreparedMaps - trimPreparedEliminationMaps", () => { }); expect(trimmed?.maps[0].list?.[0].stageId).toBe( + // biome-ignore lint/suspicious/noNonNullAssertedOptionalChain: Biome 2.3.1 upgrade EIGHT_TEAM_SE_PREPARED.maps[1].list?.[0].stageId!, ); }); diff --git a/app/features/tournament-bracket/core/Swiss.ts b/app/features/tournament-bracket/core/Swiss.ts index d50826151..871cf4842 100644 --- a/app/features/tournament-bracket/core/Swiss.ts +++ b/app/features/tournament-bracket/core/Swiss.ts @@ -393,15 +393,11 @@ function generateWeightedPairs({ continue; } let wt = - 75 - - 75 / - (scoreGroups.findIndex((s) => s === Math.min(curr.score, opp.score)) + - 2); + 75 - 75 / (scoreGroups.indexOf(Math.min(curr.score, opp.score)) + 2); wt += 5 - 5 / (scoreSums.findIndex((s) => s === curr.score + opp.score) + 1); const scoreGroupDiff = Math.abs( - scoreGroups.findIndex((s) => s === curr.score) - - scoreGroups.findIndex((s) => s === opp.score), + scoreGroups.indexOf(curr.score) - scoreGroups.indexOf(opp.score), ); // TODO: consider "pairedUpDown" diff --git a/app/features/tournament-bracket/core/Tournament.ts b/app/features/tournament-bracket/core/Tournament.ts index f52b1b40e..ddb99eda4 100644 --- a/app/features/tournament-bracket/core/Tournament.ts +++ b/app/features/tournament-bracket/core/Tournament.ts @@ -470,10 +470,7 @@ export class Tournament { const [oneId, twoId] = replays[0]; const lowerSeedId = - newOrder.findIndex((t) => t === oneId) < - newOrder.findIndex((t) => t === twoId) - ? twoId - : oneId; + newOrder.indexOf(oneId) < newOrder.indexOf(twoId) ? twoId : oneId; if (!potentialSwitchCandidates.some((t) => t === lowerSeedId)) { logger.warn( @@ -487,8 +484,8 @@ export class Tournament { // can't switch place with itself if (candidate === lowerSeedId) continue; - const candidateIdx = newOrder.findIndex((t) => t === candidate); - const otherIdx = newOrder.findIndex((t) => t === lowerSeedId); + const candidateIdx = newOrder.indexOf(candidate); + const otherIdx = newOrder.indexOf(lowerSeedId); const temp = newOrder[candidateIdx]; newOrder[candidateIdx] = newOrder[otherIdx]; diff --git a/app/features/tournament-subs/loaders/to.$id.subs.server.ts b/app/features/tournament-subs/loaders/to.$id.subs.server.ts index 27a557d86..6d8f42ecf 100644 --- a/app/features/tournament-subs/loaders/to.$id.subs.server.ts +++ b/app/features/tournament-subs/loaders/to.$id.subs.server.ts @@ -22,6 +22,7 @@ export const loader = async ({ params, request }: LoaderFunctionArgs) => { const subs = findSubsByTournamentId({ tournamentId, userId: user?.id, + // biome-ignore lint/suspicious/useIterableCallbackReturn: Biome 2.3.1 upgrade }).filter((sub) => { if (sub.visibility === "ALL") return true; diff --git a/app/features/tournament/routes/to.$id.tsx b/app/features/tournament/routes/to.$id.tsx index 1cba9a592..30f6a9bd6 100644 --- a/app/features/tournament/routes/to.$id.tsx +++ b/app/features/tournament/routes/to.$id.tsx @@ -129,8 +129,8 @@ export function TournamentLayout() { window.tourney = tournament; }, [tournament]); } - const subsCount = () => + // biome-ignore lint/suspicious/useIterableCallbackReturn: Biome 2.3.1 upgrade tournament.ctx.subCounts.reduce((acc, cur) => { if (cur.visibility === "ALL") return acc + cur.count; diff --git a/app/modules/brackets-manager/create.ts b/app/modules/brackets-manager/create.ts index 600a1ac6f..6c2d2a9ba 100644 --- a/app/modules/brackets-manager/create.ts +++ b/app/modules/brackets-manager/create.ts @@ -189,6 +189,7 @@ export class Create { directInWb, ); + // biome-ignore lint/suspicious/noNonNullAssertedOptionalChain: Biome 2.3.1 upgrade if (helpers.isDoubleEliminationNecessary(this.stage.settings?.size!)) { const winnerLb = this.createLowerBracket(stageId, 2, [ directInLb, @@ -214,6 +215,7 @@ export class Create { slots, ); + // biome-ignore lint/suspicious/noNonNullAssertedOptionalChain: Biome 2.3.1 upgrade if (helpers.isDoubleEliminationNecessary(this.stage.settings?.size!)) { const winnerLb = this.createLowerBracket(stageId, 2, losersWb); this.createGrandFinal(stageId, winnerWb, winnerLb); @@ -302,6 +304,7 @@ export class Create { number: number, losers: ParticipantSlot[][], ): ParticipantSlot { + // biome-ignore lint/suspicious/noNonNullAssertedOptionalChain: Biome 2.3.1 upgrade const participantCount = this.stage.settings?.size!; const roundPairCount = helpers.getRoundPairCount(participantCount); diff --git a/biome.json b/biome.json index d4da68c3c..8de8ab766 100644 --- a/biome.json +++ b/biome.json @@ -51,10 +51,8 @@ "useLiteralKeys": { "fix": "safe", "level": "error" - } - }, - "nursery": { - "useUniqueElementIds": "off" + }, + "noImportantStyles": "off" } } }, diff --git a/package-lock.json b/package-lock.json index 3188843f2..88972aad9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -65,7 +65,7 @@ "zod": "^3.25.61" }, "devDependencies": { - "@biomejs/biome": "2.0.6", + "@biomejs/biome": "2.3.1", "@playwright/test": "^1.52.0", "@remix-run/dev": "^2.16.8", "@remix-run/route-config": "^2.16.8", @@ -1473,9 +1473,9 @@ } }, "node_modules/@biomejs/biome": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-2.0.6.tgz", - "integrity": "sha512-RRP+9cdh5qwe2t0gORwXaa27oTOiQRQvrFf49x2PA1tnpsyU7FIHX4ZOFMtBC4QNtyWsN7Dqkf5EDbg4X+9iqA==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-2.3.1.tgz", + "integrity": "sha512-A29evf1R72V5bo4o2EPxYMm5mtyGvzp2g+biZvRFx29nWebGyyeOSsDWGx3tuNNMFRepGwxmA9ZQ15mzfabK2w==", "dev": true, "license": "MIT OR Apache-2.0", "bin": { @@ -1489,20 +1489,20 @@ "url": "https://opencollective.com/biome" }, "optionalDependencies": { - "@biomejs/cli-darwin-arm64": "2.0.6", - "@biomejs/cli-darwin-x64": "2.0.6", - "@biomejs/cli-linux-arm64": "2.0.6", - "@biomejs/cli-linux-arm64-musl": "2.0.6", - "@biomejs/cli-linux-x64": "2.0.6", - "@biomejs/cli-linux-x64-musl": "2.0.6", - "@biomejs/cli-win32-arm64": "2.0.6", - "@biomejs/cli-win32-x64": "2.0.6" + "@biomejs/cli-darwin-arm64": "2.3.1", + "@biomejs/cli-darwin-x64": "2.3.1", + "@biomejs/cli-linux-arm64": "2.3.1", + "@biomejs/cli-linux-arm64-musl": "2.3.1", + "@biomejs/cli-linux-x64": "2.3.1", + "@biomejs/cli-linux-x64-musl": "2.3.1", + "@biomejs/cli-win32-arm64": "2.3.1", + "@biomejs/cli-win32-x64": "2.3.1" } }, "node_modules/@biomejs/cli-darwin-arm64": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.0.6.tgz", - "integrity": "sha512-AzdiNNjNzsE6LfqWyBvcL29uWoIuZUkndu+wwlXW13EKcBHbbKjNQEZIJKYDc6IL+p7bmWGx3v9ZtcRyIoIz5A==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.3.1.tgz", + "integrity": "sha512-ombSf3MnTUueiYGN1SeI9tBCsDUhpWzOwS63Dove42osNh0PfE1cUtHFx6eZ1+MYCCLwXzlFlYFdrJ+U7h6LcA==", "cpu": [ "arm64" ], @@ -1517,9 +1517,9 @@ } }, "node_modules/@biomejs/cli-darwin-x64": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.0.6.tgz", - "integrity": "sha512-wJjjP4E7bO4WJmiQaLnsdXMa516dbtC6542qeRkyJg0MqMXP0fvs4gdsHhZ7p9XWTAmGIjZHFKXdsjBvKGIJJQ==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.3.1.tgz", + "integrity": "sha512-pcOfwyoQkrkbGvXxRvZNe5qgD797IowpJPovPX5biPk2FwMEV+INZqfCaz4G5bVq9hYnjwhRMamg11U4QsRXrQ==", "cpu": [ "x64" ], @@ -1534,9 +1534,9 @@ } }, "node_modules/@biomejs/cli-linux-arm64": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.0.6.tgz", - "integrity": "sha512-ZSVf6TYo5rNMUHIW1tww+rs/krol7U5A1Is/yzWyHVZguuB0lBnIodqyFuwCNqG9aJGyk7xIMS8HG0qGUPz0SA==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.3.1.tgz", + "integrity": "sha512-td5O8pFIgLs8H1sAZsD6v+5quODihyEw4nv2R8z7swUfIK1FKk+15e4eiYVLcAE4jUqngvh4j3JCNgg0Y4o4IQ==", "cpu": [ "arm64" ], @@ -1551,9 +1551,9 @@ } }, "node_modules/@biomejs/cli-linux-arm64-musl": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.0.6.tgz", - "integrity": "sha512-CVPEMlin3bW49sBqLBg2x016Pws7eUXA27XYDFlEtponD0luYjg2zQaMJ2nOqlkKG9fqzzkamdYxHdMDc2gZFw==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.3.1.tgz", + "integrity": "sha512-+DZYv8l7FlUtTrWs1Tdt1KcNCAmRO87PyOnxKGunbWm5HKg1oZBSbIIPkjrCtDZaeqSG1DiGx7qF+CPsquQRcg==", "cpu": [ "arm64" ], @@ -1568,9 +1568,9 @@ } }, "node_modules/@biomejs/cli-linux-x64": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-2.0.6.tgz", - "integrity": "sha512-geM1MkHTV1Kh2Cs/Xzot9BOF3WBacihw6bkEmxkz4nSga8B9/hWy5BDiOG3gHDGIBa8WxT0nzsJs2f/hPqQIQw==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-2.3.1.tgz", + "integrity": "sha512-PYWgEO7up7XYwSAArOpzsVCiqxBCXy53gsReAb1kKYIyXaoAlhBaBMvxR/k2Rm9aTuZ662locXUmPk/Aj+Xu+Q==", "cpu": [ "x64" ], @@ -1585,9 +1585,9 @@ } }, "node_modules/@biomejs/cli-linux-x64-musl": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.0.6.tgz", - "integrity": "sha512-mKHE/e954hR/hSnAcJSjkf4xGqZc/53Kh39HVW1EgO5iFi0JutTN07TSjEMg616julRtfSNJi0KNyxvc30Y4rQ==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.3.1.tgz", + "integrity": "sha512-Y3Ob4nqgv38Mh+6EGHltuN+Cq8aj/gyMTJYzkFZV2AEj+9XzoXB9VNljz9pjfFNHUxvLEV4b55VWyxozQTBaUQ==", "cpu": [ "x64" ], @@ -1602,9 +1602,9 @@ } }, "node_modules/@biomejs/cli-win32-arm64": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.0.6.tgz", - "integrity": "sha512-290V4oSFoKaprKE1zkYVsDfAdn0An5DowZ+GIABgjoq1ndhvNxkJcpxPsiYtT7slbVe3xmlT0ncdfOsN7KruzA==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.3.1.tgz", + "integrity": "sha512-RHIG/zgo+69idUqVvV3n8+j58dKYABRpMyDmfWu2TITC+jwGPiEaT0Q3RKD+kQHiS80mpBrST0iUGeEXT0bU9A==", "cpu": [ "arm64" ], @@ -1619,9 +1619,9 @@ } }, "node_modules/@biomejs/cli-win32-x64": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-2.0.6.tgz", - "integrity": "sha512-bfM1Bce0d69Ao7pjTjUS+AWSZ02+5UHdiAP85Th8e9yV5xzw6JrHXbL5YWlcEKQ84FIZMdDc7ncuti1wd2sdbw==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-2.3.1.tgz", + "integrity": "sha512-izl30JJ5Dp10mi90Eko47zhxE6pYyWPcnX1NQxKpL/yMhXxf95oLTzfpu4q+MDBh/gemNqyJEwjBpe0MT5iWPA==", "cpu": [ "x64" ], diff --git a/package.json b/package.json index 58554edb2..d574ba783 100644 --- a/package.json +++ b/package.json @@ -86,7 +86,7 @@ "zod": "^3.25.61" }, "devDependencies": { - "@biomejs/biome": "2.0.6", + "@biomejs/biome": "2.3.1", "@playwright/test": "^1.52.0", "@remix-run/dev": "^2.16.8", "@remix-run/route-config": "^2.16.8",