eslint-plugin-zod 3.4.0 → 3.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -56,6 +56,10 @@ exports.requireSchemaSuffix = (0, create_plugin_rule_js_1.createZodPluginRule)({
56
56
  'safeDecode',
57
57
  'safeDecodeAsync',
58
58
  'codec',
59
+ 'treeifyError',
60
+ 'prettifyError',
61
+ 'formatError',
62
+ 'flattenError',
59
63
  ];
60
64
  if (methodsThatProduceSomethingThatShouldNotBeValidated.some((it) => chainMethods.includes(it))) {
61
65
  return;
@@ -53,6 +53,10 @@ export const requireSchemaSuffix = createZodPluginRule({
53
53
  'safeDecode',
54
54
  'safeDecodeAsync',
55
55
  'codec',
56
+ 'treeifyError',
57
+ 'prettifyError',
58
+ 'formatError',
59
+ 'flattenError',
56
60
  ];
57
61
  if (methodsThatProduceSomethingThatShouldNotBeValidated.some((it) => chainMethods.includes(it))) {
58
62
  return;
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.trackZodSchemaImports = trackZodSchemaImports;
4
3
  exports.createZodSchemaImportTrack = createZodSchemaImportTrack;
5
4
  const utils_1 = require("@typescript-eslint/utils");
6
5
  const detect_zod_schema_root_node_js_1 = require("./detect-zod-schema-root-node.cjs");
@@ -10,7 +10,7 @@ interface Result {
10
10
  detectZodSchemaRootNode: (node: TSESTree.Node) => null | DetectResult;
11
11
  collectZodChainMethods: (node: TSESTree.CallExpression) => Array<ZodChainItem>;
12
12
  }
13
- export declare function trackZodSchemaImports(importAllowedSource: ZodImportAllowedSource): Result;
13
+ declare function trackZodSchemaImports(importAllowedSource: ZodImportAllowedSource): Result;
14
14
  export declare function createZodSchemaImportTrack(zodImportAllowedSource: ZodImportAllowedSource): {
15
15
  zodImportAllowedSource: ZodImportAllowedSource;
16
16
  trackZodSchemaImports: () => ReturnType<typeof trackZodSchemaImports>;
@@ -10,7 +10,7 @@ interface Result {
10
10
  detectZodSchemaRootNode: (node: TSESTree.Node) => null | DetectResult;
11
11
  collectZodChainMethods: (node: TSESTree.CallExpression) => Array<ZodChainItem>;
12
12
  }
13
- export declare function trackZodSchemaImports(importAllowedSource: ZodImportAllowedSource): Result;
13
+ declare function trackZodSchemaImports(importAllowedSource: ZodImportAllowedSource): Result;
14
14
  export declare function createZodSchemaImportTrack(zodImportAllowedSource: ZodImportAllowedSource): {
15
15
  zodImportAllowedSource: ZodImportAllowedSource;
16
16
  trackZodSchemaImports: () => ReturnType<typeof trackZodSchemaImports>;
@@ -1,7 +1,7 @@
1
1
  import { AST_NODE_TYPES } from '@typescript-eslint/utils';
2
2
  import { detectZodSchemaRootNode } from "./detect-zod-schema-root-node.js";
3
3
  import { isZodImportSource } from "./is-zod-import-source.js";
4
- export function trackZodSchemaImports(importAllowedSource) {
4
+ function trackZodSchemaImports(importAllowedSource) {
5
5
  const zodNamespaces = new Set();
6
6
  const zodNamedImports = new Set();
7
7
  function collectZodChainMethods(node) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-zod",
3
- "version": "3.4.0",
3
+ "version": "3.5.1",
4
4
  "type": "module",
5
5
  "description": "ESLint plugin that adds custom linting rules to enforce best practices when using Zod",
6
6
  "engines": {
@@ -43,11 +43,11 @@
43
43
  },
44
44
  "prettier": "@marcalexiei/prettier-config",
45
45
  "dependencies": {
46
- "@typescript-eslint/utils": "^8.50.0",
46
+ "@typescript-eslint/utils": "^8.57.0",
47
47
  "esquery": "^1.6.0"
48
48
  },
49
49
  "peerDependencies": {
50
- "eslint": "^9",
50
+ "eslint": "^9 || ^10",
51
51
  "zod": "^4"
52
52
  },
53
53
  "peerDependenciesMeta": {
@@ -56,26 +56,26 @@
56
56
  }
57
57
  },
58
58
  "devDependencies": {
59
- "@changesets/changelog-github": "0.5.2",
60
- "@changesets/cli": "2.29.8",
61
- "@marcalexiei/eslint-config": "5.0.0",
59
+ "@changesets/changelog-github": "0.6.0",
60
+ "@changesets/cli": "2.30.0",
61
+ "@marcalexiei/eslint-config": "6.0.0",
62
62
  "@marcalexiei/prettier-config": "1.1.4",
63
63
  "@types/esquery": "1.5.4",
64
- "@types/node": "24.10.1",
65
- "@typescript-eslint/rule-tester": "8.56.1",
66
- "@vitest/eslint-plugin": "1.6.9",
67
- "dedent": "1.7.1",
68
- "eslint": "9.39.2",
69
- "eslint-doc-generator": "3.2.0",
64
+ "@types/node": "25.5.0",
65
+ "@typescript-eslint/rule-tester": "8.58.0",
66
+ "@vitest/eslint-plugin": "1.6.14",
67
+ "dedent": "1.7.2",
68
+ "eslint": "10.1.0",
69
+ "eslint-doc-generator": "3.3.2",
70
70
  "eslint-import-resolver-typescript": "4.4.4",
71
- "eslint-plugin-eslint-plugin": "7.3.1",
72
- "eslint-plugin-import-x": "4.16.1",
71
+ "eslint-plugin-eslint-plugin": "7.3.2",
72
+ "eslint-plugin-import-x": "4.16.2",
73
73
  "eslint-plugin-n": "17.24.0",
74
- "knip": "5.85.0",
74
+ "knip": "6.2.0",
75
75
  "prettier": "3.8.1",
76
76
  "typescript": "5.9.3",
77
- "typescript-eslint": "8.56.1",
78
- "vitest": "4.0.18",
77
+ "typescript-eslint": "8.58.0",
78
+ "vitest": "4.1.2",
79
79
  "zshy": "0.7.0"
80
80
  },
81
81
  "scripts": {