@eslint-zod/utils weekly downloads statistics
By eslint-zod · npm · ESLint plugins
Shared utilities for eslint-zod plugins
@eslint-zod/utils has 55,674 recorded weekly downloads on npm, a decrease of 17.5% over the past 30 days.
It ranks #538 of 2,251 tracked npm listings by weekly downloads.
Over 90 days, weekly downloads changed by +73.8%.
PluginStats has 121 daily observations since Jun 19, 2026; the latest is from Oct 17, 2026.
About @eslint-zod/utils
@eslint-zod/utils
[![CI Status][CIBadge]][CIURL] [![Code style: prettier][CodeStyleBadge]][CodeStyleURL] [![Lint: eslint][lintBadge]][lintURL] [![Open on npmx][npmVersionBadge]][npmVersionURL] [![Open issue tracker][issuesBadge]][issuesURL]
Shared AST utilities for
• eslint-plugin-zod • eslint-plugin-zod-mini • eslint-plugin-zod-core
[!NOTE] This package is a dependency of all previously listed packages, so you do not need to install it directly.
API
Every export carries JSDoc with usage notes — refer to the linked source files (or hover in your editor) for the full description and examples. This README only lists what's available.
Root exports — @eslint-zod/utils
AST parsing, import tracking, traversal, and fixer helpers.
Rule authoring
• createRuleCreator(getRuleURL) — builds a rule factory; each rule gets its docs URL, and create receives the user's options merged over defaultOptions. Types RuleCreator (the factory) and RuleDefinition (what it takes); the types they are written against live in @eslint-zod/utils/rule-types • createPluginMeta(packageJSONURL) — a plugin's name, version, getRuleURL and createRule, read from its package.json; rule docs are expected at docs/rules/.md under repository.directory. Type PluginMeta
Import tracking & scopes
• ZodImportScope — the class defining which import sources a plugin considers in-scope; scope.createTracker({ kind }) is how rules get a per-file import tracker; kind is required, and sourceCode enables the scope-aware resolvers below • zodImportScope, zodMiniImportScope, zodCoreImportScope — pre-built ZodImportScope instances • scope.createTracker({ kind, sourceCode? }) — the returned tracker exposes createSchemaVisitor, detectZodSchemaRootNode, isZodSchemaOfType, collectZodChainMethods, collectZodSchemaConstraints, findZodChainedMethod, and the import-lookup helpers. getZodImportBindings() returns every binding with the declaration it came from, and resolveZodImport(node) / resolveZodExport(node) resolve a node to its zod import honouring lexical scope, so a shadowed z resolves to null — use them over isZodNamespace in a rule whose fixer writes an import. createTracker({ kind }) picks which specifiers are recorded, and is required — 'value' skips import type { … } and { type … }, 'type' keeps only those, 'all' keeps both and is what a rule reading a type position needs, since either form reaches one. Schema detection is reachable only through a tracker — the raw forms need the tracker's private import maps • tracker.createSchemaVisitor({ schemaType?, onSchema }) — builds the { ImportDeclaration, CallExpression } visitor a rule returns, with detection and the schemaType filter already applied. The standard shape for a schema rule; spread it to add more visitor keys • tracker.findZodChainedMethod(node, meta, methodName) — locate a method chained onto a schema (one name, or the first chained of several), for rules that flag a deprecated chained call. null means not chained; a match with member: null means chained on a chain the walker cannot name (z'number'.finite()), so report without a fix • types ZodSchemaImportTracker, ZodChainItem, ZodChainMember, ZodChainedMethodMatch, ZodImportBinding, ZodImportKind, ZodSchemaVisitorOptions, ZodTrackerOptions
Schema detection & navigation
• findParentSchemaMatchingCondition(node, options) — search up the AST for a matching ancestor schema call • getZodChainedMethodNames(meta) — the methods chained _onto_ a schema, with the factory removed. ZodSchemaMeta.methods includes the factory for a namespace schema (z.number().safe() → ['number', 'safe']) but not for a named import (number().safe() → ['safe']), so a bare methods.includes(name) matches the factory of an aliased import. Use this to ask "does this schema chain method X?" • getZodSchemaBaseType(schemaType) — map a schema factory name to its base type category; returns ZodSchemaBaseType | null, null for factories rules should not reason about • type ZodSchemaMeta — what the tracker's detectZodSchemaRootNode returns (or null) • types ZodSchemaConstraint, ZodChainedConstraint, ZodCheckArgumentConstraint — the normalized constraints produced by the tracker's collectZodSchemaConstraints
Fixer helpers
• buildZodChainRemoveMethodFix(opts) — remove one method from a chain • hasCommentInRange(sourceCode, range) — whether a comment sits inside a range a fixer is about to remove or rewrite • hasParenthesizedReceiver(member) — whether a member expression's object is wrapped in parentheses ((z.string()).min(1)), where a fixer cutting at the object's end would leave the closing parenthesis behind • buildZodChainReplacementFix(opts) — replace a run of methods • buildZodConstraintsRemoveFix(opts) — remove a set of ZodSchemaConstraints (chained or check-argument) • buildZodWrapperUnwrapFix(opts) — replace a single-argument wrapper call with its argument
Zod vocabulary tables…
Description from the npm listing.
- eslint
- eslint-plugin
- utils
- zod
Where @eslint-zod/utils 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-zod/utils. First seen Oct 16, 2026; last successful collection Oct 18, 2026. See the methodology.