STRUCT013warningFree tier

duplicate-client-init

Same SDK client is initialized in multiple files — consolidate into one shared module.

Applies to: Project-level

Why this matters

When the same external service client (like Resend, Stripe, or PrismaClient) is initialized in multiple files with `new`, changes to one copy don't update the others. This leads to bugs when copies drift: one file gets a mock mode, retry logic, or config fix while the others silently keep the old behavior. Centralize initialization in one shared module and import from there.

Catch it before it ships

pip install stablestack # or: npx stablestackstablestack # scans your project, STRUCT013 includedstablestack explain STRUCT013

False positive in your codebase? Suppress a single line with # noqa: STRUCT013