ESLint plugin providing custom lint rules for projects using zod-openapi, which extends Zod with OpenAPI metadata. Version 2.0.0 requires Node >=16.11 and ships TypeScript types. It enforces best practices like requiring `.meta()`, JSDoc comments, and examples on Zod types, and provides auto-fixable rules. Differentiates from generic ESLint plugins by being purpose-built for zod-openapi's `.meta()` chain pattern. Released via GitHub Releases with manual tagging.
npm install eslint-plugin-zod-openapiNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
ESLint configuration enabling all zod-openapi rules with overrides for API type files.
Ensure rule keys in ESLint config are prefixed with 'zod-openapi/'.
Use ESLint overrides to apply rules only to files that use zod-openapi, or ensure all Zod objects have `.meta()`.
Upgrade Node to >=16.11.
Review auto-fix output manually if using other ESLint plugins that impose comment formatting.
Install the plugin: npm i -D eslint-plugin-zod-openapi
Add 'zod-openapi' to the 'plugins' array in your ESLint config.
Ensure the file uses zod-openapi's z.object(...).meta(...) or exclude the file from the rule via overrides.