ESLint plugin for Zod v4 best practices and migration from v3. Current stable version 0.3.0. Actively maintained, with breaking change detection and auto-fix support. Differentiator: educational rule messages, React-aware for memoization, and flat config support for ESLint 9+. Covers all major breaking changes from Zod v3 to v4, such as string format methods, record signature, error handling, and object methods.
npm install eslint-plugin-zod-v4No compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Minimal flat config for ESLint 9+ using recommended config and custom rules.
Replace z.string().email() with z.email().
Use z.record(keySchema, valueSchema).
Replace error.errors with error.issues.
Replace .merge() with .extend().
Replace .superRefine() with .check().
Replace z.nativeEnum() with z.enum().
Use the 'error' param instead of invalid_type_error/required_error.
Run 'npm install --save-dev eslint-plugin-zod-v4' and ensure it's in node_modules.
Use flat config (eslint.config.js) and import the plugin directly: import zodPlugin from 'eslint-plugin-zod-v4'
Use ESM import: import { configs } from 'eslint-plugin-zod-v4'