= (args) => {
diff --git a/app/features/tournament/routes/to.$id.tsx b/app/features/tournament/routes/to.$id.tsx
index d16a821d0..4f6234e92 100644
--- a/app/features/tournament/routes/to.$id.tsx
+++ b/app/features/tournament/routes/to.$id.tsx
@@ -24,7 +24,7 @@ import {
} from "~/utils/urls";
import { metaTags } from "../../../utils/remix";
-import { type TournamentLoaderData, loader } from "../loaders/to.$id.server";
+import { loader, type TournamentLoaderData } from "../loaders/to.$id.server";
export { loader };
import "~/styles/calendar-event.css";
@@ -120,6 +120,7 @@ export function TournamentLayout() {
// this is nice to debug with tournament in browser console
if (process.env.NODE_ENV === "development") {
+ // biome-ignore lint/correctness/useHookAtTopLevel: process.env.NODE_ENV is a constant
React.useEffect(() => {
// @ts-expect-error for dev purposes
window.tourney = tournament;
diff --git a/app/features/tournament/tournament-utils.ts b/app/features/tournament/tournament-utils.ts
index dd720ff23..17ca7eb56 100644
--- a/app/features/tournament/tournament-utils.ts
+++ b/app/features/tournament/tournament-utils.ts
@@ -388,6 +388,9 @@ export function validateCanJoinTeam({
export function normalizedTeamCount({
teamsCount,
minMembersPerTeam,
-}: { teamsCount: number; minMembersPerTeam: number }) {
+}: {
+ teamsCount: number;
+ minMembersPerTeam: number;
+}) {
return teamsCount * minMembersPerTeam;
}
diff --git a/app/features/tournament/tournament.css b/app/features/tournament/tournament.css
index 8d03d5524..f66843a74 100644
--- a/app/features/tournament/tournament.css
+++ b/app/features/tournament/tournament.css
@@ -246,7 +246,6 @@
font-weight: var(--bold);
padding: var(--s-0-5) var(--s-2);
border-radius: var(--rounded);
- display: grid;
place-items: center;
width: max-content;
display: flex;
@@ -389,15 +388,6 @@
cursor: grab;
}
-.tournament__seeds__teams-list-row.sortable:hover:not(.disabled)
- .tournament__seeds__team-member {
- background-color: var(--bg-lighter-transparent);
-}
-
-.tournament__seeds__teams-list-row.active .tournament__seeds__team-member {
- background-color: var(--bg-lighter-transparent);
-}
-
.tournament__seeds__teams-list-row.active {
cursor: grabbing;
}
@@ -426,6 +416,10 @@
place-items: center;
}
+.tournament__seeds__teams-list-row.active .tournament__seeds__team-member {
+ background-color: var(--bg-lighter-transparent);
+}
+
.tournament__seeds__team-member__name {
grid-column: 1 / span 2;
font-weight: var(--semi-bold);
diff --git a/app/features/user-page/UserRepository.server.ts b/app/features/user-page/UserRepository.server.ts
index 7aff2696e..b73294c31 100644
--- a/app/features/user-page/UserRepository.server.ts
+++ b/app/features/user-page/UserRepository.server.ts
@@ -724,11 +724,10 @@ export function upsert(
.insertInto("User")
.values(args)
.onConflict((oc) => {
- const { discordId, ...rest } = args;
-
- return oc
- .column("discordId")
- .doUpdateSet({ ...rest, createdAt: databaseTimestampNow() });
+ return oc.column("discordId").doUpdateSet({
+ ...R.omit(args, ["discordId"]),
+ createdAt: databaseTimestampNow(),
+ });
})
.returning("id")
.executeTakeFirstOrThrow();
@@ -880,7 +879,10 @@ export function updateResultHighlights(args: UpdateResultHighlightsArgs) {
export function updateBuildSorting({
userId,
buildSorting,
-}: { userId: number; buildSorting: BuildSort[] | null }) {
+}: {
+ userId: number;
+ buildSorting: BuildSort[] | null;
+}) {
return db
.updateTable("User")
.set({ buildSorting: buildSorting ? JSON.stringify(buildSorting) : null })
diff --git a/app/features/user-page/actions/u.$identifier.edit.server.ts b/app/features/user-page/actions/u.$identifier.edit.server.ts
index 5f955dd2d..cef064d6a 100644
--- a/app/features/user-page/actions/u.$identifier.edit.server.ts
+++ b/app/features/user-page/actions/u.$identifier.edit.server.ts
@@ -1,7 +1,7 @@
import { type ActionFunction, redirect } from "@remix-run/node";
import { requireUserId } from "~/features/auth/core/user.server";
-import { clearTournamentDataCache } from "~/features/tournament-bracket/core/Tournament.server";
import * as TournamentTeamRepository from "~/features/tournament/TournamentTeamRepository.server";
+import { clearTournamentDataCache } from "~/features/tournament-bracket/core/Tournament.server";
import * as UserRepository from "~/features/user-page/UserRepository.server";
import { safeParseRequestFormData } from "~/utils/remix.server";
import { errorIsSqliteUniqueConstraintFailure } from "~/utils/sql";
diff --git a/app/features/user-page/actions/u.$identifier.results.highlights.server.ts b/app/features/user-page/actions/u.$identifier.results.highlights.server.ts
index f9f298961..0452f02f4 100644
--- a/app/features/user-page/actions/u.$identifier.results.highlights.server.ts
+++ b/app/features/user-page/actions/u.$identifier.results.highlights.server.ts
@@ -1,10 +1,10 @@
import { type ActionFunction, redirect } from "@remix-run/node";
import { requireUser } from "~/features/auth/core/user.server";
-import * as UserRepository from "~/features/user-page/UserRepository.server";
import {
HIGHLIGHT_CHECKBOX_NAME,
HIGHLIGHT_TOURNAMENT_CHECKBOX_NAME,
} from "~/features/user-page/components/UserResultsTable";
+import * as UserRepository from "~/features/user-page/UserRepository.server";
import { normalizeFormFieldArray } from "~/utils/arrays";
import { parseRequestPayload } from "~/utils/remix.server";
import { userResultsPage } from "~/utils/urls";
diff --git a/app/features/user-page/components/UserResultsTable.tsx b/app/features/user-page/components/UserResultsTable.tsx
index 0775194c5..ca2696938 100644
--- a/app/features/user-page/components/UserResultsTable.tsx
+++ b/app/features/user-page/components/UserResultsTable.tsx
@@ -88,7 +88,7 @@ export function UserResultsTable({
{result.teamName}
) : (
- <>{result.teamName}>
+ result.teamName
)}
|
diff --git a/app/features/user-page/routes/u.$identifier.admin.tsx b/app/features/user-page/routes/u.$identifier.admin.tsx
index cb889889c..0f276c206 100644
--- a/app/features/user-page/routes/u.$identifier.admin.tsx
+++ b/app/features/user-page/routes/u.$identifier.admin.tsx
@@ -1,21 +1,20 @@
import { useLoaderData } from "@remix-run/react";
import type { z } from "zod/v4";
import { Divider } from "~/components/Divider";
-import { FormWithConfirm } from "~/components/FormWithConfirm";
-import { Main } from "~/components/Main";
import { SendouButton } from "~/components/elements/Button";
import { SendouDialog } from "~/components/elements/Dialog";
+import { FormWithConfirm } from "~/components/FormWithConfirm";
import { SendouForm } from "~/components/form/SendouForm";
import { TextAreaFormField } from "~/components/form/TextAreaFormField";
import { PlusIcon } from "~/components/icons/Plus";
+import { Main } from "~/components/Main";
import { useUser } from "~/features/auth/core/user";
import { USER } from "~/features/user-page/user-page-constants";
import { addModNoteSchema } from "~/features/user-page/user-page-schemas";
import { databaseTimestampToDate } from "~/utils/dates";
-import styles from "./u.$identifier.admin.module.css";
-
import { action } from "../actions/u.$identifier.admin.server";
import { loader } from "../loaders/u.$identifier.admin.server";
+import styles from "./u.$identifier.admin.module.css";
export { loader, action };
export default function UserAdminPage() {
diff --git a/app/features/user-page/routes/u.$identifier.art.tsx b/app/features/user-page/routes/u.$identifier.art.tsx
index 7da9fa99b..7dbe4fb05 100644
--- a/app/features/user-page/routes/u.$identifier.art.tsx
+++ b/app/features/user-page/routes/u.$identifier.art.tsx
@@ -8,10 +8,9 @@ import { useSearchParamState } from "~/hooks/useSearchParamState";
import invariant from "~/utils/invariant";
import type { SendouRouteHandle } from "~/utils/remix.server";
import { newArtPage } from "~/utils/urls";
-import type { UserPageLoaderData } from "../loaders/u.$identifier.server";
-
import { action } from "../actions/u.$identifier.art.server";
import { loader } from "../loaders/u.$identifier.art.server";
+import type { UserPageLoaderData } from "../loaders/u.$identifier.server";
export { action, loader };
export const handle: SendouRouteHandle = {
diff --git a/app/features/user-page/routes/u.$identifier.builds.new.tsx b/app/features/user-page/routes/u.$identifier.builds.new.tsx
index c99b5c109..d82cdcb7c 100644
--- a/app/features/user-page/routes/u.$identifier.builds.new.tsx
+++ b/app/features/user-page/routes/u.$identifier.builds.new.tsx
@@ -8,25 +8,24 @@ import * as React from "react";
import { useTranslation } from "react-i18next";
import { AbilitiesSelector } from "~/components/AbilitiesSelector";
import { Alert } from "~/components/Alert";
+import { SendouButton } from "~/components/elements/Button";
import { FormMessage } from "~/components/FormMessage";
import { GearSelect } from "~/components/GearSelect";
import { Image } from "~/components/Image";
+import { CrossIcon } from "~/components/icons/Cross";
+import { PlusIcon } from "~/components/icons/Plus";
import { Label } from "~/components/Label";
import { Main } from "~/components/Main";
import { RequiredHiddenInput } from "~/components/RequiredHiddenInput";
import { SubmitButton } from "~/components/SubmitButton";
import { WeaponSelect } from "~/components/WeaponSelect";
-import { SendouButton } from "~/components/elements/Button";
-import { CrossIcon } from "~/components/icons/Cross";
-import { PlusIcon } from "~/components/icons/Plus";
import type { GearType } from "~/db/tables";
import {
validatedBuildFromSearchParams,
validatedWeaponIdFromSearchParams,
} from "~/features/build-analyzer";
import { BUILD } from "~/features/builds/builds-constants";
-import { modesShort } from "~/modules/in-game-lists/modes";
-import { rankedModesShort } from "~/modules/in-game-lists/modes";
+import { modesShort, rankedModesShort } from "~/modules/in-game-lists/modes";
import type {
BuildAbilitiesTupleWithUnknown,
MainWeaponId,
@@ -34,10 +33,9 @@ import type {
import invariant from "~/utils/invariant";
import type { SendouRouteHandle } from "~/utils/remix.server";
import { modeImageUrl } from "~/utils/urls";
-import type { UserPageLoaderData } from "../loaders/u.$identifier.server";
-
import { action } from "../actions/u.$identifier.builds.new.server";
import { loader } from "../loaders/u.$identifier.builds.new.server";
+import type { UserPageLoaderData } from "../loaders/u.$identifier.server";
export { loader, action };
export const handle: SendouRouteHandle = {
diff --git a/app/features/user-page/routes/u.$identifier.builds.tsx b/app/features/user-page/routes/u.$identifier.builds.tsx
index dc03f29c1..6ea33590e 100644
--- a/app/features/user-page/routes/u.$identifier.builds.tsx
+++ b/app/features/user-page/routes/u.$identifier.builds.tsx
@@ -3,16 +3,16 @@ import * as React from "react";
import { useTranslation } from "react-i18next";
import { AddNewButton } from "~/components/AddNewButton";
import { BuildCard } from "~/components/BuildCard";
-import { FormMessage } from "~/components/FormMessage";
-import { Image, WeaponImage } from "~/components/Image";
-import { SubmitButton } from "~/components/SubmitButton";
import { SendouButton } from "~/components/elements/Button";
import { SendouDialog } from "~/components/elements/Dialog";
import { SendouMenu, SendouMenuItem } from "~/components/elements/Menu";
+import { FormMessage } from "~/components/FormMessage";
+import { Image, WeaponImage } from "~/components/Image";
import { LockIcon } from "~/components/icons/Lock";
import { SortIcon } from "~/components/icons/Sort";
import { TrashIcon } from "~/components/icons/Trash";
import { UnlockIcon } from "~/components/icons/Unlock";
+import { SubmitButton } from "~/components/SubmitButton";
import { BUILD_SORT_IDENTIFIERS, type BuildSort } from "~/db/tables";
import { useUser } from "~/features/auth/core/user";
import { useSearchParamState } from "~/hooks/useSearchParamState";
@@ -21,14 +21,13 @@ import { mainWeaponIds } from "~/modules/in-game-lists/weapon-ids";
import { atOrError } from "~/utils/arrays";
import type { SendouRouteHandle } from "~/utils/remix.server";
import { userNewBuildPage, weaponCategoryUrl } from "~/utils/urls";
-import type { UserPageLoaderData } from "../loaders/u.$identifier.server";
-import { DEFAULT_BUILD_SORT } from "../user-page-constants";
-
import { action } from "../actions/u.$identifier.builds.server";
import {
- type UserBuildsPageData,
loader,
+ type UserBuildsPageData,
} from "../loaders/u.$identifier.builds.server";
+import type { UserPageLoaderData } from "../loaders/u.$identifier.server";
+import { DEFAULT_BUILD_SORT } from "../user-page-constants";
export { loader, action };
import styles from "./u.$identifier.builds.module.css";
diff --git a/app/features/user-page/routes/u.$identifier.edit.tsx b/app/features/user-page/routes/u.$identifier.edit.tsx
index 729a4feec..af614ca0b 100644
--- a/app/features/user-page/routes/u.$identifier.edit.tsx
+++ b/app/features/user-page/routes/u.$identifier.edit.tsx
@@ -3,19 +3,19 @@ import clsx from "clsx";
import * as React from "react";
import { Trans, useTranslation } from "react-i18next";
import { CustomizedColorsInput } from "~/components/CustomizedColorsInput";
+import { SendouButton } from "~/components/elements/Button";
+import { SendouSelect, SendouSelectItem } from "~/components/elements/Select";
+import { SendouSwitch } from "~/components/elements/Switch";
import { FormErrors } from "~/components/FormErrors";
import { FormMessage } from "~/components/FormMessage";
import { WeaponImage } from "~/components/Image";
import { Input } from "~/components/Input";
-import { Label } from "~/components/Label";
-import { SubmitButton } from "~/components/SubmitButton";
-import { WeaponSelect } from "~/components/WeaponSelect";
-import { SendouButton } from "~/components/elements/Button";
-import { SendouSelect, SendouSelectItem } from "~/components/elements/Select";
-import { SendouSwitch } from "~/components/elements/Switch";
import { StarIcon } from "~/components/icons/Star";
import { StarFilledIcon } from "~/components/icons/StarFilled";
import { TrashIcon } from "~/components/icons/Trash";
+import { Label } from "~/components/Label";
+import { SubmitButton } from "~/components/SubmitButton";
+import { WeaponSelect } from "~/components/WeaponSelect";
import type { Tables } from "~/db/tables";
import { BADGE } from "~/features/badges/badges-constants";
import { BadgesSelector } from "~/features/badges/components/BadgesSelector";
@@ -24,11 +24,10 @@ import { useHasRole } from "~/modules/permissions/hooks";
import invariant from "~/utils/invariant";
import { rawSensToString } from "~/utils/strings";
import { FAQ_PAGE } from "~/utils/urls";
-import type { UserPageLoaderData } from "../loaders/u.$identifier.server";
-import { COUNTRY_CODES, USER } from "../user-page-constants";
-
import { action } from "../actions/u.$identifier.edit.server";
import { loader } from "../loaders/u.$identifier.edit.server";
+import type { UserPageLoaderData } from "../loaders/u.$identifier.server";
+import { COUNTRY_CODES, USER } from "../user-page-constants";
export { loader, action };
import styles from "~/styles/u.$identifier.module.css";
@@ -358,7 +357,9 @@ function WeaponPoolSelect() {
function BioTextarea({
initialValue,
-}: { initialValue: Tables["User"]["bio"] }) {
+}: {
+ initialValue: Tables["User"]["bio"];
+}) {
const { t } = useTranslation("user");
const [value, setValue] = React.useState(initialValue ?? "");
diff --git a/app/features/user-page/routes/u.$identifier.index.tsx b/app/features/user-page/routes/u.$identifier.index.tsx
index 81f77eff4..0d731e796 100644
--- a/app/features/user-page/routes/u.$identifier.index.tsx
+++ b/app/features/user-page/routes/u.$identifier.index.tsx
@@ -2,10 +2,10 @@ import { Link, useLoaderData, useMatches } from "@remix-run/react";
import clsx from "clsx";
import { useTranslation } from "react-i18next";
import { Avatar } from "~/components/Avatar";
-import { Flag } from "~/components/Flag";
-import { Image, WeaponImage } from "~/components/Image";
import { SendouButton } from "~/components/elements/Button";
import { SendouPopover } from "~/components/elements/Popover";
+import { Flag } from "~/components/Flag";
+import { Image, WeaponImage } from "~/components/Image";
import { BattlefyIcon } from "~/components/icons/Battlefy";
import { BskyIcon } from "~/components/icons/Bsky";
import { DiscordIcon } from "~/components/icons/Discord";
@@ -25,9 +25,8 @@ import {
topSearchPlayerPage,
userSubmittedImage,
} from "~/utils/urls";
-import type { UserPageLoaderData } from "../loaders/u.$identifier.server";
-
import { loader } from "../loaders/u.$identifier.index.server";
+import type { UserPageLoaderData } from "../loaders/u.$identifier.server";
export { loader };
export const handle: SendouRouteHandle = {
diff --git a/app/features/user-page/routes/u.$identifier.results.tsx b/app/features/user-page/routes/u.$identifier.results.tsx
index 6a2f547b8..b78b8fcce 100644
--- a/app/features/user-page/routes/u.$identifier.results.tsx
+++ b/app/features/user-page/routes/u.$identifier.results.tsx
@@ -7,9 +7,8 @@ import { useSearchParamState } from "~/hooks/useSearchParamState";
import invariant from "~/utils/invariant";
import { userResultsEditHighlightsPage } from "~/utils/urls";
import { SendouButton } from "../../../components/elements/Button";
-import type { UserPageLoaderData } from "../loaders/u.$identifier.server";
-
import { loader } from "../loaders/u.$identifier.results.server";
+import type { UserPageLoaderData } from "../loaders/u.$identifier.server";
export { loader };
export default function UserResultsPage() {
diff --git a/app/features/user-page/routes/u.$identifier.seasons.tsx b/app/features/user-page/routes/u.$identifier.seasons.tsx
index e3eb87716..cb3a1ee7e 100644
--- a/app/features/user-page/routes/u.$identifier.seasons.tsx
+++ b/app/features/user-page/routes/u.$identifier.seasons.tsx
@@ -10,14 +10,6 @@ import * as React from "react";
import { useTranslation } from "react-i18next";
import { Avatar } from "~/components/Avatar";
import Chart from "~/components/Chart";
-import {
- ModeImage,
- StageImage,
- TierImage,
- WeaponImage,
-} from "~/components/Image";
-import { Pagination } from "~/components/Pagination";
-import { SubNav, SubNavLink } from "~/components/SubNav";
import { SendouButton } from "~/components/elements/Button";
import { SendouPopover } from "~/components/elements/Popover";
import {
@@ -26,7 +18,15 @@ import {
SendouTabPanel,
SendouTabs,
} from "~/components/elements/Tabs";
+import {
+ ModeImage,
+ StageImage,
+ TierImage,
+ WeaponImage,
+} from "~/components/Image";
import { AlertIcon } from "~/components/icons/Alert";
+import { Pagination } from "~/components/Pagination";
+import { SubNav, SubNavLink } from "~/components/SubNav";
import { TopTenPlayer } from "~/features/leaderboards/components/TopTenPlayer";
import { playerTopTenPlacement } from "~/features/leaderboards/leaderboards-utils";
import * as Seasons from "~/features/mmr/core/Seasons";
@@ -41,7 +41,7 @@ import { databaseTimestampToDate } from "~/utils/dates";
import invariant from "~/utils/invariant";
import { cutToNDecimalPlaces, roundToNDecimalPlaces } from "~/utils/number";
import type { SendouRouteHandle } from "~/utils/remix.server";
-import { TIERS_PAGE, sendouQMatchPage, userSeasonsPage } from "~/utils/urls";
+import { sendouQMatchPage, TIERS_PAGE, userSeasonsPage } from "~/utils/urls";
import { loader } from "../loaders/u.$identifier.seasons.server";
import type { UserPageLoaderData } from "../loaders/u.$identifier.server";
diff --git a/app/features/user-page/routes/u.$identifier.tsx b/app/features/user-page/routes/u.$identifier.tsx
index 6a0ab5579..a92a2854e 100644
--- a/app/features/user-page/routes/u.$identifier.tsx
+++ b/app/features/user-page/routes/u.$identifier.tsx
@@ -8,8 +8,8 @@ import { useHasRole } from "~/modules/permissions/hooks";
import { metaTags } from "~/utils/remix";
import type { SendouRouteHandle } from "~/utils/remix.server";
import {
- USER_SEARCH_PAGE,
navIconUrl,
+ USER_SEARCH_PAGE,
userAdminPage,
userArtPage,
userBuildsPage,
@@ -21,8 +21,8 @@ import {
} from "~/utils/urls";
import {
- type UserPageLoaderData,
loader,
+ type UserPageLoaderData,
} from "../loaders/u.$identifier.server";
export { loader };
diff --git a/app/features/user-search/routes/u.tsx b/app/features/user-search/routes/u.tsx
index 0f3513632..8d4c3b15e 100644
--- a/app/features/user-search/routes/u.tsx
+++ b/app/features/user-search/routes/u.tsx
@@ -4,18 +4,18 @@ import * as React from "react";
import { useTranslation } from "react-i18next";
import { useDebounce } from "react-use";
import { Avatar } from "~/components/Avatar";
-import { Input } from "~/components/Input";
-import { Main } from "~/components/Main";
import { SendouButton } from "~/components/elements/Button";
+import { Input } from "~/components/Input";
import { DiscordIcon } from "~/components/icons/Discord";
import { SearchIcon } from "~/components/icons/Search";
+import { Main } from "~/components/Main";
import { useUser } from "~/features/auth/core/user";
import { metaTags } from "~/utils/remix";
import type { SendouRouteHandle } from "~/utils/remix.server";
import {
LOG_IN_URL,
- USER_SEARCH_PAGE,
navIconUrl,
+ USER_SEARCH_PAGE,
userPage,
} from "~/utils/urls";
diff --git a/app/features/vods/actions/vods.$id.server.ts b/app/features/vods/actions/vods.$id.server.ts
index 0bc9739c7..5021f3f98 100644
--- a/app/features/vods/actions/vods.$id.server.ts
+++ b/app/features/vods/actions/vods.$id.server.ts
@@ -2,8 +2,8 @@ import { type ActionFunctionArgs, redirect } from "@remix-run/node";
import { requireUser } from "~/features/auth/core/user.server";
import { badRequestIfFalsy, unauthorizedIfFalsy } from "~/utils/remix.server";
import { userVodsPage } from "~/utils/urls";
-import * as VodRepository from "../VodRepository.server";
import { findVodById } from "../queries/findVodById.server";
+import * as VodRepository from "../VodRepository.server";
import { canEditVideo } from "../vods-utils";
export const action = async ({ request, params }: ActionFunctionArgs) => {
diff --git a/app/features/vods/routes/vods.$id.tsx b/app/features/vods/routes/vods.$id.tsx
index dda8d9fed..fc99572a6 100644
--- a/app/features/vods/routes/vods.$id.tsx
+++ b/app/features/vods/routes/vods.$id.tsx
@@ -3,13 +3,13 @@ import { useLoaderData } from "@remix-run/react";
import clsx from "clsx";
import * as React from "react";
import { useTranslation } from "react-i18next";
+import { LinkButton } from "~/components/elements/Button";
import { FormWithConfirm } from "~/components/FormWithConfirm";
import { Image, WeaponImage } from "~/components/Image";
-import { Main } from "~/components/Main";
-import { YouTubeEmbed } from "~/components/YouTubeEmbed";
-import { LinkButton } from "~/components/elements/Button";
import { EditIcon } from "~/components/icons/Edit";
import { TrashIcon } from "~/components/icons/Trash";
+import { Main } from "~/components/Main";
+import { YouTubeEmbed } from "~/components/YouTubeEmbed";
import { useUser } from "~/features/auth/core/user";
import { useIsMounted } from "~/hooks/useIsMounted";
import { useSearchParamState } from "~/hooks/useSearchParamState";
@@ -18,20 +18,19 @@ import { metaTags } from "~/utils/remix";
import type { SendouRouteHandle } from "~/utils/remix.server";
import type { Unpacked } from "~/utils/types";
import {
- VODS_PAGE,
modeImageUrl,
navIconUrl,
newVodPage,
stageImageUrl,
+ VODS_PAGE,
vodVideoPage,
} from "~/utils/urls";
import { SendouButton } from "../../../components/elements/Button";
+import { action } from "../actions/vods.$id.server";
import { PovUser } from "../components/VodPov";
+import { loader } from "../loaders/vods.$id.server";
import type { Vod } from "../vods-types";
import { canEditVideo, secondsToHoursMinutesSecondString } from "../vods-utils";
-
-import { action } from "../actions/vods.$id.server";
-import { loader } from "../loaders/vods.$id.server";
export { loader, action };
import "../vods.css";
diff --git a/app/features/vods/routes/vods.new.tsx b/app/features/vods/routes/vods.new.tsx
index 07d19adb2..e405943b1 100644
--- a/app/features/vods/routes/vods.new.tsx
+++ b/app/features/vods/routes/vods.new.tsx
@@ -8,14 +8,14 @@ import {
} from "react-hook-form";
import { useTranslation } from "react-i18next";
import type { z } from "zod/v4";
+import { SendouButton } from "~/components/elements/Button";
+import { UserSearch } from "~/components/elements/UserSearch";
import { FormMessage } from "~/components/FormMessage";
+import { AddFieldButton } from "~/components/form/AddFieldButton";
+import { RemoveFieldButton } from "~/components/form/RemoveFieldButton";
import { Label } from "~/components/Label";
import { Main } from "~/components/Main";
import { WeaponSelect } from "~/components/WeaponSelect";
-import { SendouButton } from "~/components/elements/Button";
-import { UserSearch } from "~/components/elements/UserSearch";
-import { AddFieldButton } from "~/components/form/AddFieldButton";
-import { RemoveFieldButton } from "~/components/form/RemoveFieldButton";
import type { Tables } from "~/db/tables";
import { modesShort } from "~/modules/in-game-lists/modes";
import { stageIds } from "~/modules/in-game-lists/stage-ids";
@@ -26,11 +26,10 @@ import { DateFormField } from "../../../components/form/DateFormField";
import { InputFormField } from "../../../components/form/InputFormField";
import { SelectFormField } from "../../../components/form/SelectFormField";
import { SendouForm } from "../../../components/form/SendouForm";
-import { videoMatchTypes } from "../vods-constants";
-import { videoInputSchema } from "../vods-schemas";
-
import { action } from "../actions/vods.new.server";
import { loader } from "../loaders/vods.new.server";
+import { videoMatchTypes } from "../vods-constants";
+import { videoInputSchema } from "../vods-schemas";
export { action, loader };
export const handle: SendouRouteHandle = {
@@ -216,7 +215,9 @@ function PovFormField() {
function MatchesFormfield({
videoType,
-}: { videoType: Tables["Video"]["type"] }) {
+}: {
+ videoType: Tables["Video"]["type"];
+}) {
const {
formState: { errors },
} = useFormContext();
diff --git a/app/features/vods/routes/vods.tsx b/app/features/vods/routes/vods.tsx
index 5f41fa399..5d29ba569 100644
--- a/app/features/vods/routes/vods.tsx
+++ b/app/features/vods/routes/vods.tsx
@@ -2,20 +2,19 @@ import type { MetaFunction } from "@remix-run/node";
import { useLoaderData, useSearchParams } from "@remix-run/react";
import { useTranslation } from "react-i18next";
import { AddNewButton } from "~/components/AddNewButton";
+import { SendouButton } from "~/components/elements/Button";
import { Label } from "~/components/Label";
import { Main } from "~/components/Main";
import { WeaponSelect } from "~/components/WeaponSelect";
-import { SendouButton } from "~/components/elements/Button";
import { modesShort } from "~/modules/in-game-lists/modes";
import { stageIds } from "~/modules/in-game-lists/stage-ids";
import { mainWeaponIds } from "~/modules/in-game-lists/weapon-ids";
import { metaTags } from "~/utils/remix";
import type { SendouRouteHandle } from "~/utils/remix.server";
-import { VODS_PAGE, navIconUrl, newVodPage } from "~/utils/urls";
+import { navIconUrl, newVodPage, VODS_PAGE } from "~/utils/urls";
import { VodListing } from "../components/VodListing";
-import { VODS_PAGE_BATCH_SIZE, videoMatchTypes } from "../vods-constants";
-
import { loader } from "../loaders/vods.server";
+import { VODS_PAGE_BATCH_SIZE, videoMatchTypes } from "../vods-constants";
export { loader };
import "../vods.css";
diff --git a/app/features/vods/vods-utils.ts b/app/features/vods/vods-utils.ts
index b02c8a7ac..781a0b23d 100644
--- a/app/features/vods/vods-utils.ts
+++ b/app/features/vods/vods-utils.ts
@@ -52,7 +52,7 @@ export function canEditVideo({
export function extractYoutubeIdFromVideoUrl(url: string): string | null {
const match = url.match(
- /^(?:https?:\/\/)?(?:www\.)?(?:youtube\.com\/(?:watch\?v=|live\/)|youtu\.be\/)([^&\/\?]+)/,
+ /^(?:https?:\/\/)?(?:www\.)?(?:youtube\.com\/(?:watch\?v=|live\/)|youtu\.be\/)([^&/?]+)/,
);
return match ? match[1] : null;
}
diff --git a/app/hooks/swr.ts b/app/hooks/swr.ts
index cff67e9b7..b056927c3 100644
--- a/app/hooks/swr.ts
+++ b/app/hooks/swr.ts
@@ -3,10 +3,11 @@ import type { PatronsListLoaderData } from "~/features/front-page/routes/patrons
import type { TrustersLoaderData } from "~/features/sendouq/routes/trusters";
import type { WeaponUsageLoaderData } from "~/features/sendouq/routes/weapon-usage";
import type { ModeShort, StageId } from "~/modules/in-game-lists/types";
+import { logger } from "~/utils/logger";
import {
GET_TRUSTERS_ROUTE,
- PATRONS_LIST_ROUTE,
getWeaponUsage,
+ PATRONS_LIST_ROUTE,
} from "~/utils/urls";
// TODO: replace with useFetcher after proper errr handling is implemented https://github.com/remix-run/react-router/discussions/10013
@@ -14,7 +15,7 @@ import {
const fetcher = (key: string) => async (url: string) => {
const res = await fetch(url);
if (res.status !== 200) {
- console.error(`swr error ${key}: status code ${res.status}`);
+ logger.error(`swr error ${key}: status code ${res.status}`);
throw new Error("fetching failed");
}
return res.json();
diff --git a/app/hooks/useAutoRerender.ts b/app/hooks/useAutoRerender.ts
index a8a7af0ee..4513bca62 100644
--- a/app/hooks/useAutoRerender.ts
+++ b/app/hooks/useAutoRerender.ts
@@ -2,13 +2,13 @@ import * as React from "react";
/** Forces the component to rerender periodically*/
export function useAutoRerender(every?: "second" | "ten seconds") {
- const [, setNow] = React.useState(new Date().getTime());
+ const [, setNow] = React.useState(Date.now());
React.useEffect(() => {
const intervalTime = !every || every === "second" ? 1000 : 10000;
const interval = setInterval(() => {
- setNow(new Date().getTime());
+ setNow(Date.now());
}, intervalTime);
return () => {
diff --git a/app/modules/brackets-manager/create.ts b/app/modules/brackets-manager/create.ts
index c84ca35ab..600a1ac6f 100644
--- a/app/modules/brackets-manager/create.ts
+++ b/app/modules/brackets-manager/create.ts
@@ -3,8 +3,8 @@ import type {
InputStage,
Match,
Round,
- SeedOrdering,
Seeding,
+ SeedOrdering,
Stage,
} from "~/modules/brackets-model";
import type { BracketsManager } from ".";
diff --git a/app/modules/brackets-manager/helpers.ts b/app/modules/brackets-manager/helpers.ts
index 006ac1ac9..e856ae160 100644
--- a/app/modules/brackets-manager/helpers.ts
+++ b/app/modules/brackets-manager/helpers.ts
@@ -6,8 +6,8 @@ import type {
ParticipantResult,
Result,
RoundRobinMode,
- SeedOrdering,
Seeding,
+ SeedOrdering,
Stage,
StageType,
} from "~/modules/brackets-model";
diff --git a/app/modules/brackets-manager/manager.ts b/app/modules/brackets-manager/manager.ts
index f249d9160..53ef59c18 100644
--- a/app/modules/brackets-manager/manager.ts
+++ b/app/modules/brackets-manager/manager.ts
@@ -5,8 +5,8 @@ import * as helpers from "./helpers";
import { Reset } from "./reset";
import type {
CrudInterface,
- DataTypes,
Database,
+ DataTypes,
Storage,
Table,
} from "./types";
diff --git a/app/modules/brackets-memory-db/index.ts b/app/modules/brackets-memory-db/index.ts
index 03020455e..d09cc3d96 100644
--- a/app/modules/brackets-memory-db/index.ts
+++ b/app/modules/brackets-memory-db/index.ts
@@ -76,7 +76,7 @@ export class InMemoryDatabase implements CrudInterface {
// @ts-expect-error imported
this.data[table].push({ id, ...values });
}
- } catch (error) {
+ } catch {
return -1;
}
return id;
@@ -93,7 +93,7 @@ export class InMemoryDatabase implements CrudInterface {
this.data[table].push({ id: id++, ...object });
}
}
- } catch (error) {
+ } catch {
return false;
}
@@ -141,7 +141,7 @@ export class InMemoryDatabase implements CrudInterface {
return this.data[table]
.filter(this.makeFilter(arg))
.map((val) => structuredClone(val));
- } catch (error) {
+ } catch {
return null;
}
}
@@ -190,7 +190,7 @@ export class InMemoryDatabase implements CrudInterface {
// @ts-expect-error imported
this.data[table][arg] = value;
return true;
- } catch (error) {
+ } catch {
return false;
}
}
diff --git a/app/modules/brackets-model/index.ts b/app/modules/brackets-model/index.ts
index 98a67c038..78c2505d4 100644
--- a/app/modules/brackets-model/index.ts
+++ b/app/modules/brackets-model/index.ts
@@ -1,4 +1,4 @@
-export * from "./unions";
export * from "./input";
-export * from "./storage";
export * from "./other";
+export * from "./storage";
+export * from "./unions";
diff --git a/app/modules/responsive-masonry/components/ResponsiveMasonry.tsx b/app/modules/responsive-masonry/components/ResponsiveMasonry.tsx
index c1abf6233..5035e2a04 100644
--- a/app/modules/responsive-masonry/components/ResponsiveMasonry.tsx
+++ b/app/modules/responsive-masonry/components/ResponsiveMasonry.tsx
@@ -14,7 +14,9 @@ const useBreakpoint = createBreakpoint({ L: 900, M: 750, S: 350 });
const MasonryResponsive = ({
children,
-}: { children: React.ReactNode | React.ReactNode[] }) => {
+}: {
+ children: React.ReactNode | React.ReactNode[];
+}) => {
const breakpoint = useBreakpoint() as "L" | "M" | "S";
const columnsCount = COLUMN_COUNTS[breakpoint];
diff --git a/app/modules/tournament-map-list-generator/generation.test.ts b/app/modules/tournament-map-list-generator/generation.test.ts
index b51a14059..e9d621973 100644
--- a/app/modules/tournament-map-list-generator/generation.test.ts
+++ b/app/modules/tournament-map-list-generator/generation.test.ts
@@ -1,8 +1,8 @@
import { describe, expect, test } from "vitest";
import { MapPool } from "~/features/map-list-generator/core/map-pool";
-import { createTournamentMapList } from ".";
import { rankedModesShort } from "../in-game-lists/modes";
import type { RankedModeShort } from "../in-game-lists/types";
+import { createTournamentMapList } from ".";
import { DEFAULT_MAP_POOL } from "./constants";
import type { TournamentMaplistInput } from "./types";
diff --git a/app/modules/tournament-map-list-generator/index.ts b/app/modules/tournament-map-list-generator/index.ts
index 426ceb0ac..6e2cd0cd0 100644
--- a/app/modules/tournament-map-list-generator/index.ts
+++ b/app/modules/tournament-map-list-generator/index.ts
@@ -1,9 +1,9 @@
+export { sourceTypes } from "./constants";
export { createTournamentMapList } from "./tournament-map-list";
export type {
BracketType,
+ TournamentMapListMap,
TournamentMaplistInput,
TournamentMaplistSource,
- TournamentMapListMap,
} from "./types";
-export { sourceTypes } from "./constants";
export { seededRandom } from "./utils";
diff --git a/app/modules/tournament-map-list-generator/starter-map.ts b/app/modules/tournament-map-list-generator/starter-map.ts
index 612a53071..05b9c77e6 100644
--- a/app/modules/tournament-map-list-generator/starter-map.ts
+++ b/app/modules/tournament-map-list-generator/starter-map.ts
@@ -4,13 +4,13 @@
import { stageIds } from "~/modules/in-game-lists/stage-ids";
import { logger } from "~/utils/logger";
-import {
- type TournamentMapListMap,
- type TournamentMaplistInput,
- seededRandom,
-} from ".";
import { modesShort } from "../in-game-lists/modes";
import type { ModeWithStage } from "../in-game-lists/types";
+import {
+ seededRandom,
+ type TournamentMapListMap,
+ type TournamentMaplistInput,
+} from ".";
type StarterMapArgs = Pick<
TournamentMaplistInput,
diff --git a/app/modules/twitch/streams.ts b/app/modules/twitch/streams.ts
index 9c932d58a..1a51de63c 100644
--- a/app/modules/twitch/streams.ts
+++ b/app/modules/twitch/streams.ts
@@ -1,5 +1,6 @@
import { cachified } from "@epic-web/cachified";
import { cache } from "~/utils/cache.server";
+import { logger } from "~/utils/logger";
import type { Unpacked } from "~/utils/types";
import { type RawStream, type StreamsResponse, streamsSchema } from "./schemas";
import { getToken, purgeCachedToken } from "./token";
@@ -86,7 +87,7 @@ export async function getStreams() {
return result;
} catch (e) {
- console.error(e);
+ logger.error(e);
return [];
}
}
@@ -107,7 +108,7 @@ async function getAllStreams() {
const result: RawStream[] = [];
- let cursor: string | undefined = undefined;
+ let cursor: string | undefined;
let count = 0;
while (true) {
if (count === 50) {
diff --git a/app/root.tsx b/app/root.tsx
index ca141034d..7159fb0b6 100644
--- a/app/root.tsx
+++ b/app/root.tsx
@@ -21,8 +21,7 @@ import {
import generalI18next from "i18next";
import NProgress from "nprogress";
import * as React from "react";
-import { I18nProvider } from "react-aria-components";
-import { RouterProvider } from "react-aria-components";
+import { I18nProvider, RouterProvider } from "react-aria-components";
import { ErrorBoundary as ClientErrorBoundary } from "react-error-boundary";
import { useTranslation } from "react-i18next";
import type { NavigateOptions } from "react-router-dom";
@@ -38,10 +37,10 @@ import { Ramp } from "./components/ramp/Ramp";
import { getUser } from "./features/auth/core/user.server";
import { userIsBanned } from "./features/ban/core/banned.server";
import {
+ isTheme,
Theme,
ThemeHead,
ThemeProvider,
- isTheme,
useTheme,
} from "./features/theme/core/provider";
import { getThemeSession } from "./features/theme/core/session.server";
diff --git a/app/routes.ts b/app/routes.ts
index 110c8a767..35ef4602c 100644
--- a/app/routes.ts
+++ b/app/routes.ts
@@ -1,7 +1,7 @@
import {
- type RouteConfig,
index,
prefix,
+ type RouteConfig,
route,
} from "@remix-run/route-config";
diff --git a/app/routines/notifyCheckInStart.ts b/app/routines/notifyCheckInStart.ts
index 6034d67d6..9adcd765e 100644
--- a/app/routines/notifyCheckInStart.ts
+++ b/app/routines/notifyCheckInStart.ts
@@ -1,6 +1,6 @@
import { notify } from "../features/notifications/core/notify.server";
-import { tournamentDataCached } from "../features/tournament-bracket/core/Tournament.server";
import * as TournamentRepository from "../features/tournament/TournamentRepository.server";
+import { tournamentDataCached } from "../features/tournament-bracket/core/Tournament.server";
import { logger } from "../utils/logger";
import { Routine } from "./routine.server";
diff --git a/app/routines/notifyPlusServerVoting.ts b/app/routines/notifyPlusServerVoting.ts
index 6a275855e..ccaf02eda 100644
--- a/app/routines/notifyPlusServerVoting.ts
+++ b/app/routines/notifyPlusServerVoting.ts
@@ -1,6 +1,6 @@
import * as Seasons from "../features/mmr/core/Seasons";
-import * as NotificationRepository from "../features/notifications/NotificationRepository.server";
import { notify } from "../features/notifications/core/notify.server";
+import * as NotificationRepository from "../features/notifications/NotificationRepository.server";
import { isVotingActive } from "../features/plus-voting/core";
import * as UserRepository from "../features/user-page/UserRepository.server";
import { Routine } from "./routine.server";
diff --git a/app/routines/notifySeasonStart.ts b/app/routines/notifySeasonStart.ts
index 3e580a481..687f42106 100644
--- a/app/routines/notifySeasonStart.ts
+++ b/app/routines/notifySeasonStart.ts
@@ -1,8 +1,8 @@
import { add } from "date-fns";
import * as Seasons from "../features/mmr/core/Seasons";
import { userSkills } from "../features/mmr/tiered.server";
-import * as NotificationRepository from "../features/notifications/NotificationRepository.server";
import { notify } from "../features/notifications/core/notify.server";
+import * as NotificationRepository from "../features/notifications/NotificationRepository.server";
import { Routine } from "./routine.server";
export const NotifySeasonStartRoutine = new Routine({
diff --git a/app/styles/common.css b/app/styles/common.css
index 50865fb08..1f37b4ef9 100644
--- a/app/styles/common.css
+++ b/app/styles/common.css
@@ -1,3 +1,4 @@
+/** biome-ignore-all lint/style/noDescendingSpecificity: Biome v2 migration */
*,
*::before,
*::after {
@@ -1248,7 +1249,9 @@ html[dir="rtl"] .fix-rtl {
width: var(--map-width);
border: none;
background-color: transparent;
- transition: filter, opacity 0.2s;
+ transition:
+ filter,
+ opacity 0.2s;
border-radius: var(--rounded);
}
diff --git a/app/styles/elements.css b/app/styles/elements.css
index 70432d33d..fe3152a10 100644
--- a/app/styles/elements.css
+++ b/app/styles/elements.css
@@ -56,10 +56,6 @@
outline: none;
}
-.react-aria-DatePicker .react-aria-Button[data-focused] svg {
- fill: var(--theme);
-}
-
.react-aria-DatePicker svg {
fill: var(--input-icon);
width: 17.5px;
@@ -98,6 +94,10 @@
width: 27.5px;
}
+.react-aria-DatePicker .react-aria-Button[data-focused] svg {
+ fill: var(--theme);
+}
+
.react-aria-CalendarGrid {
width: 100%;
}
diff --git a/app/styles/front.css b/app/styles/front.css
index 1dc12961c..8277e4565 100644
--- a/app/styles/front.css
+++ b/app/styles/front.css
@@ -32,7 +32,6 @@
.front-page__side-nav__log-out {
display: flex;
- color: var(--text);
font-size: var(--fonts-xs);
font-weight: var(--bold);
gap: var(--s-1-5);
@@ -43,7 +42,6 @@
.front-page__side-nav__log-out svg {
background-color: var(--bg-lightest);
border-radius: var(--rounded);
- padding: var(--s-1);
min-width: 28px;
margin-inline-end: 0 !important;
padding: var(--s-1-5);
diff --git a/app/utils/Test.ts b/app/utils/Test.ts
index 02f5169ce..cf015c9b6 100644
--- a/app/utils/Test.ts
+++ b/app/utils/Test.ts
@@ -64,7 +64,10 @@ export function wrappedLoader({
return async ({
user,
params = {},
- }: { user?: "admin" | "regular"; params?: Params } = {}) => {
+ }: {
+ user?: "admin" | "regular";
+ params?: Params;
+ } = {}) => {
const request = new Request("http://app.com/path", {
method: "GET",
headers: await authHeader(user),
diff --git a/app/utils/fetch.ts b/app/utils/fetch.ts
index dfe5e6bbc..21410d136 100644
--- a/app/utils/fetch.ts
+++ b/app/utils/fetch.ts
@@ -1,3 +1,5 @@
+import { logger } from "./logger";
+
// https://stackoverflow.com/a/50101022
export async function fetchWithTimeout(
input: RequestInfo | URL,
@@ -7,7 +9,7 @@ export async function fetchWithTimeout(
const controller = new AbortController();
const timeoutId = setTimeout(() => {
controller.abort();
- console.error("Fetch timed out");
+ logger.error("Fetch timed out");
}, timeout);
const response = await fetch(input, { signal: controller.signal, ...init });
diff --git a/app/utils/json.ts b/app/utils/json.ts
index 98b121cd0..a9b38ef1d 100644
--- a/app/utils/json.ts
+++ b/app/utils/json.ts
@@ -1,7 +1,7 @@
export function safeJSONParse(json: string, defaultValue: T): T {
try {
return JSON.parse(json);
- } catch (e) {
+ } catch {
return defaultValue;
}
}
diff --git a/app/utils/kysely.server.ts b/app/utils/kysely.server.ts
index c35964bbb..f82f0a4d8 100644
--- a/app/utils/kysely.server.ts
+++ b/app/utils/kysely.server.ts
@@ -26,7 +26,7 @@ export function unJsonify(value: T) {
return value;
}
- if (value.match(/^[\[\{]/) === null) {
+ if (value.match(/^[[{]/) === null) {
return value;
}
diff --git a/app/utils/logger.ts b/app/utils/logger.ts
index 38b67897d..667eb0b83 100644
--- a/app/utils/logger.ts
+++ b/app/utils/logger.ts
@@ -1,4 +1,4 @@
-// stub file to enable different solution later
+/** biome-ignore-all lint/suspicious/noConsole: stub file to enable different solution later */
export const logger = {
info: console.log,
diff --git a/app/utils/playwright.ts b/app/utils/playwright.ts
index be80c2c1c..16632d2fd 100644
--- a/app/utils/playwright.ts
+++ b/app/utils/playwright.ts
@@ -1,4 +1,4 @@
-import { type Locator, type Page, expect } from "@playwright/test";
+import { expect, type Locator, type Page } from "@playwright/test";
import { ADMIN_ID } from "~/features/admin/admin-constants";
import type { SeedVariation } from "~/features/api-private/routes/seed";
import { tournamentBracketsPage } from "./urls";
diff --git a/app/utils/remix.server.ts b/app/utils/remix.server.ts
index f11c3d4e6..112cb848a 100644
--- a/app/utils/remix.server.ts
+++ b/app/utils/remix.server.ts
@@ -1,8 +1,9 @@
-import { json, redirect } from "@remix-run/node";
import {
unstable_composeUploadHandlers as composeUploadHandlers,
unstable_createMemoryUploadHandler as createMemoryUploadHandler,
+ json,
unstable_parseMultipartFormData as parseMultipartFormData,
+ redirect,
} from "@remix-run/node";
import type { Params, UIMatch } from "@remix-run/react";
import type { Namespace, TFunction } from "i18next";
diff --git a/app/utils/strings.ts b/app/utils/strings.ts
index 4784bbe54..60aac7e53 100644
--- a/app/utils/strings.ts
+++ b/app/utils/strings.ts
@@ -83,14 +83,14 @@ export function removeMarkdown(value: string) {
// Remove HTML tags
.replace(htmlReplaceRegex, "")
// Remove setext-style headers
- .replace(/^[=\-]{2,}\s*$/g, "")
+ .replace(/^[=-]{2,}\s*$/g, "")
// Remove footnotes?
- .replace(/\[\^.+?\](\: .*?$)?/g, "")
+ .replace(/\[\^.+?\](: .*?$)?/g, "")
.replace(/\s{0,2}\[.*?\]: .*?$/g, "")
// Remove images
- .replace(/\!\[(.*?)\][\[\(].*?[\]\)]/g, "")
+ .replace(/!\[(.*?)\][[(].*?[\])]/g, "")
// Remove inline links
- .replace(/\[([^\]]*?)\][\[\(].*?[\]\)]/g, "$2")
+ .replace(/\[([^\]]*?)\][[(].*?[\])]/g, "$2")
// Remove blockquotes
.replace(/^(\n)?\s{0,3}>\s?/gm, "$1")
// Remove reference-style links?
@@ -98,7 +98,7 @@ export function removeMarkdown(value: string) {
// Remove headers
.replaceAll("#", "")
// Remove * emphasis
- .replace(/([\*]+)(\S)(.*?\S)??\1/g, "$2$3")
+ .replace(/([*]+)(\S)(.*?\S)??\1/g, "$2$3")
// Remove _ emphasis. Unlike *, _ emphasis gets rendered only if
// 1. Either there is a whitespace character before opening _ and after closing _.
// 2. Or _ is at the start/end of the string.
diff --git a/app/utils/types.ts b/app/utils/types.ts
index 3cab1748d..af44a4ee1 100644
--- a/app/utils/types.ts
+++ b/app/utils/types.ts
@@ -13,8 +13,7 @@ export function assertUnreachable(x: never): never {
}
/** @link https://stackoverflow.com/a/69413184 */
-// @ts-expect-error helper to assert type to be another compile time
-export const assertType = () => {};
+export const assertType = () => {};
export type Unpacked = T extends (infer U)[]
? U
diff --git a/app/utils/urls.ts b/app/utils/urls.ts
index a43989cb0..fc0024bb7 100644
--- a/app/utils/urls.ts
+++ b/app/utils/urls.ts
@@ -8,12 +8,13 @@ import type { MapPool } from "~/features/map-list-generator/core/map-pool";
import type { StageBackgroundStyle } from "~/features/map-planner";
import type { TierName } from "~/features/mmr/mmr-constants";
import { JOIN_CODE_SEARCH_PARAM_KEY } from "~/features/sendouq/q-constants";
-import type { BrandId, ModeShort } from "~/modules/in-game-lists/types";
import type {
Ability,
AbilityWithUnknown,
+ BrandId,
BuildAbilitiesTupleWithUnknown,
MainWeaponId,
+ ModeShort,
ModeShortWithSpecial,
SpecialWeaponId,
StageId,
@@ -247,7 +248,10 @@ export const badgePage = (badgeId: number) => `${BADGES_PAGE}/${badgeId}`;
export const plusSuggestionPage = ({
tier,
showAlert,
-}: { tier?: string | number; showAlert?: boolean } = {}) => {
+}: {
+ tier?: string | number;
+ showAlert?: boolean;
+} = {}) => {
const params = new URLSearchParams();
if (tier) {
params.set("tier", String(tier));
@@ -371,7 +375,10 @@ export const tournamentStreamsPage = (tournamentId: number) => {
export const tournamentOrganizationPage = ({
organizationSlug,
tournamentName,
-}: { organizationSlug: string; tournamentName?: string }) =>
+}: {
+ organizationSlug: string;
+ tournamentName?: string;
+}) =>
`/org/${organizationSlug}${tournamentName ? `?source=${decodeURIComponent(tournamentName)}` : ""}`;
export const tournamentOrganizationEditPage = (organizationSlug: string) =>
`${tournamentOrganizationPage({ organizationSlug })}/edit`;
diff --git a/app/utils/zod.ts b/app/utils/zod.ts
index 7aff2e0a0..6c032cdaf 100644
--- a/app/utils/zod.ts
+++ b/app/utils/zod.ts
@@ -144,7 +144,7 @@ export function safeJSONParse(value: unknown): unknown {
if (typeof value !== "string") return value;
const parsedValue = z.string().parse(value);
return JSON.parse(parsedValue);
- } catch (e) {
+ } catch {
return undefined;
}
}
diff --git a/biome.json b/biome.json
index a0a1194a4..5fee539ba 100644
--- a/biome.json
+++ b/biome.json
@@ -1,11 +1,12 @@
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"files": {
- "ignore": [
- "./scripts/dicts/**/*",
- "./scripts/output/**/*",
- "./app/db/seed/placements.json",
- "./build/**/*"
+ "includes": [
+ "**",
+ "!scripts/dicts/**/*",
+ "!scripts/output/**/*",
+ "!app/db/seed/placements.json",
+ "!build/**/*"
]
},
"linter": {
@@ -13,7 +14,7 @@
"suspicious": {
"noExplicitAny": "off",
"noArrayIndexKey": "off",
- "noConsoleLog": "error"
+ "noConsole": { "level": "error" }
},
"style": {
"noNonNullAssertion": "off",
@@ -28,7 +29,16 @@
"useTemplate": {
"fix": "safe",
"level": "error"
- }
+ },
+ "noParameterAssign": "error",
+ "useAsConstAssertion": "error",
+ "useDefaultParameterLast": "error",
+ "useEnumInitializers": "error",
+ "useSelfClosingElements": "error",
+ "useSingleVarDeclarator": "error",
+ "useNumberNamespace": "error",
+ "noInferrableTypes": "error",
+ "noUselessElse": "error"
},
"a11y": {
"useKeyWithClickEvents": "off",
@@ -39,6 +49,9 @@
"fix": "safe",
"level": "error"
}
+ },
+ "nursery": {
+ "useUniqueElementIds": "off"
}
}
},
diff --git a/e2e/builds.spec.ts b/e2e/builds.spec.ts
index 716aa5c00..a7f05ec36 100644
--- a/e2e/builds.spec.ts
+++ b/e2e/builds.spec.ts
@@ -1,4 +1,4 @@
-import { type Page, expect, test } from "@playwright/test";
+import { expect, type Page, test } from "@playwright/test";
import { NZAP_TEST_DISCORD_ID, NZAP_TEST_ID } from "~/db/seed/constants";
import type { GearType } from "~/db/tables";
import { ADMIN_DISCORD_ID } from "~/features/admin/admin-constants";
diff --git a/e2e/team.spec.ts b/e2e/team.spec.ts
index 3fa98a515..7f55d22b3 100644
--- a/e2e/team.spec.ts
+++ b/e2e/team.spec.ts
@@ -10,8 +10,8 @@ import {
submit,
} from "~/utils/playwright";
import {
- TEAM_SEARCH_PAGE,
editTeamPage,
+ TEAM_SEARCH_PAGE,
teamPage,
userPage,
} from "~/utils/urls";
diff --git a/e2e/tournament-bracket.spec.ts b/e2e/tournament-bracket.spec.ts
index ab9023df8..5e0383149 100644
--- a/e2e/tournament-bracket.spec.ts
+++ b/e2e/tournament-bracket.spec.ts
@@ -1,4 +1,4 @@
-import { type Page, expect, test } from "@playwright/test";
+import { expect, type Page, test } from "@playwright/test";
import { NZAP_TEST_ID } from "~/db/seed/constants";
import { ADMIN_DISCORD_ID } from "~/features/admin/admin-constants";
import {
diff --git a/e2e/user-page.spec.ts b/e2e/user-page.spec.ts
index 598114cdf..c97696211 100644
--- a/e2e/user-page.spec.ts
+++ b/e2e/user-page.spec.ts
@@ -1,4 +1,4 @@
-import { type Page, expect, test } from "@playwright/test";
+import { expect, type Page, test } from "@playwright/test";
import { NZAP_TEST_DISCORD_ID, NZAP_TEST_ID } from "~/db/seed/constants";
import { ADMIN_DISCORD_ID } from "~/features/admin/admin-constants";
import {
diff --git a/e2e/vods.spec.ts b/e2e/vods.spec.ts
index 53204930a..76777cac5 100644
--- a/e2e/vods.spec.ts
+++ b/e2e/vods.spec.ts
@@ -8,7 +8,7 @@ import {
selectWeapon,
submit,
} from "~/utils/playwright";
-import { VODS_PAGE, newVodPage, vodVideoPage } from "~/utils/urls";
+import { newVodPage, VODS_PAGE, vodVideoPage } from "~/utils/urls";
const chooseVideoDate = async (page: Page) => {
await page.getByTestId("open-calendar-button").click();
diff --git a/package-lock.json b/package-lock.json
index 331e54fd3..e6ec8ad40 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -63,7 +63,7 @@
"zod": "^3.25.61"
},
"devDependencies": {
- "@biomejs/biome": "1.9.4",
+ "@biomejs/biome": "2.0.4",
"@playwright/test": "^1.52.0",
"@remix-run/dev": "^2.16.5",
"@remix-run/route-config": "^2.16.5",
@@ -1470,11 +1470,10 @@
}
},
"node_modules/@biomejs/biome": {
- "version": "1.9.4",
- "resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-1.9.4.tgz",
- "integrity": "sha512-1rkd7G70+o9KkTn5KLmDYXihGoTaIGO9PIIN2ZB7UJxFrWw04CZHPYiMRjYsaDvVV7hP1dYNRLxSANLaBFGpog==",
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-2.0.4.tgz",
+ "integrity": "sha512-DNA++xe+E7UugTvI/HhzSFl6OwrVgU8SIV0Mb2fPtWPk2/oTr4eOSA5xy1JECrvgJeYxurmUBOS49qxv/OUkrQ==",
"dev": true,
- "hasInstallScript": true,
"license": "MIT OR Apache-2.0",
"bin": {
"biome": "bin/biome"
@@ -1487,20 +1486,20 @@
"url": "https://opencollective.com/biome"
},
"optionalDependencies": {
- "@biomejs/cli-darwin-arm64": "1.9.4",
- "@biomejs/cli-darwin-x64": "1.9.4",
- "@biomejs/cli-linux-arm64": "1.9.4",
- "@biomejs/cli-linux-arm64-musl": "1.9.4",
- "@biomejs/cli-linux-x64": "1.9.4",
- "@biomejs/cli-linux-x64-musl": "1.9.4",
- "@biomejs/cli-win32-arm64": "1.9.4",
- "@biomejs/cli-win32-x64": "1.9.4"
+ "@biomejs/cli-darwin-arm64": "2.0.4",
+ "@biomejs/cli-darwin-x64": "2.0.4",
+ "@biomejs/cli-linux-arm64": "2.0.4",
+ "@biomejs/cli-linux-arm64-musl": "2.0.4",
+ "@biomejs/cli-linux-x64": "2.0.4",
+ "@biomejs/cli-linux-x64-musl": "2.0.4",
+ "@biomejs/cli-win32-arm64": "2.0.4",
+ "@biomejs/cli-win32-x64": "2.0.4"
}
},
"node_modules/@biomejs/cli-darwin-arm64": {
- "version": "1.9.4",
- "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-1.9.4.tgz",
- "integrity": "sha512-bFBsPWrNvkdKrNCYeAp+xo2HecOGPAy9WyNyB/jKnnedgzl4W4Hb9ZMzYNbf8dMCGmUdSavlYHiR01QaYR58cw==",
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.0.4.tgz",
+ "integrity": "sha512-r5McIUMMiedwJ2rltuXhj0+w0W7IJLpkOS+OGCVZQQOOcrGY9gUSUmOo7O6Z7P0vlv5YYZkPbi+qR9MDDWRBSw==",
"cpu": [
"arm64"
],
@@ -1515,9 +1514,9 @@
}
},
"node_modules/@biomejs/cli-darwin-x64": {
- "version": "1.9.4",
- "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-1.9.4.tgz",
- "integrity": "sha512-ngYBh/+bEedqkSevPVhLP4QfVPCpb+4BBe2p7Xs32dBgs7rh9nY2AIYUL6BgLw1JVXV8GlpKmb/hNiuIxfPfZg==",
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.0.4.tgz",
+ "integrity": "sha512-aV5Zc/3E3aXFbrjK1IgCMEQc+6PCkBL+NS+vtjoNM2VPFeM5OL5Q82BI4YZyPnebj+k42BPIoYtz0jJ95PGRRg==",
"cpu": [
"x64"
],
@@ -1532,9 +1531,9 @@
}
},
"node_modules/@biomejs/cli-linux-arm64": {
- "version": "1.9.4",
- "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-1.9.4.tgz",
- "integrity": "sha512-fJIW0+LYujdjUgJJuwesP4EjIBl/N/TcOX3IvIHJQNsAqvV2CHIogsmA94BPG6jZATS4Hi+xv4SkBBQSt1N4/g==",
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.0.4.tgz",
+ "integrity": "sha512-nlJhf7DyuajMj+S7Ygum59cbrHvI/nSRvedfJcEIx4X7SsiZjpRUiC5XtEn77kg7NIKq/KqG5roQIHkmjuFHCw==",
"cpu": [
"arm64"
],
@@ -1549,9 +1548,9 @@
}
},
"node_modules/@biomejs/cli-linux-arm64-musl": {
- "version": "1.9.4",
- "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-1.9.4.tgz",
- "integrity": "sha512-v665Ct9WCRjGa8+kTr0CzApU0+XXtRgwmzIf1SeKSGAv+2scAlW6JR5PMFo6FzqqZ64Po79cKODKf3/AAmECqA==",
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.0.4.tgz",
+ "integrity": "sha512-cNukq2PthoOa7quqaKoEFz4Zd1pDPJGfTR5jVyk9Z9iFHEm6TI7+7eeIs3aYcEuuJPNFR9xhJ4Uj3E2iUWkV3A==",
"cpu": [
"arm64"
],
@@ -1566,9 +1565,9 @@
}
},
"node_modules/@biomejs/cli-linux-x64": {
- "version": "1.9.4",
- "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-1.9.4.tgz",
- "integrity": "sha512-lRCJv/Vi3Vlwmbd6K+oQ0KhLHMAysN8lXoCI7XeHlxaajk06u7G+UsFSO01NAs5iYuWKmVZjmiOzJ0OJmGsMwg==",
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-2.0.4.tgz",
+ "integrity": "sha512-jlzrNZ+OzN9wvp2RL3cl5Y4NiV7xSU+QV5A8bWXke1on3jKy7QbXajybSjVQ6aFw1gdrqkO/W8xV5HODhIMT4g==",
"cpu": [
"x64"
],
@@ -1583,9 +1582,9 @@
}
},
"node_modules/@biomejs/cli-linux-x64-musl": {
- "version": "1.9.4",
- "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-1.9.4.tgz",
- "integrity": "sha512-gEhi/jSBhZ2m6wjV530Yy8+fNqG8PAinM3oV7CyO+6c3CEh16Eizm21uHVsyVBEB6RIM8JHIl6AGYCv6Q6Q9Tg==",
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.0.4.tgz",
+ "integrity": "sha512-oWQALSbp8xF0t/wiHU2zdkZOpIHyaI9QxQv0Ytty9GAKsCGP6pczp8qyKD/P49iGJdDozHp5KiuQPxs33APhyA==",
"cpu": [
"x64"
],
@@ -1600,9 +1599,9 @@
}
},
"node_modules/@biomejs/cli-win32-arm64": {
- "version": "1.9.4",
- "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-1.9.4.tgz",
- "integrity": "sha512-tlbhLk+WXZmgwoIKwHIHEBZUwxml7bRJgk0X2sPyNR3S93cdRq6XulAZRQJ17FYGGzWne0fgrXBKpl7l4M87Hg==",
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.0.4.tgz",
+ "integrity": "sha512-/PbNhMJo9ONja7hOxLlifM/qgeHpRD9bF2flTz5KIrXnQqpuegaRuwP/HYdJ9TFkTKFjHkPLoE4onOz3HIT5CQ==",
"cpu": [
"arm64"
],
@@ -1617,9 +1616,9 @@
}
},
"node_modules/@biomejs/cli-win32-x64": {
- "version": "1.9.4",
- "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-1.9.4.tgz",
- "integrity": "sha512-8Y5wMhVIPaWe6jw2H+KlEm4wP/f7EW3810ZLmDlrEEy5KvBsb9ECEfu/kMWD484ijfQ8+nIi0giMgu9g1UAuuA==",
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-2.0.4.tgz",
+ "integrity": "sha512-dIM4SgO4/Rmsb4X7fwKtciQ682SZDSC1lm42uSM9gt8zNqBIeTaqsMc6eO1DpxYWMlAb/n2SML9+HUHmCib7NA==",
"cpu": [
"x64"
],
diff --git a/package.json b/package.json
index 00ea50dc0..ab2a70cf5 100644
--- a/package.json
+++ b/package.json
@@ -82,7 +82,7 @@
"zod": "^3.25.61"
},
"devDependencies": {
- "@biomejs/biome": "1.9.4",
+ "@biomejs/biome": "2.0.4",
"@playwright/test": "^1.52.0",
"@remix-run/dev": "^2.16.5",
"@remix-run/route-config": "^2.16.5",
diff --git a/scripts/calc-seeding-skills.ts b/scripts/calc-seeding-skills.ts
index a2efd2afd..c4ce2ddd8 100644
--- a/scripts/calc-seeding-skills.ts
+++ b/scripts/calc-seeding-skills.ts
@@ -1,9 +1,9 @@
import "dotenv/config";
-import { type Rating, ordinal, rating } from "openskill";
+import { ordinal, type Rating, rating } from "openskill";
import { db } from "../app/db/sql";
import type { Tables } from "../app/db/tables";
-import { tournamentFromDB } from "../app/features/tournament-bracket/core/Tournament.server";
import { calculateIndividualPlayerSkills } from "../app/features/tournament-bracket/core/summarizer.server";
+import { tournamentFromDB } from "../app/features/tournament-bracket/core/Tournament.server";
import { allMatchResultsByTournamentId } from "../app/features/tournament-bracket/queries/allMatchResultsByTournamentId.server";
import invariant from "../app/utils/invariant";
import { logger } from "../app/utils/logger";
@@ -15,7 +15,6 @@ async function main() {
const ratings = new Map();
let count = 0;
- console.time(`Tournament skills: ${type}`);
for await (const tournament of tournaments(type)) {
count++;
const results = allMatchResultsByTournamentId(tournament.ctx.id);
@@ -32,7 +31,6 @@ async function main() {
ratings.set(userId, rating({ mu, sigma }));
}
}
- console.timeEnd(`Tournament skills: ${type}`);
logger.info(`Processed ${count} tournaments`);
for (const [userId, { mu, sigma }] of ratings) {
@@ -81,7 +79,7 @@ async function* tournaments(type: "RANKED" | "UNRANKED") {
) {
yield tournament;
}
- } catch (err) {
+ } catch {
// logger.info(`Skipped tournament with id ${tournamentId}`);
}
}
diff --git a/scripts/check-homemade-badges.ts b/scripts/check-homemade-badges.ts
index f23017715..a5613f5f2 100644
--- a/scripts/check-homemade-badges.ts
+++ b/scripts/check-homemade-badges.ts
@@ -1,3 +1,4 @@
+/** biome-ignore-all lint/suspicious/noConsole: Biome v2 migration */
import fs from "node:fs";
import path from "node:path";
import { z } from "zod/v4";
diff --git a/scripts/check-translation-jsons.ts b/scripts/check-translation-jsons.ts
index 886f87b41..8e32fcfe8 100644
--- a/scripts/check-translation-jsons.ts
+++ b/scripts/check-translation-jsons.ts
@@ -1,7 +1,9 @@
+/** biome-ignore-all lint/suspicious/noConsole: Biome v2 migration */
import fs from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";
+
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
@@ -64,7 +66,7 @@ for (const file of fileNames) {
let otherLanguageContent: Record;
try {
otherLanguageContent = JSON.parse(otherRawContent);
- } catch (e) {
+ } catch {
throw new Error(`failed to parse ${lang}/${file}`);
}
diff --git a/scripts/create-analyzer-json.ts b/scripts/create-analyzer-json.ts
index fd9477ec0..adfb6ece7 100644
--- a/scripts/create-analyzer-json.ts
+++ b/scripts/create-analyzer-json.ts
@@ -8,16 +8,19 @@
// 5) params (weapon folder) inside dicts
import fs from "node:fs";
+import path from "node:path";
+import { fileURLToPath } from "node:url";
import { z } from "zod/v4";
import type { MainWeaponParams, SubWeaponParams } from "~/modules/analyzer";
import type { ParamsJson } from "~/modules/analyzer/types";
import {
- SQUID_BEAKON_ID,
type SpecialWeaponId,
+ SQUID_BEAKON_ID,
type SubWeaponId,
subWeaponIds,
} from "~/modules/in-game-lists/weapon-ids";
import invariant from "~/utils/invariant";
+import { logger } from "~/utils/logger";
import playersParams from "./dicts/SplPlayer.game__GameParameterTable.json";
import weapons from "./dicts/WeaponInfoMain.json";
import specialWeapons from "./dicts/WeaponInfoSpecial.json";
@@ -28,9 +31,6 @@ import {
translationJsonFolderName,
} from "./utils";
-import path from "node:path";
-import { fileURLToPath } from "node:url";
-import { logger } from "~/utils/logger";
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
diff --git a/scripts/create-gear-json.ts b/scripts/create-gear-json.ts
index ac4ca00ae..bac47f907 100644
--- a/scripts/create-gear-json.ts
+++ b/scripts/create-gear-json.ts
@@ -1,20 +1,19 @@
// @ts-nocheck
+import fs from "node:fs";
+import path from "node:path";
+import { fileURLToPath } from "node:url";
+import { brandIds } from "~/modules/in-game-lists/brand-ids";
+import invariant from "~/utils/invariant";
import clothes from "./dicts/GearInfoClothes.json";
import head from "./dicts/GearInfoHead.json";
import shoes from "./dicts/GearInfoShoes.json";
-
-import fs from "node:fs";
-import invariant from "~/utils/invariant";
import {
LANG_JSONS_TO_CREATE,
loadLangDicts,
translationJsonFolderName,
} from "./utils";
-import path from "node:path";
-import { fileURLToPath } from "node:url";
-import { brandIds } from "~/modules/in-game-lists/brand-ids";
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
diff --git a/scripts/create-league-divisions.ts b/scripts/create-league-divisions.ts
index b195ce45a..7075eb0d1 100644
--- a/scripts/create-league-divisions.ts
+++ b/scripts/create-league-divisions.ts
@@ -5,9 +5,9 @@ import { z } from "zod/v4";
import { db } from "~/db/sql";
import { ADMIN_ID } from "~/features/admin/admin-constants";
import * as CalendarRepository from "~/features/calendar/CalendarRepository.server";
+import * as TournamentTeamRepository from "~/features/tournament/TournamentTeamRepository.server";
import type { Tournament } from "~/features/tournament-bracket/core/Tournament";
import { tournamentFromDB } from "~/features/tournament-bracket/core/Tournament.server";
-import * as TournamentTeamRepository from "~/features/tournament/TournamentTeamRepository.server";
import { dateToDatabaseTimestamp } from "~/utils/dates";
import invariant from "~/utils/invariant";
import { logger } from "~/utils/logger";
@@ -24,8 +24,6 @@ const csvUrl = process.argv[3]?.trim();
invariant(z.string().url().parse(csvUrl), "csv url is required (argument 2)");
async function main() {
- console.time("create-league-divisions");
-
const tournament = await tournamentFromDB({
tournamentId,
user: { id: ADMIN_ID },
@@ -118,8 +116,6 @@ async function main() {
logger.info(`Created division ${div} (id: ${createdEvent.tournamentId})`);
}
-
- console.timeEnd("create-league-divisions");
}
async function loadCsv() {
diff --git a/scripts/create-misc-json.ts b/scripts/create-misc-json.ts
index 69d1e750c..4a3f8ba1e 100644
--- a/scripts/create-misc-json.ts
+++ b/scripts/create-misc-json.ts
@@ -1,6 +1,8 @@
// @ts-nocheck
import fs from "node:fs";
+import path from "node:path";
+import { fileURLToPath } from "node:url";
import { abilitiesShort } from "~/modules/in-game-lists/abilities";
import { brandIds } from "~/modules/in-game-lists/brand-ids";
import invariant from "~/utils/invariant";
@@ -10,8 +12,6 @@ import {
translationJsonFolderName,
} from "./utils";
-import path from "node:path";
-import { fileURLToPath } from "node:url";
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
diff --git a/scripts/create-object-dmg-json.ts b/scripts/create-object-dmg-json.ts
index 7620d6bc6..c7c3510c9 100644
--- a/scripts/create-object-dmg-json.ts
+++ b/scripts/create-object-dmg-json.ts
@@ -1,23 +1,23 @@
// @ts-nocheck
import fs from "node:fs";
+import path from "node:path";
+import { fileURLToPath } from "node:url";
import { DAMAGE_RECEIVERS } from "~/features/object-damage-calculator/calculator-constants";
import {
mainWeaponIds,
specialWeaponIds,
subWeaponIds,
} from "~/modules/in-game-lists/weapon-ids";
-import weapons from "./dicts/WeaponInfoMain.json";
-import specialWeapons from "./dicts/WeaponInfoSpecial.json";
-import subWeapons from "./dicts/WeaponInfoSub.json";
// 1) WeaponInfoMain.json inside dicts
// 2) WeaponInfoSub.json inside dicts
// 3) WeaponInfoSpecial.json inside dicts
// 4) misc/spl__DamageRateInfoConfig.pp__CombinationDataTableData.json
import params from "./dicts/spl__DamageRateInfoConfig.pp__CombinationDataTableData.json";
+import weapons from "./dicts/WeaponInfoMain.json";
+import specialWeapons from "./dicts/WeaponInfoSpecial.json";
+import subWeapons from "./dicts/WeaponInfoSub.json";
-import path from "node:path";
-import { fileURLToPath } from "node:url";
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
diff --git a/scripts/refresh-prod-db.ts b/scripts/refresh-prod-db.ts
index cbd5eca87..c6f8bb6e6 100644
--- a/scripts/refresh-prod-db.ts
+++ b/scripts/refresh-prod-db.ts
@@ -1,7 +1,10 @@
+/** biome-ignore-all lint/suspicious/noConsole: Biome v2 migration */
import fs from "node:fs";
import { fileURLToPath } from "node:url";
+
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
+
import path from "node:path";
function main() {
diff --git a/scripts/replace-img-names.ts b/scripts/replace-img-names.ts
index 3d1929bfa..5220ce827 100644
--- a/scripts/replace-img-names.ts
+++ b/scripts/replace-img-names.ts
@@ -1,9 +1,9 @@
import fs from "node:fs";
import path from "node:path";
-import invariant from "~/utils/invariant";
-
import { fileURLToPath } from "node:url";
+import invariant from "~/utils/invariant";
import { logger } from "~/utils/logger";
+
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
diff --git a/scripts/replace-weapon-names.ts b/scripts/replace-weapon-names.ts
index 2e70ac194..9acecec54 100644
--- a/scripts/replace-weapon-names.ts
+++ b/scripts/replace-weapon-names.ts
@@ -2,11 +2,10 @@
import fs from "node:fs";
import path from "node:path";
-import invariant from "~/utils/invariant";
-import weapons from "./dicts/WeaponInfoMain.json";
-
import { fileURLToPath } from "node:url";
import { logger } from "~/utils/logger";
+import weapons from "./dicts/WeaponInfoMain.json";
+
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
diff --git a/scripts/utils.ts b/scripts/utils.ts
index e78e9a59d..6ef82e4f4 100644
--- a/scripts/utils.ts
+++ b/scripts/utils.ts
@@ -2,9 +2,9 @@
import fs from "node:fs";
import path from "node:path";
+import { fileURLToPath } from "node:url";
import type euEn from "./dicts/langs/EUen.json";
-import { fileURLToPath } from "node:url";
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
diff --git a/types/react.d.ts b/types/react.d.ts
index 645085fb3..aef6fa9c3 100644
--- a/types/react.d.ts
+++ b/types/react.d.ts
@@ -1,3 +1,4 @@
+// biome-ignore lint/correctness/noUnusedImports: needed for type augmentation
import type * as React from "react";
declare module "react" {
|