Skip to content

chore: remove unused hooks barrel - #59

Open
jkasprzyk17 wants to merge 1 commit into
mainfrom
chore/remove-unused-hooks-barrel
Open

chore: remove unused hooks barrel#59
jkasprzyk17 wants to merge 1 commit into
mainfrom
chore/remove-unused-hooks-barrel

Conversation

@jkasprzyk17

@jkasprzyk17 jkasprzyk17 commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Deletes package/src/hooks/index.ts, a one-line barrel re-exporting useCollectedOverlays that nothing imported.

Why it is safe

  • No importers: from '../hooks' / from './hooks' has no matches anywhere in package/src or example.
  • The only consumer, package/src/components/MapView.tsx:3, imports the hook by path — the established pattern in this package.
  • useCollectedOverlays is internal. package/src/index.ts exports only components, types and utils, so the public API surface is unchanged.
  • The other three barrels (components, types, utils) are consumed by src/index.ts; the hooks barrel was the only unused one, so this does not cut against a package-wide convention.

Verification

Check Result
bun run lint clean
bun run typecheck exit 0
bun run build exit 0, 29 files compiled
cd package && bun test src/ 50 pass, 0 fail
bun run doctor deslop/unused-file gone

bun run doctor still 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 exactly deslop/unused-file on src/hooks/index.ts; the remaining 7 are unchanged and out of scope here:

  • deslop/unused-dev-dependencypackage.json
  • no-ref-current-in-rendersrc/hooks/useCollectedOverlays.ts:239
  • deslop/unused-exportsrc/utils/enteringAnimation.ts:33
  • 4 findings in example/App.tsx

No formatting run was needed — the change is a pure deletion, so no file was modified.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

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.
@github-actions

Copy link
Copy Markdown

React Doctor found 7 issues in 4 files · 2 errors & 5 warnings · score 64 / 100 (Needs work) · full project

Errors

5 warnings

App.tsx

  • ⚠️ L729 Side effect inside a state updater function no-side-effect-in-state-updater-function
  • ⚠️ L734 Side effect inside a state updater function no-side-effect-in-state-updater-function
  • ⚠️ L735 Side effect inside a state updater function no-side-effect-in-state-updater-function

package.json

  • ⚠️ L0 unused-dev-dependency

src/utils/enteringAnimation.ts

  • ⚠️ L33 unused-export

Reviewed by React Doctor for commit 194b77c. See inline comments for fixes.

@coderabbitai

coderabbitai Bot commented Aug 24, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e619c80b-735c-4b6e-a426-ab81ea62c016

📥 Commits

Reviewing files that changed from the base of the PR and between 1c38c93 and 194b77c.

📒 Files selected for processing (1)
  • package/src/hooks/index.ts
💤 Files with no reviewable changes (1)
  • package/src/hooks/index.ts

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.


📝 Walkthrough

Summary by CodeRabbit

  • Breaking Changes
    • Removed the useCollectedOverlays hook from the public package exports.

Walkthrough

The change removes useCollectedOverlays from the hooks export file.

Changes

Cohort / File(s) Summary
Hooks API
package/src/hooks/index.ts
Removes the useCollectedOverlays export from the public hooks surface.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to 194b7

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: piotr-graczyk-dev

🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Security Check ✅ Passed PASS. The PR only deletes the one-line package/src/hooks/index.ts barrel export. The hook implementation remains unchanged, and MapView.tsx still imports it directly from `../hooks/useCollectedOve…
Full details: Security Check

Explanation

PASS. The PR only deletes the one-line package/src/hooks/index.ts barrel export. The hook implementation remains unchanged, and MapView.tsx still imports it directly from ../hooks/useCollectedOverlays. The diff introduces no attacker-controlled data flow, security sink, permission change, dependency change, or secret exposure. No medium, high, or critical vulnerability is present.

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 @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant