mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-15 06:52:04 +00:00
Migrate every remaining *-dracula-* utility site (127 lint warnings, 193 class occurrences) onto the semantic vocabulary. The swaps are pixel-identical in both themes — each target token aliases the same primitive the utility read, including the light-theme AA overrides: - green/orange/cyan/red → success/warning/info/destructive - purple → primary (same value in both themes) - pink → the new --brand-pink token (Coach gradient, Apple-Health badge, recording mic): dark #ff79c6 — 6.86:1 card / 5.97:1 bg; light #a3134d — 7.32:1 card / 6.83:1 bg (computed) - yellow sites resolve to their status meaning: warn-level log icon, update-available pill and offline-geo hint → warning; the admin helpful-rate ramp → success/warning/destructive; the confidence meter mirrors the coverage-meter precedent (medium + low share the caution tint, the lit count carries the distinction) - the confidence-badge low tier dropped dead *-dracula-comment/* classes (no generated utility) for border-border + bg-muted/50 Close two rule blind spots the sweep surfaced — directional borders (border-l-dracula-red) and the parenthesised CSS-var shorthand (bg-(--dracula-green)) — and flip healthlog/no-dracula-utility from warn to error so the class cannot regrow. var(--dracula-*) references in chart code stay: they are token references the light theme overrides, and the chart palette is pinned visually.
34 lines
1.4 KiB
JavaScript
34 lines
1.4 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.
|
|
*/
|
|
|
|
"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");
|
|
|
|
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,
|
|
},
|
|
};
|