refactor: remove dead normalizeMarkerDescriptor helper - #57
Conversation
normalizeMarkerDescriptor had no callers anywhere in the repo and was not re-exported from the package entrypoint. It also duplicated normalizeDescriptor in overlays/normalizeMarkerDescriptors.ts while dropping image, anchor, centerOffset, rotation, flat and opacity, so any future caller would have silently lost those marker properties. Drop it along with the MarkerDescriptor / PublicMarkerDescriptor type imports it was the only user of in that file.
|
React Doctor found 7 issues in 4 files · 2 errors & 5 warnings · score 64 / 100 (Needs work) · full project Errors
5 warnings
Reviewed by React Doctor for commit |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
Included review availability: 3 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour. 📝 WalkthroughSummary by CodeRabbit
WalkthroughThe entering-animation utility removes unused marker descriptor imports and the exported ChangesEntering animation utility
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This localized cleanup removes dead code without changing referenced behavior, and no actionable merge-blocking risk remains after normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 1✅ Passed checks (1 passed)
Full details: Security CheckExplanation PASS. The commit changes only Warning Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption. Comment |
What
Deletes
normalizeMarkerDescriptor(singular) frompackage/src/utils/enteringAnimation.ts, along with theMarkerDescriptor/PublicMarkerDescriptortype imports it was the only user of in that file.Why
It was dead code, and it was also wrong:
normalizeMarkerDescriptor\bmatched only its own definition — nothing inpackage/src,package/type-testsorexample— and it was not re-exported frompackage/src/index.ts.normalizeDescriptorinpackage/src/overlays/normalizeMarkerDescriptors.tsbut droppedimage,anchor,centerOffset,rotation,flatandopacity. Any future caller would have silently lost those marker properties.normalizeEnteringAnimationin the same file stays — it is still used bynormalizeMarkerDescriptors.ts, which is the complete and correct implementation.Verification
No behaviour change: nothing referenced the deleted symbol before or after.
bun run lintbun run typecheckcd package && bun test src/Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.