#!/usr/bin/env node /** * Validate that the unified Mana web app uses theme tokens instead of raw * Tailwind utilities that bypass the theme system. * * Background: the unified Mana app supports multiple theme variants (Lume, * Nature, Stone, Ocean, plus dark). Utilities like `text-white/80`, * `bg-gray-800`, `border-neutral-700` ignore the active theme and can * render white-on-white (or dark-on-dark) under the wrong variant. The * theme tokens (`text-foreground`, `bg-muted`, `border-border`, etc.) are * generated by Tailwind v4 from `packages/shared-tailwind/src/themes.css` * and resolve per-theme automatically. * * Rules (enforced across `apps/mana/apps/web/src/lib/modules/**` and * `apps/mana/apps/web/src/routes/(app)/**`): * * 1. No white-alpha utilities: * `bg-white/N`, `text-white/N`, `border-white/N` (and hover:/focus:/etc. variants) * * 2. No neutral-palette utilities: * `(bg|text|border)-(gray|slate|zinc|neutral|stone)-N` (with or without /N) * — these should be theme tokens instead. * * Replacement cheat-sheet: * bg-white/N → bg-muted/N or bg-card * text-white → text-foreground * text-white/40..60 → text-muted-foreground * border-white/N → border-border * bg-gray-800 → bg-card or bg-muted * bg-neutral-900 → bg-card * text-gray-400 → text-muted-foreground * text-slate-300 → text-foreground/90 * border-gray-700 → border-border * * Brand-literal escape hatch: if a color must stay literal (overlay on a * vivid gradient, photo viewer backdrop, domain-semantic palette), move * it into a scoped