Repository navigation
fix(website): satisfy lint in the landing fit script - #433
Conversation
Replace the unchecked firstElementChild cast with an instanceof guard and add the blank lines lint requires. Behavior is unchanged; this unblocks CI on main, which has failed lint since 3af79b9. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🚀 Deploying Preview to Cloudflare 🚀Preview Deployments by commit
|
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes.
|
| Layer / File(s) | Summary |
|---|---|
Guard the fit handler website/landing/home/Landing.astro |
The [data-fit] handler exits when its first child is not an HTMLElement. Existing scaling and height updates remain unchanged. |
Priority:
Estimated code review effort: 1 (Trivial) | ~3 minutes
Change: Refactor
Possibly related PRs
- Waishnav/devspace#422: Introduced the profile-card scaling behavior that this change preserves.
- Waishnav/devspace#429: Added lint rules that reject the unchecked assertion addressed here.
- Waishnav/devspace#430: Enabled linting in CI and included cleanup related to this lint fix.
Merge Risk: 
Minimal · up to 22158
-
The fit-handler guard introduces no identified merge-blocking risk. Merge after normal checks pass.
Pre-merge checks: 
5
-
Full details: Docstring Coverage
-
Explanation
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
A rabbit checks the first child’s kind,
Then leaves the scaling flow aligned.
The card still fits as before,
With no unchecked cast at the door.
A neat guard keeps the page in line.
Comment @coderabbitai help to get the list of available commands.
CI on
mainhas failed lint since 3af79b9: the landing page's fit script castsfirstElementChildwithout aSAFETY:justification and is missing the blank lines the anti-slop rules require.This replaces the cast with an
instanceof HTMLElementguard, which is the real invariant (every[data-fit]wrapper has one element child), and adds the blank lines. Behavior is unchanged.pnpm lintnow passes.The packaging and installer PRs stack on this so their CI runs aren't red for an unrelated reason.
🤖 Generated with Claude Code
Summary by CodeRabbit