Skip to content

require-pascal-case-zod-schema-name

Require confirmed module-level Zod schema contracts to use PascalCase with a Schema suffix.

Why

A reusable Zod schema is a runtime type contract. PascalCase mirrors that role; SCREAMING_SNAKE_CASE should remain reserved for scalar values and lookup tables.

Fix

Rename the binding to PascalCase ending in Schema (for example, MutationRouteBaseSchema).

Examples

Before — flagged Do not name a schema like a scalar constant
src/user.ts
import { z } from "zod";
export const USER_SCHEMA = z.object({ id: z.string() });
After — preferred Name a reusable schema like a runtime type contract
src/user.ts
import { z } from "zod";
export const UserSchema = z.object({ id: z.string() });

Formerly: zod-naming-convention