@ts-runtypes/devtools 0.9.3 → 0.11.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.
Files changed (64) hide show
  1. package/README.md +25 -66
  2. package/dist/diagnosticCatalog.d.ts +2 -2
  3. package/dist/diagnosticCatalog.d.ts.map +1 -1
  4. package/dist/diagnosticCatalog.js +2 -2
  5. package/dist/diagnosticCatalog.js.map +1 -1
  6. package/dist/eslint/diagnosticRouting.d.ts +8 -1
  7. package/dist/eslint/diagnosticRouting.d.ts.map +1 -1
  8. package/dist/eslint/diagnosticRouting.js +219 -35
  9. package/dist/eslint/diagnosticRouting.js.map +1 -1
  10. package/dist/eslint/index.d.ts +2 -0
  11. package/dist/eslint/index.d.ts.map +1 -1
  12. package/dist/eslint/index.js +22 -26
  13. package/dist/eslint/index.js.map +1 -1
  14. package/dist/eslint/lint-worker.js +31 -20
  15. package/dist/eslint/lint-worker.js.map +1 -1
  16. package/dist/eslint/prefilter.d.ts.map +1 -1
  17. package/dist/eslint/prefilter.js +2 -2
  18. package/dist/eslint/prefilter.js.map +1 -1
  19. package/dist/eslint/session-protocol.d.ts +5 -4
  20. package/dist/eslint/session-protocol.d.ts.map +1 -1
  21. package/dist/eslint/session-protocol.js +2 -0
  22. package/dist/eslint/session-protocol.js.map +1 -1
  23. package/dist/eslint/session.d.ts.map +1 -1
  24. package/dist/eslint/session.js +7 -1
  25. package/dist/eslint/session.js.map +1 -1
  26. package/dist/{diagnosticCatalog.generated.d.ts → go-generated/diagnosticCatalog.generated.d.ts} +1 -0
  27. package/dist/go-generated/diagnosticCatalog.generated.d.ts.map +1 -0
  28. package/dist/{diagnosticCatalog.generated.js → go-generated/diagnosticCatalog.generated.js} +269 -66
  29. package/dist/go-generated/diagnosticCatalog.generated.js.map +1 -0
  30. package/dist/go-generated/reflectionKind.generated.d.ts +59 -0
  31. package/dist/go-generated/reflectionKind.generated.d.ts.map +1 -0
  32. package/dist/go-generated/reflectionKind.generated.js +59 -0
  33. package/dist/go-generated/reflectionKind.generated.js.map +1 -0
  34. package/dist/{runtypes-constants.generated.d.ts → go-generated/runtypes-constants.generated.d.ts} +9 -27
  35. package/dist/go-generated/runtypes-constants.generated.d.ts.map +1 -0
  36. package/dist/{runtypes-constants.generated.js → go-generated/runtypes-constants.generated.js} +5 -18
  37. package/dist/go-generated/runtypes-constants.generated.js.map +1 -0
  38. package/dist/go-generated/tsconfig-plugin-keys.generated.d.ts +3 -0
  39. package/dist/go-generated/tsconfig-plugin-keys.generated.d.ts.map +1 -0
  40. package/dist/go-generated/tsconfig-plugin-keys.generated.js +18 -0
  41. package/dist/go-generated/tsconfig-plugin-keys.generated.js.map +1 -0
  42. package/dist/packages/ts-runtypes-devtools/tsconfig.test.tsbuildinfo +1 -1
  43. package/dist/plugin-option-keys.d.ts +3 -0
  44. package/dist/plugin-option-keys.d.ts.map +1 -0
  45. package/dist/plugin-option-keys.js +24 -0
  46. package/dist/plugin-option-keys.js.map +1 -0
  47. package/dist/protocol.d.ts +28 -43
  48. package/dist/protocol.d.ts.map +1 -1
  49. package/dist/protocol.js +3 -41
  50. package/dist/protocol.js.map +1 -1
  51. package/dist/resolver-client.d.ts +41 -12
  52. package/dist/resolver-client.d.ts.map +1 -1
  53. package/dist/resolver-client.js +147 -50
  54. package/dist/resolver-client.js.map +1 -1
  55. package/dist/unplugin.d.ts +30 -8
  56. package/dist/unplugin.d.ts.map +1 -1
  57. package/dist/unplugin.js +155 -37
  58. package/dist/unplugin.js.map +1 -1
  59. package/oxlint-recommended.json +32 -0
  60. package/package.json +4 -3
  61. package/dist/diagnosticCatalog.generated.d.ts.map +0 -1
  62. package/dist/diagnosticCatalog.generated.js.map +0 -1
  63. package/dist/runtypes-constants.generated.d.ts.map +0 -1
  64. package/dist/runtypes-constants.generated.js.map +0 -1
package/README.md CHANGED
@@ -1,76 +1,35 @@
1
- # ts-runtypes-devtools
1
+ # @ts-runtypes/devtools
2
2
 
3
- Cross-bundler build tooling for **RunTypes**. One package, one plugin built on
4
- [unplugin](https://github.com/unjs/unplugin), exposed as ready-made entry
5
- points for each bundler. The plugin rewrites RunTypes marker calls
6
- (`getRunTypeId`, `createValidate`, `createJsonEncoder`, ) into specialized,
7
- type-derived code generated by the [RunTypes](../../README.md) Go resolver.
3
+ Build-time tooling for **RunTypes**. It carries two surfaces: a cross-bundler
4
+ plugin that rewrites RunTypes marker calls (`getRunTypeId`, `createValidateFn`,
5
+ `createJsonEncoderFn`, …) into specialized, type-derived code, and a lint plugin
6
+ (OXlint and ESLint v9) that surfaces the compiler's diagnostics in your editor and
7
+ CI.
8
8
 
9
- ## Entry points
9
+ The runtime half is
10
+ [`@ts-runtypes/core`](https://www.npmjs.com/package/@ts-runtypes/core); the compiler
11
+ binary rides along in [`@ts-runtypes/bin`](https://www.npmjs.com/package/@ts-runtypes/bin).
10
12
 
11
- | Import | What it is |
12
- | ------------------------------- | -------------------------------------------------------------------- |
13
- | `ts-runtypes-devtools/vite` | Vite plugin (default export is the plugin factory) |
14
- | `ts-runtypes-devtools/rollup` | Rollup plugin |
15
- | `ts-runtypes-devtools/webpack` | webpack plugin |
16
- | `ts-runtypes-devtools/rspack` | Rspack plugin |
17
- | `ts-runtypes-devtools/esbuild` | esbuild plugin |
18
- | `ts-runtypes-devtools/unplugin` | the framework-agnostic unplugin instance (`.vite`, `.rollup`, …) |
19
- | `ts-runtypes-devtools` | the unplugin instance (default export) plus shared types + helpers |
20
- | `ts-runtypes-devtools/eslint` | reserved for the future lint integration (placeholder, no rules yet) |
13
+ Entry points: `/vite`, `/rollup`, `/rolldown`, `/webpack`, `/rspack`, `/esbuild`,
14
+ `/unplugin` for any other tool, `/oxlint` and `/eslint` for linting, and the package
15
+ root for the shared types and helpers.
21
16
 
22
- > The transform is identical across bundlers; the Vite entry additionally wires
23
- > HMR. Vite and Rollup are covered by tests today; webpack, Rspack and esbuild
24
- > ride the same unplugin core. esbuild has no native transform phase, so
25
- > unplugin emulates it via `onLoad`.
17
+ ## Documentation
26
18
 
27
- ## Install
19
+ Install, wiring, the full option list, and the linting setup live at
20
+ **[runtypes.pages.dev](https://runtypes.pages.dev/)**.
28
21
 
29
- ```bash
30
- pnpm add -D ts-runtypes-devtools
31
- ```
32
-
33
- The plugin runs a small prebuilt Go binary. It resolves the right binary for
34
- your platform automatically through `ts-runtypes-bin`; pass `binary` only to
35
- point at a custom or in-repo build.
36
-
37
- ## Usage
38
-
39
- ```ts
40
- // vite.config.ts
41
- import {defineConfig} from 'vite';
42
- import runtypes from 'ts-runtypes-devtools/vite';
43
-
44
- export default defineConfig({
45
- plugins: [runtypes()],
46
- });
47
- ```
48
-
49
- Every other bundler is the same shape, e.g. Rollup:
50
-
51
- ```ts
52
- // rollup.config.js
53
- import runtypes from 'ts-runtypes-devtools/rollup';
54
-
55
- export default {
56
- plugins: [runtypes()],
57
- };
58
- ```
59
-
60
- ## Options
61
-
62
- | Option | Default | Description |
63
- | --------------------------------- | ---------------------------- | ----------------------------------------------------------------- |
64
- | `binary` | auto (via `ts-runtypes-bin`) | Path to a custom `ts-runtypes` binary. |
65
- | `cwd` | bundler root | Project root (where `tsconfig.json` lives). |
66
- | `tsconfig` | `"tsconfig.json"` | tsconfig path, relative to `cwd`. |
67
- | `emitMode` | `"code"` | What each cache entry ships: `code`, `functions`, or `both`. |
68
- | `moduleMode` | `"default"` | Virtual-module grouping: `default`, `allSingle`, `allModules`. |
69
- | `inlineMode` | `"default"` | Child-inlining policy: `default` or `allInternal`. |
70
- | `parallelScan` / `parallelRender` | `true` | Opt out of the resolver's parallel phases (benchmarking / debug). |
71
-
72
- The on-disk artifact cache (`node_modules/.cache/ts-runtypes`) has no option here: it follows TypeScript's `incremental` / `composite` tsconfig setting (on when your project is incremental, off otherwise).
22
+ - [Quick start](https://runtypes.pages.dev/introduction/quick-start)
23
+ - [Configuration](https://runtypes.pages.dev/introduction/configuration)
24
+ - [Linting](https://runtypes.pages.dev/guide/linting)
25
+ - [Source and issues](https://github.com/MionKit/ts-run-types)
73
26
 
74
27
  ## Status
75
28
 
76
29
  Experimental.
30
+
31
+ ## License
32
+
33
+ Proprietary — all rights reserved. No use, copying, or distribution without prior
34
+ written authorization. See
35
+ [LICENSE](https://github.com/MionKit/ts-run-types/blob/main/LICENSE).
@@ -1,5 +1,5 @@
1
- export { DIAGNOSTIC_CATALOG } from './diagnosticCatalog.generated.ts';
2
- export type { DiagnosticEntry } from './diagnosticCatalog.generated.ts';
1
+ export { DIAGNOSTIC_CATALOG } from './go-generated/diagnosticCatalog.generated.ts';
2
+ export type { DiagnosticEntry } from './go-generated/diagnosticCatalog.generated.ts';
3
3
  export declare function renderHeadline(code: string, args?: readonly string[]): string;
4
4
  export declare function renderDetail(code: string, args?: readonly string[]): string | undefined;
5
5
  export declare function alwaysThrowFactory(code: string, siteHint?: string, ...args: string[]): () => never;
@@ -1 +1 @@
1
- {"version":3,"file":"diagnosticCatalog.d.ts","sourceRoot":"","sources":["../src/diagnosticCatalog.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAC,kBAAkB,EAAC,MAAM,kCAAkC,CAAC;AACpE,YAAY,EAAC,eAAe,EAAC,MAAM,kCAAkC,CAAC;AAkBtE,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAI7E;AAQD,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,GAAG,SAAS,CAIvF;AAeD,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,KAAK,CAOlG;AAQD,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAE7E"}
1
+ {"version":3,"file":"diagnosticCatalog.d.ts","sourceRoot":"","sources":["../src/diagnosticCatalog.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAC,kBAAkB,EAAC,MAAM,+CAA+C,CAAC;AACjF,YAAY,EAAC,eAAe,EAAC,MAAM,+CAA+C,CAAC;AAkBnF,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAI7E;AAQD,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,GAAG,SAAS,CAIvF;AAeD,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,KAAK,CAOlG;AAQD,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAE7E"}
@@ -1,5 +1,5 @@
1
- import { DIAGNOSTIC_CATALOG } from "./diagnosticCatalog.generated.js";
2
- export { DIAGNOSTIC_CATALOG } from "./diagnosticCatalog.generated.js";
1
+ import { DIAGNOSTIC_CATALOG } from "./go-generated/diagnosticCatalog.generated.js";
2
+ export { DIAGNOSTIC_CATALOG } from "./go-generated/diagnosticCatalog.generated.js";
3
3
  function substitute(template, args) {
4
4
  if (!args || args.length === 0)
5
5
  return template;
@@ -1 +1 @@
1
- {"version":3,"file":"diagnosticCatalog.js","sourceRoot":"","sources":["../src/diagnosticCatalog.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAC,kBAAkB,EAAC,MAAM,kCAAkC,CAAC;AAEpE,OAAO,EAAC,kBAAkB,EAAC,MAAM,kCAAkC,CAAC;AAIpE,SAAS,UAAU,CAAC,QAAgB,EAAE,IAAmC;IACvE,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,QAAQ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C;AAeD,MAAM,UAAU,kBAAkB,CAAC,IAAY,EAAE,QAAiB,EAAE,GAAG,IAAc;IACnF,MAAM,QAAQ,GAAG,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC5C,MAAM,IAAI,GAAG,IAAI,IAAI,KAAK,QAAQ,EAAE,CAAC;IACrC,MAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,QAAQ,QAAQ,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;IAC7D,OAAO,GAAG,EAAE;QACV,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;IAC3B,CAAC,CAAC;AACJ,CAAC;AAQD,MAAM,UAAU,cAAc,CAAC,IAAY,EAAE,IAAwB;IACnE,OAAO,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AACpC,CAAC"}
@@ -1,5 +1,12 @@
1
1
  import { type Diagnostic } from '../protocol.ts';
2
- export type RuleName = 'error' | 'warn' | 'info' | 'no-enrichment-todo' | 'no-orphan-carcass' | 'enrichment-field' | 'enrichment-drift';
2
+ export type RuleName = 'broken-tsconfig' | 'invalid-marker' | 'redundant-marker' | 'pure-functions' | 'validate-non-serializable' | 'validate-skipped-member' | 'json-non-serializable' | 'json-skipped-member' | 'binary-non-serializable' | 'binary-skipped-member' | 'clone-unsupported-type' | 'clone-shared-reference' | 'unknown-keys' | 'format' | 'invalid-override' | 'override-side-effect' | 'non-enumerable' | 'class-serializer' | 'other' | 'no-enrichment-todo' | 'no-orphan-carcass' | 'enrichment-field' | 'enrichment-message' | 'enrichment-broken-source' | 'enrichment-misplaced-file';
3
+ export interface RuleSpec {
4
+ readonly name: RuleName;
5
+ readonly default: 'error' | 'warn';
6
+ readonly gate: 'compiler' | 'enrichment';
7
+ readonly description: string;
8
+ }
9
+ export declare const RULE_SPECS: readonly RuleSpec[];
3
10
  export declare const ALL_RULE_NAMES: readonly RuleName[];
4
11
  export interface LintLoc {
5
12
  start: {
@@ -1 +1 @@
1
- {"version":3,"file":"diagnosticRouting.d.ts","sourceRoot":"","sources":["../../src/eslint/diagnosticRouting.ts"],"names":[],"mappings":"AAOA,OAAO,EAAmB,KAAK,UAAU,EAAsB,MAAM,gBAAgB,CAAC;AAUtF,MAAM,MAAM,QAAQ,GAChB,OAAO,GACP,MAAM,GACN,MAAM,GACN,oBAAoB,GACpB,mBAAmB,GACnB,kBAAkB,GAClB,kBAAkB,CAAC;AAEvB,eAAO,MAAM,cAAc,EAAE,SAAS,QAAQ,EAQ7C,CAAC;AAIF,MAAM,WAAW,OAAO;IACtB,KAAK,EAAE;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAC,CAAC;IACtC,GAAG,CAAC,EAAE;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAC,CAAC;CACtC;AAGD,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,QAAQ,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,OAAO,CAAC;CACd;AAMD,wBAAgB,eAAe,CAAC,UAAU,EAAE,UAAU,GAAG,UAAU,CAMlE;AA+CD,wBAAgB,aAAa,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM,CAU5D"}
1
+ {"version":3,"file":"diagnosticRouting.d.ts","sourceRoot":"","sources":["../../src/eslint/diagnosticRouting.ts"],"names":[],"mappings":"AAOA,OAAO,EAAmB,KAAK,UAAU,EAAsB,MAAM,gBAAgB,CAAC;AAWtF,MAAM,MAAM,QAAQ,GAChB,iBAAiB,GACjB,gBAAgB,GAChB,kBAAkB,GAClB,gBAAgB,GAChB,2BAA2B,GAC3B,yBAAyB,GACzB,uBAAuB,GACvB,qBAAqB,GACrB,yBAAyB,GACzB,uBAAuB,GACvB,wBAAwB,GACxB,wBAAwB,GACxB,cAAc,GACd,QAAQ,GACR,kBAAkB,GAClB,sBAAsB,GACtB,gBAAgB,GAChB,kBAAkB,GAClB,OAAO,GACP,oBAAoB,GACpB,mBAAmB,GACnB,kBAAkB,GAClB,oBAAoB,GACpB,0BAA0B,GAC1B,2BAA2B,CAAC;AAQhC,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAAC;IACnC,QAAQ,CAAC,IAAI,EAAE,UAAU,GAAG,YAAY,CAAC;IACzC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAED,eAAO,MAAM,UAAU,EAAE,SAAS,QAAQ,EAgLzC,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,SAAS,QAAQ,EAAwC,CAAC;AAiGvF,MAAM,WAAW,OAAO;IACtB,KAAK,EAAE;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAC,CAAC;IACtC,GAAG,CAAC,EAAE;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAC,CAAC;CACtC;AAGD,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,QAAQ,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,OAAO,CAAC;CACd;AAMD,wBAAgB,eAAe,CAAC,UAAU,EAAE,UAAU,GAAG,UAAU,CAMlE;AAqBD,wBAAgB,aAAa,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM,CAU5D"}
@@ -1,14 +1,221 @@
1
1
  import { DIAGNOSTIC_CATALOG, renderHeadline } from "../diagnosticCatalog.js";
2
2
  import { Family, Severity } from "../protocol.js";
3
- export const ALL_RULE_NAMES = [
4
- 'error',
5
- 'warn',
6
- 'info',
7
- 'no-enrichment-todo',
8
- 'no-orphan-carcass',
9
- 'enrichment-field',
10
- 'enrichment-drift',
3
+ export const RULE_SPECS = [
4
+ {
5
+ name: 'broken-tsconfig',
6
+ default: 'error',
7
+ gate: 'compiler',
8
+ description: 'The project tsconfig the linter was pointed at (the tsconfig setting, or the default tsconfig.json) is missing or does not parse, so type-aware linting cannot run. The linter reads the same config as your build; fix the config or the configured path',
9
+ },
10
+ {
11
+ name: 'invalid-marker',
12
+ default: 'error',
13
+ gate: 'compiler',
14
+ description: 'A marker call the build cannot turn into a function: a generic type argument never filled in with a concrete type, an options argument that is not a plain literal the build can read, an import that failed to resolve, or a Temporal type without the Temporal lib enabled',
15
+ },
16
+ {
17
+ name: 'redundant-marker',
18
+ default: 'warn',
19
+ gate: 'compiler',
20
+ description: 'A marker that works but probably does not do what you meant: a function called inside a marker just to read its return type (the call itself is wasted), or a ValidateOptions flag that has no effect on this particular type',
21
+ },
22
+ {
23
+ name: 'pure-functions',
24
+ default: 'error',
25
+ gate: 'compiler',
26
+ description: 'A registered pure function that breaks the purity rules (uses this, await, yield, dynamic import, blocked globals, or variables from outside its own body), is registered twice with different bodies, or is referenced by a generated function but never registered',
27
+ },
28
+ {
29
+ name: 'validate-non-serializable',
30
+ default: 'error',
31
+ gate: 'compiler',
32
+ description: 'A type that can never be validated. Validators check serializable data only (the data-only projection of the type), so a type like symbol or Map at a root position has nothing to check and the generated function will always fail',
33
+ },
34
+ {
35
+ name: 'validate-skipped-member',
36
+ default: 'warn',
37
+ gate: 'compiler',
38
+ description: 'A property the validator silently skips: functions, methods, statics, and symbols are not data and never survive JSON, so the generated validator checks the rest of the object and ignores them',
39
+ },
40
+ {
41
+ name: 'json-non-serializable',
42
+ default: 'error',
43
+ gate: 'compiler',
44
+ description: 'A type that can never be encoded to or decoded from JSON (a function, symbol, never, or a non-serializable built-in like Map at a root position) — the generated function will always fail',
45
+ },
46
+ {
47
+ name: 'json-skipped-member',
48
+ default: 'warn',
49
+ gate: 'compiler',
50
+ description: 'A property the JSON encoder and decoder silently leave out (a function, method, static, or symbol member) — the rest of the object round-trips normally',
51
+ },
52
+ {
53
+ name: 'binary-non-serializable',
54
+ default: 'error',
55
+ gate: 'compiler',
56
+ description: 'A type that can never be serialised to or deserialised from binary (a function, symbol, never, or a non-serializable built-in like Map at a root position) — the generated function will always fail',
57
+ },
58
+ {
59
+ name: 'binary-skipped-member',
60
+ default: 'warn',
61
+ gate: 'compiler',
62
+ description: 'A property the binary encoder and decoder silently leave out (a function, method, static, or symbol member) — the rest of the object round-trips normally',
63
+ },
64
+ {
65
+ name: 'clone-unsupported-type',
66
+ default: 'error',
67
+ gate: 'compiler',
68
+ description: 'A type cloneExactShape cannot clone safely: a union of objects (the clone cannot tell which shape to rebuild) or a callable root. A clone that guessed could keep unknown keys, so the build stops instead',
69
+ },
70
+ {
71
+ name: 'clone-shared-reference',
72
+ default: 'warn',
73
+ gate: 'compiler',
74
+ description: 'A property the clone cannot rebuild (a function, symbol, or non-serializable built-in), so it stays pointing at the same value as the original — changes through it are visible on both copies',
75
+ },
76
+ {
77
+ name: 'unknown-keys',
78
+ default: 'warn',
79
+ gate: 'compiler',
80
+ description: 'A property the unknown-keys helpers (hasUnknownKeys, unknownKeyErrors, unknownKeysToUndefined) silently skip, such as a function member — the check covers the rest of the object',
81
+ },
82
+ {
83
+ name: 'format',
84
+ default: 'error',
85
+ gate: 'compiler',
86
+ description: 'A custom string format with a broken definition: a mock sample that does not match its own pattern, a sample that violates a sibling constraint like maxLength, or invalid format params. Also fires when the linter re-checks samples the build could not verify (allowUncheckedPatterns)',
87
+ },
88
+ {
89
+ name: 'invalid-override',
90
+ default: 'error',
91
+ gate: 'compiler',
92
+ description: 'An override that cannot work: the same (type, function) pair registered twice, or an override redirect pointing at a generated module that does not exist',
93
+ },
94
+ {
95
+ name: 'override-side-effect',
96
+ default: 'warn',
97
+ gate: 'compiler',
98
+ description: 'A validate override on a type whose JSON and binary union decoders also run validation internally — the override changes their behaviour too, which may be intended but is worth knowing',
99
+ },
100
+ {
101
+ name: 'non-enumerable',
102
+ default: 'error',
103
+ gate: 'compiler',
104
+ description: 'A property marked @nonEnumerable that is not optional — a non-enumerable property can be absent from a plain object, so the type must allow undefined',
105
+ },
106
+ {
107
+ name: 'class-serializer',
108
+ default: 'warn',
109
+ gate: 'compiler',
110
+ description: 'A class that will be serialized structurally (declared properties only) because no custom serializer is registered — the data survives, but the decoded value is a plain object, not a class instance. Register one with registerClassSerializer to round-trip real instances',
111
+ },
112
+ {
113
+ name: 'other',
114
+ default: 'error',
115
+ gate: 'compiler',
116
+ description: 'Any other RunTypes compiler diagnostic (reached only when a locally built binary runs ahead of the message catalog)',
117
+ },
118
+ {
119
+ name: 'no-enrichment-todo',
120
+ default: 'error',
121
+ gate: 'enrichment',
122
+ description: 'An unfilled @todo placeholder the generator scaffolded in a FriendlyText / MockData file — fill in the value, then delete the tag line',
123
+ },
124
+ {
125
+ name: 'no-orphan-carcass',
126
+ default: 'error',
127
+ gate: 'enrichment',
128
+ description: 'A commented-out @rtOrphan / @rtOrphanChild block the generator left behind when a type or field disappeared — restore the type, or run `ts-runtypes gen --prune` to remove it',
129
+ },
130
+ {
131
+ name: 'enrichment-field',
132
+ default: 'error',
133
+ gate: 'enrichment',
134
+ description: 'A FriendlyText / MockData entry that no longer matches its type: a field the type does not declare, a name colliding with the reserved rt$ prefix, or a plural template missing its mandatory other arm',
135
+ },
136
+ {
137
+ name: 'enrichment-message',
138
+ default: 'warn',
139
+ gate: 'enrichment',
140
+ description: 'A friendly error message template with a problem: an error key that is not a declared constraint of the field, an unknown $[placeholder], or a plural arm that is not a valid category',
141
+ },
142
+ {
143
+ name: 'enrichment-broken-source',
144
+ default: 'error',
145
+ gate: 'enrichment',
146
+ description: 'A generated mirror whose source is gone — the file it mirrors no longer exists, or no longer declares the imported type. Re-run the generator, or delete the mirror',
147
+ },
148
+ {
149
+ name: 'enrichment-misplaced-file',
150
+ default: 'warn',
151
+ gate: 'enrichment',
152
+ description: 'A generated mirror that is no longer where the generator would write it, usually after its source file moved — re-run the generator to relocate it',
153
+ },
11
154
  ];
155
+ export const ALL_RULE_NAMES = RULE_SPECS.map((spec) => spec.name);
156
+ const PREFIX_TO_FAMILY = {
157
+ CFG: { primary: 'broken-tsconfig' },
158
+ MKR: { primary: 'invalid-marker', warn: 'redundant-marker' },
159
+ CTA: { primary: 'invalid-marker' },
160
+ PFN: { primary: 'invalid-marker' },
161
+ TMP: { primary: 'invalid-marker' },
162
+ PFE: { primary: 'pure-functions' },
163
+ VL: { primary: 'validate-non-serializable', warn: 'validate-skipped-member' },
164
+ VE: { primary: 'validate-non-serializable', warn: 'validate-skipped-member' },
165
+ PJ: { primary: 'json-non-serializable', warn: 'json-skipped-member' },
166
+ PJS: { primary: 'json-non-serializable', warn: 'json-skipped-member' },
167
+ RJ: { primary: 'json-non-serializable', warn: 'json-skipped-member' },
168
+ SJ: { primary: 'json-non-serializable', warn: 'json-skipped-member' },
169
+ JCP: { primary: 'json-non-serializable' },
170
+ TB: { primary: 'binary-non-serializable', warn: 'binary-skipped-member' },
171
+ FB: { primary: 'binary-non-serializable', warn: 'binary-skipped-member' },
172
+ CES: { primary: 'clone-unsupported-type', warn: 'clone-shared-reference' },
173
+ HUK: { primary: 'unknown-keys' },
174
+ UKE: { primary: 'unknown-keys' },
175
+ UKU: { primary: 'unknown-keys' },
176
+ UKW: { primary: 'unknown-keys' },
177
+ FMT: { primary: 'format' },
178
+ OVR: { primary: 'invalid-override', warn: 'override-side-effect' },
179
+ NE: { primary: 'non-enumerable' },
180
+ CLS: { primary: 'class-serializer' },
181
+ };
182
+ function codePrefix(code) {
183
+ const match = code.match(/^[A-Z]+/);
184
+ return match ? match[0] : code;
185
+ }
186
+ function enrichFamily(code) {
187
+ switch (code) {
188
+ case 'FT020':
189
+ case 'MD020':
190
+ case 'FT023':
191
+ case 'MD023':
192
+ return { primary: 'no-enrichment-todo' };
193
+ case 'FT021':
194
+ case 'FT022':
195
+ case 'MD021':
196
+ case 'MD022':
197
+ return { primary: 'no-orphan-carcass' };
198
+ case 'GE000':
199
+ case 'GE001':
200
+ case 'GE002':
201
+ case 'GE003':
202
+ return { primary: 'enrichment-broken-source', warn: 'enrichment-misplaced-file' };
203
+ default:
204
+ return { primary: 'enrichment-field', warn: 'enrichment-message' };
205
+ }
206
+ }
207
+ function fallbackFamily(family) {
208
+ switch (family) {
209
+ case Family.Marker:
210
+ return { primary: 'invalid-marker', warn: 'redundant-marker' };
211
+ case Family.PureFn:
212
+ return { primary: 'pure-functions' };
213
+ case Family.Enrich:
214
+ return { primary: 'enrichment-field', warn: 'enrichment-message' };
215
+ default:
216
+ return { primary: 'other' };
217
+ }
218
+ }
12
219
  export function routeDiagnostic(diagnostic) {
13
220
  return {
14
221
  ruleName: ruleNameFor(diagnostic),
@@ -17,33 +224,10 @@ export function routeDiagnostic(diagnostic) {
17
224
  };
18
225
  }
19
226
  function ruleNameFor(diagnostic) {
20
- if (diagnostic.family === Family.Enrich) {
21
- switch (diagnostic.code) {
22
- case 'FT020':
23
- case 'MD020':
24
- return 'no-enrichment-todo';
25
- case 'FT021':
26
- case 'FT022':
27
- case 'MD021':
28
- case 'MD022':
29
- return 'no-orphan-carcass';
30
- case 'GE000':
31
- case 'GE001':
32
- case 'GE002':
33
- case 'GE003':
34
- return 'enrichment-drift';
35
- default:
36
- return 'enrichment-field';
37
- }
38
- }
39
- switch (diagnostic.severity) {
40
- case Severity.Error:
41
- return 'error';
42
- case Severity.Warning:
43
- return 'warn';
44
- default:
45
- return 'info';
46
- }
227
+ const family = diagnostic.family === Family.Enrich
228
+ ? enrichFamily(diagnostic.code)
229
+ : (PREFIX_TO_FAMILY[codePrefix(diagnostic.code)] ?? fallbackFamily(diagnostic.family));
230
+ return diagnostic.severity === Severity.Warning && family.warn ? family.warn : family.primary;
47
231
  }
48
232
  export function renderMessage(diagnostic) {
49
233
  const known = diagnostic.code in DIAGNOSTIC_CATALOG;
@@ -1 +1 @@
1
- {"version":3,"file":"diagnosticRouting.js","sourceRoot":"","sources":["../../src/eslint/diagnosticRouting.ts"],"names":[],"mappings":"AAMA,OAAO,EAAC,kBAAkB,EAAE,cAAc,EAAC,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAC,M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AI,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;QAClG,GAAG,CAAC,GAAG,GAAG,EAAC,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,EAAC,CAAC;IACvE,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { type RuleName } from './diagnosticRouting.ts';
2
+ import { type LintSessionOptions } from './session.ts';
2
3
  interface RuleContext {
3
4
  physicalFilename?: string;
4
5
  filename?: string;
@@ -29,6 +30,7 @@ interface RuleModule {
29
30
  };
30
31
  create(context: RuleContext): Record<string, unknown>;
31
32
  }
33
+ export declare function sessionOptions(settings: Record<string, unknown> | undefined): LintSessionOptions;
32
34
  export declare const meta: {
33
35
  name: string;
34
36
  version: string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/eslint/index.ts"],"names":[],"mappings":"AA0BA,OAAO,EAAkB,KAAK,QAAQ,EAAC,MAAM,wBAAwB,CAAC;AAatE,UAAU,WAAW;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE;QAAC,IAAI,EAAE,MAAM,CAAA;KAAC,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,MAAM,CAAC,UAAU,EAAE;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE;YAAC,KAAK,EAAE;gBAAC,IAAI,EAAE,MAAM,CAAC;gBAAC,MAAM,EAAE,MAAM,CAAA;aAAC,CAAC;YAAC,GAAG,CAAC,EAAE;gBAAC,IAAI,EAAE,MAAM,CAAC;gBAAC,MAAM,EAAE,MAAM,CAAA;aAAC,CAAA;SAAC,CAAA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AAG,IAAI,CAAC;CACjI;AAED,UAAU,UAAU;IAClB,IAAI,EAAE;QAAC,IAAI,EAAE,SAAS,CAAC;QAAC,IAAI,EAAE;YAAC,WAAW,EAAE,MAAM,CAAA;SAAC,CAAA;KAAC,CAAC;IACrD,MAAM,CAAC,OAAO,EAAE,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACvD;AAiCD,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GAAG,kBAAkB,CAUhG;AA0CD,eAAO,MAAM,IAAI;;;CAA8C,CAAC;AAOhE,eAAO,MAAM,KAAK,EAAE,MAAM,CAAC,QAAQ,EAAE,UAAU,CAKd,CAAC;AAKlC,QAAA,MAAM,MAAM;;;;;;aAAgC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAAC,CAAC;AAOrE,eAAO,MAAM,OAAO,yBAAiB,CAAC;AAEtC,eAAe,MAAM,CAAC"}
@@ -1,23 +1,32 @@
1
1
  import { createRequire } from 'node:module';
2
- import { routeDiagnostic } from "./diagnosticRouting.js";
2
+ import { routeDiagnostic, RULE_SPECS } from "./diagnosticRouting.js";
3
3
  import { looksLikeEnrichmentFile, needsResolverPass } from "./prefilter.js";
4
+ import { LINT_SETTING_KEYS } from "./session-protocol.js";
4
5
  import { prewarmSession, sharedSession } from "./session.js";
5
6
  await prewarmSession();
6
7
  const engineErrorClaims = new Map();
7
- function sessionOptions(settings) {
8
+ const warnedKeys = new Set();
9
+ function warnUnknownSettings(bag) {
10
+ for (const key of Object.keys(bag)) {
11
+ if (LINT_SETTING_KEYS.includes(key) || warnedKeys.has(key))
12
+ continue;
13
+ warnedKeys.add(key);
14
+ console.warn(`[runtypes] ignoring unknown lint setting 'settings.runtypes.${key}' (supported: ${LINT_SETTING_KEYS.join(', ')})`);
15
+ }
16
+ }
17
+ export function sessionOptions(settings) {
8
18
  const raw = settings?.['runtypes'];
9
19
  if (!raw || typeof raw !== 'object')
10
20
  return {};
11
21
  const bag = raw;
22
+ warnUnknownSettings(bag);
12
23
  const options = {};
13
- if (typeof bag['binary'] === 'string')
14
- options.binary = bag['binary'];
15
- if (typeof bag['socket'] === 'string')
16
- options.socket = bag['socket'];
17
- if (typeof bag['cwd'] === 'string')
18
- options.cwd = bag['cwd'];
19
24
  if (typeof bag['timeoutMs'] === 'number')
20
25
  options.timeoutMs = bag['timeoutMs'];
26
+ if (typeof bag['tsconfig'] === 'string')
27
+ options.tsconfig = bag['tsconfig'];
28
+ if (typeof bag['binary'] === 'string')
29
+ options.binary = bag['binary'];
21
30
  return options;
22
31
  }
23
32
  function diagnosticRule(ruleName, description, gate) {
@@ -56,27 +65,14 @@ function diagnosticRule(ruleName, description, gate) {
56
65
  }
57
66
  const packageVersion = createRequire(import.meta.url)('../../package.json').version;
58
67
  export const meta = { name: 'runtypes', version: packageVersion };
59
- export const rules = {
60
- error: diagnosticRule('error', 'RunTypes compiler diagnostics with error severity (unsupported types that throw at runtime, marker misuse, pure-function extraction failures)', needsResolverPass),
61
- warn: diagnosticRule('warn', 'RunTypes compiler diagnostics with warning severity (non-serializable members silently dropped from validators and codecs)', needsResolverPass),
62
- info: diagnosticRule('info', 'RunTypes compiler diagnostics with info severity', needsResolverPass),
63
- 'no-enrichment-todo': diagnosticRule('no-enrichment-todo', 'Forbid unfilled @todo scaffold placeholders in generated enrichment files', looksLikeEnrichmentFile),
64
- 'no-orphan-carcass': diagnosticRule('no-orphan-carcass', 'Forbid stale @rtOrphan / @rtOrphanChild carcasses in generated enrichment files (run `ts-runtypes gen --prune` or restore the type)', looksLikeEnrichmentFile),
65
- 'enrichment-field': diagnosticRule('enrichment-field', 'FriendlyText / MockData maps must match the source type (no dead fields, constraints, or placeholders)', looksLikeEnrichmentFile),
66
- 'enrichment-drift': diagnosticRule('enrichment-drift', 'Enrichment mirror files must track a live source (breadcrumb resolves and the source still declares the imported types)', looksLikeEnrichmentFile),
67
- };
68
+ export const rules = Object.fromEntries(RULE_SPECS.map((spec) => [
69
+ spec.name,
70
+ diagnosticRule(spec.name, spec.description, spec.gate === 'enrichment' ? looksLikeEnrichmentFile : needsResolverPass),
71
+ ]));
68
72
  const plugin = { meta, rules, configs: {} };
69
73
  plugin.configs['recommended'] = {
70
74
  plugins: { runtypes: plugin },
71
- rules: {
72
- 'runtypes/error': 'error',
73
- 'runtypes/warn': 'warn',
74
- 'runtypes/info': 'off',
75
- 'runtypes/no-enrichment-todo': 'error',
76
- 'runtypes/no-orphan-carcass': 'error',
77
- 'runtypes/enrichment-field': 'error',
78
- 'runtypes/enrichment-drift': 'error',
79
- },
75
+ rules: Object.fromEntries(RULE_SPECS.map((spec) => [`runtypes/${spec.name}`, spec.default])),
80
76
  };
81
77
  export const configs = plugin.configs;
82
78
  export default plugin;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/eslint/index.ts"],"names":[],"mappings":"AAyBA,OAAO,EAAC,aAAa,EAAC,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAC,eAAe,EAAgB,MAAM,wBAAwB,CAAC;AACtE,OAAO,EAAC,uBAAuB,EAAE,iBAAiB,EAAC,MAAM,gBAAgB,CAAC;AAC1E,OAAO,EAAC,cAAc,EAAE,aAAa,EAA0B,MAAM,cAAc,CAAC;AAOpF,MAAM,cAAc,EAAE,CAAC;AAoBvB,MAAM,iBAAiB,GAAG,IAAI,GAAG,EAAoB,CAAC;AAItD,SAAS,cAAc,CAAC,QAA6C;IACnE,MAAM,GAAG,GAAG,QAAQ,EAAE,CAAC,UAAU,CAAC,CAAC;IACnC,IAAI,CAAC,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ;QAAE,OAAO,EAAE,CAAC;IAC/C,MAAM,GAAG,GAAG,GAA8B,CAAC;IAC3C,MAAM,OAAO,GAAuB,EAAE,CAAC;IACvC,IAAI,OAAO,GAAG,CAAC,QAAQ,CAAC,KAAK,QAAQ;QAAE,OAAO,CAAC,M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