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
recognize self-closing <Match when={...} /> elements as valid direct children of <Case>
retain diagnostics for non-Match children
add focused regression coverage
Context
The broader Case child validation from issue #39 was merged in #58 while this PR was open. That implementation accepted only JsxElement children, so valid self-closing Match branches were reported by askr/control-contract. This rebased PR now contains only the remaining compatibility fix.
Validation
focused analyzer suite: 15/15 tests
full npm run check: lint, typecheck, 202 tests with coverage, build, publint, and package dry-run
Rebased onto current main after #58 merged. This PR is now a focused fix for the remaining analyzer bug: valid self-closing <Match when={...} /> children were still diagnosed under <Case>. The full repository check passes (202 tests, lint, typecheck, coverage, build, publint, package dry-run).
Merged current upstream main into this branch without rewriting history. The conflict was additive in tests/analyze.rules.test.ts; the resolution preserves all upstream analyzer tests and retains the focused self-closing <Match /> regression test. Verified exact pushed head 4dc737c5a6aae815a6112ef9588cae283f325d18 with the focused regression test (1 passed) and full npm run check under Node 24.17.0 (lint, typecheck, 210 coverage tests, build, publint, and package dry-run all passed). GitHub now reports the PR mergeable; fresh CI is running.
Current head 4dc737c5a6aae815a6112ef9588cae283f325d18 now appears to be in a clean merge-ready state: the PR is mergeable, all visible CI jobs on that exact SHA have completed successfully, and there are no review threads or review-body comments open on the current PR state. The self-closing <Match /> regression remains isolated to the intended analyzer case, with the upstream main test additions preserved on this head. If this still matches the intended direction, it looks ready for maintainer review/merge when convenient.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
<Match when={...} />elements as valid direct children of<Case>MatchchildrenContext
The broader Case child validation from issue #39 was merged in #58 while this PR was open. That implementation accepted only
JsxElementchildren, so valid self-closing Match branches were reported byaskr/control-contract. This rebased PR now contains only the remaining compatibility fix.Validation
npm run check: lint, typecheck, 202 tests with coverage, build, publint, and package dry-run