You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recorded as "deliberately unmeasured" on #10653, whose seat declined to file it on reasoning alone — "an unmeasured divergence filed as a finding is exactly the borrowed authority this card is about." Measured now, while implementing #10653, so it is filed with numbers instead.
The claim that was unmeasured
validate-react-page-props.ts carried a catch { continue; } commented "the syntax gate reports unparseable sources". Two things were wrong with it, and #10653 fixes the first (the catch never ran; the live path was the unread parseDiagnostics). This issue is the second: the gate credited as cover parses with a different parser.
validate-jsx-pages.ts does not lint kind:'react' pages at all.
The real cover is validate-react-pages.ts, which uses Sucrase (transform, transpile-only).
validate-react-page-props.ts uses the TypeScript compiler (createSourceFile, ScriptKind.TSX).
So "the syntax gate reports it" is only true where the two acceptance sets agree, and they do not.
Measurement (2026-08-21, TypeScript 6.0.3, sucrase 3.35.x, at 55809a09a5)
Each source below is a kind:'react' page source. "sucrase" = does validate-react-pages report a react-page-syntax finding; "tsc" = parseDiagnostics.length under ScriptKind.TSX.
Both directions are real. Four shapes pass the syntax gate and are unreadable to the props gate; one shape is refused by the syntax gate and parses fine for the props gate.
Why it matters
The first four rows are the case the deleted comment was most wrong about: the syntax gate is green, so nothing tells the author anything, while the props gate is reading a partially recovered tree. Before #10653 that combination was total silence. After #10653 the props gate reports react-page-source-unparseable on exactly those rows, which is why the fix does not double-report: the two rules fire on overlapping-but-different sets, by construction.
The last row is the opposite and is harmless today (the syntax gate reports; the props gate reads the source fine).
Pinned as a regression test in PR for #10653: packages/lint/src/validate-react-page-props.test.ts → 'the syntax gate is a DIFFERENT parser — measured, not assumed', which asserts the 0755 row in both directions.
What is NOT claimed here
That either parser is wrong. Sucrase is the family that actually transpiles a react page, so its verdict is the one closest to what ships; TypeScript's grammar is stricter about numeric literal legacy forms. What is filed is that two gates on the same authored surface answer "does this parse?" differently, that the divergence is unmeasured anywhere in the tree, and that a comment in the props gate asserted the opposite.
Possible dispositions, no recommendation made here (it needs a spec-level answer about which parser defines "a valid react page source"):
Recorded as "deliberately unmeasured" on #10653, whose seat declined to file it on reasoning alone — "an unmeasured divergence filed as a finding is exactly the borrowed authority this card is about." Measured now, while implementing #10653, so it is filed with numbers instead.
The claim that was unmeasured
validate-react-page-props.tscarried acatch { continue; }commented "the syntax gate reports unparseable sources". Two things were wrong with it, and #10653 fixes the first (the catch never ran; the live path was the unreadparseDiagnostics). This issue is the second: the gate credited as cover parses with a different parser.validate-jsx-pages.tsdoes not lintkind:'react'pages at all.validate-react-pages.ts, which uses Sucrase (transform, transpile-only).validate-react-page-props.tsuses the TypeScript compiler (createSourceFile,ScriptKind.TSX).So "the syntax gate reports it" is only true where the two acceptance sets agree, and they do not.
Measurement (2026-08-21, TypeScript 6.0.3, sucrase 3.35.x, at
55809a09a5)Each source below is a
kind:'react'page source. "sucrase" = doesvalidate-react-pagesreport areact-page-syntaxfinding; "tsc" =parseDiagnostics.lengthunderScriptKind.TSX.const n = 0755;const s = '\012';const n = 0b2;const n = 1__0;with (o) { x = 1; }Both directions are real. Four shapes pass the syntax gate and are unreadable to the props gate; one shape is refused by the syntax gate and parses fine for the props gate.
Why it matters
The first four rows are the case the deleted comment was most wrong about: the syntax gate is green, so nothing tells the author anything, while the props gate is reading a partially recovered tree. Before #10653 that combination was total silence. After #10653 the props gate reports
react-page-source-unparseableon exactly those rows, which is why the fix does not double-report: the two rules fire on overlapping-but-different sets, by construction.The last row is the opposite and is harmless today (the syntax gate reports; the props gate reads the source fine).
Pinned as a regression test in PR for #10653:
packages/lint/src/validate-react-page-props.test.ts→'the syntax gate is a DIFFERENT parser — measured, not assumed', which asserts the0755row in both directions.What is NOT claimed here
That either parser is wrong. Sucrase is the family that actually transpiles a react page, so its verdict is the one closest to what ships; TypeScript's grammar is stricter about numeric literal legacy forms. What is filed is that two gates on the same authored surface answer "does this parse?" differently, that the divergence is unmeasured anywhere in the tree, and that a comment in the props gate asserted the opposite.
Possible dispositions, no recommendation made here (it needs a spec-level answer about which parser defines "a valid react page source"):
Refs: #10653 · #10606 · PR #10651