TYPE011warningPro

inline-enum-duplication

Same enum values defined in multiple places - should use shared definition.

Applies to: JavaScript, TypeScript

Why this matters

When the same enum values are copy-pasted across files, adding or renaming a value requires changes in multiple places. This leads to values drifting out of sync, inconsistent validation, and bugs when one location is updated but others are missed. Define enums once (in Prisma schema, shared types, or constants) and import everywhere.

Catch it before it ships

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

TYPE011 is part of the Pro rule set. See pricing — the free tier ships 24 checks with no signup.

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