no-zod-native-enum
Disallow z.nativeEnum() (and z.enum() over a TypeScript enum); use z.enum(["a", "b"]) with a string-literal union instead.
Why
The project prefers literal-first schema definitions. nativeEnum also accepts plain enum-like objects, so this is an explicit declaration policy, not proof that every call duplicates a TypeScript enum's runtime object.
Fix
Pass string literals directly to z.enum and derive the TypeScript type with z.infer.
Examples
export enum Status { Active = "active", Inactive = "inactive",}import { z } from "zod";import { Status } from "./status-values.js";export const StatusSchema = z.enum(Status);import { z } from "zod";export const StatusSchema = z.enum(["active", "inactive"]);import { z } from "zod";const S = z.nativeEnum({ Active: "active", Inactive: "inactive" });import { z } from "zod";const S = z.enum(["active", "inactive"]);