fix(gate): close the gaps in the plan-code guard, the button lists and the tooling
- planCodes: the quote and slash lookarounds let the commonest form through (a docstring or test title opening with a code, a slash pair); the two real exceptions (an episode titled "E1", ruff's E4/E7/E9) are now named and cut first, with cases that fail on the old pattern. audit_metrics counts by the same definition. - button-primitive: both file lists live in the rule body, out of sight of the snapshot and the register; each is now pinned to its exact set of ui/ files (red when either is widened). - check.sh --brief shows a short log whole and keeps the line before each hit, so ruff's rule and eslint's file path survive the excerpt. - lint-changed runs prettier over every changed frontend file, as the gate does, not only code. - CLAUDE.md and gates.md no longer claim the basedpyright baseline was found harmless: it was never triaged, and the reportOptional* entries are the likeliest real bugs.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { readdirSync } from "node:fs";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
import { ESLint } from "eslint";
|
||||
@@ -35,6 +36,12 @@ export const eslint = new ESLint({
|
||||
},
|
||||
});
|
||||
|
||||
/** Every component file in ui/, by name — for a probe that pins which of them a rule exempts. */
|
||||
export const uiFiles = (): string[] =>
|
||||
readdirSync(new URL("../components/ui/", import.meta.url))
|
||||
.filter((f) => f.endsWith(".tsx") && !f.includes(".test."))
|
||||
.sort();
|
||||
|
||||
beforeAll(async () => {
|
||||
await eslint.lintText("", { filePath: "src/components/__probe.tsx" });
|
||||
}, 60_000);
|
||||
|
||||
Reference in New Issue
Block a user