build(eslint): drop the Z_RAW and EDGED_LABEL selectors

Both came out of the E28 claim audit (0521149c named z-levels, e13d93a3
static labels as flat Badges) after the audit itself had fixed the sites.
No real hit since: 0 matches in every lint run from E28 to E34 (S2/S3
measurement). Each still cost a probe test (zLayer.contract, the edged-label
half of hoverAndLink.contract) and a place in the gate snapshot. The design
rules stay in DESIGN.md (Tokens: no ad-hoc z-index; Static vs pressable),
with a decision-log row saying the selectors went and why.
This commit is contained in:
2026-10-05 00:19:38 +02:00
parent 91f6a77fa3
commit adaa7dc23c
6 changed files with 2 additions and 140 deletions
@@ -13,7 +13,6 @@ async function messages(source: string, starts: string): Promise<number> {
const swaps = (src: string) => messages(src, "hover by a colour swap");
const glyphs = (src: string) => messages(src, "a glyph-only <a>");
const palette = (src: string) => messages(src, "a palette colour");
const edged = (src: string) => messages(src, "a static label with an edge");
describe("a hover by a colour swap", () => {
// Assembled, so this file does not trip the very rule it probes.
@@ -74,36 +73,3 @@ describe("a palette colour", () => {
expect(await palette(`export const g = "bg-accent text-danger border-border";\n`)).toBe(0);
});
});
// F29: DESIGN.md "Static vs pressable": a label that does nothing is a flat Badge. A span drawn with a
// rounded edge reads as a chip, gets clicked and does nothing (three sites and a private Badge had it).
describe("a static label with an edge", () => {
const b = "border"; // assembled, as above
it("is refused, in a plain class and inside clsx", async () => {
const src = [
'import clsx from "clsx";',
"export const A = ({ on }: { on: boolean }) => (",
" <>",
` <span className="px-2 rounded-full ${b} ${b}-accent/40 text-accent">x</span>`,
` <span className={clsx("rounded-lg ${b} ${b}-dashed", on && "text-accent")}>y</span>`,
" </>",
");",
].join("\n");
expect(await edged(src)).toBe(2);
});
it("passes a flat tint, an edge on a non-label element, a span with no rounding, a drawn check mark", async () => {
const src = [
"export const B = () => (",
" <>",
' <span className="rounded-full bg-fg/8 text-muted">x</span>',
` <div className="rounded-lg ${b} ${b}-border">y</div>`,
` <span className="${b}-b ${b}-border">z</span>`,
` <span className="grid h-3.5 w-3.5 rounded ${b}">✓</span>`,
" </>",
");",
].join("\n");
expect(await edged(src)).toBe(0);
});
});