style: apply prettier across the tree

One-shot prettier pass so the new format:check gate starts from a clean
baseline. Formatting only — no behaviour change. Generator-owned and
vendored artifacts stay untouched via .prettierignore.
This commit is contained in:
Marc-André Bombeck committed 2026-06-19 22:20:31 +02:00
1 parent b3fea2ef59
commit 1f4ba5939d
1000 files changed
+12130 -8385

No files matched your search

@@ -33,9 +33,9 @@ describe("retryOnceOnTransientError", () => {
});
it("never retries 401/403 — the server answered", () => {
expect(retryOnceOnTransientError(0, new ApiError("Unauthorized", 401))).toBe(
false,
);
expect(
retryOnceOnTransientError(0, new ApiError("Unauthorized", 401)),
).toBe(false);
expect(retryOnceOnTransientError(0, new ApiError("Forbidden", 403))).toBe(
false,
);
@@ -106,7 +106,9 @@ describe("useDashboardSnapshot — auto-refresh on an open page", () => {
"fetch",
vi
.fn()
.mockResolvedValue(envelopeResponse({ layout: { widgets: [] }, tiles: {} })),
.mockResolvedValue(
envelopeResponse({ layout: { widgets: [] }, tiles: {} }),
),
);
getQueryDataMock.mockReturnValue({ widgets: [{ id: "existing" }] });
useDashboardSnapshot();
@@ -127,7 +129,9 @@ describe("prefetchDashboardSnapshot — hydration-safe promise handoff", () => {
} as unknown as QueryClient;
}
function stubFetch(payload: unknown = { layout: { widgets: [] }, tiles: {} }) {
function stubFetch(
payload: unknown = { layout: { widgets: [] }, tiles: {} },
) {
const fetchMock = vi
.fn()
.mockImplementation(() => Promise.resolve(envelopeResponse(payload)));
@@ -184,9 +188,7 @@ describe("prefetchDashboardSnapshot — hydration-safe promise handoff", () => {
});
});
function lastOptsOf(
mock: typeof useQueryMock,
): Record<string, unknown> {
function lastOptsOf(mock: typeof useQueryMock): Record<string, unknown> {
const call = mock.mock.calls.at(-1);
expect(call).toBeDefined();
return call![0];
@@ -61,9 +61,9 @@ describe("runSetMedicationListView", () => {
version: 1,
view: "table",
});
expect(
queryClient.getQueryData(queryKeys.medicationListLayout()),
).toEqual(saved);
expect(queryClient.getQueryData(queryKeys.medicationListLayout())).toEqual(
saved,
);
expect(toast.error).not.toHaveBeenCalled();
});
@@ -98,9 +98,9 @@ describe("runSetMedicationListView", () => {
await runSetMedicationListView({ view: "table", queryClient, t });
expect(
queryClient.getQueryData(queryKeys.medicationListLayout()),
).toEqual(previous);
expect(queryClient.getQueryData(queryKeys.medicationListLayout())).toEqual(
previous,
);
expect(toast.error).toHaveBeenCalledWith("medications.viewSaveFailed");
});
});
@@ -126,9 +126,9 @@ describe("runSaveMedicationListOrder", () => {
version: 1,
order: ["med-b", "med-a"],
});
expect(
queryClient.getQueryData(queryKeys.medicationListLayout()),
).toEqual(saved);
expect(queryClient.getQueryData(queryKeys.medicationListLayout())).toEqual(
saved,
);
expect(toast.success).toHaveBeenCalledWith("medications.reorderSaved");
});
@@ -143,8 +143,6 @@ describe("runSaveMedicationListOrder", () => {
});
expect(ok).toBe(false);
expect(toast.error).toHaveBeenCalledWith(
"medications.reorderSaveFailed",
);
expect(toast.error).toHaveBeenCalledWith("medications.reorderSaveFailed");
});
});
@@ -48,9 +48,7 @@ export interface MedicationComplianceSummaryEntry {
* any future consumer) must ride this exact function so the key can
* never be registered with diverging fetch shapes.
*/
function fetchComplianceSummary(): Promise<
MedicationComplianceSummaryEntry[]
> {
function fetchComplianceSummary(): Promise<MedicationComplianceSummaryEntry[]> {
return apiGet<MedicationComplianceSummaryEntry[]>(
"/api/medications/compliance",
);
@@ -1,6 +1,10 @@
"use client";
import { useQuery, useQueryClient, type QueryClient } from "@tanstack/react-query";
import {
useQuery,
useQueryClient,
type QueryClient,
} from "@tanstack/react-query";
import { toast } from "sonner";
import { apiGet, apiPut } from "@/lib/api/api-fetch";
@@ -110,7 +114,6 @@ export function useMedicationListLayout(enabled: boolean = true): {
layout: data ?? DEFAULT_MEDICATION_LIST_LAYOUT,
isLayoutLoading: enabled && isLoading,
setView: (view) => runSetMedicationListView({ view, queryClient, t }),
saveOrder: (order) =>
runSaveMedicationListOrder({ order, queryClient, t }),
saveOrder: (order) => runSaveMedicationListOrder({ order, queryClient, t }),
};
}