@ttsc/lint 0.10.2 → 0.11.0-dev.20260518

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 (113) hide show
  1. package/README.md +172 -33
  2. package/lib/defineConfig.d.ts +55 -0
  3. package/lib/defineConfig.js +39 -0
  4. package/lib/defineConfig.js.map +1 -0
  5. package/lib/index.d.ts +25 -1
  6. package/lib/index.js +622 -2
  7. package/lib/index.js.map +1 -1
  8. package/lib/structures/ITtscLintPlugin.d.ts +53 -0
  9. package/lib/structures/ITtscLintPlugin.js +3 -0
  10. package/lib/structures/ITtscLintPlugin.js.map +1 -0
  11. package/lib/structures/ITtscLintPluginConfig.d.ts +82 -5
  12. package/lib/structures/ITtscLintPluginMeta.d.ts +12 -0
  13. package/lib/structures/ITtscLintPluginMeta.js +3 -0
  14. package/lib/structures/ITtscLintPluginMeta.js.map +1 -0
  15. package/lib/structures/PluginRuleNames.d.ts +14 -0
  16. package/lib/structures/PluginRuleNames.js +3 -0
  17. package/lib/structures/PluginRuleNames.js.map +1 -0
  18. package/lib/structures/TtscLintConfig.d.ts +24 -8
  19. package/lib/structures/TtscLintConfigEntry.d.ts +39 -0
  20. package/lib/structures/TtscLintConfigEntry.js +3 -0
  21. package/lib/structures/TtscLintConfigEntry.js.map +1 -0
  22. package/lib/structures/TtscLintFormatConfig.d.ts +154 -0
  23. package/lib/structures/TtscLintFormatConfig.js +3 -0
  24. package/lib/structures/TtscLintFormatConfig.js.map +1 -0
  25. package/lib/structures/TtscLintPlugins.d.ts +9 -0
  26. package/lib/structures/TtscLintPlugins.js +3 -0
  27. package/lib/structures/TtscLintPlugins.js.map +1 -0
  28. package/lib/structures/TtscLintRule.d.ts +1 -1
  29. package/lib/structures/TtscLintRuleEntry.d.ts +22 -0
  30. package/lib/structures/TtscLintRuleEntry.js +3 -0
  31. package/lib/structures/TtscLintRuleEntry.js.map +1 -0
  32. package/lib/structures/TtscLintRuleMap.d.ts +44 -0
  33. package/lib/structures/TtscLintRuleMap.js +3 -0
  34. package/lib/structures/TtscLintRuleMap.js.map +1 -0
  35. package/lib/structures/TtscLintRuleOptions.d.ts +149 -0
  36. package/lib/structures/TtscLintRuleOptions.js +3 -0
  37. package/lib/structures/TtscLintRuleOptions.js.map +1 -0
  38. package/lib/structures/defaultFormat.d.ts +31 -0
  39. package/lib/structures/defaultFormat.js +35 -0
  40. package/lib/structures/defaultFormat.js.map +1 -0
  41. package/lib/structures/index.d.ts +10 -0
  42. package/lib/structures/index.js +10 -0
  43. package/lib/structures/index.js.map +1 -1
  44. package/{plugin → linthost}/ast_helpers.go +92 -1
  45. package/{plugin → linthost}/compile.go +1 -1
  46. package/{plugin → linthost}/config.go +583 -66
  47. package/linthost/config_format.go +360 -0
  48. package/linthost/contrib_adapter.go +134 -0
  49. package/{plugin → linthost}/directives.go +1 -1
  50. package/linthost/dispatch.go +65 -0
  51. package/{plugin → linthost}/engine.go +156 -11
  52. package/{plugin → linthost}/eslint_runtime.go +76 -2
  53. package/linthost/fix.go +249 -0
  54. package/linthost/format.go +107 -0
  55. package/{plugin → linthost}/host.go +1 -1
  56. package/linthost/print_dispatch.go +118 -0
  57. package/linthost/print_doc.go +168 -0
  58. package/linthost/print_engine.go +343 -0
  59. package/linthost/print_nodes_array.go +46 -0
  60. package/linthost/print_nodes_call.go +180 -0
  61. package/linthost/print_nodes_imports.go +171 -0
  62. package/linthost/print_nodes_list.go +64 -0
  63. package/linthost/print_nodes_object.go +51 -0
  64. package/{plugin → linthost}/rules_arrays.go +1 -1
  65. package/{plugin → linthost}/rules_console.go +1 -1
  66. package/{plugin → linthost}/rules_debugger.go +1 -1
  67. package/{plugin → linthost}/rules_dupes.go +1 -1
  68. package/{plugin → linthost}/rules_empty.go +1 -1
  69. package/linthost/rules_escape.go +238 -0
  70. package/{plugin → linthost}/rules_eval.go +1 -1
  71. package/{plugin → linthost}/rules_finally.go +1 -1
  72. package/linthost/rules_format_jsdoc.go +230 -0
  73. package/linthost/rules_format_print_width.go +332 -0
  74. package/linthost/rules_format_quotes.go +219 -0
  75. package/linthost/rules_format_semi.go +190 -0
  76. package/linthost/rules_format_sort_imports.go +462 -0
  77. package/linthost/rules_format_trailing_comma.go +460 -0
  78. package/{plugin → linthost}/rules_gap.go +101 -6
  79. package/linthost/rules_imports.go +101 -0
  80. package/{plugin → linthost}/rules_logic.go +55 -3
  81. package/{plugin → linthost}/rules_loops.go +1 -1
  82. package/{plugin → linthost}/rules_misc.go +1 -1
  83. package/linthost/rules_params.go +64 -0
  84. package/{plugin → linthost}/rules_problems.go +10 -2
  85. package/linthost/rules_promise.go +111 -0
  86. package/{plugin → linthost}/rules_protos.go +1 -1
  87. package/{plugin → linthost}/rules_self.go +1 -1
  88. package/{plugin → linthost}/rules_strings.go +1 -1
  89. package/{plugin → linthost}/rules_suggestions.go +51 -9
  90. package/{plugin → linthost}/rules_throw.go +1 -1
  91. package/{plugin → linthost}/rules_ts.go +12 -2
  92. package/{plugin → linthost}/rules_ts_extra.go +90 -4
  93. package/{plugin → linthost}/rules_var.go +36 -5
  94. package/package.json +8 -6
  95. package/plugin/main.go +14 -27
  96. package/rule/astutil/astutil.go +148 -0
  97. package/rule/rule.go +291 -0
  98. package/src/defineConfig.ts +69 -0
  99. package/src/index.ts +807 -3
  100. package/src/structures/ITtscLintPlugin.ts +56 -0
  101. package/src/structures/ITtscLintPluginConfig.ts +86 -5
  102. package/src/structures/ITtscLintPluginMeta.ts +14 -0
  103. package/src/structures/PluginRuleNames.ts +19 -0
  104. package/src/structures/TtscLintConfig.ts +27 -8
  105. package/src/structures/TtscLintConfigEntry.ts +50 -0
  106. package/src/structures/TtscLintFormatConfig.ts +169 -0
  107. package/src/structures/TtscLintPlugins.ts +10 -0
  108. package/src/structures/TtscLintRule.ts +14 -1
  109. package/src/structures/TtscLintRuleEntry.ts +28 -0
  110. package/src/structures/TtscLintRuleMap.ts +52 -0
  111. package/src/structures/TtscLintRuleOptions.ts +162 -0
  112. package/src/structures/defaultFormat.ts +33 -0
  113. package/src/structures/index.ts +10 -0
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,0DAA6B;AAI7B,qDAAmC;AAgBnC,0BACE,QAAyD;IAEzD,OAAO;QACL,IAAI,EAAE,YAAY;QAClB,MAAM,EAAE,mBAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,QAAQ,CAAC;QAC/C,KAAK,EAAE,OAAO;KACf,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,2DAA+C;AAC/C,sDAAyB;AACzB,6CAA4C;AAC5C,sDAAyB;AACzB,0DAA6B;AAI7B,iDAA+B;AAC/B,qDAAmC;AAsBnC,yEAAyE;AACzE,sEAAsE;AACtE,wEAAwE;AACxE,qEAAqE;AACrE,gEAAgE;AAChE,uEAAuE;AACvE,MAAM,iBAAiB,GAAG,oBAAoB,CAAC;AAE/C;;;;;;GAMG;AACH,SAAS,gBAAgB,CAAC,SAAiB;IACzC,OAAO,SAAS,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;AACtC,CAAC;AAED,MAAM,qBAAqB,GAAG;IAC5B,gBAAgB;IAChB,iBAAiB;IACjB,iBAAiB;IACjB,iBAAiB;IACjB,iBAAiB;IACjB,gBAAgB;IAChB,kBAAkB;IAClB,qBAAqB;IACrB,sBAAsB;IACtB,sBAAsB;IACtB,sBAAsB;IACtB,sBAAsB;IACtB,qBAAqB;IACrB,uBAAuB;IACvB,kBAAkB;IAClB,mBAAmB;IACnB,mBAAmB;IACnB,mBAAmB;IACnB,mBAAmB;IACnB,kBAAkB;CACnB,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,0BACE,OAAwD;IAExD,MAAM,MAAM,GAAG,yBAA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CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QACjE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC;IACxD,CAAC;IACD,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;AAChC,CAAC"}
@@ -0,0 +1,53 @@
1
+ import type { ITtscLintPluginMeta } from "./ITtscLintPluginMeta";
2
+ /**
3
+ * Plugin descriptor exported by a `@ttsc/lint` contributor package.
4
+ *
5
+ * The shape intentionally mirrors ESLint's flat-config plugin object so a
6
+ * contributor can read like an ESLint plugin at a glance:
7
+ *
8
+ * ```ts
9
+ * // ttsc-lint-plugin-demo/src/index.ts
10
+ * import type { ITtscLintPlugin } from "@ttsc/lint";
11
+ * import path from "node:path";
12
+ *
13
+ * const plugin: ITtscLintPlugin = {
14
+ * meta: {
15
+ * name: "ttsc-lint-plugin-demo",
16
+ * version: "0.1.0",
17
+ * namespace: "demo",
18
+ * },
19
+ * rules: ["no-todo-comment"],
20
+ * source: path.resolve(__dirname, "..", "rules"),
21
+ * };
22
+ *
23
+ * export default plugin;
24
+ * ```
25
+ *
26
+ * The only field with runtime semantics is `source`: it points at the
27
+ * contributor's Go source directory. `@ttsc/lint`'s factory passes that path to
28
+ * ttsc's plugin builder, which links the contributor into the host binary at
29
+ * build time. `meta.namespace` and `rules` are advisory (used for type
30
+ * inference and diagnostic messages); the authoritative rule registration
31
+ * happens in the Go `init()` of the contributor module.
32
+ */
33
+ export interface ITtscLintPlugin {
34
+ /**
35
+ * Plugin metadata. Optional, but `meta.namespace` is the conventional source
36
+ * for the rule-name prefix; when absent, the tsconfig `plugins` map key fills
37
+ * that role.
38
+ */
39
+ meta?: ITtscLintPluginMeta;
40
+ /**
41
+ * Rule names exported by the Go side, used for TypeScript autocomplete in
42
+ * user configs. Purely advisory — the Go `init()` is the registration
43
+ * authority. Missing entries will not be flagged at runtime.
44
+ */
45
+ rules?: readonly string[];
46
+ /**
47
+ * Absolute path to the contributor's Go source directory.
48
+ *
49
+ * Resolve with `path.resolve(__dirname, ...)` so the path stays valid
50
+ * regardless of where the consumer's `node_modules` lives.
51
+ */
52
+ source: string;
53
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=ITtscLintPlugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ITtscLintPlugin.js","sourceRoot":"","sources":["../../src/structures/ITtscLintPlugin.ts"],"names":[],"mappings":""}
@@ -1,18 +1,95 @@
1
- import type { TtscLintConfig } from "./TtscLintConfig";
1
+ import type { TtscLintFormatConfig } from "./TtscLintFormatConfig";
2
+ import type { TtscLintRuleMap } from "./TtscLintRuleMap";
2
3
  /** `compilerOptions.plugins[]` entry shape consumed by `@ttsc/lint`. */
3
4
  export interface ITtscLintPluginConfig {
4
5
  /** Set to `false` to keep the entry while disabling this plugin. */
5
6
  enabled?: boolean;
6
7
  /** Plugin module specifier. */
7
8
  transform?: string;
9
+ /**
10
+ * Inline rule severity map applied to the project.
11
+ *
12
+ * Mirrors the `rules` field of an ESLint flat-config entry. When set, the
13
+ * sidecar uses this map directly and does NOT consult any `lint.config.*`
14
+ * file (use `extends` for that). Combine with `plugins` to register
15
+ * contributor rule namespaces in the same entry.
16
+ *
17
+ * ```jsonc
18
+ * {
19
+ * "transform": "@ttsc/lint",
20
+ * "rules": { "no-var": "error", "prefer-const": "warning" }
21
+ * }
22
+ * ```
23
+ */
24
+ rules?: TtscLintRuleMap;
25
+ /**
26
+ * Path to a standalone lint config file whose rules should be applied to this
27
+ * project. Relative paths are resolved from the tsconfig directory. Accepts
28
+ * the usual `lint.config.*` / `ttsc-lint.config.*` / `eslint.config.*`
29
+ * extensions.
30
+ *
31
+ * Mirrors the `extends` field of an ESLint flat-config entry — "inherit this
32
+ * file's configuration".
33
+ *
34
+ * ```jsonc
35
+ * {
36
+ * "transform": "@ttsc/lint",
37
+ * "extends": "./lint.config.ts"
38
+ * }
39
+ * ```
40
+ *
41
+ * `rules` and `extends` are mutually exclusive on a single plugin entry; the
42
+ * sidecar surfaces a loud error when both are set.
43
+ */
44
+ extends?: string;
45
+ /**
46
+ * Contributor lint plugins to compile into the `@ttsc/lint` binary.
47
+ *
48
+ * Each entry maps a namespace (rule-name prefix) to an npm specifier or
49
+ * relative path. The factory resolves the package, reads its exported
50
+ * `ITtscLintPlugin` descriptor, and forwards the Go source directory to
51
+ * ttsc's plugin builder via the `contributors` field.
52
+ *
53
+ * ```jsonc
54
+ * {
55
+ * "transform": "@ttsc/lint",
56
+ * "plugins": { "demo": "ttsc-lint-plugin-demo" },
57
+ * "rules": { "demo/no-todo-comment": "error" }
58
+ * }
59
+ * ```
60
+ */
61
+ plugins?: Record<string, string>;
62
+ /**
63
+ * Prettier-style flat configuration for the `format/*` rules. Sibling of
64
+ * `rules`. See {@link TtscLintFormatConfig} for the full surface.
65
+ *
66
+ * ```jsonc
67
+ * {
68
+ * "transform": "@ttsc/lint",
69
+ * "format": { "printWidth": 100, "singleQuote": true }
70
+ * }
71
+ * ```
72
+ *
73
+ * Combines with `rules` (per-rule overrides win on collision). Cannot be
74
+ * combined with `extends` on the same plugin entry — put format options
75
+ * inside the extends-target lint.config.ts instead.
76
+ */
77
+ format?: TtscLintFormatConfig;
8
78
  /**
9
79
  * Inline rule map or path to a standalone lint config file.
10
80
  *
11
- * Inline maps are passed to the native sidecar through `--plugins-json`.
12
- * String values are resolved by the sidecar from the owning tsconfig
13
- * directory and may point at JSON, JavaScript, or TypeScript config files.
81
+ * @deprecated Use `rules` for inline severity maps or `extends` for a config
82
+ * file path. The sidecar maps a legacy `config` entry onto the appropriate
83
+ * new field and emits a one-time stderr deprecation notice. Removed in a
84
+ * future minor.
85
+ *
86
+ * The legacy shape is intentionally narrower than `rules`/`extends`: a string
87
+ * (file path) or a flat rule-name → severity map. The Go-side parser only
88
+ * accepts those two shapes; widening the TS type to the new
89
+ * `TtscLintConfig` union would silently let `config: [{ rules: {...} }]`
90
+ * pass type-checking and fail at runtime.
14
91
  */
15
- config?: string | TtscLintConfig;
92
+ config?: string | TtscLintRuleMap;
16
93
  /** Extra plugin-owned fields are passed through unchanged. */
17
94
  [key: string]: unknown;
18
95
  }
@@ -0,0 +1,12 @@
1
+ /** Plugin-level metadata shared with the diagnostic surface. */
2
+ export interface ITtscLintPluginMeta {
3
+ /** Plugin package name as published on npm. */
4
+ name?: string;
5
+ /** Plugin package version. */
6
+ version?: string;
7
+ /**
8
+ * Rule namespace prefix (e.g. "import" → "import/no-cycle"). When omitted,
9
+ * `@ttsc/lint` uses the key from the tsconfig `plugins` map.
10
+ */
11
+ namespace?: string;
12
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=ITtscLintPluginMeta.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ITtscLintPluginMeta.js","sourceRoot":"","sources":["../../src/structures/ITtscLintPluginMeta.ts"],"names":[],"mappings":""}
@@ -0,0 +1,14 @@
1
+ import type { TtscLintPlugins } from "./TtscLintPlugins";
2
+ /**
3
+ * Builds the union of `${namespace}/${rule}` strings from a plugins map.
4
+ *
5
+ * Each plugin's `rules` tuple is read literally: an `as const` tuple
6
+ * (`["no-cycle", "order"] as const`) provides exact autocomplete, while a plain
7
+ * `string[]` collapses to `${namespace}/${string}` and disables rule-level typo
8
+ * detection for that namespace.
9
+ */
10
+ export type PluginRuleNames<P extends TtscLintPlugins> = {
11
+ [Ns in keyof P]: P[Ns] extends {
12
+ rules?: infer R;
13
+ } ? R extends readonly (infer N)[] ? N extends string ? `${Ns & string}/${N}` : never : never : never;
14
+ }[keyof P];
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=PluginRuleNames.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PluginRuleNames.js","sourceRoot":"","sources":["../../src/structures/PluginRuleNames.ts"],"names":[],"mappings":""}
@@ -1,11 +1,27 @@
1
- import type { TtscLintRule } from "./TtscLintRule";
2
- import type { TtscLintSeverity } from "./TtscLintSeverity";
1
+ import type { TtscLintConfigEntry } from "./TtscLintConfigEntry";
2
+ import type { TtscLintPlugins } from "./TtscLintPlugins";
3
+ import type { TtscLintRuleMap } from "./TtscLintRuleMap";
3
4
  /**
4
- * Inline rule map accepted by the `@ttsc/lint` tsconfig plugin entry.
5
+ * Top-level config accepted by `@ttsc/lint`.
5
6
  *
6
- * Each property key is a native lint rule name. Omitted rules are disabled,
7
- * while present rules enable or disable that rule for the current project.
7
+ * Three accepted forms, listed in expected order of preference:
8
+ *
9
+ * 1. **Flat-config array** — mirrors ESLint flat config exactly. Each entry can
10
+ * scope by `files` / `ignores`, declare a `plugins` map of contributors,
11
+ * configure `rules`, and configure formatting through the Prettier-style
12
+ * {@link TtscLintFormatConfig | `format`} block. Multiple entries layer in
13
+ * order.
14
+ * 2. **Single config object** — same shape as one flat-config entry. Useful when
15
+ * the project has no per-file scoping. Pass `format: { … }` here for the
16
+ * smallest "describe my style" config.
17
+ * 3. **Rules-only map** — historical shape kept for backward compat with
18
+ * single-file projects. `{"no-var":"error"}` is interpreted as `[{rules:
19
+ * {"no-var":"error"}}]`. The shorthand intentionally has no slot for the
20
+ * `format` block — use form (1) or (2) to enable formatting.
21
+ *
22
+ * The generic parameter `P` lets `defineConfig` capture the literal plugin
23
+ * object types declared in `plugins`. When non-empty, rule-name keys
24
+ * autocomplete as `BuiltInRule | "<ns>/<rule>"` where the namespace-rule
25
+ * combinations come from each plugin's `rules` tuple.
8
26
  */
9
- export type TtscLintConfig = {
10
- [P in TtscLintRule]?: TtscLintSeverity;
11
- };
27
+ export type TtscLintConfig<P extends TtscLintPlugins = Record<string, never>> = TtscLintRuleMap<P> | TtscLintConfigEntry<P> | readonly TtscLintConfigEntry<P>[];
@@ -0,0 +1,39 @@
1
+ import type { TtscLintFormatConfig } from "./TtscLintFormatConfig";
2
+ import type { TtscLintPlugins } from "./TtscLintPlugins";
3
+ import type { TtscLintRuleMap } from "./TtscLintRuleMap";
4
+ /**
5
+ * One flat-config entry. ESLint-style `files` / `ignores` glob scoping, a
6
+ * `plugins` namespace map of contributor plugin objects, an `extends` list of
7
+ * child entries to fold in first, and a severity-keyed `rules` map applied
8
+ * after the extends chain.
9
+ *
10
+ * Prettier-style formatting opts in through a sibling `format` block — see
11
+ * `TtscLintFormatConfig`. The block can scope per-entry (e.g. wider
12
+ * `printWidth` for `legacy/**`) just like `rules` does.
13
+ */
14
+ export interface TtscLintConfigEntry<P extends TtscLintPlugins = Record<string, never>> {
15
+ /** Globs that select the files this entry applies to. */
16
+ files?: string | readonly string[];
17
+ /** Globs that exclude files this entry would otherwise match. */
18
+ ignores?: string | readonly string[];
19
+ /**
20
+ * Nested entries (or arrays of entries) folded in before this entry's own
21
+ * rules apply. Mirrors ESLint flat config's `extends`: each child's rules
22
+ * layer first, with `this.rules` taking precedence on key collisions.
23
+ */
24
+ extends?: TtscLintConfigEntry<P> | readonly TtscLintConfigEntry<P>[] | readonly (TtscLintConfigEntry<P> | readonly TtscLintConfigEntry<P>[])[];
25
+ /**
26
+ * Contributor plugin objects keyed by namespace. Each value is the default
27
+ * export of a `@ttsc/lint` contributor package (an `ITtscLintPlugin`).
28
+ */
29
+ plugins?: P;
30
+ /** Rule-name → severity map. Supports severity tuples with options. */
31
+ rules?: TtscLintRuleMap<P>;
32
+ /**
33
+ * Prettier-style flat configuration for the `format/*` rules. Presence
34
+ * (even an empty `format: {}`) enables format-class rules at Prettier
35
+ * defaults; absence keeps them all off. Per-rule overrides go through
36
+ * the `rules` map — the `rules` entry wins on conflict.
37
+ */
38
+ format?: TtscLintFormatConfig;
39
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=TtscLintConfigEntry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TtscLintConfigEntry.js","sourceRoot":"","sources":["../../src/structures/TtscLintConfigEntry.ts"],"names":[],"mappings":""}
@@ -0,0 +1,154 @@
1
+ import type { TtscLintSeverity } from "./TtscLintSeverity";
2
+ /**
3
+ * Prettier-style flat configuration for the `format/*` rules.
4
+ *
5
+ * The `format` block is the recommended way to enable formatting in
6
+ * `@ttsc/lint`. Each key mirrors a Prettier option of the same name —
7
+ * users coming from a `.prettierrc` can copy their config almost
8
+ * verbatim. The block is opt-in by presence: a `lint.config.ts` with no
9
+ * `format` field keeps every format rule off, exactly as before.
10
+ *
11
+ * Once present, the block enables a curated set of format rules at
12
+ * Prettier-aligned defaults. Individual rules can be overridden or
13
+ * disabled through the `rules` map (the `rules` entry wins on conflict).
14
+ *
15
+ * @example
16
+ * import type { TtscLintConfig } from "@ttsc/lint";
17
+ *
18
+ * export default {
19
+ * rules: { "no-var": "error" },
20
+ * format: {
21
+ * printWidth: 100,
22
+ * singleQuote: true,
23
+ * importOrder: ["<THIRD_PARTY_MODULES>", "^[./]"],
24
+ * },
25
+ * } satisfies TtscLintConfig;
26
+ *
27
+ * Deviations from Prettier:
28
+ * - `endOfLine` is restricted to `"lf"` and `"crlf"`. Prettier's
29
+ * `"cr"` and `"auto"` modes are intentionally unsupported — the
30
+ * printer does not auto-detect terminators.
31
+ * - Many Prettier knobs (`bracketSpacing`, `arrowParens`,
32
+ * `quoteProps`, JSX-specific switches) are not yet implemented.
33
+ * See `docs/14-prettier-migration.md` for the full gap list.
34
+ *
35
+ * Rule enablement matrix (when the `format` block is present):
36
+ *
37
+ * - `format/semi` — always on. `semi: false` flips it to `prefer:
38
+ * "never"`.
39
+ * - `format/quotes` — always on. `singleQuote: true` flips to
40
+ * `prefer: "single"`.
41
+ * - `format/trailing-comma` — always on. `trailingComma: "none"`
42
+ * disables the rule's edits without removing the surface.
43
+ * - `format/print-width` — always on, driven by `printWidth`,
44
+ * `tabWidth`, `useTabs`, `endOfLine`.
45
+ * - `format/sort-imports` — opt-in. Setting `importOrder` enables it.
46
+ * - `format/jsdoc` — opt-in. Setting `jsdoc` enables it.
47
+ *
48
+ * For per-rule severity overrides, drop a `rules` entry alongside:
49
+ *
50
+ * format: { semi: true, severity: "warning" },
51
+ * rules: { "format/semi": "error" },
52
+ */
53
+ export interface TtscLintFormatConfig {
54
+ /**
55
+ * Severity for every format diagnostic emitted by `ttsc check`. The
56
+ * same vocabulary as the `rules` map (`"off" | "warn" | "warning" |
57
+ * "error"` plus numeric 0/1/2). `"off"` disables both the diagnostic
58
+ * and the `ttsc format` / `ttsc fix` rewrite for every format rule.
59
+ *
60
+ * @default "warning"
61
+ */
62
+ severity?: TtscLintSeverity;
63
+ /**
64
+ * Insert trailing semicolons on ASI-terminated statements. Mirrors
65
+ * Prettier's `semi`. `false` flips the rule to require *no*
66
+ * trailing semicolon (rare; matches prettier's `semi: false`).
67
+ *
68
+ * @default true
69
+ */
70
+ semi?: boolean;
71
+ /**
72
+ * Prefer single-quoted strings. Mirrors Prettier's `singleQuote`.
73
+ * `false` means double quotes (Prettier's default).
74
+ *
75
+ * @default false
76
+ */
77
+ singleQuote?: boolean;
78
+ /**
79
+ * Trailing-comma policy. Mirrors Prettier's `trailingComma`. The
80
+ * `"none"` mode disables the rule's edits.
81
+ *
82
+ * @default "all"
83
+ */
84
+ trailingComma?: "all" | "es5" | "none";
85
+ /**
86
+ * Maximum column width before broken-form layout is chosen.
87
+ * Mirrors Prettier's `printWidth`.
88
+ *
89
+ * @default 80
90
+ */
91
+ printWidth?: number;
92
+ /**
93
+ * Indentation increment in columns. Mirrors Prettier's `tabWidth`.
94
+ *
95
+ * @default 2
96
+ */
97
+ tabWidth?: number;
98
+ /**
99
+ * Emit indentation as tab characters. Mirrors Prettier's `useTabs`.
100
+ *
101
+ * @default false
102
+ */
103
+ useTabs?: boolean;
104
+ /**
105
+ * Line terminator the printer emits on reflow. `@ttsc/lint`
106
+ * supports `"lf"` and `"crlf"`. Prettier's `"cr"` and `"auto"` are
107
+ * intentionally unsupported because the printer does not
108
+ * auto-detect line endings.
109
+ *
110
+ * @default "lf"
111
+ */
112
+ endOfLine?: "lf" | "crlf";
113
+ /**
114
+ * Group order for `format/sort-imports`. Setting this enables the
115
+ * rule; mirrors `@trivago/prettier-plugin-sort-imports`'
116
+ * `importOrder`. The `<THIRD_PARTY_MODULES>` literal is the
117
+ * catch-all placeholder for specifiers that match no other group.
118
+ */
119
+ importOrder?: readonly ("<THIRD_PARTY_MODULES>" | (string & {}))[];
120
+ /**
121
+ * Insert blank line between sort-imports groups.
122
+ *
123
+ * @default true
124
+ */
125
+ importOrderSeparation?: boolean;
126
+ /**
127
+ * Sort named import specifiers alphabetically within each
128
+ * declaration.
129
+ *
130
+ * @default true
131
+ */
132
+ importOrderSortSpecifiers?: boolean;
133
+ /**
134
+ * Case-insensitive comparison for sort-imports.
135
+ *
136
+ * @default false
137
+ */
138
+ importOrderCaseInsensitive?: boolean;
139
+ /**
140
+ * Enable `format/jsdoc`. Pass `true` to turn it on with built-in
141
+ * defaults, or an object to customize:
142
+ *
143
+ * - `tagSynonyms` — extra `from → to` rewrites layered on the
144
+ * built-in synonym table.
145
+ * - `sortTags` — sort JSDoc tags into canonical order (reserved;
146
+ * today's MVP only rewrites tag names).
147
+ *
148
+ * @default false (off)
149
+ */
150
+ jsdoc?: boolean | {
151
+ tagSynonyms?: Record<string, string>;
152
+ sortTags?: boolean;
153
+ };
154
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=TtscLintFormatConfig.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TtscLintFormatConfig.js","sourceRoot":"","sources":["../../src/structures/TtscLintFormatConfig.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ import type { ITtscLintPlugin } from "./ITtscLintPlugin";
2
+ /**
3
+ * Map of contributor plugins, keyed by their namespace prefix.
4
+ *
5
+ * The key (e.g. `"import"`) is what `@ttsc/lint`'s rule-name union joins with
6
+ * each plugin's exported `rules` tuple (`"no-cycle"`) to produce the namespaced
7
+ * rule names a user writes in `rules` (`"import/no-cycle"`).
8
+ */
9
+ export type TtscLintPlugins = Record<string, ITtscLintPlugin>;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=TtscLintPlugins.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TtscLintPlugins.js","sourceRoot":"","sources":["../../src/structures/TtscLintPlugins.ts"],"names":[],"mappings":""}
@@ -5,4 +5,4 @@
5
5
  * names so a `compilerOptions.plugins[]` entry can configure native linting
6
6
  * without introducing a separate lint config file.
7
7
  */
8
- export type TtscLintRule = "adjacent-overload-signatures" | "array-type" | "ban-ts-comment" | "ban-tslint-comment" | "consistent-indexed-object-style" | "consistent-type-assertions" | "consistent-type-definitions" | "consistent-type-imports" | "dot-notation" | "eqeqeq" | "for-direction" | "no-alert" | "no-array-constructor" | "no-array-delete" | "no-async-promise-executor" | "no-bitwise" | "no-caller" | "no-case-declarations" | "no-class-assign" | "no-compare-neg-zero" | "no-cond-assign" | "no-confusing-non-null-assertion" | "no-console" | "no-constant-condition" | "no-continue" | "no-control-regex" | "no-debugger" | "no-delete-var" | "no-dupe-args" | "no-dupe-else-if" | "no-dupe-keys" | "no-duplicate-case" | "no-duplicate-enum-values" | "no-dynamic-delete" | "no-empty" | "no-empty-character-class" | "no-empty-function" | "no-empty-interface" | "no-empty-object-type" | "no-empty-pattern" | "no-empty-static-block" | "no-eq-null" | "no-eval" | "no-ex-assign" | "no-explicit-any" | "no-extra-bind" | "no-extra-boolean-cast" | "no-extra-non-null-assertion" | "no-fallthrough" | "no-func-assign" | "no-inferrable-types" | "no-inner-declarations" | "no-irregular-whitespace" | "no-iterator" | "no-labels" | "no-lone-blocks" | "no-lonely-if" | "no-loss-of-precision" | "no-misleading-character-class" | "no-misused-new" | "no-multi-assign" | "no-multi-str" | "no-namespace" | "no-negated-condition" | "no-nested-ternary" | "no-new" | "no-new-func" | "no-new-wrappers" | "no-non-null-asserted-nullish-coalescing" | "no-non-null-asserted-optional-chain" | "no-non-null-assertion" | "no-obj-calls" | "no-object-constructor" | "no-octal" | "no-octal-escape" | "no-plusplus" | "no-promise-executor-return" | "no-proto" | "no-prototype-builtins" | "no-regex-spaces" | "no-require-imports" | "no-return-assign" | "no-script-url" | "no-self-assign" | "no-self-compare" | "no-sequences" | "no-setter-return" | "no-shadow-restricted-names" | "no-sparse-arrays" | "no-template-curly-in-string" | "no-this-alias" | "no-throw-literal" | "no-undef-init" | "no-undefined" | "no-unnecessary-type-constraint" | "no-unneeded-ternary" | "no-unsafe-declaration-merging" | "no-unsafe-finally" | "no-unsafe-function-type" | "no-unsafe-negation" | "no-unused-expressions" | "no-unused-labels" | "no-useless-call" | "no-useless-catch" | "no-useless-computed-key" | "no-useless-concat" | "no-useless-constructor" | "no-useless-rename" | "no-var" | "no-with" | "no-wrapper-object-types" | "object-shorthand" | "operator-assignment" | "prefer-as-const" | "prefer-const" | "prefer-enum-initializers" | "prefer-exponentiation-operator" | "prefer-for-of" | "prefer-function-type" | "prefer-literal-enum-member" | "prefer-namespace-keyword" | "prefer-spread" | "prefer-template" | "radix" | "require-yield" | "triple-slash-reference" | "use-isnan" | "valid-typeof" | "vars-on-top" | "yoda";
8
+ export type TtscLintRule = "adjacent-overload-signatures" | "array-type" | "await-thenable" | "ban-ts-comment" | "ban-tslint-comment" | "consistent-indexed-object-style" | "consistent-type-assertions" | "consistent-type-definitions" | "consistent-type-imports" | "default-param-last" | "dot-notation" | "eqeqeq" | "for-direction" | "no-alert" | "no-array-constructor" | "no-array-delete" | "no-async-promise-executor" | "no-bitwise" | "no-caller" | "no-case-declarations" | "no-class-assign" | "no-compare-neg-zero" | "no-cond-assign" | "no-confusing-non-null-assertion" | "no-console" | "no-constant-condition" | "no-continue" | "no-control-regex" | "no-debugger" | "no-delete-var" | "no-dupe-args" | "no-dupe-else-if" | "no-dupe-keys" | "no-duplicate-case" | "no-duplicate-enum-values" | "no-dynamic-delete" | "no-empty" | "no-empty-character-class" | "no-empty-function" | "no-empty-interface" | "no-empty-object-type" | "no-empty-pattern" | "no-empty-static-block" | "no-eq-null" | "no-eval" | "no-ex-assign" | "no-explicit-any" | "no-extra-bind" | "no-extra-boolean-cast" | "no-extra-non-null-assertion" | "no-fallthrough" | "no-func-assign" | "no-import-type-side-effects" | "no-inferrable-types" | "no-inner-declarations" | "no-irregular-whitespace" | "no-iterator" | "no-labels" | "no-lone-blocks" | "no-lonely-if" | "no-loss-of-precision" | "no-misleading-character-class" | "no-misused-new" | "no-mixed-enums" | "no-multi-assign" | "no-multi-str" | "no-namespace" | "no-negated-condition" | "no-nested-ternary" | "no-new" | "no-new-func" | "no-new-wrappers" | "no-non-null-asserted-nullish-coalescing" | "no-non-null-asserted-optional-chain" | "no-non-null-assertion" | "no-obj-calls" | "no-object-constructor" | "no-octal" | "no-octal-escape" | "no-plusplus" | "no-promise-executor-return" | "no-proto" | "no-prototype-builtins" | "no-regex-spaces" | "no-require-imports" | "no-return-assign" | "no-script-url" | "no-self-assign" | "no-self-compare" | "no-sequences" | "no-setter-return" | "no-shadow-restricted-names" | "no-sparse-arrays" | "no-template-curly-in-string" | "no-this-alias" | "no-throw-literal" | "no-undef-init" | "no-undefined" | "no-unnecessary-type-constraint" | "no-unneeded-ternary" | "no-unsafe-declaration-merging" | "no-unsafe-finally" | "no-unsafe-function-type" | "no-unsafe-negation" | "no-unused-expressions" | "no-unused-labels" | "no-useless-call" | "no-useless-catch" | "no-useless-computed-key" | "no-useless-concat" | "no-useless-constructor" | "no-useless-escape" | "no-useless-rename" | "no-var" | "no-with" | "no-wrapper-object-types" | "object-shorthand" | "operator-assignment" | "prefer-as-const" | "prefer-const" | "prefer-enum-initializers" | "prefer-exponentiation-operator" | "prefer-for-of" | "prefer-function-type" | "prefer-literal-enum-member" | "prefer-namespace-keyword" | "prefer-spread" | "prefer-template" | "radix" | "require-yield" | "triple-slash-reference" | "use-isnan" | "valid-typeof" | "vars-on-top" | "yoda" | "format/semi" | "format/quotes" | "format/trailing-comma" | "format/sort-imports" | "format/jsdoc" | "format/print-width";
@@ -0,0 +1,22 @@
1
+ import type { TtscLintRuleOptionsMap } from "./TtscLintRuleOptions";
2
+ import type { TtscLintSeverity } from "./TtscLintSeverity";
3
+ /**
4
+ * One rule's configuration entry.
5
+ *
6
+ * Accepts either a bare severity literal or a `[severity, options]` tuple. The
7
+ * options slot's type is _picked per rule name_ via `TtscLintRuleOptionsMap` —
8
+ * so a user writing
9
+ *
10
+ * "format/sort-imports": ["error", { importOrder: [...] }]
11
+ *
12
+ * Inside `TtscLintRuleMap` gets exact autocomplete and typo detection on the
13
+ * options object. The rule name is the object key; the `[severity, options]`
14
+ * tuple is the value.
15
+ *
16
+ * Rules that do not appear in `TtscLintRuleOptionsMap` accept only the severity
17
+ * literal (or the bare `[severity]` tuple): the conditional arm collapses to
18
+ * `never`, removing the options-tuple branch from the union for those rules.
19
+ * This keeps `no-var` and friends from silently accepting unrecognized option
20
+ * blobs.
21
+ */
22
+ export type TtscLintRuleEntry<R extends string = string> = TtscLintSeverity | readonly [TtscLintSeverity] | (R extends keyof TtscLintRuleOptionsMap ? readonly [TtscLintSeverity, TtscLintRuleOptionsMap[R]] : never);
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=TtscLintRuleEntry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TtscLintRuleEntry.js","sourceRoot":"","sources":["../../src/structures/TtscLintRuleEntry.ts"],"names":[],"mappings":""}
@@ -0,0 +1,44 @@
1
+ import type { PluginRuleNames } from "./PluginRuleNames";
2
+ import type { TtscLintPlugins } from "./TtscLintPlugins";
3
+ import type { TtscLintRule } from "./TtscLintRule";
4
+ import type { TtscLintRuleOptionsMap } from "./TtscLintRuleOptions";
5
+ import type { TtscLintSeverity } from "./TtscLintSeverity";
6
+ /**
7
+ * Rule-name → severity or severity-tuple map.
8
+ *
9
+ * Built from two independent mapped types intersected together:
10
+ *
11
+ * - Rules listed in `TtscLintRuleOptionsMap` accept `severity`, `[severity]`, or
12
+ * `[severity, options]`, with the options type picked per rule key.
13
+ * - Every other built-in rule plus any contributor plugin rule accepts `severity`
14
+ * or `[severity]`.
15
+ *
16
+ * Splitting the two halves (instead of folding them into one mapped type with a
17
+ * conditional value) keeps TypeScript's contextual typing intact inside the
18
+ * options object literal: typing
19
+ *
20
+ * ```ts
21
+ * rules: {
22
+ * "format/sort-imports": ["warning", { importOrder: [...] }],
23
+ * "no-var": "error",
24
+ * }
25
+ * ```
26
+ *
27
+ * Yields exact autocomplete on `importOrder`, `importOrderSeparation`, etc.,
28
+ * while `no-var` rejects any tuple beyond a bare severity.
29
+ *
30
+ * The `(string & {})` widener is intentionally absent: typos in rule names
31
+ * produce a `TS2353` excess-property error when the literal is checked in
32
+ * isolation (e.g. one negative-case-per-const). When the literal also carries
33
+ * other shape-incompatible entries — e.g. `prefre` typo on `format/quotes` next
34
+ * to the rule-name typo — TS sometimes elides the rule-name error after
35
+ * reporting the option-key error first. The test at
36
+ * `tests/test-lint/.../test_lib_index_d_ts_rule_options_autocomplete_per_rule.ts`
37
+ * splits each negative case into its own const to keep every branch
38
+ * load-bearing.
39
+ */
40
+ export type TtscLintRuleMap<P extends TtscLintPlugins = Record<string, never>> = {
41
+ [K in keyof TtscLintRuleOptionsMap]?: TtscLintSeverity | readonly [TtscLintSeverity] | readonly [TtscLintSeverity, TtscLintRuleOptionsMap[K]];
42
+ } & {
43
+ [K in Exclude<TtscLintRule | PluginRuleNames<P>, keyof TtscLintRuleOptionsMap>]?: TtscLintSeverity | readonly [TtscLintSeverity];
44
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=TtscLintRuleMap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TtscLintRuleMap.js","sourceRoot":"","sources":["../../src/structures/TtscLintRuleMap.ts"],"names":[],"mappings":""}