From d0c26e63db262be897863c328ec0dc63b777d7d9 Mon Sep 17 00:00:00 2001 From: "Russ T. Fugal" Date: Wed, 19 Aug 2026 11:10:59 -0600 Subject: [PATCH] style: oxfmt sweep MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Repo-wide `bun run format` with oxfmt. Kept as its own commit so the reflow never mixes with a behavioral change, and deliberately sequenced after the enum and parameter-property rewrites so a reviewer can tell one from the other. The sweep is one file: src/level-blocks/runConfig.ts, where oxfmt hugs the arrow-function body against the .map( call rather than indenting it on its own line. Keeping printWidth at 100 is what holds the rest of the repo still. Also sets sortPackageJson: false in .oxfmtrc.json, matching what `oxfmt --migrate=prettier` emits. Left at its default, oxfmt reordered package.json's top-level keys and sorted the keywords array — churn Prettier never produced and unrelated to formatting. bun run format:check exits 0. generated/block-meta.json untouched. --- .oxfmtrc.json | 4 ++++ src/level-blocks/runConfig.ts | 22 ++++++++++------------ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/.oxfmtrc.json b/.oxfmtrc.json index fd0c44e..2413761 100644 --- a/.oxfmtrc.json +++ b/.oxfmtrc.json @@ -7,6 +7,10 @@ "trailingComma": "all", "printWidth": 100, "tabWidth": 2, + // Off, as `oxfmt --migrate=prettier` sets it. oxfmt would otherwise reorder + // package.json's keys and sort the keywords array — churn Prettier never + // did, unrelated to formatting. + "sortPackageJson": false, "ignorePatterns": [ "node_modules", "dist", diff --git a/src/level-blocks/runConfig.ts b/src/level-blocks/runConfig.ts index 8f5f8a9..856dde6 100644 --- a/src/level-blocks/runConfig.ts +++ b/src/level-blocks/runConfig.ts @@ -589,19 +589,17 @@ export function runFromConfig( const sweepStatsBySchedule = new WeakMap(); const sweepScorersBySchedule = new WeakMap>(); const runScorers = filled.sweep - ? scorers.map( - (entry): WeightedScorerEntry => ({ - ...entry, - scorer: { - ...entry.scorer, - score(schedule: Schedule): number { - return ( - sweepScorersBySchedule.get(schedule)?.get(entry.instanceId) ?? entry.scorer - ).score(schedule); - }, + ? scorers.map((entry): WeightedScorerEntry => ({ + ...entry, + scorer: { + ...entry.scorer, + score(schedule: Schedule): number { + return ( + sweepScorersBySchedule.get(schedule)?.get(entry.instanceId) ?? entry.scorer + ).score(schedule); }, - }), - ) + }, + })) : scorers; const objective = runScorers.some((s) => s.weight !== null && s.weight !== 0) -- 2.54.0