@noctcore/eslint-plugin-contracts 0.1.0 โ†’ 0.2.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 CHANGED
@@ -38,10 +38,21 @@ export default [
38
38
 
39
39
  ## Rules
40
40
 
41
- | Rule | Description | ๐Ÿ”ง |
42
- | --- | --- | --- |
43
- | [`zod-schema-naming`](./docs/rules/zod-schema-naming.md) | Exported zod schema must be a PascalCase `*Schema` const with a sibling `z.infer` type. | |
44
- | [`wire-message-naming`](./docs/rules/wire-message-naming.md) | A role-suffixed schema's `type: z.literal(...)` must be kebab-case of its name minus the suffix. | ๐Ÿ”ง |
45
- | [`no-error-stringify`](./docs/rules/no-error-stringify.md) | Ban `${error}` / `error.toString()` / `error + ""` โ€” they drop the cause chain. | |
46
- | [`no-direct-process-env`](./docs/rules/no-direct-process-env.md) | Ban direct `process.env`; require a typed config accessor. | |
47
- | [`money-must-be-decimal`](./docs/rules/money-must-be-decimal.md) | Money-named fields typed `: number` are banned; require a Decimal money type. | |
41
+ Legend: ๐Ÿ”ง = autofixable ยท ๐Ÿ’ค = ships inert / `off` in `recommended` (enable + configure explicitly).
42
+
43
+ | Rule | Description | ๐Ÿ”ง | ๐Ÿ’ค |
44
+ | --- | --- | --- | --- |
45
+ | [`zod-schema-naming`](./docs/rules/zod-schema-naming.md) | Exported zod schema must be a PascalCase `*Schema` const with a sibling `z.infer` type. | | |
46
+ | [`wire-message-naming`](./docs/rules/wire-message-naming.md) | A role-suffixed schema's `type: z.literal(...)` must be kebab-case of its name minus the suffix. | ๐Ÿ”ง | |
47
+ | [`no-error-stringify`](./docs/rules/no-error-stringify.md) | Ban `${error}` / `error.toString()` / `error + ""` โ€” they drop the cause chain. | | |
48
+ | [`no-direct-process-env`](./docs/rules/no-direct-process-env.md) | Ban direct `process.env`; require a typed config accessor. | | |
49
+ | [`money-must-be-decimal`](./docs/rules/money-must-be-decimal.md) | Money-named fields typed `: number` are banned; require a Decimal money type. | | |
50
+ | [`require-error-cause`](./docs/rules/require-error-cause.md) | Re-throwing a new error inside `catch` must forward the caught error as `{ cause }`. | ๐Ÿ”ง | |
51
+ | [`restrict-throw-to-taxonomy`](./docs/rules/restrict-throw-to-taxonomy.md) | `throw` only allowlisted error classes; ban throwing non-Error values. | | |
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
+ | [`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
+ | [`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
+
56
+ The ๐Ÿ’ค rules ship `off` in `recommended`: `require-registered-keys` and `env-var-schema-parity` do
57
+ nothing until their `sinks` / `schema` options are set, and `require-schema-parse-at-boundary` is a
58
+ conservative syntactic slice of a type-aware concern. Turn them on explicitly once configured.