@enormora/eslint-config-zod 0.0.1 → 0.0.2
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.
- package/LICENSE +21 -0
- package/package.json +37 -6
- package/plugins/enormora-zod/enormora-zod-plugin.js +9 -0
- package/plugins/enormora-zod/enormora-zod-plugin.js.map +1 -0
- package/plugins/enormora-zod/no-unnecessary-readonly-schema.js +89 -0
- package/plugins/enormora-zod/no-unnecessary-readonly-schema.js.map +1 -0
- package/plugins/enormora-zod/require-readonly-schema.js +85 -0
- package/plugins/enormora-zod/require-readonly-schema.js.map +1 -0
- package/presets/zod/zod.js +70 -0
- package/presets/zod/zod.js.map +1 -0
- package/readme.md +75 -5
- package/rule-sets/restricted-imports.js +11 -0
- package/rule-sets/restricted-imports.js.map +1 -0
- package/sbom.cdx.json +118 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) [2023]
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/package.json
CHANGED
|
@@ -1,7 +1,38 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
2
|
+
"author": "Mathias Schreck <schreck.mathias@gmail.com>",
|
|
3
|
+
"contributors": [
|
|
4
|
+
{
|
|
5
|
+
"email": "github@echooff.de",
|
|
6
|
+
"name": "Christian Rackerseder"
|
|
7
|
+
}
|
|
8
|
+
],
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"@typescript-eslint/utils": "8.63.0",
|
|
11
|
+
"eslint-plugin-zod-core": "1.0.7",
|
|
12
|
+
"eslint-plugin-zod-mini": "1.4.0"
|
|
13
|
+
},
|
|
14
|
+
"description": "Enormora’s ESLint Zod configuration enforcing Zod Mini and Zod core",
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"import": "./presets/zod/zod.js"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"license": "MIT",
|
|
21
|
+
"name": "@enormora/eslint-config-zod",
|
|
22
|
+
"peerDependencies": {
|
|
23
|
+
"@enormora/eslint-config-base": "0.0.51",
|
|
24
|
+
"eslint": "^10.0.0"
|
|
25
|
+
},
|
|
26
|
+
"repository": {
|
|
27
|
+
"type": "git",
|
|
28
|
+
"url": "git://github.com/enormora/eslint-config.git"
|
|
29
|
+
},
|
|
30
|
+
"sideEffects": [
|
|
31
|
+
"./plugins/enormora-zod/no-unnecessary-readonly-schema.js",
|
|
32
|
+
"./plugins/enormora-zod/require-readonly-schema.js",
|
|
33
|
+
"./presets/zod/zod.js",
|
|
34
|
+
"./rule-sets/restricted-imports.js"
|
|
35
|
+
],
|
|
36
|
+
"type": "module",
|
|
37
|
+
"version": "0.0.2"
|
|
38
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { noUnnecessaryReadonlySchemaRule } from "./no-unnecessary-readonly-schema.js";
|
|
2
|
+
import { requireReadonlySchemaRule } from "./require-readonly-schema.js";
|
|
3
|
+
export const enormoraZodPlugin = {
|
|
4
|
+
rules: {
|
|
5
|
+
'no-unnecessary-readonly-schema': noUnnecessaryReadonlySchemaRule,
|
|
6
|
+
'require-readonly-schema': requireReadonlySchemaRule
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=enormora-zod-plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enormora-zod-plugin.js","sourceRoot":"","sources":["../../../../../configs/plugins/enormora-zod/enormora-zod-plugin.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,+BAA+B,EAAE,MAAM,qCAAqC,CAAC;AACtF,OAAO,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AAMzE,MAAM,CAAC,MAAM,iBAAiB,GAAsB;IAChD,KAAK,EAAE;QACH,gCAAgC,EAAE,+BAA6D;QAC/F,yBAAyB,EAAE,yBAAuD;KACrF;CACJ,CAAC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { AST_NODE_TYPES, ESLintUtils } from '@typescript-eslint/utils';
|
|
2
|
+
function ruleUrl(ruleName) {
|
|
3
|
+
return `https://github.com/enormora/eslint-config/blob/main/configs/plugins/enormora-zod/${ruleName}.ts`;
|
|
4
|
+
}
|
|
5
|
+
const { RuleCreator: ruleCreator } = ESLintUtils;
|
|
6
|
+
const buildRule = ruleCreator(ruleUrl);
|
|
7
|
+
const zodNamespace = 'z';
|
|
8
|
+
const readonlyFactory = 'readonly';
|
|
9
|
+
const immutableSchemaFactories = new Set([
|
|
10
|
+
'string',
|
|
11
|
+
'number',
|
|
12
|
+
'boolean',
|
|
13
|
+
'bigint',
|
|
14
|
+
'symbol',
|
|
15
|
+
'date',
|
|
16
|
+
'literal',
|
|
17
|
+
'int',
|
|
18
|
+
'null',
|
|
19
|
+
'undefined',
|
|
20
|
+
'void',
|
|
21
|
+
'any',
|
|
22
|
+
'unknown',
|
|
23
|
+
'never',
|
|
24
|
+
'nan',
|
|
25
|
+
'enum',
|
|
26
|
+
'nativeEnum'
|
|
27
|
+
]);
|
|
28
|
+
function getZodFactoryName(node) {
|
|
29
|
+
const { callee } = node;
|
|
30
|
+
if (callee.type !== AST_NODE_TYPES.MemberExpression || callee.computed) {
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|
|
33
|
+
const { object, property } = callee;
|
|
34
|
+
if (object.type !== AST_NODE_TYPES.Identifier || object.name !== zodNamespace) {
|
|
35
|
+
return undefined;
|
|
36
|
+
}
|
|
37
|
+
if (property.type !== AST_NODE_TYPES.Identifier) {
|
|
38
|
+
return undefined;
|
|
39
|
+
}
|
|
40
|
+
return property.name;
|
|
41
|
+
}
|
|
42
|
+
function isAlreadyImmutable(node) {
|
|
43
|
+
if (node.type !== AST_NODE_TYPES.CallExpression) {
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
const factory = getZodFactoryName(node);
|
|
47
|
+
if (factory === undefined) {
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
return immutableSchemaFactories.has(factory) || factory === readonlyFactory;
|
|
51
|
+
}
|
|
52
|
+
const description = 'Disallow `z.readonly()` on schemas whose type is already immutable — primitives ' +
|
|
53
|
+
'(`z.string`, `z.number`, `z.literal`, `z.enum`, …) and already-readonly schemas — where the ' +
|
|
54
|
+
'wrapper has no effect on the inferred type.';
|
|
55
|
+
export const noUnnecessaryReadonlySchemaRule = buildRule({
|
|
56
|
+
name: 'no-unnecessary-readonly-schema',
|
|
57
|
+
meta: {
|
|
58
|
+
type: 'suggestion',
|
|
59
|
+
fixable: 'code',
|
|
60
|
+
docs: { description },
|
|
61
|
+
messages: {
|
|
62
|
+
unnecessaryReadonly: 'Unnecessary z.readonly() on an already-immutable schema; remove it.'
|
|
63
|
+
},
|
|
64
|
+
schema: []
|
|
65
|
+
},
|
|
66
|
+
defaultOptions: [],
|
|
67
|
+
create(context) {
|
|
68
|
+
const { sourceCode } = context;
|
|
69
|
+
return {
|
|
70
|
+
CallExpression(node) {
|
|
71
|
+
if (getZodFactoryName(node) !== readonlyFactory) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
const [argument] = node.arguments;
|
|
75
|
+
if (argument === undefined || !isAlreadyImmutable(argument)) {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
context.report({
|
|
79
|
+
node,
|
|
80
|
+
messageId: 'unnecessaryReadonly',
|
|
81
|
+
fix(fixer) {
|
|
82
|
+
return fixer.replaceText(node, sourceCode.getText(argument));
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
//# sourceMappingURL=no-unnecessary-readonly-schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-unnecessary-readonly-schema.js","sourceRoot":"","sources":["../../../../../configs/plugins/enormora-zod/no-unnecessary-readonly-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,cAAc,EACd,WAAW,EAGd,MAAM,0BAA0B,CAAC;AAElC,SAAS,OAAO,CAAC,QAAgB;IAC7B,OAAO,oFAAoF,QAAQ,KAAK,CAAC;AAC7G,CAAC;AAED,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,GAAG,WAAW,CAAC;AACjD,MAAM,SAAS,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;AAKvC,MAAM,YAAY,GAAG,GAAG,CAAC;AACzB,MAAM,eAAe,GAAG,UAAU,CAAC;AAEnC,MAAM,wBAAwB,GAAwB,IAAI,GAAG,CAAC;IAC1D,QAAQ;IACR,QAAQ;IACR,SAAS;IACT,QAAQ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tC,IAAI,EAAE;QACF,IAAI,EAAE,YAAY;QAClB,OAAO,EAAE,MAAM;QACf,IAAI,EAAE,EAAE,WAAW,EAAE;QACrB,QAAQ,EAAE;YACN,mBAAmB,EAAE,qEAAqE;SAC7F;QACD,MAAM,EAAE,EAAE;KACb;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,CAAC,OAAO;QACV,MAAM,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC;QAE/B,OAAO;YACH,cAAc,CAAC,IAA6B;gBACxC,IAAI,iBAAiB,CAAC,IAAI,CAAC,KAAK,eAAe,EAAE,CAAC;oBAC9C,OAAO;gBACX,CAAC;gBACD,MAAM,CAAE,QAAQ,CAAE,GAAG,IAAI,CAAC,SAAS,CAAC;gBACpC,IAAI,QAAQ,KAAK,SAAS,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,EAAE,CAAC;oBAC1D,OAAO;gBACX,CAAC;gBACD,OAAO,CAAC,MAAM,CAAC;oBACX,IAAI;oBACJ,SAAS,EAAE,qBAAqB;oBAChC,GAAG,CAAC,KAAY;wBACZ,OAAO,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE,UAAU,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;oBACjE,CAAC;iBACJ,CAAC,CAAC;YACP,CAAC;SACJ,CAAC;IACN,CAAC;CACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { AST_NODE_TYPES, ESLintUtils } from '@typescript-eslint/utils';
|
|
2
|
+
function ruleUrl(ruleName) {
|
|
3
|
+
return `https://github.com/enormora/eslint-config/blob/main/configs/plugins/enormora-zod/${ruleName}.ts`;
|
|
4
|
+
}
|
|
5
|
+
const { RuleCreator: ruleCreator } = ESLintUtils;
|
|
6
|
+
const buildRule = ruleCreator(ruleUrl);
|
|
7
|
+
const zodNamespace = 'z';
|
|
8
|
+
const readonlyFactory = 'readonly';
|
|
9
|
+
const mutableSchemaFactories = new Set([
|
|
10
|
+
'object',
|
|
11
|
+
'strictObject',
|
|
12
|
+
'looseObject',
|
|
13
|
+
'array',
|
|
14
|
+
'tuple',
|
|
15
|
+
'record',
|
|
16
|
+
'map',
|
|
17
|
+
'set'
|
|
18
|
+
]);
|
|
19
|
+
function readParent(node) {
|
|
20
|
+
const raw = node.parent;
|
|
21
|
+
return raw ?? undefined;
|
|
22
|
+
}
|
|
23
|
+
function getZodFactoryName(node) {
|
|
24
|
+
const { callee } = node;
|
|
25
|
+
if (callee.type !== AST_NODE_TYPES.MemberExpression || callee.computed) {
|
|
26
|
+
return undefined;
|
|
27
|
+
}
|
|
28
|
+
const { object, property } = callee;
|
|
29
|
+
if (object.type !== AST_NODE_TYPES.Identifier || object.name !== zodNamespace) {
|
|
30
|
+
return undefined;
|
|
31
|
+
}
|
|
32
|
+
if (property.type !== AST_NODE_TYPES.Identifier) {
|
|
33
|
+
return undefined;
|
|
34
|
+
}
|
|
35
|
+
return property.name;
|
|
36
|
+
}
|
|
37
|
+
function isWrappedInReadonly(node) {
|
|
38
|
+
const parent = readParent(node);
|
|
39
|
+
if (parent?.type !== AST_NODE_TYPES.CallExpression) {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
if (getZodFactoryName(parent) !== readonlyFactory) {
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
45
|
+
return parent.arguments[0] === node;
|
|
46
|
+
}
|
|
47
|
+
const description = 'Require mutable Zod Mini schemas (`z.object`, `z.strictObject`, `z.looseObject`, `z.array`, ' +
|
|
48
|
+
'`z.tuple`, `z.record`, `z.map`, `z.set`) to be wrapped in `z.readonly()` so the inferred type is ' +
|
|
49
|
+
'readonly. Applied at every level, wrapping composes into a deeply readonly type.';
|
|
50
|
+
export const requireReadonlySchemaRule = buildRule({
|
|
51
|
+
name: 'require-readonly-schema',
|
|
52
|
+
meta: {
|
|
53
|
+
type: 'problem',
|
|
54
|
+
fixable: 'code',
|
|
55
|
+
docs: { description },
|
|
56
|
+
messages: {
|
|
57
|
+
schemaShouldBeReadonly: 'Wrap this z.{{factory}}() schema in z.readonly() to produce a readonly type.'
|
|
58
|
+
},
|
|
59
|
+
schema: []
|
|
60
|
+
},
|
|
61
|
+
defaultOptions: [],
|
|
62
|
+
create(context) {
|
|
63
|
+
const { sourceCode } = context;
|
|
64
|
+
return {
|
|
65
|
+
CallExpression(node) {
|
|
66
|
+
const factory = getZodFactoryName(node);
|
|
67
|
+
if (factory === undefined || !mutableSchemaFactories.has(factory)) {
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
if (isWrappedInReadonly(node)) {
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
context.report({
|
|
74
|
+
node,
|
|
75
|
+
messageId: 'schemaShouldBeReadonly',
|
|
76
|
+
data: { factory },
|
|
77
|
+
fix(fixer) {
|
|
78
|
+
return fixer.replaceText(node, `z.readonly(${sourceCode.getText(node)})`);
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
//# sourceMappingURL=require-readonly-schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"require-readonly-schema.js","sourceRoot":"","sources":["../../../../../configs/plugins/enormora-zod/require-readonly-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,cAAc,EACd,WAAW,EAGd,MAAM,0BAA0B,CAAC;AAElC,SAAS,OAAO,CAAC,QAAgB;IAC7B,OAAO,oFAAoF,QAAQ,KAAK,CAAC;AAC7G,CAAC;AAED,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,GAAG,WAAW,CAAC;AACjD,MAAM,SAAS,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;AAKvC,MAAM,YAAY,GAAG,GAAG,CAAC;AACzB,MAAM,eAAe,GAAG,UAAU,CAAC;AAEnC,MAAM,sBAAsB,GAAwB,IAAI,GAAG,CAAC;IACxD,QAAQ;IACR,cAAc;IACd,aAAa;I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,SAAS,CAAC;IAC/C,IAAI,EAAE,yBAAyB;IAC/B,IAAI,EAAE;QACF,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,MAAM;QACf,IAAI,EAAE,EAAE,WAAW,EAAE;QACrB,QAAQ,EAAE;YACN,sBAAsB,EAAE,8EAA8E;SACzG;QACD,MAAM,EAAE,EAAE;KACb;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,CAAC,OAAO;QACV,MAAM,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC;QAE/B,OAAO;YACH,cAAc,CAAC,IAA6B;gBACxC,MAAM,OAAO,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;gBACxC,IAAI,OAAO,KAAK,SAAS,IAAI,CAAC,sBAAsB,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC;oBAChE,OAAO;gBACX,CAAC;gBACD,IAAI,mBAAmB,CAAC,IAAI,CAAC,EAAE,CAAC;oBAC5B,OAAO;gBACX,CAAC;gBACD,OAAO,CAAC,MAAM,CAAC;oBACX,IAAI;oBACJ,SAAS,EAAE,wBAAwB;oBACnC,IAAI,EAAE,EAAE,OAAO,EAAE;oBACjB,GAAG,CAAC,KAAY;wBACZ,OAAO,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE,cAAc,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;oBAC9E,CAAC;iBACJ,CAAC,CAAC;YACP,CAAC;SACJ,CAAC;IACN,CAAC;CACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import zodCorePlugin from 'eslint-plugin-zod-core';
|
|
2
|
+
import zodMiniPlugin from 'eslint-plugin-zod-mini';
|
|
3
|
+
import { enormoraZodPlugin } from "../../plugins/enormora-zod/enormora-zod-plugin.js";
|
|
4
|
+
import { createRestrictedImportsPlugin } from "../../rule-sets/restricted-imports.js";
|
|
5
|
+
import { createRestrictedSyntaxPlugin } from "@enormora/eslint-config-base/rule-sets/restricted-syntax.js";
|
|
6
|
+
const useZodMiniOrCoreMessage = 'Use zod/mini or zod/v4/core instead.';
|
|
7
|
+
const regularZodImportRestriction = {
|
|
8
|
+
paths: [
|
|
9
|
+
{ name: 'zod', message: useZodMiniOrCoreMessage },
|
|
10
|
+
{ name: 'zod/v4', message: useZodMiniOrCoreMessage },
|
|
11
|
+
{ name: 'zod/v3', message: useZodMiniOrCoreMessage }
|
|
12
|
+
]
|
|
13
|
+
};
|
|
14
|
+
const noEnumSchemaRestriction = {
|
|
15
|
+
selector: "CallExpression[callee.object.name='z'][callee.property.name='enum']",
|
|
16
|
+
message: 'Use a union of z.literal() schemas instead of z.enum().'
|
|
17
|
+
};
|
|
18
|
+
const noNativeEnumSchemaRestriction = {
|
|
19
|
+
selector: "CallExpression[callee.object.name='z'][callee.property.name='nativeEnum']",
|
|
20
|
+
message: 'Use a union of z.literal() schemas instead of z.nativeEnum().'
|
|
21
|
+
};
|
|
22
|
+
const lengthCheckedArraySelector = [
|
|
23
|
+
"CallExpression[callee.property.name='check']",
|
|
24
|
+
"[callee.object.callee.object.name='z'][callee.object.callee.property.name='array']",
|
|
25
|
+
":has(> CallExpression[callee.object.name='z'][callee.property.name=/^(minLength|maxLength|length)$/])"
|
|
26
|
+
]
|
|
27
|
+
.join('');
|
|
28
|
+
const noLengthCheckedArraySchemaRestriction = {
|
|
29
|
+
selector: lengthCheckedArraySelector,
|
|
30
|
+
message: 'Use z.tuple() instead of a z.array() with a length check.'
|
|
31
|
+
};
|
|
32
|
+
const restrictedImportsWrappers = createRestrictedImportsPlugin(['no-regular-zod-import']);
|
|
33
|
+
const restrictedSyntaxWrappers = createRestrictedSyntaxPlugin(['no-enum-schema', 'no-native-enum-schema', 'no-length-checked-array-schema'], {});
|
|
34
|
+
export const zodConfig = {
|
|
35
|
+
plugins: {
|
|
36
|
+
'zod-mini': zodMiniPlugin,
|
|
37
|
+
'zod-core': zodCorePlugin,
|
|
38
|
+
'enormora-zod': enormoraZodPlugin,
|
|
39
|
+
'restricted-imports': restrictedImportsWrappers,
|
|
40
|
+
'restricted-syntax-zod': restrictedSyntaxWrappers
|
|
41
|
+
},
|
|
42
|
+
rules: {
|
|
43
|
+
'zod-mini/consistent-import': ['error', { syntax: 'named' }],
|
|
44
|
+
'zod-mini/consistent-import-source': ['error', { sources: ['zod/mini'] }],
|
|
45
|
+
'zod-mini/consistent-object-schema-type': 'off',
|
|
46
|
+
'zod-mini/consistent-schema-output-type-style': ['error', { style: 'output' }],
|
|
47
|
+
'zod-mini/consistent-schema-var-name': 'error',
|
|
48
|
+
'zod-mini/no-any-schema': 'error',
|
|
49
|
+
'zod-mini/no-coerce-boolean': 'error',
|
|
50
|
+
'zod-mini/no-duplicate-schema-methods': 'error',
|
|
51
|
+
'zod-mini/no-empty-custom-schema': 'error',
|
|
52
|
+
'zod-mini/no-throw-in-refine': 'error',
|
|
53
|
+
'zod-mini/no-transform-in-record-key': 'error',
|
|
54
|
+
'zod-mini/no-unknown-schema': 'off',
|
|
55
|
+
'zod-mini/prefer-enum-over-literal-union': 'off',
|
|
56
|
+
'zod-mini/prefer-meta': 'error',
|
|
57
|
+
'zod-mini/require-brand-type-parameter': 'error',
|
|
58
|
+
'zod-mini/require-error-message': 'error',
|
|
59
|
+
'zod-mini/schema-error-property-style': 'off',
|
|
60
|
+
'zod-core/consistent-import': ['error', { syntax: 'named' }],
|
|
61
|
+
'zod-core/consistent-schema-output-type-style': ['error', { style: 'output' }],
|
|
62
|
+
'enormora-zod/require-readonly-schema': 'error',
|
|
63
|
+
'enormora-zod/no-unnecessary-readonly-schema': 'error',
|
|
64
|
+
'restricted-imports/no-regular-zod-import': ['error', regularZodImportRestriction],
|
|
65
|
+
'restricted-syntax-zod/no-enum-schema': ['error', noEnumSchemaRestriction],
|
|
66
|
+
'restricted-syntax-zod/no-native-enum-schema': ['error', noNativeEnumSchemaRestriction],
|
|
67
|
+
'restricted-syntax-zod/no-length-checked-array-schema': ['error', noLengthCheckedArraySchemaRestriction]
|
|
68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E,6BAA6B,CAAE;QACzF,sDAAsD,EAAE,CAAE,OAAO,EAAE,qCAAqC,CAAE;KAC7G;CACJ,CAAC"}
|
package/readme.md
CHANGED
|
@@ -1,7 +1,77 @@
|
|
|
1
|
-
#
|
|
1
|
+
# `@enormora/eslint-config-zod`
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
can subsequently be configured for it. It contains no real package content and is published already
|
|
5
|
-
deprecated.
|
|
3
|
+
[](https://www.npmjs.com/package/@enormora/eslint-config-zod)
|
|
6
4
|
|
|
7
|
-
|
|
5
|
+
Config preset for [Zod](https://zod.dev). It enforces the usage of [Zod Mini](https://zod.dev/packages/mini) (`zod/mini`) together with [Zod core](https://zod.dev/packages/core) (`zod/v4/core`), and reports the regular Zod API as a problem.
|
|
6
|
+
|
|
7
|
+
Wraps [`eslint-plugin-zod-mini`](https://github.com/marcalexiei/eslint-plugin-zod) and [`eslint-plugin-zod-core`](https://github.com/marcalexiei/eslint-plugin-zod).
|
|
8
|
+
|
|
9
|
+
## Install & Setup
|
|
10
|
+
|
|
11
|
+
Install `@enormora/eslint-config-zod` and the base preset package via npm:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm install --save-dev @enormora/eslint-config-base @enormora/eslint-config-zod
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Create an ESLint configuration file (e.g., `eslint.config.js`) in your project and add the base and Zod config to the configuration array:
|
|
18
|
+
|
|
19
|
+
```javascript
|
|
20
|
+
import { baseConfig } from '@enormora/eslint-config-base';
|
|
21
|
+
import { zodConfig } from '@enormora/eslint-config-zod';
|
|
22
|
+
|
|
23
|
+
export default [
|
|
24
|
+
{
|
|
25
|
+
ignores: [ 'dist/**/*' ]
|
|
26
|
+
},
|
|
27
|
+
...baseConfig,
|
|
28
|
+
zodConfig
|
|
29
|
+
];
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Enforcing Zod Mini
|
|
33
|
+
|
|
34
|
+
Importing from the regular `zod` entry points is reported, while `zod/mini` and `zod/v4/core` are allowed:
|
|
35
|
+
|
|
36
|
+
```javascript
|
|
37
|
+
import { z } from 'zod'; // error: Use zod/mini or zod/v4/core instead.
|
|
38
|
+
import { z } from 'zod/mini'; // ok
|
|
39
|
+
import { $ZodType } from 'zod/v4/core'; // ok
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Banned schemas
|
|
43
|
+
|
|
44
|
+
`z.enum()` and `z.nativeEnum()` are reported; use a union of `z.literal()` instead:
|
|
45
|
+
|
|
46
|
+
```javascript
|
|
47
|
+
z.enum([ 'a', 'b' ]); // error
|
|
48
|
+
z.nativeEnum(Color); // error
|
|
49
|
+
z.union([ z.literal('a'), z.literal('b') ]); // ok
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
A `z.array()` carrying a length check (`z.length()`, `z.minLength()`, `z.maxLength()`) is reported; a length-constrained array has a precise `z.tuple()` form:
|
|
53
|
+
|
|
54
|
+
```javascript
|
|
55
|
+
z.array(z.string()).check(z.length(2)); // error
|
|
56
|
+
z.array(z.string()).check(z.minLength(1)); // error
|
|
57
|
+
z.tuple([ z.string(), z.string() ]); // ok
|
|
58
|
+
z.tuple([ z.string() ], z.string()); // ok: [string, ...string[]]
|
|
59
|
+
z.array(z.string()); // ok: unbounded array
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Readonly schemas
|
|
63
|
+
|
|
64
|
+
Mutable schemas (`z.object`, `z.strictObject`, `z.looseObject`, `z.array`, `z.tuple`, `z.record`, `z.map`, `z.set`) must be wrapped in `z.readonly()` so the inferred type is readonly, matching the readonly-everywhere TypeScript stance. The check is autofixable, and applying it at every level composes into a deeply readonly type (`z.readonly()` is shallow):
|
|
65
|
+
|
|
66
|
+
```javascript
|
|
67
|
+
z.object({ a: z.string() }); // error
|
|
68
|
+
z.readonly(z.object({ a: z.string() })); // ok
|
|
69
|
+
z.readonly(z.object({ items: z.readonly(z.array(z.string())) })); // ok: deep
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Conversely, `z.readonly()` on an already-immutable schema (a primitive such as `z.string()`/`z.literal()`, or a doubled `z.readonly()`) is reported and removed by autofix, since it has no effect on the inferred type:
|
|
73
|
+
|
|
74
|
+
```javascript
|
|
75
|
+
z.readonly(z.string()); // error → z.string()
|
|
76
|
+
z.string(); // ok
|
|
77
|
+
```
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { builtinRules } from 'eslint/use-at-your-own-risk';
|
|
2
|
+
const noRestrictedImportsRule = builtinRules.get('no-restricted-imports');
|
|
3
|
+
export function createRestrictedImportsPlugin(ruleNames) {
|
|
4
|
+
const wrapperEntries = Object.fromEntries(ruleNames.map(function toRuleEntry(ruleName) {
|
|
5
|
+
return [ruleName, noRestrictedImportsRule];
|
|
6
|
+
}));
|
|
7
|
+
return {
|
|
8
|
+
rules: wrapperEntries
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=restricted-imports.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"restricted-imports.js","sourceRoot":"","sources":["../../../../configs/rule-sets/restricted-imports.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAM3D,MAAM,uBAAuB,GAAG,YAAY,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;AAE1E,MAAM,UAAU,6BAA6B,CAAC,SAA4B;IACtE,MAAM,cAAc,GAAG,MAAM,CAAC,WAAW,CACrC,SAAS,CAAC,GAAG,CAAC,SAAS,WAAW,CAAC,QAAgB;QAC/C,OAAO,CAAE,QAAQ,EAAE,uBAAuB,CAAE,CAAC;IACjD,CAAC,CAAC,CACL,CAAC;IACF,OAAO;QACH,KAAK,EAAE,cAAc;KACxB,CAAC;AACN,CAAC"}
|
package/sbom.cdx.json
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://cyclonedx.org/schema/bom-1.6.schema.json",
|
|
3
|
+
"bomFormat": "CycloneDX",
|
|
4
|
+
"specVersion": "1.6",
|
|
5
|
+
"version": 1,
|
|
6
|
+
"metadata": {
|
|
7
|
+
"tools": {
|
|
8
|
+
"components": [
|
|
9
|
+
{
|
|
10
|
+
"type": "application",
|
|
11
|
+
"name": "packtory",
|
|
12
|
+
"version": "0.0.63"
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
},
|
|
16
|
+
"component": {
|
|
17
|
+
"type": "library",
|
|
18
|
+
"name": "@enormora/eslint-config-zod",
|
|
19
|
+
"version": "0.0.2",
|
|
20
|
+
"bom-ref": "pkg:npm/@enormora/eslint-config-zod@0.0.2",
|
|
21
|
+
"purl": "pkg:npm/@enormora/eslint-config-zod@0.0.2"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"components": [
|
|
25
|
+
{
|
|
26
|
+
"type": "library",
|
|
27
|
+
"name": "@enormora/eslint-config-base",
|
|
28
|
+
"version": "0.0.51",
|
|
29
|
+
"bom-ref": "pkg:npm/@enormora/eslint-config-base@0.0.51",
|
|
30
|
+
"scope": "optional",
|
|
31
|
+
"licenses": [
|
|
32
|
+
{
|
|
33
|
+
"expression": "MIT"
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"purl": "pkg:npm/@enormora/eslint-config-base@0.0.51"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"type": "library",
|
|
40
|
+
"name": "@typescript-eslint/utils",
|
|
41
|
+
"version": "8.63.0",
|
|
42
|
+
"bom-ref": "pkg:npm/@typescript-eslint/utils@8.63.0",
|
|
43
|
+
"scope": "required",
|
|
44
|
+
"licenses": [
|
|
45
|
+
{
|
|
46
|
+
"expression": "MIT"
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
"purl": "pkg:npm/@typescript-eslint/utils@8.63.0"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"type": "library",
|
|
53
|
+
"name": "eslint-plugin-zod-core",
|
|
54
|
+
"version": "1.0.7",
|
|
55
|
+
"bom-ref": "pkg:npm/eslint-plugin-zod-core@1.0.7",
|
|
56
|
+
"scope": "required",
|
|
57
|
+
"licenses": [
|
|
58
|
+
{
|
|
59
|
+
"expression": "MIT"
|
|
60
|
+
}
|
|
61
|
+
],
|
|
62
|
+
"purl": "pkg:npm/eslint-plugin-zod-core@1.0.7"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"type": "library",
|
|
66
|
+
"name": "eslint-plugin-zod-mini",
|
|
67
|
+
"version": "1.4.0",
|
|
68
|
+
"bom-ref": "pkg:npm/eslint-plugin-zod-mini@1.4.0",
|
|
69
|
+
"scope": "required",
|
|
70
|
+
"licenses": [
|
|
71
|
+
{
|
|
72
|
+
"expression": "MIT"
|
|
73
|
+
}
|
|
74
|
+
],
|
|
75
|
+
"purl": "pkg:npm/eslint-plugin-zod-mini@1.4.0"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"type": "library",
|
|
79
|
+
"name": "eslint",
|
|
80
|
+
"version": "^10.0.0",
|
|
81
|
+
"bom-ref": "pkg:npm/eslint@%5E10.0.0",
|
|
82
|
+
"scope": "optional",
|
|
83
|
+
"licenses": [
|
|
84
|
+
{
|
|
85
|
+
"expression": "MIT"
|
|
86
|
+
}
|
|
87
|
+
],
|
|
88
|
+
"purl": "pkg:npm/eslint@%5E10.0.0"
|
|
89
|
+
}
|
|
90
|
+
],
|
|
91
|
+
"dependencies": [
|
|
92
|
+
{
|
|
93
|
+
"ref": "pkg:npm/@enormora/eslint-config-base@0.0.51"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"ref": "pkg:npm/@enormora/eslint-config-zod@0.0.2",
|
|
97
|
+
"dependsOn": [
|
|
98
|
+
"pkg:npm/@enormora/eslint-config-base@0.0.51",
|
|
99
|
+
"pkg:npm/@typescript-eslint/utils@8.63.0",
|
|
100
|
+
"pkg:npm/eslint-plugin-zod-core@1.0.7",
|
|
101
|
+
"pkg:npm/eslint-plugin-zod-mini@1.4.0",
|
|
102
|
+
"pkg:npm/eslint@%5E10.0.0"
|
|
103
|
+
]
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"ref": "pkg:npm/@typescript-eslint/utils@8.63.0"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"ref": "pkg:npm/eslint-plugin-zod-core@1.0.7"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"ref": "pkg:npm/eslint-plugin-zod-mini@1.4.0"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"ref": "pkg:npm/eslint@%5E10.0.0"
|
|
116
|
+
}
|
|
117
|
+
]
|
|
118
|
+
}
|