{"_id":"eslint-plugin-zod-v4","_rev":"7-57697613199c98010a2ff5d63e2463b6","name":"eslint-plugin-zod-v4","dist-tags":{"latest":"0.4.1"},"versions":{"0.1.0":{"name":"eslint-plugin-zod-v4","version":"0.1.0","keywords":["eslint","eslintplugin","eslint-plugin","zod","zod-v4","validation","schema","typescript","migration"],"author":{"name":"Matheus Pimenta","email":"studio.kodaai@gmail.com"},"license":"MIT","_id":"eslint-plugin-zod-v4@0.1.0","maintainers":[{"name":"justmpm","email":"tetu_gato.1@hotmail.com"}],"homepage":"https://github.com/Just-mpm/eslint-plugin-zod-v4#readme","bugs":{"url":"https://github.com/Just-mpm/eslint-plugin-zod-v4/issues"},"dist":{"shasum":"3003f48a1216bdd76fa27acb8c95dfd6aa1d9f04","tarball":"https://registry.npmjs.org/eslint-plugin-zod-v4/-/eslint-plugin-zod-v4-0.1.0.tgz","fileCount":9,"integrity":"sha512-01BiGySjeTGzqKV81ilN/jTDtFQTGVsaAdbDppfUYrQrsyTE0lgSCZclfsXPZOLiTMCWAGPkwVP1NDMUxy0PgA==","signatures":[{"sig":"MEQCIG1i/UD3KshrGZB498yd5QpVhUK+Qz0RbUuMf24pTaxzAiBSOn5o8gsVEJqWrJgFVZOAy0qwK/m+ThSKsnW0lRPY5w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3008678},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.18.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"scripts":{"dev":"tsup --watch","lint":"eslint .","test":"vitest","build":"tsup","test:run":"vitest run","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"justmpm","email":"tetu_gato.1@hotmail.com"},"repository":{"url":"git+https://github.com/Just-mpm/eslint-plugin-zod-v4.git","type":"git"},"_npmVersion":"11.7.0","description":"ESLint plugin for Zod v4 best practices and migration from v3","directories":{},"_nodeVersion":"22.19.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","eslint":"^9.27.0","vitest":"^3.1.4","typescript":"^5.8.3","@types/node":"^22.15.21","@typescript-eslint/utils":"^8.32.1","@typescript-eslint/rule-tester":"^8.32.1"},"peerDependencies":{"eslint":">=9.0.0"},"_npmOperationalInternal":{"tmp":"tmp/eslint-plugin-zod-v4_0.1.0_1765855355443_0.39299764591901654","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"eslint-plugin-zod-v4","version":"0.1.1","keywords":["eslint","eslintplugin","eslint-plugin","zod","zod-v4","validation","schema","typescript","migration"],"author":{"name":"Matheus Pimenta","email":"studio.kodaai@gmail.com"},"license":"MIT","_id":"eslint-plugin-zod-v4@0.1.1","maintainers":[{"name":"justmpm","email":"tetu_gato.1@hotmail.com"}],"homepage":"https://github.com/Just-mpm/eslint-plugin-zod-v4#readme","bugs":{"url":"https://github.com/Just-mpm/eslint-plugin-zod-v4/issues"},"dist":{"shasum":"9360a96ebd0a0443663f6c2e2b550c3958dce347","tarball":"https://registry.npmjs.org/eslint-plugin-zod-v4/-/eslint-plugin-zod-v4-0.1.1.tgz","fileCount":9,"integrity":"sha512-Ndo/cKdgKklq3/j2B4mN6vL8Po7x4pYGspdeBUPh2gPxQgk3aa2IfNpAm9c89aCFJc6jwExTuZzyaPF7U7GUlg==","signatures":[{"sig":"MEUCIAVYKtgYHWq+r2EZYj+DkbJHzYJ/En4SbbrcBceiewWjAiEAr0iavWuAwD4SS6iJ5TOPzTyirGfJaTDWJkDwLy1aDsk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3008786},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.18.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"gitHead":"cdd817b9026819320598106457ab96043215bca1","scripts":{"dev":"tsup --watch","lint":"eslint .","test":"vitest","build":"tsup","test:run":"vitest run","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"justmpm","email":"tetu_gato.1@hotmail.com"},"repository":{"url":"git+https://github.com/Just-mpm/eslint-plugin-zod-v4.git","type":"git"},"_npmVersion":"11.7.0","description":"ESLint plugin for Zod v4 best practices and migration from v3","directories":{},"_nodeVersion":"22.19.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","eslint":"^9.27.0","vitest":"^3.1.4","typescript":"^5.8.3","@types/node":"^22.15.21","@typescript-eslint/utils":"^8.32.1","@typescript-eslint/rule-tester":"^8.32.1"},"peerDependencies":{"eslint":">=9.0.0"},"_npmOperationalInternal":{"tmp":"tmp/eslint-plugin-zod-v4_0.1.1_1765856222164_0.19186935485232937","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"eslint-plugin-zod-v4","version":"0.2.0","keywords":["eslint","eslintplugin","eslint-plugin","zod","zod-v4","validation","schema","typescript","migration"],"author":{"name":"Matheus Pimenta","email":"studio.kodaai@gmail.com"},"license":"MIT","_id":"eslint-plugin-zod-v4@0.2.0","maintainers":[{"name":"justmpm","email":"tetu_gato.1@hotmail.com"}],"homepage":"https://github.com/Just-mpm/eslint-plugin-zod-v4#readme","bugs":{"url":"https://github.com/Just-mpm/eslint-plugin-zod-v4/issues"},"dist":{"shasum":"8b84fa288c08fa154305f02df1db3328666db8f8","tarball":"https://registry.npmjs.org/eslint-plugin-zod-v4/-/eslint-plugin-zod-v4-0.2.0.tgz","fileCount":9,"integrity":"sha512-zRatO36a6sIfzOaHFPxCOOrz43A3dUVW46fq/S3bnlhReT/fw9gdBiPBazmCOXOdttN9tZxrIdFSEfh6zxOgcg==","signatures":[{"sig":"MEUCIBEG+ZtHCx2XrypjhVK2/LA5e87e3wLZ2agtM+H5EpV7AiEA/ajLOw4dLf3oMr7D/RzubJgbKEjypdhf4iUgJg0b5gE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3049630},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.18.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"gitHead":"57b60849a98adafc41131dbd857882c94adfd99f","scripts":{"dev":"tsup --watch","lint":"eslint .","test":"vitest","build":"tsup","test:run":"vitest run","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"justmpm","email":"tetu_gato.1@hotmail.com"},"repository":{"url":"git+https://github.com/Just-mpm/eslint-plugin-zod-v4.git","type":"git"},"_npmVersion":"11.7.0","description":"ESLint plugin for Zod v4 best practices and migration from v3","directories":{},"_nodeVersion":"22.19.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","eslint":"^9.27.0","vitest":"^3.1.4","typescript":"^5.8.3","@types/node":"^22.15.21","@typescript-eslint/utils":"^8.32.1","@typescript-eslint/rule-tester":"^8.32.1"},"peerDependencies":{"eslint":">=9.0.0"},"_npmOperationalInternal":{"tmp":"tmp/eslint-plugin-zod-v4_0.2.0_1765858293366_0.1701352165244303","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"eslint-plugin-zod-v4","version":"0.2.1","keywords":["eslint","eslintplugin","eslint-plugin","zod","zod-v4","validation","schema","typescript","migration"],"author":{"name":"Matheus Pimenta","email":"studio.kodaai@gmail.com"},"license":"MIT","_id":"eslint-plugin-zod-v4@0.2.1","maintainers":[{"name":"justmpm","email":"tetu_gato.1@hotmail.com"}],"homepage":"https://github.com/Just-mpm/eslint-plugin-zod-v4#readme","bugs":{"url":"https://github.com/Just-mpm/eslint-plugin-zod-v4/issues"},"dist":{"shasum":"907a910aeefe0de0262e1757999503b592871c60","tarball":"https://registry.npmjs.org/eslint-plugin-zod-v4/-/eslint-plugin-zod-v4-0.2.1.tgz","fileCount":9,"integrity":"sha512-+wsJoGds6aVQCNf0HVfI6vhJsVsiSEiGOQQ+0up+TNpXm+Wpui/2nYwxaFr25VtIlqPhey/ihVTb8/wD5QwUAw==","signatures":[{"sig":"MEYCIQDhWro/OGY71cVg8acNOaIZtR764D2QcjOoO2xbKEjJ1QIhAPOfRcyC2mne4Gi/EorIgrstDa8Mg8htBVpwQYyRS5YR","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3052834},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.18.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"gitHead":"57b60849a98adafc41131dbd857882c94adfd99f","scripts":{"dev":"tsup --watch","lint":"eslint .","test":"vitest","build":"tsup","test:run":"vitest run","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"justmpm","email":"tetu_gato.1@hotmail.com"},"repository":{"url":"git+https://github.com/Just-mpm/eslint-plugin-zod-v4.git","type":"git"},"_npmVersion":"11.7.0","description":"ESLint plugin for Zod v4 best practices and migration from v3","directories":{},"_nodeVersion":"22.19.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","eslint":"^9.27.0","vitest":"^3.1.4","typescript":"^5.8.3","@types/node":"^22.15.21","@typescript-eslint/utils":"^8.32.1","@typescript-eslint/rule-tester":"^8.32.1"},"peerDependencies":{"eslint":">=9.0.0"},"_npmOperationalInternal":{"tmp":"tmp/eslint-plugin-zod-v4_0.2.1_1771476807713_0.8071315463021453","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"eslint-plugin-zod-v4","version":"0.3.0","keywords":["eslint","eslintplugin","eslint-plugin","zod","zod-v4","validation","schema","typescript","migration"],"author":{"name":"Matheus Pimenta","email":"studio.kodaai@gmail.com"},"license":"MIT","_id":"eslint-plugin-zod-v4@0.3.0","maintainers":[{"name":"justmpm","email":"tetu_gato.1@hotmail.com"}],"homepage":"https://github.com/Just-mpm/eslint-plugin-zod-v4#readme","bugs":{"url":"https://github.com/Just-mpm/eslint-plugin-zod-v4/issues"},"dist":{"shasum":"722adef3a42932e07bf42eb0ed1865ce62bf27a8","tarball":"https://registry.npmjs.org/eslint-plugin-zod-v4/-/eslint-plugin-zod-v4-0.3.0.tgz","fileCount":9,"integrity":"sha512-+wKungEiqqvDH+46RkeOo3SuQ7TjaOhmJBeA7n8UJ8Da/Gau0rT375qQqSK8kbXudgvySEyL1QrZVs8lxQc1yQ==","signatures":[{"sig":"MEYCIQDQdvx/7lfsEN6IYYxM3zJkZZZhq4TfVQMpIfkSnPcJ0QIhAIaA3GqAcYVuAmxjVSJPan4WQMquJeoale7X3yU98mu7","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3053736},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.18.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"gitHead":"abbb59b642fd749814690aed79745c2a92f4570c","scripts":{"dev":"tsup --watch","lint":"eslint .","test":"vitest","build":"tsup","test:run":"vitest run","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"justmpm","email":"tetu_gato.1@hotmail.com"},"repository":{"url":"git+https://github.com/Just-mpm/eslint-plugin-zod-v4.git","type":"git"},"_npmVersion":"11.7.0","description":"ESLint plugin for Zod v4 best practices and migration from v3","directories":{},"_nodeVersion":"22.19.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","eslint":"^9.27.0","vitest":"^3.1.4","typescript":"^5.8.3","@types/node":"^22.15.21","@typescript-eslint/utils":"^8.32.1","@typescript-eslint/rule-tester":"^8.32.1"},"peerDependencies":{"eslint":">=9.0.0"},"_npmOperationalInternal":{"tmp":"tmp/eslint-plugin-zod-v4_0.3.0_1771721701415_0.8520920344383685","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"eslint-plugin-zod-v4","version":"0.4.0","keywords":["eslint","eslintplugin","eslint-plugin","zod","zod-v4","validation","schema","typescript","migration"],"author":{"name":"Matheus Pimenta","email":"studio.kodaai@gmail.com"},"license":"MIT","_id":"eslint-plugin-zod-v4@0.4.0","maintainers":[{"name":"justmpm","email":"tetu_gato.1@hotmail.com"}],"homepage":"https://github.com/Just-mpm/eslint-plugin-zod-v4#readme","bugs":{"url":"https://github.com/Just-mpm/eslint-plugin-zod-v4/issues"},"dist":{"shasum":"6741248826e033a15f674ae73cf792a8303b82b9","tarball":"https://registry.npmjs.org/eslint-plugin-zod-v4/-/eslint-plugin-zod-v4-0.4.0.tgz","fileCount":9,"integrity":"sha512-3oyzJZ/E65WzhDCVrm4YUIZ7aRCSUSqee19btHnvAXOvEZJrTeCVfKMkAQ49NxvXH+AZ/UiVXuuUgfvadK6osA==","signatures":[{"sig":"MEYCIQCexsrl+w8SNVSQeCoZL1LrrPsxuJON4VRTTe+JRXIeGQIhAP3m7mO2DRtLjEkKhkER9taa36ZtwKziKjh9Wc/xL6Mr","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3208854},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=20.19.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"gitHead":"361c1b2552962d93dc29f3e8ce376feabafa1466","scripts":{"dev":"tsup --watch","lint":"eslint .","test":"vitest","build":"tsup","test:run":"vitest run","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"justmpm","email":"tetu_gato.1@hotmail.com"},"repository":{"url":"git+https://github.com/Just-mpm/eslint-plugin-zod-v4.git","type":"git"},"_npmVersion":"11.16.0","description":"ESLint plugin for Zod v4 best practices and migration from v3","directories":{},"_nodeVersion":"24.14.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","eslint":"^9.27.0 || ^10.0.0","vitest":"^3.1.4","typescript":"^5.8.3","@types/node":"^22.15.21","typescript-eslint":"^8.61.0","@typescript-eslint/utils":"^8.61.0","@typescript-eslint/rule-tester":"^8.61.0"},"peerDependencies":{"eslint":"^9.0.0 || ^10.0.0"},"_npmOperationalInternal":{"tmp":"tmp/eslint-plugin-zod-v4_0.4.0_1782087436080_0.27687978801146884","host":"s3://npm-registry-packages-npm-production"}},"0.4.1":{"_id":"eslint-plugin-zod-v4@0.4.1","bugs":{"url":"https://github.com/Just-mpm/eslint-plugin-zod-v4/issues"},"dist":{"shasum":"8689f2e9c6cd49700c463971ee4ba8ac24cbb698","tarball":"https://registry.npmjs.org/eslint-plugin-zod-v4/-/eslint-plugin-zod-v4-0.4.1.tgz","fileCount":9,"integrity":"sha512-IbFBpM0gPzFH0w/a4XpoO75NQivlP7bluKAkCLHWZ8j0TzLTRK2W28Z/doMMYeBc0KWG+8dbNDauUaXAYRNwzw==","signatures":[{"sig":"MEYCIQD325RFWKH5jcdUcr2bsAP5eitHdeEX/YlcdeuNh7daWAIhALoOGSI1slhwrfR27+gC20kDr5NP0ZQhdWS4I9ET6ddI","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCYtk2m/EoC6yknfim53IOEApfO6OWFiSPoMrOUY1qT4gIhALTKEeVtkfJHrOvsOQWNCQ4CgzvDqeKm2PR1XSvcsP+t"}],"unpackedSize":3209602},"main":"./dist/index.cjs","name":"eslint-plugin-zod-v4","type":"module","types":"./dist/index.d.ts","author":{"name":"Matheus Pimenta","email":"studio.kodaai@gmail.com"},"module":"./dist/index.js","engines":{"node":">=20.19.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"gitHead":"914c74d930f6dfc9515e888bb2c6a526eab4c412","license":"MIT","scripts":{"dev":"tsup --watch","lint":"eslint .","test":"vitest","build":"tsup","test:run":"vitest run","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"version":"0.4.1","_npmUser":{"name":"justmpm","email":"tetu_gato.1@hotmail.com"},"homepage":"https://github.com/Just-mpm/eslint-plugin-zod-v4#readme","keywords":["eslint","eslintplugin","eslint-plugin","zod","zod-v4","validation","schema","typescript","migration"],"repository":{"url":"git+https://github.com/Just-mpm/eslint-plugin-zod-v4.git","type":"git"},"_npmVersion":"11.18.0","description":"ESLint plugin for Zod v4 best practices and migration from v3","directories":{},"maintainers":[{"name":"justmpm","email":"tetu_gato.1@hotmail.com"}],"_nodeVersion":"24.14.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","eslint":"^9.27.0 || ^10.0.0","vitest":"^3.1.4","typescript":"^5.8.3","@types/node":"^22.15.21","typescript-eslint":"^8.61.0","@typescript-eslint/utils":"^8.61.0","@typescript-eslint/rule-tester":"^8.61.0"},"peerDependencies":{"eslint":"^9.0.0 || ^10.0.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/eslint-plugin-zod-v4_0.4.1_1790397228208_0.7807182122468441"}}},"time":{"created":"2025-12-16T03:22:35.377Z","modified":"2026-09-26T04:33:48.531Z","0.1.0":"2025-12-16T03:22:35.672Z","0.1.1":"2025-12-16T03:37:02.314Z","0.2.0":"2025-12-16T04:11:33.582Z","0.2.1":"2026-02-19T04:53:27.924Z","0.3.0":"2026-02-22T00:55:01.633Z","0.4.0":"2026-06-22T00:17:16.245Z","0.4.1":"2026-09-26T04:33:48.373Z"},"bugs":{"url":"https://github.com/Just-mpm/eslint-plugin-zod-v4/issues"},"author":{"name":"Matheus Pimenta","email":"studio.kodaai@gmail.com"},"license":"MIT","homepage":"https://github.com/Just-mpm/eslint-plugin-zod-v4#readme","keywords":["eslint","eslintplugin","eslint-plugin","zod","zod-v4","validation","schema","typescript","migration"],"repository":{"url":"git+https://github.com/Just-mpm/eslint-plugin-zod-v4.git","type":"git"},"description":"ESLint plugin for Zod v4 best practices and migration from v3","maintainers":[{"name":"justmpm","email":"tetu_gato.1@hotmail.com"}],"readme":"# eslint-plugin-zod-v4\n\nESLint plugin for Zod v4 best practices and migration from v3.\n\n[![npm version](https://badge.fury.io/js/eslint-plugin-zod-v4.svg)](https://www.npmjs.com/package/eslint-plugin-zod-v4)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n## Features\n\n- Detects deprecated Zod v3 patterns that break in v4\n- Enforces Zod v4 best practices\n- Auto-fix support for most rules\n- Educational error messages explaining the correct approach\n- Full ESLint 9+ flat config support\n- **React-aware**: Recognizes `useMemo`/`useCallback` for schema memoization\n\n## Installation\n\n```bash\nnpm install --save-dev eslint-plugin-zod-v4\n```\n\n## Requirements\n\n- ESLint >= 9.0.0 (supports ESLint 9.x and 10.x)\n- Node.js >= 20.19.0 (ESLint 10 requires Node 20.19+, 22.13+, or 24+)\n\n## Usage\n\n### ESLint 9+ / 10+ (Flat Config)\n\n```javascript\n// eslint.config.js\nimport zodPlugin from \"eslint-plugin-zod-v4\"\n\nexport default [\n  // Use recommended config (breaking changes only)\n  zodPlugin.configs.recommended,\n\n  // Or use strict config (recommended + best practices)\n  // zodPlugin.configs.strict,\n\n  // Or configure rules manually\n  {\n    plugins: {\n      \"zod-v4\": zodPlugin,\n    },\n    rules: {\n      \"zod-v4/no-deprecated-string-format\": \"error\",\n      \"zod-v4/prefer-safeParse\": \"warn\",\n    },\n  },\n]\n```\n\n## Configs\n\n| Config | Description |\n|--------|-------------|\n| `recommended` | Breaking changes only (errors). Use to catch code that will break in Zod v4. |\n| `strict` | Recommended + best practices (warnings). Enforces optimal Zod v4 patterns. |\n| `all` | All rules enabled as errors. Maximum strictness. |\n\n## Rules\n\n### Breaking Changes (severity: error)\n\nThese rules detect Zod v3 patterns that will break in v4.\n\n| Rule | Description | Fixable |\n|------|-------------|---------|\n| [no-deprecated-string-format](docs/rules/no-deprecated-string-format.md) | Disallow `z.string().email()` etc. Use `z.email()` instead. | ✅ Yes |\n| [no-record-single-arg](docs/rules/no-record-single-arg.md) | Require `z.record(keySchema, valueSchema)` with two arguments. | ❌ No |\n| [no-deprecated-error-params](docs/rules/no-deprecated-error-params.md) | Disallow `invalid_type_error`/`required_error`. Use `error` param. | ✅ Yes |\n| [no-deprecated-format-methods](docs/rules/no-deprecated-format-methods.md) | Disallow `.format()`/`.flatten()` on ZodError. Use `z.treeifyError()`. | ❌ No |\n| [no-merge-method](docs/rules/no-merge-method.md) | Disallow `.merge()`. Use `.extend()` instead. | ❌ No |\n| [no-superrefine](docs/rules/no-superrefine.md) | Disallow `.superRefine()`. Use `.check()` instead. | ✅ Yes |\n| [no-errors-property](docs/rules/no-errors-property.md) | Disallow `error.errors`. Use `error.issues` instead. | ✅ Yes |\n| [no-deprecated-object-methods](docs/rules/no-deprecated-object-methods.md) | Disallow `.strict()`/`.passthrough()`/`.strip()`. Use top-level functions. | ❌ No |\n| [no-native-enum](docs/rules/no-native-enum.md) | Disallow `z.nativeEnum()`. Use `z.enum()` instead. | ❌ No |\n| [no-deep-partial](docs/rules/no-deep-partial.md) | Disallow `.deepPartial()` (removed in v4). | ❌ No |\n| [no-deprecated-ip-methods](docs/rules/no-deprecated-ip-methods.md) | Disallow `.ip()`/`.cidr()`. Use `.ipv4()`/`.ipv6()` variants. | ❌ No |\n| [no-promise-schema](docs/rules/no-promise-schema.md) | Disallow `z.promise()`. Await before parsing. | ❌ No |\n| [no-throw-in-refine](docs/rules/no-throw-in-refine.md) | Disallow `throw` inside `.refine()`/`.superRefine()`/`.transform()`. Use return patterns. | ❌ No |\n| [require-enum-as-const](docs/rules/require-enum-as-const.md) | Require `as const` for arrays passed to `z.enum()`. | ❌ No |\n\n### Best Practices (severity: warn)\n\nThese rules enforce Zod v4 best practices for optimal code quality.\n\n| Rule | Description | Fixable |\n|------|-------------|---------|\n| [prefer-safeParse](docs/rules/prefer-safeParse.md) | Prefer `.safeParse()` over `.parse()` for explicit error handling. | ✅ Yes |\n| [no-schema-in-render](docs/rules/no-schema-in-render.md) | Disallow creating schemas inside functions/components. **React-aware**: allows `useMemo`/`useCallback`. | ❌ No |\n| [prefer-error-param](docs/rules/prefer-error-param.md) | Prefer `error` param over deprecated `message` param. | ✅ Yes |\n\n## React Integration\n\n### Schema Creation in Components\n\nThe `no-schema-in-render` rule is React-aware and recognizes memoization patterns:\n\n```tsx\n// ❌ Bad - Schema recreated every render\nconst MyComponent = () => {\n  const schema = z.object({ name: z.string() })  // Error!\n  return <Form schema={schema} />\n}\n\n// ✅ Good - Schema at module level\nconst schema = z.object({ name: z.string() })\nconst MyComponent = () => {\n  return <Form schema={schema} />\n}\n\n// ✅ Good - Schema memoized with useMemo (for translated schemas)\nconst MyComponent = () => {\n  const t = useTranslations()\n  const schema = useMemo(() => z.object({\n    email: z.email(t('invalidEmail')),\n  }), [t])\n  return <Form schema={schema} />\n}\n\n// ✅ Good - Factory function with useMemo\nconst createSchema = (t) => z.object({ email: z.email(t('error')) })\nconst MyComponent = () => {\n  const t = useTranslations()\n  const schema = useMemo(() => createSchema(t), [t])\n  return <Form schema={schema} />\n}\n```\n\n### TypeScript Workaround for `.check()` ctx.addIssue\n\nWhen using `.check()`, TypeScript may incorrectly flag `ctx.addIssue()` calls:\n\n```typescript\n// If you see: @typescript-eslint/no-unsafe-call on ctx.addIssue()\n// Add this comment to suppress the false positive:\n.check((ctx) => {\n  const { value: data } = ctx;\n  if (!data.name) {\n    // eslint-disable-next-line @typescript-eslint/no-unsafe-call -- Zod v4 ctx.addIssue is type-safe at runtime\n    ctx.addIssue({ code: 'custom', message: 'Name required' });\n  }\n})\n```\n\n## Migration Guide\n\n### From Zod v3 to v4\n\n#### 1. String Format Methods\n\n```javascript\n// Before (deprecated)\nz.string().email()\nz.string().url()\nz.string().uuid()\n\n// After (v4)\nz.email()\nz.url()\nz.uuid()\n```\n\n#### 2. Record Schema\n\n```javascript\n// Before (v3 - single argument)\nz.record(z.string())\n\n// After (v4 - two arguments)\nz.record(z.string(), z.string())\n```\n\n#### 3. Error Parameters\n\n```javascript\n// Before (deprecated)\nz.string({ invalid_type_error: \"Must be string\", required_error: \"Required\" })\nz.string().refine(fn, { message: \"Error\" })\n\n// After (v4)\nz.string({ error: \"Must be string\" })\nz.string().refine(fn, { error: \"Error\" })\n// Or with function\nz.string({ error: (iss) => `Error: ${iss.code}` })\n```\n\n#### 4. ZodError Methods\n\n```javascript\n// Before (deprecated)\nerror.format()\nerror.flatten()\n\n// After (v4)\nz.treeifyError(error)\n```\n\n#### 5. ZodError Property\n\n```javascript\n// Before (v3)\nerror.errors\n\n// After (v4)\nerror.issues\n```\n\n#### 6. Schema Merging\n\n```javascript\n// Before (deprecated)\nschema1.merge(schema2)\n\n// After (v4)\nschema1.extend(schema2.shape)\n// Or\nz.object({ ...schema1.shape, ...schema2.shape })\n```\n\n#### 7. Super Refine → Check\n\n```javascript\n// Before (deprecated)\nschema.superRefine((val, ctx) => {\n  if (!isValid(val)) {\n    ctx.addIssue({ code: \"custom\", message: \"Invalid\" })\n  }\n})\n\n// After (v4)\nschema.check((ctx) => {\n  const { value: val } = ctx;\n  if (!isValid(val)) {\n    ctx.addIssue({ code: \"custom\", message: \"Invalid\" })\n  }\n})\n\n// Or for simple cases\nschema.check((val) => isValid(val) || \"Invalid\")\n```\n\n#### 8. Object Methods\n\n```javascript\n// Before (deprecated)\nz.object({ name: z.string() }).strict()\nz.object({ name: z.string() }).passthrough()\n\n// After (v4)\nz.strictObject({ name: z.string() })\nz.looseObject({ name: z.string() })\n```\n\n#### 9. Native Enums\n\n```javascript\n// Before (deprecated)\nz.nativeEnum(MyEnum)\n\n// After (v4)\nz.enum(MyEnum)  // z.enum() now supports native enums\n```\n\n#### 10. IP and CIDR Validation\n\n```javascript\n// Before (removed)\nz.string().ip()\nz.string().cidr()\n\n// After (v4)\nz.ipv4()  // or z.ipv6()\nz.cidrv4()  // or z.cidrv6()\nz.union([z.ipv4(), z.ipv6()])  // for both\n```\n\n#### 11. Promise Schema\n\n```javascript\n// Before (deprecated)\nz.promise(z.string())\n\n// After (v4)\nconst data = await fetchData()\nschema.parse(data)  // await before parsing\n```\n\n#### 12. Deep Partial\n\n```javascript\n// Before (removed)\nschema.deepPartial()\n\n// After (v4)\nschema.partial()  // shallow only\n// For deep partial, manually create nested partial schemas\n```\n\n## Changelog\n\n### v0.4.0 (2026-06-21)\n\n**ESLint 10 Compatibility:**\n- Peer dependency updated to support both ESLint 9.x and 10.x (`\"eslint\": \"^9.0.0 || ^10.0.0\"`).\n- Minimum Node.js bumped to `20.19.0` to match ESLint 10's engine requirements.\n- Plugin `meta` now exposes `namespace: \"zod-v4\"` so the plugin resolves correctly under flat config (`--cache`, `--print-config`).\n- Plugin `meta.version` is now in sync with the published package version.\n- `eslint.config.js` rewritten to use `parserOptions.projectService` (recommended by `@typescript-eslint` v8) so tests and config files lint cleanly without polluting the type-aware scope.\n- Resolved 10 transitive vulnerabilities (`npm audit fix`) in dev dependencies.\n\n**Notes:**\n- No rule code changes required — the plugin already used the modern flat config APIs and does not rely on any `context`/`SourceCode` methods removed in ESLint 10.\n- Fixes a pre-existing TypeScript inference bug in `src/utils/zod-helpers.ts` (`findRootZodCall`) that surfaced under `strict` + `noUncheckedIndexedAccess`.\n\n### v0.3.0 (2025-02-21)\n\n**New Rules:**\n- `no-throw-in-refine`: Detects `throw` statements inside `.refine()`, `.superRefine()`, and `.transform()` callbacks. These errors are **not captured by Zod**, causing silent failures. The rule provides educational messages with correct patterns for each method.\n- `require-enum-as-const`: Requires `as const` for arrays passed to `z.enum()`. Without it, TypeScript infers `string[]` instead of the literal union, breaking type inference.\n\n**Improvements:**\n- Added 61 new test cases (276 total tests passing)\n- Updated documentation with migration examples for new rules\n\n### v0.2.0 (2025-12-16)\n\n**New Features:**\n- `no-superrefine`: Now has **auto-fix** support! Transforms `.superRefine((data, ctx) => {...})` to `.check((ctx) => { const { value: data } = ctx; ...})`\n- `no-schema-in-render`: Now **recognizes `useMemo` and `useCallback`** - schemas inside memoized callbacks are allowed\n- Improved error messages with migration examples\n\n**Bug Fixes:**\n- Fixed false positives in `no-schema-in-render` when using React memoization hooks\n\n### v0.1.1 (2025-12-15)\n\n- Initial release with 15 rules (12 breaking changes + 3 best practices)\n\n## Contributing\n\nContributions are welcome! Please read our contributing guidelines before submitting a PR.\n\n## License\n\nMIT License - see [LICENSE](LICENSE) for details.\n\n## Author\n\n**Matheus Pimenta** - [Koda AI Studio](https://kodaai.app)\n\nBuilt with Claude Code.\n","readmeFilename":"README.md"}