import { describe, expect, it } from "vitest"; import { eslint } from "./lintProbe.testkit"; // `local/literal-a11y-text` (eslint.config.js): what a screen reader or a tooltip says is user-facing // text, so it goes through t() like the rest. Five English `aria-label`s and a whole English panel // survived every lane before it. A rule that matches nothing looks exactly like a clean codebase, so // this asserts it fires. const RULE = "local/literal-a11y-text"; async function hits(source: string): Promise { const [result] = await eslint.lintText(source, { filePath: "src/components/__probe.tsx" }); return (result?.messages ?? []).filter((m) => m.ruleId === RULE).length; } describe("a literal word in an attribute the user hears or sees", () => { it("is refused, in every spelling of a string", async () => { expect(await hits(`export const A = () =>