TYPE005infoPro

inline-type-definition

Inline type definition instead of using shared/generated types.

Applies to: JavaScript, TypeScript

Why this matters

When frontend and backend define the same types separately, they can drift apart. Use generated types from OpenAPI/GraphQL schemas or a shared types package. Inline type definitions like `{ user_id: string, name: string }` should be replaced with imported types that stay in sync with your API.

Catch it before it ships

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

TYPE005 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: TYPE005