API002warningPro

inconsistent-api-naming

Mixed naming conventions (snake_case/camelCase) in API code cause bugs

Applies to: Go, JavaScript, Python, Ruby, Rust, TypeScript

Why this matters

When your frontend uses camelCase (userName) but your backend uses snake_case (user_name), you'll get undefined values and hard-to-debug issues. Pick one convention and stick to it, or use explicit transformations.

Catch it before it ships

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

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