@shivaedev/quality 0.59.0 → 0.61.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 (183) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +41 -18
  3. package/dist/adapters/biome/relocateConfig.d.ts +1 -1
  4. package/dist/adapters/biome/relocateConfig.d.ts.map +1 -1
  5. package/dist/adapters/biome/relocateConfig.js +6 -5
  6. package/dist/adapters/biome/relocateConfig.js.map +1 -1
  7. package/dist/adapters/biome/run.d.ts +1 -1
  8. package/dist/adapters/biome/run.d.ts.map +1 -1
  9. package/dist/adapters/biome/run.js +2 -2
  10. package/dist/adapters/biome/run.js.map +1 -1
  11. package/dist/adapters/biome/withExceptionConfig.d.ts +1 -1
  12. package/dist/adapters/biome/withExceptionConfig.d.ts.map +1 -1
  13. package/dist/adapters/biome/withExceptionConfig.js +3 -3
  14. package/dist/adapters/biome/withExceptionConfig.js.map +1 -1
  15. package/dist/adapters/bodyReference.d.ts +9 -0
  16. package/dist/adapters/bodyReference.d.ts.map +1 -0
  17. package/dist/adapters/bodyReference.js +10 -0
  18. package/dist/adapters/bodyReference.js.map +1 -0
  19. package/dist/adapters/bodyReferences.d.ts +1 -6
  20. package/dist/adapters/bodyReferences.d.ts.map +1 -1
  21. package/dist/adapters/bodyReferences.js +16 -12
  22. package/dist/adapters/bodyReferences.js.map +1 -1
  23. package/dist/adapters/engineEscapes.d.ts.map +1 -1
  24. package/dist/adapters/engineEscapes.js.map +1 -1
  25. package/dist/adapters/imports/projects.js +1 -1
  26. package/dist/adapters/imports/projects.js.map +1 -1
  27. package/dist/adapters/knip/configuration.d.ts.map +1 -1
  28. package/dist/adapters/knip/configuration.js +9 -1
  29. package/dist/adapters/knip/configuration.js.map +1 -1
  30. package/dist/adapters/knip/run.js +1 -1
  31. package/dist/adapters/knip/run.js.map +1 -1
  32. package/dist/adapters/queueReadoutFindings.js +1 -1
  33. package/dist/adapters/queueReadoutFindings.js.map +1 -1
  34. package/dist/adapters/serviceAccess.d.ts +1 -1
  35. package/dist/adapters/serviceAccess.d.ts.map +1 -1
  36. package/dist/{rules/stories/program.d.ts → adapters/storyProgram.d.ts} +1 -1
  37. package/dist/adapters/storyProgram.d.ts.map +1 -0
  38. package/dist/{rules/stories/program.js → adapters/storyProgram.js} +14 -5
  39. package/dist/adapters/storyProgram.js.map +1 -0
  40. package/dist/adapters/tanstackRoutes.d.ts +11 -0
  41. package/dist/adapters/tanstackRoutes.d.ts.map +1 -0
  42. package/dist/adapters/tanstackRoutes.js +65 -0
  43. package/dist/adapters/tanstackRoutes.js.map +1 -0
  44. package/dist/biome/nonEffectPlugins.d.ts +7 -0
  45. package/dist/biome/nonEffectPlugins.d.ts.map +1 -0
  46. package/dist/biome/nonEffectPlugins.js +24 -0
  47. package/dist/biome/nonEffectPlugins.js.map +1 -0
  48. package/dist/biome/report.d.ts +1 -1
  49. package/dist/biome/report.d.ts.map +1 -1
  50. package/dist/biome/report.js +5 -5
  51. package/dist/biome/report.js.map +1 -1
  52. package/dist/cli/baseline.d.ts.map +1 -1
  53. package/dist/cli/baseline.js +0 -6
  54. package/dist/cli/baseline.js.map +1 -1
  55. package/dist/cli/fix.d.ts.map +1 -1
  56. package/dist/cli/fix.js +7 -7
  57. package/dist/cli/fix.js.map +1 -1
  58. package/dist/cli/messages.d.ts +1 -1
  59. package/dist/cli/messages.d.ts.map +1 -1
  60. package/dist/cli/messages.js +1 -1
  61. package/dist/config/decode.d.ts +1 -0
  62. package/dist/config/decode.d.ts.map +1 -1
  63. package/dist/config/decode.js +2 -0
  64. package/dist/config/decode.js.map +1 -1
  65. package/dist/config/load.d.ts +1 -0
  66. package/dist/config/load.d.ts.map +1 -1
  67. package/dist/config/load.js +1 -0
  68. package/dist/config/load.js.map +1 -1
  69. package/dist/config/nonEffectFolders.d.ts +5 -0
  70. package/dist/config/nonEffectFolders.d.ts.map +1 -0
  71. package/dist/config/nonEffectFolders.js +17 -0
  72. package/dist/config/nonEffectFolders.js.map +1 -0
  73. package/dist/config/resolve.d.ts +1 -0
  74. package/dist/config/resolve.d.ts.map +1 -1
  75. package/dist/config.d.ts +1 -0
  76. package/dist/config.d.ts.map +1 -1
  77. package/dist/config.js.map +1 -1
  78. package/dist/engine/runRules.d.ts.map +1 -1
  79. package/dist/engine/runRules.js +4 -1
  80. package/dist/engine/runRules.js.map +1 -1
  81. package/dist/engine/session.d.ts.map +1 -1
  82. package/dist/engine/session.js +1 -0
  83. package/dist/engine/session.js.map +1 -1
  84. package/dist/inventory/routeFiles.d.ts +7 -0
  85. package/dist/inventory/routeFiles.d.ts.map +1 -0
  86. package/dist/inventory/routeFiles.js +62 -0
  87. package/dist/inventory/routeFiles.js.map +1 -0
  88. package/dist/inventory/shadcnAlias.js +1 -1
  89. package/dist/inventory/shadcnAlias.js.map +1 -1
  90. package/dist/rule.d.ts +1 -0
  91. package/dist/rule.d.ts.map +1 -1
  92. package/dist/rule.js.map +1 -1
  93. package/dist/rules/biome.js +2 -2
  94. package/dist/rules/biome.js.map +1 -1
  95. package/dist/rules/builtIn.d.ts +2 -2
  96. package/dist/rules/effect/boundary.js +1 -1
  97. package/dist/rules/effect/boundary.js.map +1 -1
  98. package/dist/rules/effect/serviceParameters.js +1 -1
  99. package/dist/rules/effect/serviceParameters.js.map +1 -1
  100. package/dist/rules/files/folderNames.d.ts +1 -1
  101. package/dist/rules/files/folderNames.d.ts.map +1 -1
  102. package/dist/rules/files/folderNames.js +6 -4
  103. package/dist/rules/files/folderNames.js.map +1 -1
  104. package/dist/rules/files/namedAfterExport.d.ts +1 -1
  105. package/dist/rules/files/namedAfterExport.d.ts.map +1 -1
  106. package/dist/rules/files/namedAfterExport.js +5 -3
  107. package/dist/rules/files/namedAfterExport.js.map +1 -1
  108. package/dist/rules/manifestsExportsShape.d.ts.map +1 -1
  109. package/dist/rules/manifestsExportsShape.js +2 -1
  110. package/dist/rules/manifestsExportsShape.js.map +1 -1
  111. package/dist/rules/manifestsSourceFirst.d.ts.map +1 -1
  112. package/dist/rules/manifestsSourceFirst.js +4 -4
  113. package/dist/rules/manifestsSourceFirst.js.map +1 -1
  114. package/dist/rules/stories/adapterOnlyFakes.js +1 -1
  115. package/dist/rules/stories/adapterOnlyFakes.js.map +1 -1
  116. package/dist/rules/stories/origins.d.ts.map +1 -1
  117. package/dist/rules/stories/origins.js +1 -1
  118. package/dist/rules/stories/origins.js.map +1 -1
  119. package/dist/rules/stories/sources.d.ts +1 -0
  120. package/dist/rules/stories/sources.d.ts.map +1 -1
  121. package/dist/rules/stories/sources.js +17 -0
  122. package/dist/rules/stories/sources.js.map +1 -1
  123. package/dist/rules/stories/waitOnEvents.d.ts.map +1 -1
  124. package/dist/rules/stories/waitOnEvents.js +74 -10
  125. package/dist/rules/stories/waitOnEvents.js.map +1 -1
  126. package/dist/testing/adapters/cli.js +1 -1
  127. package/dist/testing/adapters/cli.js.map +1 -1
  128. package/dist/testing/adapters/hookRepository.js +1 -1
  129. package/dist/testing/adapters/hookRepository.js.map +1 -1
  130. package/dist/testing/adapters/packageExports.d.ts +1 -1
  131. package/dist/testing/adapters/packageExports.d.ts.map +1 -1
  132. package/dist/testing/adapters/packageExports.js +6 -3
  133. package/dist/testing/adapters/packageExports.js.map +1 -1
  134. package/dist/testing/ruleStory.d.ts +1 -0
  135. package/dist/testing/ruleStory.d.ts.map +1 -1
  136. package/dist/testing/ruleStory.js +4 -0
  137. package/dist/testing/ruleStory.js.map +1 -1
  138. package/docs/debt-and-hooks.md +1 -1
  139. package/package.json +9 -9
  140. package/src/adapters/biome/relocateConfig.ts +6 -4
  141. package/src/adapters/biome/run.ts +17 -12
  142. package/src/adapters/biome/withExceptionConfig.ts +3 -2
  143. package/src/adapters/bodyReference.ts +19 -0
  144. package/src/adapters/bodyReferences.ts +16 -23
  145. package/src/adapters/engineEscapes.ts +2 -1
  146. package/src/adapters/imports/projects.ts +1 -1
  147. package/src/adapters/knip/configuration.ts +8 -1
  148. package/src/adapters/knip/run.ts +1 -1
  149. package/src/adapters/queueReadoutFindings.ts +1 -1
  150. package/src/adapters/serviceAccess.ts +1 -1
  151. package/src/{rules/stories/program.ts → adapters/storyProgram.ts} +13 -4
  152. package/src/adapters/tanstackRoutes.ts +73 -0
  153. package/src/biome/nonEffectPlugins.ts +27 -0
  154. package/src/biome/report.ts +5 -3
  155. package/src/cli/baseline.ts +0 -6
  156. package/src/cli/fix.ts +13 -5
  157. package/src/cli/messages.ts +1 -1
  158. package/src/config/decode.ts +2 -0
  159. package/src/config/load.ts +2 -0
  160. package/src/config/nonEffectFolders.ts +26 -0
  161. package/src/config.ts +1 -0
  162. package/src/engine/runRules.ts +9 -1
  163. package/src/engine/session.ts +1 -0
  164. package/src/inventory/routeFiles.ts +78 -0
  165. package/src/inventory/shadcnAlias.ts +1 -1
  166. package/src/rule.ts +1 -0
  167. package/src/rules/biome.ts +2 -2
  168. package/src/rules/effect/boundary.ts +1 -1
  169. package/src/rules/effect/serviceParameters.ts +1 -1
  170. package/src/rules/files/folderNames.ts +7 -5
  171. package/src/rules/files/namedAfterExport.ts +5 -3
  172. package/src/rules/manifestsExportsShape.ts +2 -1
  173. package/src/rules/manifestsSourceFirst.ts +4 -5
  174. package/src/rules/stories/adapterOnlyFakes.ts +1 -1
  175. package/src/rules/stories/origins.ts +1 -1
  176. package/src/rules/stories/sources.ts +18 -0
  177. package/src/rules/stories/waitOnEvents.ts +89 -10
  178. package/src/testing/adapters/cli.ts +1 -1
  179. package/src/testing/adapters/hookRepository.ts +1 -1
  180. package/src/testing/adapters/packageExports.ts +6 -3
  181. package/src/testing/ruleStory.ts +7 -0
  182. package/dist/rules/stories/program.d.ts.map +0 -1
  183. package/dist/rules/stories/program.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ruleStory.js","sourceRoot":"","sources":["../../src/testing/ruleStory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAClD,OAA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,CAAC;QAC1D,CAAC,CAAC,CACF,CAAC;IACH,CAAC;IAED,SAAS,gBAAgB;QACxB,OAAO,eAAe,CAAC,iCAAiC,EAAE,WAAW,CAAC,CAAC;IACxE,CAAC;IAED,MAAM,OAAO,GAIT,EAAE,GAAG,SAAS,EAAE,gBAAgB,EAAE,aAAa,EAAE,eAAe,EAAE,CAAC;IACvE,OAAO,OAAO,CAAC;AAChB,CAAC"}
@@ -4,7 +4,7 @@ The [README](../README.md) introduces the gate. This page explains how the basel
4
4
 
5
5
  ## Baseline
6
6
 
7
- For a shared policy upgrade, `quality baseline write --first-adoption --rule <id>` records existing findings of explicitly named rules that refuse config exceptions, including unchanged files. This mode covers first adoption of a rule or new detection shapes; it does not change ordinary file-scoped writes. Review each new or raised entry and state why that debt needs a separate migration. Rules that permit exceptions and unnamed rules refuse this mode.
7
+ `quality baseline write --first-adoption` records existing findings of every rule when there is no baseline, including rules that permit config exceptions and findings in unchanged files. For a shared policy upgrade with an existing baseline, name the rules with `quality baseline write --first-adoption --rule <id>`; every rule is eligible, and unrelated entries remain unchanged. An existing baseline refuses an unnamed write, including with `--first-adoption`. Ordinary later writes still require named rules and changed file selections. Review each new or raised entry and state why that debt needs a separate migration.
8
8
 
9
9
  ```jsonl
10
10
  {"path":"src/legacy/sync.ts","rule":"comments/no-jsdoc","count":3}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shivaedev/quality",
3
- "version": "0.59.0",
3
+ "version": "0.61.0",
4
4
  "description": "Repository quality gate with typed rules, a baseline of existing debt and a registry of reasoned exceptions",
5
5
  "homepage": "https://github.com/ShivaeDev/platform/tree/main/packages/quality#readme",
6
6
  "bugs": {
@@ -17,14 +17,14 @@
17
17
  "imports": {
18
18
  "#test/*": "./src/test-support/*",
19
19
  "#*.ts": {
20
- "source": "./src/*.ts",
20
+ "@shivaedev/source": "./src/*.ts",
21
21
  "types": "./dist/*.d.ts",
22
22
  "default": "./dist/*.js"
23
23
  }
24
24
  },
25
25
  "exports": {
26
26
  "./*.ts": {
27
- "source": "./src/*.ts",
27
+ "@shivaedev/source": "./src/*.ts",
28
28
  "types": "./dist/*.d.ts",
29
29
  "default": "./dist/*.js"
30
30
  },
@@ -51,9 +51,9 @@
51
51
  ],
52
52
  "dependencies": {
53
53
  "@biomejs/biome": "2.6.3",
54
- "@shivaedev/errors": "0.8.0",
55
- "@shivaedev/heavy-lock": "0.9.0",
56
- "@shivaedev/service": "0.6.2",
54
+ "@shivaedev/errors": "0.9.0",
55
+ "@shivaedev/heavy-lock": "0.10.0",
56
+ "@shivaedev/service": "0.7.0",
57
57
  "@vitest/coverage-v8": "5.0.5",
58
58
  "ignore": "7.0.14",
59
59
  "knip": "6.43.0",
@@ -64,8 +64,8 @@
64
64
  "@effect/platform-node": "4.0.6",
65
65
  "@effect/platform-node-shared": "4.0.6",
66
66
  "@effect/vitest": "4.0.6",
67
- "@shivaedev/test": "0.14.0",
68
- "@shivaedev/test-story": "0.37.1",
67
+ "@shivaedev/test": "0.15.0",
68
+ "@shivaedev/test-story": "0.39.0",
69
69
  "@types/node": "24.19.2",
70
70
  "@typescript/native": "npm:typescript@7.0.2",
71
71
  "effect": "4.0.6",
@@ -74,7 +74,7 @@
74
74
  "peerDependencies": {
75
75
  "@effect/platform-node": "4.0.6",
76
76
  "@effect/platform-node-shared": "4.0.6",
77
- "@shivaedev/test-story": "0.37.1",
77
+ "@shivaedev/test-story": "0.39.0",
78
78
  "effect": "4.0.6",
79
79
  "vitest": "5.0.5"
80
80
  },
@@ -2,6 +2,7 @@ import { createRequire } from "node:module";
2
2
  import { dirname, resolve } from "node:path";
3
3
  import { Effect, FileSystem, type PlatformError, Schema, type Scope } from "effect";
4
4
  import ts from "typescript";
5
+ import { nonEffectPlugins } from "#biome/nonEffectPlugins.ts";
5
6
 
6
7
  const ObjectConfig = Schema.Record(Schema.String, Schema.Unknown);
7
8
 
@@ -17,6 +18,7 @@ const writeConfig = Effect.fn("Biome.writeConfig")(function* (
17
18
  original: string,
18
19
  config: Readonly<Record<string, unknown>>,
19
20
  paths: Map<string, string>,
21
+ nonEffectFolders: readonly string[],
20
22
  ): Effect.fn.Return<string, PlatformError.PlatformError | Schema.SchemaError, FileSystem.FileSystem | Scope.Scope> {
21
23
  const existing = paths.get(original);
22
24
  if (existing !== undefined) {
@@ -30,7 +32,7 @@ const writeConfig = Effect.fn("Biome.writeConfig")(function* (
30
32
  for (const specifier of Array.isArray(config.extends) ? config.extends : []) {
31
33
  const source = specifier.startsWith(".") ? resolve(dirname(original), specifier) : require.resolve(specifier);
32
34
  const inherited = yield* parseConfig(source, yield* fs.readFileString(source));
33
- extended.push(yield* writeConfig(root, source, inherited, paths));
35
+ extended.push(yield* writeConfig(root, source, inherited, paths, nonEffectFolders));
34
36
  }
35
37
  const vcs = config.vcs ?? {};
36
38
  const generated = {
@@ -38,7 +40,7 @@ const writeConfig = Effect.fn("Biome.writeConfig")(function* (
38
40
  ...(Array.isArray(config.extends) ? { extends: extended } : {}),
39
41
  ...(Array.isArray(config.plugins)
40
42
  ? {
41
- plugins: config.plugins.map((plugin) =>
43
+ plugins: nonEffectPlugins(config.plugins, nonEffectFolders).map((plugin) =>
42
44
  typeof plugin === "string" ? resolve(root, plugin) : { ...plugin, path: resolve(root, plugin.path) },
43
45
  ),
44
46
  }
@@ -54,6 +56,6 @@ const writeConfig = Effect.fn("Biome.writeConfig")(function* (
54
56
  return path;
55
57
  });
56
58
 
57
- export function relocateConfig(root: string, original: string, config: Readonly<Record<string, unknown>>) {
58
- return writeConfig(root, original, config, new Map());
59
+ export function relocateConfig(root: string, original: string, config: Readonly<Record<string, unknown>>, nonEffectFolders: readonly string[] = []) {
60
+ return writeConfig(root, original, config, new Map(), nonEffectFolders);
59
61
  }
@@ -18,6 +18,7 @@ export const runBiome = Effect.fn("Biome.runBiome")(function* (
18
18
  root: string,
19
19
  args: readonly string[],
20
20
  exceptions: readonly ExceptionDeclaration[] = [],
21
+ nonEffectFolders: readonly string[] = [],
21
22
  ) {
22
23
  const files = yield* shadcnFiles(root);
23
24
  const toolOwned: readonly ExceptionDeclaration[] = [
@@ -28,18 +29,22 @@ export const runBiome = Effect.fn("Biome.runBiome")(function* (
28
29
  },
29
30
  ];
30
31
  return yield* Effect.scoped(
31
- withExceptionConfig(root, [...exceptions, ...toolOwned], (configArgs) =>
32
- Effect.gen(function* () {
33
- const spawner = yield* ChildProcessSpawner.ChildProcessSpawner;
34
- const child = yield* spawner.spawn(
35
- ChildProcess.make(process.execPath, [BIN, ...args, ...configArgs, "--colors=off"], { cwd: root, stdin: "ignore" }),
36
- );
37
- const [stdout, stderr, code] = yield* Effect.all(
38
- [Stream.mkString(Stream.decodeText(child.stdout)), Stream.mkString(Stream.decodeText(child.stderr)), child.exitCode],
39
- { concurrency: "unbounded" },
40
- );
41
- return { code: Number(code), stderr, stdout };
42
- }),
32
+ withExceptionConfig(
33
+ root,
34
+ [...exceptions, ...toolOwned],
35
+ (configArgs) =>
36
+ Effect.gen(function* () {
37
+ const spawner = yield* ChildProcessSpawner.ChildProcessSpawner;
38
+ const child = yield* spawner.spawn(
39
+ ChildProcess.make(process.execPath, [BIN, ...args, ...configArgs, "--colors=off"], { cwd: root, stdin: "ignore" }),
40
+ );
41
+ const [stdout, stderr, code] = yield* Effect.all(
42
+ [Stream.mkString(Stream.decodeText(child.stdout)), Stream.mkString(Stream.decodeText(child.stderr)), child.exitCode],
43
+ { concurrency: "unbounded" },
44
+ );
45
+ return { code: Number(code), stderr, stdout };
46
+ }),
47
+ nonEffectFolders,
43
48
  ),
44
49
  );
45
50
  });
@@ -9,9 +9,10 @@ export const withExceptionConfig = Effect.fn("Biome.withExceptionConfig")(functi
9
9
  root: string,
10
10
  declarations: readonly ExceptionDeclaration[],
11
11
  run: (args: readonly string[]) => Effect.Effect<TValue, TError, TRequirements>,
12
+ nonEffectFolders: readonly string[] = [],
12
13
  ) {
13
14
  const { includes, overrides } = exceptionConfig(declarations);
14
- if (includes.length === 0 && overrides.length === 0) {
15
+ if (includes.length === 0 && overrides.length === 0 && nonEffectFolders.length === 0) {
15
16
  return yield* run([]);
16
17
  }
17
18
  const { config, text } = yield* Effect.gen(function* () {
@@ -40,6 +41,6 @@ export const withExceptionConfig = Effect.fn("Biome.withExceptionConfig")(functi
40
41
  files: { ...files, includes: [...previousIncludes, ...includes.filter((pattern) => pattern !== "**"), "!.worktrees", "!.quality-biome-*"] },
41
42
  overrides: [...previousOverrides, ...overrides],
42
43
  };
43
- const path = yield* relocateConfig(root, join(root, config), generated);
44
+ const path = yield* relocateConfig(root, join(root, config), generated, nonEffectFolders);
44
45
  return yield* run([`--config-path=${path}`]);
45
46
  });
@@ -0,0 +1,19 @@
1
+ export interface BodyReference {
2
+ readonly file?: string | undefined;
3
+ readonly kind: "data" | "import" | "service" | "told";
4
+ readonly module: string;
5
+ readonly path: readonly string[];
6
+ }
7
+
8
+ export function dataFactory({ module, path }: BodyReference): boolean {
9
+ return (module === "effect" && (path[0] === "Schema" || path[0] === "Data")) || module === "effect/Schema" || module === "effect/Data";
10
+ }
11
+
12
+ export function serviceFactory({ module, path }: BodyReference): boolean {
13
+ return (
14
+ (module === "@shivaedev/service/defineService.ts" && path[0] === "defineService")
15
+ || ((module === "effect" || module === "effect/Context")
16
+ && path.at(-1) !== undefined
17
+ && ["Service", "Tag", "GenericTag", "Reference"].includes(path.at(-1) ?? ""))
18
+ );
19
+ }
@@ -1,13 +1,7 @@
1
1
  import ts from "typescript";
2
2
  import { importFrom } from "#rules/stories/importOrigin.ts";
3
- import { memberName, unwrapped } from "#rules/stories/syntax.ts";
4
-
5
- export interface BodyReference {
6
- readonly file?: string | undefined;
7
- readonly kind: "data" | "import" | "service" | "told";
8
- readonly module: string;
9
- readonly path: readonly string[];
10
- }
3
+ import { memberName } from "#rules/stories/syntax.ts";
4
+ import { type BodyReference, dataFactory, serviceFactory } from "./bodyReference.ts";
11
5
 
12
6
  export function storyBody(body: ts.Expression, checker: ts.TypeChecker) {
13
7
  const declaration = checker.getTypeAtLocation(body).getCallSignatures()[0]?.declaration;
@@ -34,7 +28,8 @@ export function bodyReferences(body: ts.SignatureDeclaration, checker: ts.TypeCh
34
28
  const visiting = new Set<ts.Node>();
35
29
  const told = body.parameters[0];
36
30
  function symbol(value: ts.Symbol | undefined): BodyReference | undefined {
37
- return value?.declarations?.map(visit).find((reference) => reference !== undefined);
31
+ const direct = value?.declarations?.map(visit).find((reference) => reference !== undefined);
32
+ return direct ?? (value !== undefined && value.flags & ts.SymbolFlags.Alias ? symbol(checker.getAliasedSymbol(value)) : undefined);
38
33
  }
39
34
  function imported(node: ts.ImportSpecifier | ts.NamespaceImport | ts.ImportClause): BodyReference | undefined {
40
35
  const name = importName(node);
@@ -79,7 +74,18 @@ export function bodyReferences(body: ts.SignatureDeclaration, checker: ts.TypeCh
79
74
  }
80
75
  return member(receiver, memberName(node) ?? "");
81
76
  }
77
+ function variable(node: ts.VariableDeclaration): BodyReference | undefined {
78
+ const value = node.initializer ?? node.type;
79
+ return value === undefined ? undefined : visit(value);
80
+ }
82
81
  function expression(node: ts.Node): BodyReference | undefined {
82
+ if (ts.isTypeReferenceNode(node)) {
83
+ const target = visit(node.typeName);
84
+ return target?.kind === "import" && dataFactory(target) ? { kind: "data", module: target.module, path: [] } : undefined;
85
+ }
86
+ if (ts.isQualifiedName(node)) {
87
+ return member(visit(node.left), node.right.text);
88
+ }
83
89
  if (ts.isIdentifier(node)) {
84
90
  return symbol(checker.getSymbolAtLocation(node));
85
91
  }
@@ -104,7 +110,7 @@ export function bodyReferences(body: ts.SignatureDeclaration, checker: ts.TypeCh
104
110
  return imported(node);
105
111
  }
106
112
  if (ts.isVariableDeclaration(node)) {
107
- return node.initializer === undefined ? undefined : visit(unwrapped(node.initializer));
113
+ return variable(node);
108
114
  }
109
115
  if (ts.isBindingElement(node)) {
110
116
  return binding(node);
@@ -126,16 +132,3 @@ export function bodyReferences(body: ts.SignatureDeclaration, checker: ts.TypeCh
126
132
  }
127
133
  return visit;
128
134
  }
129
-
130
- function dataFactory({ module, path }: BodyReference): boolean {
131
- return (module === "effect" && (path[0] === "Schema" || path[0] === "Data")) || module === "effect/Schema" || module === "effect/Data";
132
- }
133
-
134
- function serviceFactory({ module, path }: BodyReference): boolean {
135
- return (
136
- (module === "@shivaedev/service/defineService.ts" && path[0] === "defineService")
137
- || ((module === "effect" || module === "effect/Context")
138
- && path.at(-1) !== undefined
139
- && ["Service", "Tag", "GenericTag", "Reference"].includes(path.at(-1) ?? ""))
140
- );
141
- }
@@ -3,7 +3,8 @@ import ts from "typescript";
3
3
  import { isTestSupport, testName } from "#naming/testName.ts";
4
4
  import { engineOf } from "#rules/stories/engineOf.ts";
5
5
  import { memberName, unwrapped } from "#rules/stories/syntax.ts";
6
- import { type BodyReference, bodyReferences, storyBody } from "./bodyReferences.ts";
6
+ import type { BodyReference } from "./bodyReference.ts";
7
+ import { bodyReferences, storyBody } from "./bodyReferences.ts";
7
8
  import { serviceAccess } from "./serviceAccess.ts";
8
9
 
9
10
  export interface EngineEscape {
@@ -29,7 +29,7 @@ function resolutionOptions(options: ts.CompilerOptions, declarations: boolean):
29
29
  function projectOf(root: string, parsed: ParsedProject | undefined): Project {
30
30
  const options = parsed?.options ?? {
31
31
  allowJs: true,
32
- customConditions: ["source"],
32
+ customConditions: ["@shivaedev/source"],
33
33
  module: ts.ModuleKind.ESNext,
34
34
  moduleResolution: ts.ModuleResolutionKind.Bundler,
35
35
  resolveJsonModule: true,
@@ -11,7 +11,14 @@ const ENTRIES = ["**/*.{test,spec,stories,story}.{ts,tsx,mts,cts,js,jsx,mjs,cjs}
11
11
  function importPaths(imports: Readonly<Record<string, unknown>>) {
12
12
  return Object.fromEntries(
13
13
  Object.entries(imports).flatMap(([name, target]) => {
14
- const selected = typeof target === "object" && target !== null && "source" in target ? target.source : target;
14
+ let selected = target;
15
+ if (typeof target === "object" && target !== null) {
16
+ if ("@shivaedev/source" in target) {
17
+ selected = target["@shivaedev/source"];
18
+ } else if ("source" in target) {
19
+ selected = target.source;
20
+ }
21
+ }
15
22
  const paths = exportTargets(selected).filter((path) => path.startsWith("./"));
16
23
  return paths.length === 0 ? [] : [[name, paths]];
17
24
  }),
@@ -40,7 +40,7 @@ export const runKnip = Effect.fn("Knip.runKnip")(function* (inputs: RuleInputs)
40
40
  ChildProcess.make(
41
41
  process.execPath,
42
42
  [
43
- "--conditions=source",
43
+ "--conditions=@shivaedev/source",
44
44
  "--eval",
45
45
  LAUNCH,
46
46
  pathToFileURL(API).href,
@@ -5,10 +5,10 @@ import { importGraph } from "#imports/graph.ts";
5
5
  import { packageOf } from "#imports/workspace.ts";
6
6
  import { isTestCode } from "#naming/testName.ts";
7
7
  import type { RuleInputs } from "#rule.ts";
8
- import { storyProgram } from "#rules/stories/program.ts";
9
8
  import { nodesWhere } from "#rules/stories/syntax.ts";
10
9
  import { readPackageManifest } from "./manifestInventory.ts";
11
10
  import { queueTestingOrigin } from "./queueTestingOrigin.ts";
11
+ import { storyProgram } from "./storyProgram.ts";
12
12
 
13
13
  const MESSAGE =
14
14
  "Reads jobs-testing queue storage. An enqueued job or its state does not prove the work ran. Assert the application's visible result instead; use jobs-testing only to control and settle workers.";
@@ -1,6 +1,6 @@
1
1
  import { basename } from "node:path";
2
2
  import ts from "typescript";
3
- import type { BodyReference } from "./bodyReferences.ts";
3
+ import type { BodyReference } from "./bodyReference.ts";
4
4
 
5
5
  function nativeService({ module, path }: BodyReference): boolean {
6
6
  const name = path[0];
@@ -1,5 +1,6 @@
1
1
  import { join } from "node:path";
2
2
  import ts from "typescript";
3
+ import { projectsFor } from "#adapters/imports/projects.ts";
3
4
  import type { ImportGraph } from "#imports/graph.ts";
4
5
  import type { RuleInputs } from "#rule.ts";
5
6
 
@@ -17,18 +18,26 @@ export function storyProgram(inputs: RuleInputs, graph: ImportGraph): ts.Program
17
18
  ),
18
19
  );
19
20
  const options: ts.CompilerOptions = { allowJs: true, noLib: true, types: [] };
21
+ const projectOf = projectsFor(inputs.root);
20
22
  const host: ts.CompilerHost = {
21
23
  ...ts.createCompilerHost(options),
22
- fileExists: (path) => sources.has(path),
24
+ fileExists: (path) => sources.has(path) || ts.sys.fileExists(path),
23
25
  getSourceFile: (path) => {
24
- const text = sources.get(path);
26
+ const text = sources.get(path) ?? ts.sys.readFile(path);
25
27
  return text === undefined ? undefined : ts.createSourceFile(path, text, ts.ScriptTarget.Latest, true);
26
28
  },
27
- readFile: (path) => sources.get(path),
29
+ readFile: (path) => sources.get(path) ?? ts.sys.readFile(path),
28
30
  resolveModuleNames: (names, from) =>
29
31
  names.map((name) => {
30
32
  const path = targets.get(`${from}:${name}`);
31
- return path === undefined ? undefined : { extension: ts.Extension.Ts, resolvedFileName: path };
33
+ if (path !== undefined) {
34
+ return { extension: ts.Extension.Ts, resolvedFileName: path };
35
+ }
36
+ if (!(name.startsWith("@shivaedev/") || name.startsWith(".") || name.startsWith("#"))) {
37
+ return undefined;
38
+ }
39
+ const project = projectOf(from);
40
+ return ts.resolveModuleName(name, from, project.typesOptions, host, project.typesCache).resolvedModule;
32
41
  }),
33
42
  };
34
43
  const program = ts.createProgram([...sources.keys()], options, host);
@@ -0,0 +1,73 @@
1
+ import { Schema } from "effect";
2
+ import ts from "typescript";
3
+
4
+ const RouterOptions = Schema.Struct({
5
+ routeFileIgnorePattern: Schema.optionalKey(Schema.String),
6
+ routeFileIgnorePrefix: Schema.optionalKey(Schema.String),
7
+ routeFilePrefix: Schema.optionalKey(Schema.String),
8
+ routesDirectory: Schema.optionalKey(Schema.NonEmptyString),
9
+ });
10
+
11
+ export type RouterOptions = typeof RouterOptions.Type;
12
+
13
+ const OPTIONS = new Set(["routeFileIgnorePattern", "routeFileIgnorePrefix", "routeFilePrefix", "routesDirectory"]);
14
+ const PLUGINS = new Set(["tanstackRouter", "TanStackRouterVite"]);
15
+ const PACKAGES = new Set(["@tanstack/router-plugin/vite", "@tanstack/router-vite-plugin"]);
16
+
17
+ function pluginNames(source: ts.SourceFile): ReadonlySet<string> {
18
+ return new Set(
19
+ source.statements.flatMap((statement) => {
20
+ if (!(ts.isImportDeclaration(statement) && ts.isStringLiteral(statement.moduleSpecifier) && PACKAGES.has(statement.moduleSpecifier.text))) {
21
+ return [];
22
+ }
23
+ const clause = statement.importClause;
24
+ const bindings = clause?.namedBindings;
25
+ return [
26
+ ...(clause?.name === undefined ? [] : [clause.name.text]),
27
+ ...(bindings !== undefined && ts.isNamedImports(bindings)
28
+ ? bindings.elements.filter((entry) => PLUGINS.has((entry.propertyName ?? entry.name).text)).map((entry) => entry.name.text)
29
+ : []),
30
+ ];
31
+ }),
32
+ );
33
+ }
34
+
35
+ function literalOptions(node: ts.Expression | undefined): RouterOptions {
36
+ if (node === undefined) {
37
+ return {};
38
+ }
39
+ if (!ts.isObjectLiteralExpression(node)) {
40
+ throw new Error("Use literal TanStack Router options or move them to tsr.config.json so Quality can read the route folder.");
41
+ }
42
+ const entries = node.properties.flatMap((property): readonly (readonly [string, string])[] => {
43
+ if (ts.isSpreadAssignment(property)) {
44
+ throw new Error("Move spread TanStack Router options to tsr.config.json so Quality can read the route folder.");
45
+ }
46
+ const name = property.name;
47
+ if (name === undefined || !(ts.isIdentifier(name) || ts.isStringLiteral(name)) || !OPTIONS.has(name.text)) {
48
+ return [];
49
+ }
50
+ if (!(ts.isPropertyAssignment(property) && ts.isStringLiteralLike(property.initializer))) {
51
+ throw new Error(`TanStack Router ${name.text} must be a literal string for Quality to read it.`);
52
+ }
53
+ return [[name.text, property.initializer.text]];
54
+ });
55
+ return Schema.decodeUnknownSync(RouterOptions)(Object.fromEntries(entries));
56
+ }
57
+
58
+ export function tanstackRoutes(path: string, text: string): readonly RouterOptions[] {
59
+ if (path.endsWith("tsr.config.json")) {
60
+ return [Schema.decodeUnknownSync(Schema.fromJsonString(RouterOptions))(text)];
61
+ }
62
+ const source = ts.createSourceFile(path, text, ts.ScriptTarget.Latest, true);
63
+ const names = pluginNames(source);
64
+ const options: RouterOptions[] = [];
65
+ function visit(node: ts.Node): void {
66
+ if (ts.isCallExpression(node) && ts.isIdentifier(node.expression) && names.has(node.expression.text)) {
67
+ options.push(literalOptions(node.arguments[0]));
68
+ }
69
+ ts.forEachChild(node, visit);
70
+ }
71
+ visit(source);
72
+ return options;
73
+ }
@@ -0,0 +1,27 @@
1
+ import { nonEffectFolderPath } from "#config/nonEffectFolders.ts";
2
+
3
+ const EFFECT_PLUGINS: ReadonlySet<string> = new Set([
4
+ "ambient-runtime.grit",
5
+ "effect-fn-spans.grit",
6
+ "effect-fn-functions.grit",
7
+ "effect-test-bodies.grit",
8
+ "schema-names.grit",
9
+ "schema-struct-keys.grit",
10
+ "service-layers.grit",
11
+ ]);
12
+
13
+ type Plugin = string | { readonly path: string; readonly includes?: readonly string[] };
14
+
15
+ export function nonEffectPlugins(plugins: readonly Plugin[], folders: readonly string[]) {
16
+ return plugins.map((plugin) => {
17
+ const path = typeof plugin === "string" ? plugin : plugin.path;
18
+ if (!EFFECT_PLUGINS.has(path.replaceAll("\\", "/").split("/").at(-1) ?? "") || folders.length === 0) {
19
+ return plugin;
20
+ }
21
+ const includes = typeof plugin === "string" ? ["**"] : (plugin.includes ?? ["**"]);
22
+ return {
23
+ ...(typeof plugin === "string" ? { path } : plugin),
24
+ includes: [...includes, ...folders.map((folder) => `!${nonEffectFolderPath(folder)}/**`)],
25
+ };
26
+ });
27
+ }
@@ -41,9 +41,10 @@ const reportFor = Effect.fn("Biome.reportFor")(function* (
41
41
  args: readonly string[],
42
42
  paths: readonly string[],
43
43
  exceptions: readonly ExceptionDeclaration[],
44
+ nonEffectFolders: readonly string[],
44
45
  ) {
45
46
  const command = [...args, "--reporter=json", "--max-diagnostics=none", ...paths];
46
- const run = yield* runBiome(root, command, exceptions);
47
+ const run = yield* runBiome(root, command, exceptions, nonEffectFolders);
47
48
  const report = decodeReport(run.stdout.trim());
48
49
  if (report._tag === "None") {
49
50
  return yield* Effect.fail(failure(command, run, "a report", [run.stdout, run.stderr].join("\n")));
@@ -64,10 +65,11 @@ export const biomeReport = Effect.fn("Biome.biomeReport")(function* (
64
65
  args: readonly string[],
65
66
  exceptions: readonly ExceptionDeclaration[] = [],
66
67
  files: readonly string[] = ["."],
68
+ nonEffectFolders: readonly string[] = [],
67
69
  ) {
68
70
  const { relative, sep } = yield* Path.Path.pipe(Effect.provide(NodePath.layer));
69
71
 
70
- const [report, tracked] = yield* Effect.all([reportFor(root, args, files, exceptions), ignoredTrackedPaths(root)], {
72
+ const [report, tracked] = yield* Effect.all([reportFor(root, args, files, exceptions, nonEffectFolders), ignoredTrackedPaths(root)], {
71
73
  concurrency: "unbounded",
72
74
  });
73
75
  const paths = tracked
@@ -75,7 +77,7 @@ export const biomeReport = Effect.fn("Biome.biomeReport")(function* (
75
77
  .filter((path) => files.includes(".") || files.includes(path))
76
78
  .filter((path) => !path.split(sep).some((part) => part === ".git" || part === ".worktrees" || part === "node_modules"));
77
79
  const extraArgs = [...args, "--vcs-enabled=false", ...(args.includes("--no-errors-on-unmatched") ? [] : ["--no-errors-on-unmatched"])];
78
- const extra = paths.length === 0 ? undefined : yield* reportFor(root, extraArgs, paths, exceptions);
80
+ const extra = paths.length === 0 ? undefined : yield* reportFor(root, extraArgs, paths, exceptions, nonEffectFolders);
79
81
  const diagnostics = [...report.diagnostics, ...(extra?.diagnostics ?? [])];
80
82
  const unique = [...new Map(diagnostics.map((diagnostic) => [JSON.stringify(diagnostic), diagnostic])).values()];
81
83
  return {
@@ -4,7 +4,6 @@ import type { BaselineEntry } from "#baseline/format.ts";
4
4
  import { saveShards } from "#baseline/shards.ts";
5
5
  import { adopt, type Pruned, prune, type Scope } from "#baseline/update.ts";
6
6
  import { openSession, type Session } from "#engine/session.ts";
7
- import { registrable } from "#engine/violation.ts";
8
7
  import { applyRegistry } from "#exceptions/registry.ts";
9
8
  import { SetupFailure } from "#failure.ts";
10
9
  import { changesSince } from "#git/history.ts";
@@ -30,11 +29,6 @@ export const writeBaseline = Effect.fn("Cli.writeBaseline")(function* (
30
29
 
31
30
  const session = yield* openSession(cwd, config);
32
31
  const existing = session.baseline.files.size === 0 ? undefined : session.baseline.entries;
33
- if (firstAdoption && (rules.length === 0 || rules.some((rule) => registrable(session.config, rule)))) {
34
- return yield* new SetupFailure({
35
- message: "baseline write refused: --first-adoption requires explicit --rule ids that refuse config exceptions.",
36
- });
37
- }
38
32
  if (existing !== undefined && files.length === 0 && !firstAdoption) {
39
33
  return yield* new SetupFailure({
40
34
  message: "baseline write refused: a baseline exists. Record a rule with --rule <id> and --file <path>; use prune for moved or fixed debt.",
package/src/cli/fix.ts CHANGED
@@ -45,14 +45,21 @@ function changedBy(
45
45
  root: string,
46
46
  args: readonly string[],
47
47
  exceptions: readonly ExceptionDeclaration[],
48
+ nonEffectFolders: readonly string[],
48
49
  ): Effect.Effect<number, SetupFailure, RuleServices> {
49
50
  return Effect.map(
50
- biomeReport(root, args, exceptions).pipe(Effect.mapError((cause) => new SetupFailure({ cause, message: cause.message }))),
51
+ biomeReport(root, args, exceptions, ["."], nonEffectFolders).pipe(
52
+ Effect.mapError((cause) => new SetupFailure({ cause, message: cause.message })),
53
+ ),
51
54
  (report) => report.summary.changed,
52
55
  );
53
56
  }
54
57
 
55
- function biomePasses(root: string, exceptions: readonly ExceptionDeclaration[]): readonly Pass<SetupFailure, RuleServices>[] {
58
+ function biomePasses(
59
+ root: string,
60
+ exceptions: readonly ExceptionDeclaration[],
61
+ nonEffectFolders: readonly string[],
62
+ ): readonly Pass<SetupFailure, RuleServices>[] {
56
63
  return [
57
64
  {
58
65
  label: "with fixes",
@@ -60,9 +67,10 @@ function biomePasses(root: string, exceptions: readonly ExceptionDeclaration[]):
60
67
  root,
61
68
  ["check", "--write", "--unsafe", "--skip=assist/source/useSortedKeys", "--skip=lint/suspicious/noDuplicateObjectKeys"],
62
69
  exceptions,
70
+ nonEffectFolders,
63
71
  ),
64
72
  },
65
- { label: "with the format pass", run: changedBy(root, ["format", "--write"], exceptions) },
73
+ { label: "with the format pass", run: changedBy(root, ["format", "--write"], exceptions, nonEffectFolders) },
66
74
  ];
67
75
  }
68
76
 
@@ -124,8 +132,8 @@ export const settle = Effect.fn("Cli.settle")(function* <TFailure, TRequirements
124
132
  });
125
133
 
126
134
  export const fix = Effect.fn("Cli.fix")(function* (cwd: string, config: string | undefined): Effect.fn.Return<void, SetupFailure, RuleServices> {
127
- const { root, exceptions } = yield* loadConfig(cwd, config);
135
+ const { root, exceptions, nonEffectFolders } = yield* loadConfig(cwd, config);
128
136
  const sorted = yield* Effect.mapError(sortManifests(root), (failure) => new SetupFailure({ cause: failure, message: failure.message }));
129
137
  yield* Console.log(`quality: sort-package-json rewrote ${plural(sorted, "manifest")}.`);
130
- yield* settle({ passes: biomePasses(root, exceptions), snapshot: snapshotOf(root) });
138
+ yield* settle({ passes: biomePasses(root, exceptions, nonEffectFolders), snapshot: snapshotOf(root) });
131
139
  });
@@ -25,7 +25,7 @@ exceptions migrate Move legacy registry entries and Biome declarations into qual
25
25
  baseline merge Merge Git baseline versions into <current>: deletions win and counts take the minimum.
26
26
  baseline install-driver Configure only the repository-local merge.quality-baseline.driver setting.
27
27
  baseline write Adopt initial debt once, or record named rules only for --file paths changed since HEAD. Stage new files first.
28
- --first-adoption records a shared policy upgrade for explicit rules that refuse config exceptions, including unchanged files.
28
+ --first-adoption records any rule, including unchanged files. With an existing baseline, name explicit --rule ids.
29
29
  baseline prune Drop fixed debt, lower entries to what is left and carry entries to files git saw move. Never adds or raises an entry.
30
30
  baseline tighten Prune only the entries of files changed since HEAD, or with --staged, in the index.
31
31
  baseline migrate Move a JSON or JSON Lines baseline (--from, quality/baseline.json by default) into root and package shards.
@@ -1,5 +1,6 @@
1
1
  import { Schema } from "effect";
2
2
  import { ruleConfiguration } from "#adapters/rule.ts";
3
+ import { NonEffectFolders } from "#config/nonEffectFolders.ts";
3
4
  import { type Decoded, decodeWith } from "#decoded.ts";
4
5
  import { ExceptionDeclaration } from "#exceptions/declaration.ts";
5
6
  import type { RegisteredRule } from "#rule.ts";
@@ -28,6 +29,7 @@ const ConfigInput = Schema.Struct({
28
29
  exceptions: Schema.optionalKey(Schema.Array(ExceptionDeclaration)),
29
30
  extensions: Schema.optionalKey(Schema.Array(Schema.String)),
30
31
  local: Schema.optionalKey(Schema.Array(LocalRule)),
32
+ nonEffectFolders: Schema.optionalKey(NonEffectFolders),
31
33
  registry: Schema.optionalKey(Schema.String),
32
34
  rules: Schema.optionalKey(Schema.Record(Schema.String, Setting)),
33
35
  sources: Schema.optionalKey(Schema.Array(Schema.String)),