mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-12 22:26:13 +00:00
The status assessments folded their recent days, weeks, months and years on Berlin days whatever the user's zone, the mood and cycle crosstabs keyed their metric days in Berlin, the resting-pulse proxy defaulted to Berlin days, the briefing's opener rotated at Berlin midnight, and every assessment prompt labelled today's date as Berlin's. They now use the user's zone. Rollup months and years are labelled by their UTC start, which is how they are cut; read in a zone west of UTC the label named the month before. "Europe/Berlin" was written out in some eighty places. DEFAULT_TIMEZONE in lib/tz/format is now the one definition: the second copy in mood/date-key, DISPLAY_TIMEZONE, the Berlin-only day key helpers and the per-route copies are gone. An in-repo lint rule rejects the literal outside lib/tz and tests; four areas another change owns are listed as pending.
43 lines
2.0 KiB
JavaScript
43 lines
2.0 KiB
JavaScript
/**
|
|
* @fileoverview Aggregates the project-local `healthlog/*` ESLint rules
|
|
* into a single plugin object for the flat config.
|
|
*
|
|
* - `queryKey-factory` — bare-array queryKey / mutationKey bypass guard.
|
|
* - `safe-fetch-required` — outbound fetch must route through safeFetch.
|
|
* - `api-fetch-required` — client /api/ calls must route through apiFetch.
|
|
* - `no-raw-palette-color` — ban raw Tailwind palette utilities in app UI.
|
|
* - `spacing-scale` — no pt-/pb- overrides on gap-based Card slots,
|
|
* and no off-scale `5` step on a bg-card shell.
|
|
* - `job-handler-outcome` — pg-boss bindings route through createAndWork,
|
|
* whose handler returns a JobOutcome.
|
|
* - `no-default-zone-literal` — the default zone is DEFAULT_TIMEZONE from
|
|
* src/lib/tz/format, never written out.
|
|
*/
|
|
|
|
"use strict";
|
|
|
|
const queryKeyFactory = require("./queryKey-factory.js");
|
|
const safeFetchRequired = require("./safe-fetch-required.js");
|
|
const apiFetchRequired = require("./api-fetch-required.js");
|
|
const noRawPaletteColor = require("./no-raw-palette-color.js");
|
|
const spacingScale = require("./spacing-scale.js");
|
|
const jobHandlerOutcome = require("./job-handler-outcome.js");
|
|
const noDefaultZoneLiteral = require("./no-default-zone-literal.js");
|
|
|
|
module.exports = {
|
|
rules: {
|
|
"queryKey-factory": queryKeyFactory.rules["queryKey-factory"],
|
|
"safe-fetch-required": safeFetchRequired,
|
|
"api-fetch-required": apiFetchRequired,
|
|
"no-raw-palette-color": noRawPaletteColor,
|
|
"spacing-scale": spacingScale,
|
|
// Same module as `no-raw-palette-color`, registered under a second
|
|
// name so the flat config can run the `dracula` check as its own
|
|
// named rule (now error-level too; the staged warn phase ended with
|
|
// the semantic sweep). See the rule header.
|
|
"no-dracula-utility": noRawPaletteColor,
|
|
"job-handler-outcome": jobHandlerOutcome,
|
|
"no-default-zone-literal": noDefaultZoneLiteral,
|
|
},
|
|
};
|