fix(design): rating and live colour tokens, the player's menus over its notices, the info overlay on a light theme (E28)
- F16: --rating (theme-scoped gold, 4.5:1 on the page and its chip), --rating-media, --live/--live-fg, --media-chrome replace 14 palette literals; a lint rule refuses palette classes; the theme contract measures them. - The Plex player's notices drew over its open settings/tracks popovers: notices z-base, popovers z-menu. - The player's info overlay rendered theme tokens on its always-dark panel: on a light theme the score (2.6:1), collection years (3.2:1) and cast initials (1.05:1) were unreadable; onDark variants now. - The lint-rule contract tests share one ESLint with a one-off warm-up (a cold first lint took 8 s, past vitest's 5 s).
This commit is contained in:
@@ -1,15 +1,12 @@
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
import { ESLint } from "eslint";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import { eslint } from "./lintProbe.testkit";
|
||||
|
||||
// Two lint rules about controls: no native <select> (the canonical "FE control" row in CLAUDE.md;
|
||||
// six had drifted in before the rule existed), and no hover gated on `enabled:` alone. A selector
|
||||
// that matches nothing looks exactly like a clean codebase, so this pins that each fires.
|
||||
const FRONTEND = fileURLToPath(new URL("../../", import.meta.url));
|
||||
|
||||
async function refused(source: string): Promise<number> {
|
||||
const eslint = new ESLint({ cwd: FRONTEND });
|
||||
const [result] = await eslint.lintText(source, { filePath: "src/components/__probe.tsx" });
|
||||
return (result?.messages ?? []).filter((m) => m.message.startsWith("No native <select>")).length;
|
||||
}
|
||||
@@ -25,7 +22,6 @@ describe("a native select", () => {
|
||||
// which then lit up on hover as if a click would work.
|
||||
describe("a hover gated on `enabled:` alone", () => {
|
||||
it("is refused; the aria-aware gate is not", async () => {
|
||||
const eslint = new ESLint({ cwd: FRONTEND });
|
||||
const lint = async (cls: string) =>
|
||||
(
|
||||
await eslint.lintText(
|
||||
|
||||
Reference in New Issue
Block a user