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

@@ -62,7 +62,9 @@ describe("reconstructContiguousSleepTimeline", () => {
it("appends a single IN_BED envelope at the given END instant", () => {
const rows = reconstructContiguousSleepTimeline({
startMs: onset,
stages: [{ durationMs: 60 * 60_000, stage: "CORE", fieldTag: "sleep_core" }],
stages: [
{ durationMs: 60 * 60_000, stage: "CORE", fieldTag: "sleep_core" },
],
inBed: {
durationMs: end - onset,
measuredAt: new Date(end),
@@ -81,8 +83,14 @@ describe("reconstructContiguousSleepTimeline", () => {
it("omits IN_BED when its duration is missing or non-positive", () => {
const rows = reconstructContiguousSleepTimeline({
startMs: onset,
stages: [{ durationMs: 60 * 60_000, stage: "CORE", fieldTag: "sleep_core" }],
inBed: { durationMs: 0, measuredAt: new Date(end), fieldTag: "sleep_in_bed" },
stages: [
{ durationMs: 60 * 60_000, stage: "CORE", fieldTag: "sleep_core" },
],
inBed: {
durationMs: 0,
measuredAt: new Date(end),
fieldTag: "sleep_in_bed",
},
externalIdFor: (tag, i) => `night:seg:${tag}:${i}`,
});
expect(rows.find((r) => r.sleepStage === "IN_BED")).toBeUndefined();
+5 -1
View File
@@ -91,7 +91,11 @@ export function reconstructContiguousSleepTimeline(
let cursor = startMs;
let segIndex = 0;
for (const { durationMs, stage, fieldTag } of stages) {
if (typeof durationMs !== "number" || !Number.isFinite(durationMs) || durationMs <= 0) {
if (
typeof durationMs !== "number" ||
!Number.isFinite(durationMs) ||
durationMs <= 0
) {
continue;
}
const segEnd = cursor + durationMs;