@noctcore/eslint-plugin-contracts 0.2.0 โ 0.3.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.
- package/README.md +2 -0
- package/dist/index.cjs +722 -77
- package/dist/index.d.cts +32 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.js +722 -77
- package/docs/rules/fetch-must-check-ok.md +83 -0
- package/docs/rules/schema-enum-field-consistency.md +75 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -52,6 +52,8 @@ Legend: ๐ง = autofixable ยท ๐ค = ships inert / `off` in `recommended` (enabl
|
|
|
52
52
|
| [`require-registered-keys`](./docs/rules/require-registered-keys.md) | Key/name argument of a configured sink API must be an imported constant, not a raw string. | | ๐ค |
|
|
53
53
|
| [`env-var-schema-parity`](./docs/rules/env-var-schema-parity.md) | `process.env.FOO` / `import.meta.env.FOO` keys must be declared in a schema file. | | ๐ค |
|
|
54
54
|
| [`require-schema-parse-at-boundary`](./docs/rules/require-schema-parse-at-boundary.md) | Ban `JSON.parse(...) as T` / `(await res.json()) as T`; parse boundary data at runtime. | | ๐ค |
|
|
55
|
+
| [`schema-enum-field-consistency`](./docs/rules/schema-enum-field-consistency.md) | A field that is an enum in one zod object schema must not be `z.string()` in another schema of the same module. | | |
|
|
56
|
+
| [`fetch-must-check-ok`](./docs/rules/fetch-must-check-ok.md) | A fetch response must be checked with `.ok` or a status comparison before `.json()` parses its body. | | |
|
|
55
57
|
|
|
56
58
|
The ๐ค rules ship `off` in `recommended`: `require-registered-keys` and `env-var-schema-parity` do
|
|
57
59
|
nothing until their `sinks` / `schema` options are set, and `require-schema-parse-at-boundary` is a
|