eslint-plugin-zod-v4 0.1.0

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.
@@ -0,0 +1,175 @@
1
+ import { TSESLint } from '@typescript-eslint/utils';
2
+ import * as _typescript_eslint_utils_ts_eslint from '@typescript-eslint/utils/ts-eslint';
3
+
4
+ /**
5
+ * Rule severity levels
6
+ */
7
+ type RuleSeverity = "off" | "warn" | "error";
8
+ /**
9
+ * Rule configuration
10
+ */
11
+ type RuleConfig = RuleSeverity | [RuleSeverity, ...unknown[]];
12
+ /**
13
+ * Plugin rule module
14
+ */
15
+ type RuleModule = TSESLint.RuleModule<string, unknown[]>;
16
+ /**
17
+ * Plugin rules record
18
+ */
19
+ type PluginRules = Record<string, RuleModule>;
20
+ /**
21
+ * Plugin config
22
+ */
23
+ interface PluginConfig {
24
+ plugins?: Record<string, unknown>;
25
+ rules?: Record<string, RuleConfig>;
26
+ }
27
+ /**
28
+ * Plugin meta information
29
+ */
30
+ interface PluginMeta {
31
+ name: string;
32
+ version: string;
33
+ }
34
+ /**
35
+ * Full plugin structure
36
+ */
37
+ interface Plugin {
38
+ meta: PluginMeta;
39
+ configs: Record<string, PluginConfig>;
40
+ rules: PluginRules;
41
+ }
42
+
43
+ declare const noDeprecatedStringFormat: _typescript_eslint_utils_ts_eslint.RuleModule<"deprecatedStringFormat", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
44
+
45
+ declare const noRecordSingleArg: _typescript_eslint_utils_ts_eslint.RuleModule<"recordRequiresTwoArgs", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
46
+
47
+ declare const noDeprecatedErrorParams: _typescript_eslint_utils_ts_eslint.RuleModule<"deprecatedErrorParam", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
48
+
49
+ declare const noDeprecatedFormatMethods: _typescript_eslint_utils_ts_eslint.RuleModule<"deprecatedFormatMethod", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
50
+
51
+ declare const noMergeMethod: _typescript_eslint_utils_ts_eslint.RuleModule<"deprecatedMerge", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
52
+
53
+ declare const noSuperRefine: _typescript_eslint_utils_ts_eslint.RuleModule<"deprecatedSuperRefine", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
54
+
55
+ declare const noErrorsProperty: _typescript_eslint_utils_ts_eslint.RuleModule<"deprecatedErrorsProperty", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
56
+
57
+ type MessageIds$1 = "deprecatedStrict" | "deprecatedPassthrough" | "deprecatedStrip";
58
+ declare const noDeprecatedObjectMethods: _typescript_eslint_utils_ts_eslint.RuleModule<MessageIds$1, [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
59
+
60
+ declare const noNativeEnum: _typescript_eslint_utils_ts_eslint.RuleModule<"deprecatedNativeEnum", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
61
+
62
+ declare const noDeepPartial: _typescript_eslint_utils_ts_eslint.RuleModule<"removedDeepPartial", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
63
+
64
+ type MessageIds = "removedIp" | "removedCidr";
65
+ declare const noDeprecatedIpMethods: _typescript_eslint_utils_ts_eslint.RuleModule<MessageIds, [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
66
+
67
+ declare const noPromiseSchema: _typescript_eslint_utils_ts_eslint.RuleModule<"deprecatedPromise", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
68
+
69
+ declare const preferSafeParse: _typescript_eslint_utils_ts_eslint.RuleModule<"preferSafeParse", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
70
+
71
+ declare const noSchemaInRender: _typescript_eslint_utils_ts_eslint.RuleModule<"schemaInRender", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
72
+
73
+ declare const preferErrorParam: _typescript_eslint_utils_ts_eslint.RuleModule<"preferErrorParam", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
74
+
75
+ declare const meta: {
76
+ readonly name: "eslint-plugin-zod-v4";
77
+ readonly version: "0.1.0";
78
+ };
79
+ declare const rules: {
80
+ readonly "no-deprecated-string-format": TSESLint.RuleModule<"deprecatedStringFormat", [], unknown, TSESLint.RuleListener>;
81
+ readonly "no-record-single-arg": TSESLint.RuleModule<"recordRequiresTwoArgs", [], unknown, TSESLint.RuleListener>;
82
+ readonly "no-deprecated-error-params": TSESLint.RuleModule<"deprecatedErrorParam", [], unknown, TSESLint.RuleListener>;
83
+ readonly "no-deprecated-format-methods": TSESLint.RuleModule<"deprecatedFormatMethod", [], unknown, TSESLint.RuleListener>;
84
+ readonly "no-merge-method": TSESLint.RuleModule<"deprecatedMerge", [], unknown, TSESLint.RuleListener>;
85
+ readonly "no-superrefine": TSESLint.RuleModule<"deprecatedSuperRefine", [], unknown, TSESLint.RuleListener>;
86
+ readonly "no-errors-property": TSESLint.RuleModule<"deprecatedErrorsProperty", [], unknown, TSESLint.RuleListener>;
87
+ readonly "no-deprecated-object-methods": TSESLint.RuleModule<"deprecatedStrict" | "deprecatedPassthrough" | "deprecatedStrip", [], unknown, TSESLint.RuleListener>;
88
+ readonly "no-native-enum": TSESLint.RuleModule<"deprecatedNativeEnum", [], unknown, TSESLint.RuleListener>;
89
+ readonly "no-deep-partial": TSESLint.RuleModule<"removedDeepPartial", [], unknown, TSESLint.RuleListener>;
90
+ readonly "no-deprecated-ip-methods": TSESLint.RuleModule<"removedIp" | "removedCidr", [], unknown, TSESLint.RuleListener>;
91
+ readonly "no-promise-schema": TSESLint.RuleModule<"deprecatedPromise", [], unknown, TSESLint.RuleListener>;
92
+ readonly "prefer-safeParse": TSESLint.RuleModule<"preferSafeParse", [], unknown, TSESLint.RuleListener>;
93
+ readonly "no-schema-in-render": TSESLint.RuleModule<"schemaInRender", [], unknown, TSESLint.RuleListener>;
94
+ readonly "prefer-error-param": TSESLint.RuleModule<"preferErrorParam", [], unknown, TSESLint.RuleListener>;
95
+ };
96
+ declare const plugin: Plugin;
97
+ declare const configs: {
98
+ /**
99
+ * Recommended config - Breaking changes only (errors)
100
+ * Use this to catch code that will break in Zod v4
101
+ */
102
+ readonly recommended: {
103
+ readonly plugins: {
104
+ readonly "zod-v4": Plugin;
105
+ };
106
+ readonly rules: {
107
+ readonly "zod-v4/no-deprecated-string-format": "error";
108
+ readonly "zod-v4/no-record-single-arg": "error";
109
+ readonly "zod-v4/no-deprecated-error-params": "error";
110
+ readonly "zod-v4/no-deprecated-format-methods": "error";
111
+ readonly "zod-v4/no-merge-method": "error";
112
+ readonly "zod-v4/no-superrefine": "error";
113
+ readonly "zod-v4/no-errors-property": "error";
114
+ readonly "zod-v4/no-deprecated-object-methods": "error";
115
+ readonly "zod-v4/no-native-enum": "error";
116
+ readonly "zod-v4/no-deep-partial": "error";
117
+ readonly "zod-v4/no-deprecated-ip-methods": "error";
118
+ readonly "zod-v4/no-promise-schema": "error";
119
+ };
120
+ };
121
+ /**
122
+ * Strict config - Recommended + Best practices (warnings)
123
+ * Use this to enforce best practices alongside breaking changes
124
+ */
125
+ readonly strict: {
126
+ readonly plugins: {
127
+ readonly "zod-v4": Plugin;
128
+ };
129
+ readonly rules: {
130
+ readonly "zod-v4/no-deprecated-string-format": "error";
131
+ readonly "zod-v4/no-record-single-arg": "error";
132
+ readonly "zod-v4/no-deprecated-error-params": "error";
133
+ readonly "zod-v4/no-deprecated-format-methods": "error";
134
+ readonly "zod-v4/no-merge-method": "error";
135
+ readonly "zod-v4/no-superrefine": "error";
136
+ readonly "zod-v4/no-errors-property": "error";
137
+ readonly "zod-v4/no-deprecated-object-methods": "error";
138
+ readonly "zod-v4/no-native-enum": "error";
139
+ readonly "zod-v4/no-deep-partial": "error";
140
+ readonly "zod-v4/no-deprecated-ip-methods": "error";
141
+ readonly "zod-v4/no-promise-schema": "error";
142
+ readonly "zod-v4/prefer-safeParse": "warn";
143
+ readonly "zod-v4/no-schema-in-render": "warn";
144
+ readonly "zod-v4/prefer-error-param": "warn";
145
+ };
146
+ };
147
+ /**
148
+ * All config - All rules enabled as errors
149
+ * Use this for maximum strictness
150
+ */
151
+ readonly all: {
152
+ readonly plugins: {
153
+ readonly "zod-v4": Plugin;
154
+ };
155
+ readonly rules: {
156
+ readonly "zod-v4/no-deprecated-string-format": "error";
157
+ readonly "zod-v4/no-record-single-arg": "error";
158
+ readonly "zod-v4/no-deprecated-error-params": "error";
159
+ readonly "zod-v4/no-deprecated-format-methods": "error";
160
+ readonly "zod-v4/no-merge-method": "error";
161
+ readonly "zod-v4/no-superrefine": "error";
162
+ readonly "zod-v4/no-errors-property": "error";
163
+ readonly "zod-v4/no-deprecated-object-methods": "error";
164
+ readonly "zod-v4/no-native-enum": "error";
165
+ readonly "zod-v4/no-deep-partial": "error";
166
+ readonly "zod-v4/no-deprecated-ip-methods": "error";
167
+ readonly "zod-v4/no-promise-schema": "error";
168
+ readonly "zod-v4/prefer-safeParse": "error";
169
+ readonly "zod-v4/no-schema-in-render": "error";
170
+ readonly "zod-v4/prefer-error-param": "error";
171
+ };
172
+ };
173
+ };
174
+
175
+ export { configs, plugin as default, meta, noDeepPartial, noDeprecatedErrorParams, noDeprecatedFormatMethods, noDeprecatedIpMethods, noDeprecatedObjectMethods, noDeprecatedStringFormat, noErrorsProperty, noMergeMethod, noNativeEnum, noPromiseSchema, noRecordSingleArg, noSchemaInRender, noSuperRefine, preferErrorParam, preferSafeParse, rules };
@@ -0,0 +1,175 @@
1
+ import { TSESLint } from '@typescript-eslint/utils';
2
+ import * as _typescript_eslint_utils_ts_eslint from '@typescript-eslint/utils/ts-eslint';
3
+
4
+ /**
5
+ * Rule severity levels
6
+ */
7
+ type RuleSeverity = "off" | "warn" | "error";
8
+ /**
9
+ * Rule configuration
10
+ */
11
+ type RuleConfig = RuleSeverity | [RuleSeverity, ...unknown[]];
12
+ /**
13
+ * Plugin rule module
14
+ */
15
+ type RuleModule = TSESLint.RuleModule<string, unknown[]>;
16
+ /**
17
+ * Plugin rules record
18
+ */
19
+ type PluginRules = Record<string, RuleModule>;
20
+ /**
21
+ * Plugin config
22
+ */
23
+ interface PluginConfig {
24
+ plugins?: Record<string, unknown>;
25
+ rules?: Record<string, RuleConfig>;
26
+ }
27
+ /**
28
+ * Plugin meta information
29
+ */
30
+ interface PluginMeta {
31
+ name: string;
32
+ version: string;
33
+ }
34
+ /**
35
+ * Full plugin structure
36
+ */
37
+ interface Plugin {
38
+ meta: PluginMeta;
39
+ configs: Record<string, PluginConfig>;
40
+ rules: PluginRules;
41
+ }
42
+
43
+ declare const noDeprecatedStringFormat: _typescript_eslint_utils_ts_eslint.RuleModule<"deprecatedStringFormat", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
44
+
45
+ declare const noRecordSingleArg: _typescript_eslint_utils_ts_eslint.RuleModule<"recordRequiresTwoArgs", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
46
+
47
+ declare const noDeprecatedErrorParams: _typescript_eslint_utils_ts_eslint.RuleModule<"deprecatedErrorParam", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
48
+
49
+ declare const noDeprecatedFormatMethods: _typescript_eslint_utils_ts_eslint.RuleModule<"deprecatedFormatMethod", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
50
+
51
+ declare const noMergeMethod: _typescript_eslint_utils_ts_eslint.RuleModule<"deprecatedMerge", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
52
+
53
+ declare const noSuperRefine: _typescript_eslint_utils_ts_eslint.RuleModule<"deprecatedSuperRefine", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
54
+
55
+ declare const noErrorsProperty: _typescript_eslint_utils_ts_eslint.RuleModule<"deprecatedErrorsProperty", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
56
+
57
+ type MessageIds$1 = "deprecatedStrict" | "deprecatedPassthrough" | "deprecatedStrip";
58
+ declare const noDeprecatedObjectMethods: _typescript_eslint_utils_ts_eslint.RuleModule<MessageIds$1, [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
59
+
60
+ declare const noNativeEnum: _typescript_eslint_utils_ts_eslint.RuleModule<"deprecatedNativeEnum", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
61
+
62
+ declare const noDeepPartial: _typescript_eslint_utils_ts_eslint.RuleModule<"removedDeepPartial", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
63
+
64
+ type MessageIds = "removedIp" | "removedCidr";
65
+ declare const noDeprecatedIpMethods: _typescript_eslint_utils_ts_eslint.RuleModule<MessageIds, [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
66
+
67
+ declare const noPromiseSchema: _typescript_eslint_utils_ts_eslint.RuleModule<"deprecatedPromise", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
68
+
69
+ declare const preferSafeParse: _typescript_eslint_utils_ts_eslint.RuleModule<"preferSafeParse", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
70
+
71
+ declare const noSchemaInRender: _typescript_eslint_utils_ts_eslint.RuleModule<"schemaInRender", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
72
+
73
+ declare const preferErrorParam: _typescript_eslint_utils_ts_eslint.RuleModule<"preferErrorParam", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
74
+
75
+ declare const meta: {
76
+ readonly name: "eslint-plugin-zod-v4";
77
+ readonly version: "0.1.0";
78
+ };
79
+ declare const rules: {
80
+ readonly "no-deprecated-string-format": TSESLint.RuleModule<"deprecatedStringFormat", [], unknown, TSESLint.RuleListener>;
81
+ readonly "no-record-single-arg": TSESLint.RuleModule<"recordRequiresTwoArgs", [], unknown, TSESLint.RuleListener>;
82
+ readonly "no-deprecated-error-params": TSESLint.RuleModule<"deprecatedErrorParam", [], unknown, TSESLint.RuleListener>;
83
+ readonly "no-deprecated-format-methods": TSESLint.RuleModule<"deprecatedFormatMethod", [], unknown, TSESLint.RuleListener>;
84
+ readonly "no-merge-method": TSESLint.RuleModule<"deprecatedMerge", [], unknown, TSESLint.RuleListener>;
85
+ readonly "no-superrefine": TSESLint.RuleModule<"deprecatedSuperRefine", [], unknown, TSESLint.RuleListener>;
86
+ readonly "no-errors-property": TSESLint.RuleModule<"deprecatedErrorsProperty", [], unknown, TSESLint.RuleListener>;
87
+ readonly "no-deprecated-object-methods": TSESLint.RuleModule<"deprecatedStrict" | "deprecatedPassthrough" | "deprecatedStrip", [], unknown, TSESLint.RuleListener>;
88
+ readonly "no-native-enum": TSESLint.RuleModule<"deprecatedNativeEnum", [], unknown, TSESLint.RuleListener>;
89
+ readonly "no-deep-partial": TSESLint.RuleModule<"removedDeepPartial", [], unknown, TSESLint.RuleListener>;
90
+ readonly "no-deprecated-ip-methods": TSESLint.RuleModule<"removedIp" | "removedCidr", [], unknown, TSESLint.RuleListener>;
91
+ readonly "no-promise-schema": TSESLint.RuleModule<"deprecatedPromise", [], unknown, TSESLint.RuleListener>;
92
+ readonly "prefer-safeParse": TSESLint.RuleModule<"preferSafeParse", [], unknown, TSESLint.RuleListener>;
93
+ readonly "no-schema-in-render": TSESLint.RuleModule<"schemaInRender", [], unknown, TSESLint.RuleListener>;
94
+ readonly "prefer-error-param": TSESLint.RuleModule<"preferErrorParam", [], unknown, TSESLint.RuleListener>;
95
+ };
96
+ declare const plugin: Plugin;
97
+ declare const configs: {
98
+ /**
99
+ * Recommended config - Breaking changes only (errors)
100
+ * Use this to catch code that will break in Zod v4
101
+ */
102
+ readonly recommended: {
103
+ readonly plugins: {
104
+ readonly "zod-v4": Plugin;
105
+ };
106
+ readonly rules: {
107
+ readonly "zod-v4/no-deprecated-string-format": "error";
108
+ readonly "zod-v4/no-record-single-arg": "error";
109
+ readonly "zod-v4/no-deprecated-error-params": "error";
110
+ readonly "zod-v4/no-deprecated-format-methods": "error";
111
+ readonly "zod-v4/no-merge-method": "error";
112
+ readonly "zod-v4/no-superrefine": "error";
113
+ readonly "zod-v4/no-errors-property": "error";
114
+ readonly "zod-v4/no-deprecated-object-methods": "error";
115
+ readonly "zod-v4/no-native-enum": "error";
116
+ readonly "zod-v4/no-deep-partial": "error";
117
+ readonly "zod-v4/no-deprecated-ip-methods": "error";
118
+ readonly "zod-v4/no-promise-schema": "error";
119
+ };
120
+ };
121
+ /**
122
+ * Strict config - Recommended + Best practices (warnings)
123
+ * Use this to enforce best practices alongside breaking changes
124
+ */
125
+ readonly strict: {
126
+ readonly plugins: {
127
+ readonly "zod-v4": Plugin;
128
+ };
129
+ readonly rules: {
130
+ readonly "zod-v4/no-deprecated-string-format": "error";
131
+ readonly "zod-v4/no-record-single-arg": "error";
132
+ readonly "zod-v4/no-deprecated-error-params": "error";
133
+ readonly "zod-v4/no-deprecated-format-methods": "error";
134
+ readonly "zod-v4/no-merge-method": "error";
135
+ readonly "zod-v4/no-superrefine": "error";
136
+ readonly "zod-v4/no-errors-property": "error";
137
+ readonly "zod-v4/no-deprecated-object-methods": "error";
138
+ readonly "zod-v4/no-native-enum": "error";
139
+ readonly "zod-v4/no-deep-partial": "error";
140
+ readonly "zod-v4/no-deprecated-ip-methods": "error";
141
+ readonly "zod-v4/no-promise-schema": "error";
142
+ readonly "zod-v4/prefer-safeParse": "warn";
143
+ readonly "zod-v4/no-schema-in-render": "warn";
144
+ readonly "zod-v4/prefer-error-param": "warn";
145
+ };
146
+ };
147
+ /**
148
+ * All config - All rules enabled as errors
149
+ * Use this for maximum strictness
150
+ */
151
+ readonly all: {
152
+ readonly plugins: {
153
+ readonly "zod-v4": Plugin;
154
+ };
155
+ readonly rules: {
156
+ readonly "zod-v4/no-deprecated-string-format": "error";
157
+ readonly "zod-v4/no-record-single-arg": "error";
158
+ readonly "zod-v4/no-deprecated-error-params": "error";
159
+ readonly "zod-v4/no-deprecated-format-methods": "error";
160
+ readonly "zod-v4/no-merge-method": "error";
161
+ readonly "zod-v4/no-superrefine": "error";
162
+ readonly "zod-v4/no-errors-property": "error";
163
+ readonly "zod-v4/no-deprecated-object-methods": "error";
164
+ readonly "zod-v4/no-native-enum": "error";
165
+ readonly "zod-v4/no-deep-partial": "error";
166
+ readonly "zod-v4/no-deprecated-ip-methods": "error";
167
+ readonly "zod-v4/no-promise-schema": "error";
168
+ readonly "zod-v4/prefer-safeParse": "error";
169
+ readonly "zod-v4/no-schema-in-render": "error";
170
+ readonly "zod-v4/prefer-error-param": "error";
171
+ };
172
+ };
173
+ };
174
+
175
+ export { configs, plugin as default, meta, noDeepPartial, noDeprecatedErrorParams, noDeprecatedFormatMethods, noDeprecatedIpMethods, noDeprecatedObjectMethods, noDeprecatedStringFormat, noErrorsProperty, noMergeMethod, noNativeEnum, noPromiseSchema, noRecordSingleArg, noSchemaInRender, noSuperRefine, preferErrorParam, preferSafeParse, rules };