chore: reduce code-health baseline debt - #31
Merged
Conversation
- Fix all 19 TypeScript format violations (biome format) - Extract routePose helper from server route() to reduce CCN 17→13 - Extract drawArm helper from drawSkeleton to reduce CCN 16→10 - Move hostFrom after Room class to fix lizard misparse (CCN 17→4, length 192→7) - Extract shared roundRect + distPointToSegment into games/canvas-utils.ts to eliminate cross-game duplication - Lower ratcheted baselines: format 19→0, complexity violations 6→3, maxLength 189→180, duplication clones 7→5, duplicatedLines 102→65, percentage 0.8814→0.5543 Closes #26
sarthakagrawal927
force-pushed
the
fix/reduce-code-health-debt-26
branch
from
August 15, 2026 12:18
a25e707 to
a262674
Compare
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.
Closes #26
Summary
Reduces code-health debt across the TypeScript codebase by fixing format violations, lowering complexity, and eliminating cross-game duplication. All ratcheted baselines lowered to match the improved measurements.
Changes
Format debt: 19 → 0 files
Ran
biome formaton all tracked TypeScript paths to fix every outstanding formatting violation.Complexity violations: 6 → 3
routePosehelper from therouteswitch to reduce CCN from 17 to 13.drawArmhelper fromdrawSkeletonto reduce CCN from 16 to 10.hostFromafter theRoomclass to fix a lizard misparse that attributed the entire class body to the function (CCN 17→4, length 192→7).Duplication: 7 → 5 clones, 102 → 65 lines
Extracted shared
roundRectanddistPointToSegmentfunctions into a newweb/src/games/canvas-utils.tsmodule, eliminating identical copies across motion-maker, slice, and reach-dodge.Baseline updates
Verification
Full quality gate (
pnpm check) passes: format, lint, typecheck, test, build, landing, coverage, knip, complexity, duplication, cycles, dependencies, suppressions, hygiene.