Skip to content
Back to snapcart-api report
Code QualityLow

Unused Export

src/utils/format.ts:17

What's going on

`formatSlug` is exported but never imported, so tree-shaking keeps it and its helper bundle.

Why it matters

Dead exports quietly grow the client bundle and confuse future readers.

src/utils/format.ts:17

Recommended Fix

Replace the inline query with a parameterized statement and validate the id before it ever reaches the database. A regression test is generated alongside the patch.

Before
1export function formatSlug(input: string): string { ... }
After
1function formatSlug(input: string): string { ... } // local
  1. Uploaddone
  2. Analyzedone
  3. Finddone
  4. Explainactive
  5. Fixupcoming
  6. Testupcoming
  7. Verifyupcoming