chore: finish frontend ESLint migration #18

Enable every plugin recommended preset and replace Biome with ESLint formatting.

Preserve API contracts and JSX whitespace; verify source, tests, builds and tooling.
This commit is contained in:
2026-09-28 16:36:40 +03:00
committed by ksv741
parent 57630102e4
commit 72d7835227
253 changed files with 10059 additions and 8864 deletions
@@ -1,10 +1,13 @@
import type { FC } from "react";
import { Alert, Button, Skeleton, Stack, Text } from "@mantine/core";
import { LoadingSkeleton } from "@wealthledger/ui";
import type { FC } from "react";
import { useTranslation } from "react-i18next";
import { Link } from "react-router";
import { LedgerEntryRow } from "@/entities/broker-operation";
import { formatSnapshotTime } from "@/shared/lib";
import type { AccountPageRecentOperations } from "../AccountPage.vm";
type RecentOperationsProps = {
@@ -17,51 +20,49 @@ const RecentOperations: FC<RecentOperationsProps> = (props) => {
return (
<Stack gap="sm">
{operations.state === "loaded" ? (
{(operations.state === "loaded") && ((
<>
{operations.lastSuccessfulAt ? (
<Text size="xs" c="dimmed">
{!!(operations.lastSuccessfulAt) && ((
<Text c="dimmed" size="xs">
{t("investment.sourceTime", {
date: formatSnapshotTime(operations.lastSuccessfulAt),
})}
</Text>
) : null}
{operations.stale ? (
))}
{!!(operations.stale) && ((
<Text size="xs">{t("investment.stale")}</Text>
) : null}
{operations.refreshError ? (
))}
{!!(operations.refreshError) && ((
<Text role="status">{t("accounts.refreshError")}</Text>
) : null}
))}
</>
) : null}
{operations.state === "loading" ? (
))}
{(operations.state === "loading") && ((
<LoadingSkeleton label={t("ledger.recentLoading")}>
{[0, 1, 2].map((index) => (
<Skeleton key={index} height={48} radius="sm" />
{["first", "second", "third"].map(placeholder => (
<Skeleton height={48} key={placeholder} radius="sm" />
))}
</LoadingSkeleton>
) : null}
{operations.state === "error" ? (
))}
{(operations.state === "error") && ((
<Alert color="red">{t("ledger.recentError")}</Alert>
) : null}
{operations.state === "empty" ? (
))}
{(operations.state === "empty") && ((
<Text c="dimmed">{t("ledger.recentEmpty")}</Text>
) : null}
{operations.state === "partial" ? (
))}
{(operations.state === "partial") && ((
<Text role="status">{t("investment.partial")}</Text>
) : null}
{operations.state === "loaded" || operations.state === "partial"
? operations.items.map((operation) => (
<LedgerEntryRow
key={JSON.stringify([
operation.account?.id,
operation.id,
operation.logoName,
])}
operation={operation}
/>
))
: null}
))}
{(operations.state === "loaded" || operations.state === "partial") && (operations.items.map(operation => (
<LedgerEntryRow
key={JSON.stringify([
operation.account?.id,
operation.id,
operation.logoName,
])}
operation={operation}
/>
)))}
<Button component={Link} to={operations.to} variant="subtle">
{t("ledger.open")}
</Button>