eslint-plugin-zod weekly downloads statistics
By marcalexiei · npm · ESLint plugins
ESLint plugin that adds custom linting rules to enforce best practices when using Zod
eslint-plugin-zod has 64,347 recorded weekly downloads on npm, a decrease of 22.5% over the past 30 days.
It ranks #510 of 2,251 tracked npm listings by weekly downloads.
Over 90 days, weekly downloads changed by +26.0%.
PluginStats has 121 daily observations since Jun 19, 2026; the latest is from Oct 17, 2026.
About eslint-plugin-zod
eslint-plugin-zod
[![CI Status][CIBadge]][CIURL] [![Code style: prettier][CodeStyleBadge]][CodeStyleURL] [![Lint: eslint][lintBadge]][lintURL] [![Open on npmx][npmVersionBadge]][npmVersionURL] [![Open issue tracker][issuesBadge]][issuesURL]
ESLint plugin that adds custom linting rules to enforce best practices when using Zod.
It can also work with Oxlint!\ Find out more about Oxlint's jsPlugins.
Rules
💼 Configurations enabled in.\ ✅ Set in the recommended configuration.\ 🔒 Set in the strict configuration.\ 🎨 Set in the stylistic configuration.\ 🔧 Automatically fixable by the --fix CLI option.\ 💡 Manually fixable by editor suggestions.
| Name | Description | 💼 | 🔧 | 💡 |
| array-style | Enforce consistent Zod array style | 🎨 | 🔧 | | | consistent-import | Enforce a consistent import style for Zod | ✅ 🔒 | 🔧 | | | consistent-import-source | Enforce consistent source from Zod imports | 🎨 | | 💡 | | consistent-object-schema-type | Enforce consistent usage of Zod schema methods | | | 💡 | | consistent-schema-output-type-style | Enforce consistent use of z.infer or z.output for schema type inference | 🎨 | 🔧 | | | consistent-schema-var-name | Enforce a consistent naming convention for Zod schema variables | ✅ 🔒 | | | | no-any-schema | Disallow usage of z.any() in Zod schemas | ✅ 🔒 | | 💡 | | no-coerce-boolean | Disallow z.coerce.boolean() because it treats any non-empty string as true. | ✅ 🔒 | | 💡 | | no-conflicting-checks | Disallow check combinations that can never match, are redundant, or do not apply to the schema type | ✅ 🔒 | | | | no-duplicate-schema-methods | Disallow calling the same schema method more than once in a single chain | ✅ 🔒 | | | | no-dynamic-schema-value | Disallow non-static values passed as arguments in a Zod schema expression | 🔒 | | | | no-empty-custom-schema | Disallow usage of z.custom() without arguments | ✅ 🔒 | | | | no-function-scoped-schema | Disallow constructing a Zod schema inside a function body | 🔒 | | | | no-native-enum | Disallow deprecated z.nativeEnum() in favor of z.enum(). | ✅ 🔒 | 🔧 | | | no-number-schema-with-finite | Disallow deprecated z.number().finite(). In Zod 4+ number schemas do not allow infinite values by default, so it is a no-op. | ✅ 🔒 | 🔧 | | | no-number-schema-with-int | Disallow usage of z.number().int() as it is considered legacy | ✅ 🔒 | 🔧 | | | no-number-schema-with-is-finite | Disallow using deprecated isFinite on a Zod number schema; in v4+ it is always true. | ✅ 🔒 | | | | no-number-schema-with-is-int | Disallow using deprecated isInt on a Zod number schema; check the format property instead. | ✅ 🔒 | | | | no-number-schema-with-safe | Disallow deprecated z.number().safe(). Use z.int(); .safe() is now identical to .int(). | ✅ 🔒 | 🔧 | | | no-number-schema-with-step | Disallow deprecated z.number().step(). Use .multipleOf() instead. | ✅ 🔒 | 🔧 | | | no-optional-and-default-together | Disallow using both .optional() and .default() on the same Zod schema | ✅ 🔒 | 🔧 | | | no-promise-schema | Disallow deprecated z.promise() schemas. | ✅ 🔒 | | | | no-schema-with-is-nullable | Disallow deprecated .isNullable() on a Zod schema; use safeParse(null).success instead. | ✅ 🔒 | | | | no-schema-with-is-optional | Disallow deprecated .isOptional() on a Zod schema; use safeParse(undefined).success instead. | ✅ 🔒 | | | | no-throw-in-refine | Disallow throwing errors directly inside Zod refine callbacks | ✅ 🔒 | | | | no-transform-in-record-key | Disallow transforms in z.record() key schemas, which can cause silent key mutations and data loss through key collisions | ✅ 🔒 | | | | no-unknown-schema | Disallow usage of z.unknown() in Zod schemas | 🔒 | | | | no-unnecessary-readonly | Disallow .readonly() on schemas whose output is already immutable | 🔒 | 🔧 | | | prefer-enum-over-literal-union | Prefer z.enum() over z.union() when all members are string literals. | 🎨 | 🔧 | | | prefer-loose-object | Prefer z.looseObject() over z.object().passthrough() and z.object().loose() | 🎨 | 🔧 | | | prefer-map-set-size-over-min-max | Prefer .size(n) over .min(n).max(n) with the same value on a set or map schema | 🎨 | 🔧 | | | prefer-meta | Enforce usage of .meta() over .describe() | 🎨 | 🔧 | | | prefer-meta-last | Enforce .meta() as last method | 🎨 | 🔧 | | | prefer-nullish | Enforce .nullish() instead of combining .optional() and .nullable() | 🎨 | 🔧 | | | prefer-strict-object | Prefer z.strictObject() over z.object().strict() | 🎨 | 🔧 | | | prefer-string-length-over-min-max | Prefer .length(n) over .min(n).max(n) with the same value on a string schema | 🎨 | 🔧 | | | prefer-string-schema-with-trim | Enforce z.string().trim() to prevent accidental leading/trailing whitespace | 🎨 | 🔧 | | | prefer-top-level-string-formats | Prefer top-level string format schemas over deprecated z.string().() methods | ✅ 🔒 | 🔧 | | | prefer-trim-before-string-length-checks | Enforce .trim() is called before string length checks to ensure accurate validation | 🔒 | 🔧 | | | prefer-tuple-over-array-length | Prefer z.tuple() over a length-constrained z.array() so the length is preserved in the inferred type. | 🎨 | 🔧 | | | prefer-validate | Prefer boolean validation when only the success of parsing is used | 🎨 | | 💡 | | require-brand-type-parameter | Require type parameter on .brand() functions | ✅ 🔒 | | 💡 | | require-error-message | Enforce that custom refinements include an error message | ✅ 🔒 | 🔧 | | | schema-error-property-style | Enforce consistent style for error messages in Zod schema validation (using ESQuery patterns) | 🎨 | | |
Installation
ESLint
Install eslint and eslint-plugin-zod using your preferred package manager:
ESLint Configuration
1. Import the plugin
2. Add recommended config to your ESLint setup
Here's a minimal example using the flat config format:
Oxlint
Install oxlint and eslint-plugin-zod using your preferred package manager:
Oxlint Configuration
1. Import the plugin…
Description from the npm listing.
- eslint
- eslint-plugin
- eslintplugin
- oxlint
- zod
Where eslint-plugin-zod sits in the listing
Each band is one page of 20. Weekly downloads on a log scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Recent observations
Full history (121)Similar npm ESLint plugins plugins
Data source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/eslint-plugin-zod. First seen Oct 16, 2026; last successful collection Oct 18, 2026. See the methodology.