Skip to content

Commit d5a3045

Browse files
committed
docs(lint): name the sibling call site the union default still traps
The note read as if the flat-union default were correct for the caller that still takes it. It is not: `lint-flow-patterns.ts` runs its own recursive template scan over the union view, so it is blind to an `http` node's `body` for exactly the reason this function's own doc gives one paragraph earlier — the same defect, one call site over. The default is scope control for this change, not a verdict, and the note now says which. Also states the endgame, so the next reader does not have to rediscover it: once that caller passes its own slots, `regionKeys` has no default-takers left and must become required, or the shorter call keeps handing out the trap. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vbw3RPgdtqesx4azk9SbW8
1 parent e1c87b1 commit d5a3045

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

packages/lint/src/flow-walk.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,16 @@ export function ownRegionKeys(nodeType: unknown): readonly string[] {
151151
* is the reverse of the double-count this view exists to prevent and strictly
152152
* worse: a double-count is visible in the output.
153153
*
154-
* The union stays the DEFAULT only so this function's other caller keeps the
155-
* behaviour it was written against; it is not the correct argument for any new
156-
* one. `regionKeys: []` is a real answer (strip nothing) and is distinct from
154+
* The union stays the DEFAULT to bound this change to the two rules #16111
155+
* names — ⛔ NOT because it is the right argument for the caller still taking
156+
* it. `lint-flow-patterns.ts` reads the union view for its own recursive
157+
* template scan, so it is blind to an `http` node's `body` for exactly the
158+
* reason above: the same defect, one call site over, tracked on #16405. Once
159+
* that caller passes its own slots this default has no callers left and
160+
* `regionKeys` must become REQUIRED, so no later caller inherits the trap by
161+
* writing the shorter call.
162+
*
163+
* `regionKeys: []` is a real answer (strip nothing) and is distinct from
157164
* omitting the parameter.
158165
*
159166
* Exported since #5383 because {@link WalkedFlowNode.localConfig} is not the only

0 commit comments

Comments
 (0)