style(frontend): Prettier config + one-time repo-wide format pass

Prettier 3 (pinned), printWidth 100, double quotes — chosen to match the existing
hand-formatting and minimise reflow. This commit is ONLY the mechanical format pass
(`prettier --write`) plus the config/ignore/scripts, isolated so it never pollutes a
feature diff. Verified behaviour-neutral: typecheck, eslint (0 errors), and vitest
all green before and after. See .git-blame-ignore-revs — `git blame` skips this sha.
This commit is contained in:
2026-07-21 02:26:40 +02:00
parent 04ecd8b3a7
commit e257e2aca0
101 changed files with 4388 additions and 2641 deletions
+5 -9
View File
@@ -3,13 +3,7 @@ import { useTranslation } from "react-i18next";
import { sortRows, cycleSort, type SortState } from "../lib/columnSort";
import Pager, { hasPagerContent } from "./Pager";
import { PageToolbar } from "./PageShell";
import {
ColumnHead,
alignClass,
filterRows,
type Column,
type FilterMap,
} from "./tableHeader";
import { ColumnHead, alignClass, filterRows, type Column, type FilterMap } from "./tableHeader";
// A reusable, client-side data table: per-column sort + filter (in the header) + pagination,
// with its sort/filter/page state optionally persisted to localStorage so a reload (F5) keeps
@@ -95,7 +89,7 @@ export default function DataTable<T>({
// the table keeps its own, seeded from and saved to persistKey.
const controlledSort = onSortChange !== undefined;
const [internalSort, setInternalSort] = useState<SortState>(initial.sort);
const sort = controlledSort ? sortProp ?? null : internalSort;
const sort = controlledSort ? (sortProp ?? null) : internalSort;
const [filters, setFilters] = useState<FilterMap>(initial.filters);
const [page, setPage] = useState(initial.page);
const [size, setSize] = useState(initial.size ?? pageSize);
@@ -253,7 +247,9 @@ export default function DataTable<T>({
</div>
{paged.length === 0 && (
<div className="text-muted py-8 text-center text-sm">{emptyText ?? t("datatable.empty")}</div>
<div className="text-muted py-8 text-center text-sm">
{emptyText ?? t("datatable.empty")}
</div>
)}
{controlsPosition === "bottom" && controls}