chore: remove unused hooks barrel - #59
Conversation
package/src/hooks/index.ts re-exported useCollectedOverlays, but nothing imported the barrel. MapView reaches the hook by path instead, which is the established pattern in this package, and the hook is internal rather than part of the public API, so no exported surface changes. Clears the deslop/unused-file finding reported by react-doctor.
|
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)
💤 Files with no reviewable changes (1)
Included review availability: 1 review is 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 change removes Changes
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to This change removes an unused internal re-export without changing the package API or runtime behavior; 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 PR only deletes the one-line 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 |
Summary
Deletes
package/src/hooks/index.ts, a one-line barrel re-exportinguseCollectedOverlaysthat nothing imported.Why it is safe
from '../hooks'/from './hooks'has no matches anywhere inpackage/srcorexample.package/src/components/MapView.tsx:3, imports the hook by path — the established pattern in this package.useCollectedOverlaysis internal.package/src/index.tsexports only components, types and utils, so the public API surface is unchanged.components,types,utils) are consumed bysrc/index.ts; the hooks barrel was the only unused one, so this does not cut against a package-wide convention.Verification
bun run lintbun run typecheckbun run buildcd package && bun test src/bun run doctordeslop/unused-filegonebun run doctorstill exits 1, as it did before this change — the repo carries pre-existing findings it does not gate on. To confirm nothing regressed I ran doctor both ways: baseline was 8 issues, now 7. The one that disappeared is exactlydeslop/unused-fileonsrc/hooks/index.ts; the remaining 7 are unchanged and out of scope here:deslop/unused-dev-dependency—package.jsonno-ref-current-in-render—src/hooks/useCollectedOverlays.ts:239deslop/unused-export—src/utils/enteringAnimation.ts:33example/App.tsxNo formatting run was needed — the change is a pure deletion, so no file was modified.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.