test(frontend): a React Compiler ratchet over everything the build ships
compilerCoverage.contract.test.ts used to check two files. It now runs the real compiler over all of src (minus tests) and holds the exact set it skips today, file -> function -> category: 93 functions. A new skip or a category change is red, and so is a listed skip that has gone, so the list only shrinks. Channels and DataTable must also show up as compiled, so a harness that compiled nothing cannot pass. Measured against the audit's scan: no function this sprint touched started to skip. PlexPersonView and useOverlayOrder now compile. reactPlugin.ts claimed the compiler's rules were linted, which was false while react-hooks/refs was off. That comment and the refs block in eslint.config.js now say what holds the line and why refs is still off: 245 real hits, pinned by the ratchet, burned down from S3.
This commit is contained in:
@@ -569,15 +569,15 @@ export default tseslint.config(
|
||||
// bulk `--suppress-all` would hide the next violation instead of
|
||||
// answering it, and it cannot hold a warning-level rule anyway.
|
||||
//
|
||||
// `refs` is off because it fires on this app's popover architecture, not on its history, so
|
||||
// suppressing it would not help the next popover anyone writes. Measured over the 217:
|
||||
// 79 are `pop.refs.setReference` / `getReferenceProps` — @floating-ui/react's callback-ref
|
||||
// setters, which are the documented way to use it — and 74 more are passing the popover handle
|
||||
// down as a prop (`popover={pop}`, `ref={fade.ref}`), which is what `components/ui`'s popover
|
||||
// engine is FOR. That is 153 of 217 flagged for having the word `refs` in an object that is not
|
||||
// a React ref. The remaining ~64 are genuine render-phase `someRef.current = x` writes and are
|
||||
// real (E27 S2 answered the ones the other rules could see, at their sites).
|
||||
// Re-evaluate when the rule can: it shipped in 1.0.0 and this looks like over-approximation.
|
||||
// `refs` is OFF — the one rule here switched off while it has real hits, and recorded as such
|
||||
// in docs/gates.md. E27 turned it off calling 153 of its 217 hits false positives (the popover
|
||||
// engine's `pop.refs.setReference` / `getReferenceProps()`, a popover handle passed as a prop)
|
||||
// and the other ~64 real render-phase `someRef.current = x` writes. The E32 audit showed the
|
||||
// triage was wrong: the rule and the React Compiler share one analysis, so every one of those
|
||||
// "false positives" is a component the compiler SKIPS — 21 popover components among them, and
|
||||
// Channels' 0.9 s row menu was the bill. It stays off only because 245 hits (measured E32 S1) cannot be fixed in
|
||||
// one sprint; until they are, compilerCoverage.contract.test.ts pins every skipped function
|
||||
// (none may be added), and E32 S3+ burns them down to turn this back on.
|
||||
"react-hooks/refs": "off",
|
||||
"local/jsx-comment-text": "error",
|
||||
"local/focus-safe-disabled": "error",
|
||||
|
||||
Reference in New Issue
Block a user