Repository navigation
Conversation
"Lift non-trivial conditionals into named consts" read as "assign the whole ternary to a const", which produced multi-line ternaries hiding both variants in one variable. The rule now says: every alternative UI part gets its own const, and the returned JSX decides with a one-line ternary or &&. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Coverage Report for ./packages/components/
File CoverageNo changed files found. |
mfal
marked this pull request as ready for review
October 8, 2026 09:10
Contributor
🚀 Preview DeploymentPreview environments are ready:
Images:
|
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Sharpens the JSX readability rule in
packages/components/AGENTS.mdandPATTERNS.md: every alternative UI part gets its own const, and the returned JSX decides with a one-line ternary or&&.The old wording, "lift … non-trivial conditionals into named consts", read as "assign the whole ternary to a const". That produced multi-line ternaries that hide both variants inside one variable (
const donut = isSkeleton ? (…) : (…)). Seven such spots in the SkeletonMode stack (#3321, #3322, #3320, #3324) are already rewritten to the new rule.Docs only, no release.
🤖 Generated with Claude Code