@starci/eslint-canon-fe 9.14.4 → 9.15.1

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 (207) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/comments.js +1 -1
  3. package/dist/explicit-surface.js +1 -1
  4. package/dist/index.js +1 -1
  5. package/dist/lib/config.d.ts +1 -1
  6. package/dist/lib/config.js +2 -2
  7. package/dist/lib/fe-stack.js +2 -2
  8. package/dist/lib/hfs.js +7 -5
  9. package/dist/lib/owner-source.js +8 -6
  10. package/dist/lib/package-root.d.ts +6 -1
  11. package/dist/lib/package-root.js +9 -3
  12. package/dist/lib/page-body.js +2 -2
  13. package/dist/lib/root-page.js +1 -1
  14. package/dist/project-graph.js +1 -1
  15. package/dist/swr-family.js +1 -1
  16. package/package.json +3 -1
  17. package/runtime/bundle.json +1 -189
  18. package/runtime/scripts/api/git/recorded-lines.mjs +5 -5
  19. package/runtime/scripts/hfs/project-graph.mjs +6 -6
  20. package/runtime/scripts/hfs/project-rule.mjs +3 -3
  21. package/runtime/config.example.yaml +0 -194
  22. package/runtime/engine/by-code-unit.mjs +0 -12
  23. package/runtime/engine/config.mjs +0 -461
  24. package/runtime/engine/invalid-config.mjs +0 -15
  25. package/runtime/engine/model-config.mjs +0 -112
  26. package/runtime/engine/orca-config.mjs +0 -34
  27. package/runtime/engine/plain-object.mjs +0 -5
  28. package/runtime/engine/release-config.mjs +0 -32
  29. package/runtime/engine/removed-vocabulary.mjs +0 -27
  30. package/runtime/engine/resources-config.mjs +0 -59
  31. package/runtime/engine/runtime-root.mjs +0 -138
  32. package/runtime/engine/secrets.mjs +0 -202
  33. package/runtime/engine/sonar-config.mjs +0 -24
  34. package/runtime/engine/temp-root.mjs +0 -26
  35. package/runtime/engine/yaml.mjs +0 -161
  36. package/runtime/knowledge/grammars/index.yaml +0 -114
  37. package/runtime/knowledge/hfs/canon-pins.yaml +0 -720
  38. package/runtime/knowledge/hfs/fe-stack.yaml +0 -272
  39. package/runtime/knowledge/hfs/slots.yaml +0 -2783
  40. package/runtime/knowledge/patterns/fe/folder.yaml +0 -425
  41. package/runtime/knowledge/sonar-gate.yaml +0 -151
  42. package/runtime/modules/kernel/removed-vocabulary.yaml +0 -458
  43. package/runtime/modules/models/registry.yaml +0 -221
  44. package/runtime/modules/models/runtimes.yaml +0 -556
  45. package/runtime/modules/models/tiers.yaml +0 -66
  46. package/runtime/scripts/api/git/cat-file.mjs +0 -4
  47. package/runtime/scripts/api/git/config-get.mjs +0 -9
  48. package/runtime/scripts/api/git/diff.mjs +0 -4
  49. package/runtime/scripts/api/git/lib.mjs +0 -80
  50. package/runtime/scripts/api/git/ls-files.mjs +0 -5
  51. package/runtime/scripts/api/git/ls-tree.mjs +0 -4
  52. package/runtime/scripts/api/git/merge-base.mjs +0 -8
  53. package/runtime/scripts/api/git/remote.mjs +0 -4
  54. package/runtime/scripts/api/git/rev-parse-query.mjs +0 -4
  55. package/runtime/scripts/api/git/show.mjs +0 -5
  56. package/runtime/scripts/api/git/tag.mjs +0 -4
  57. package/runtime/scripts/hfs/allows.mjs +0 -77
  58. package/runtime/scripts/hfs/architecture/ast-walks.mjs +0 -250
  59. package/runtime/scripts/hfs/architecture/automatic-gates.mjs +0 -103
  60. package/runtime/scripts/hfs/architecture/backend-app-files.mjs +0 -114
  61. package/runtime/scripts/hfs/architecture/backend.mjs +0 -462
  62. package/runtime/scripts/hfs/architecture/background-unowned.mjs +0 -254
  63. package/runtime/scripts/hfs/architecture/canon-clones.mjs +0 -291
  64. package/runtime/scripts/hfs/architecture/canon-jsx-clones.mjs +0 -224
  65. package/runtime/scripts/hfs/architecture/client-reaches-server.mjs +0 -102
  66. package/runtime/scripts/hfs/architecture/clones.mjs +0 -287
  67. package/runtime/scripts/hfs/architecture/component-tiers.mjs +0 -161
  68. package/runtime/scripts/hfs/architecture/config-unread.mjs +0 -16
  69. package/runtime/scripts/hfs/architecture/config.mjs +0 -407
  70. package/runtime/scripts/hfs/architecture/connection-map.mjs +0 -350
  71. package/runtime/scripts/hfs/architecture/constructor-deps.mjs +0 -115
  72. package/runtime/scripts/hfs/architecture/context-coupling.mjs +0 -117
  73. package/runtime/scripts/hfs/architecture/context-map.mjs +0 -355
  74. package/runtime/scripts/hfs/architecture/context-owner.mjs +0 -102
  75. package/runtime/scripts/hfs/architecture/context-platform-tables.mjs +0 -65
  76. package/runtime/scripts/hfs/architecture/context-transaction.mjs +0 -75
  77. package/runtime/scripts/hfs/architecture/contract-bounds.mjs +0 -72
  78. package/runtime/scripts/hfs/architecture/contract-fixture-guard.mjs +0 -177
  79. package/runtime/scripts/hfs/architecture/contracts-readonly.mjs +0 -360
  80. package/runtime/scripts/hfs/architecture/contracts.mjs +0 -489
  81. package/runtime/scripts/hfs/architecture/cross-app-duplicate.mjs +0 -81
  82. package/runtime/scripts/hfs/architecture/dead-exports-bindings.mjs +0 -173
  83. package/runtime/scripts/hfs/architecture/dead-exports.mjs +0 -420
  84. package/runtime/scripts/hfs/architecture/default-deny.mjs +0 -175
  85. package/runtime/scripts/hfs/architecture/doc-language.mjs +0 -45
  86. package/runtime/scripts/hfs/architecture/entity-registry.mjs +0 -51
  87. package/runtime/scripts/hfs/architecture/entrypoint.mjs +0 -75
  88. package/runtime/scripts/hfs/architecture/error-codes.mjs +0 -54
  89. package/runtime/scripts/hfs/architecture/error-masked.mjs +0 -78
  90. package/runtime/scripts/hfs/architecture/fe-slot-allows.mjs +0 -44
  91. package/runtime/scripts/hfs/architecture/feature-shape.mjs +0 -60
  92. package/runtime/scripts/hfs/architecture/framework-pinned.mjs +0 -41
  93. package/runtime/scripts/hfs/architecture/frontend-block-render.mjs +0 -112
  94. package/runtime/scripts/hfs/architecture/frontend-grammar.mjs +0 -193
  95. package/runtime/scripts/hfs/architecture/frontend-routing.mjs +0 -198
  96. package/runtime/scripts/hfs/architecture/frontend-world-render.mjs +0 -368
  97. package/runtime/scripts/hfs/architecture/frontend-world.mjs +0 -374
  98. package/runtime/scripts/hfs/architecture/frontend.mjs +0 -248
  99. package/runtime/scripts/hfs/architecture/function-spec-providers.mjs +0 -185
  100. package/runtime/scripts/hfs/architecture/hfs-graph.mjs +0 -77
  101. package/runtime/scripts/hfs/architecture/hfs.mjs +0 -394
  102. package/runtime/scripts/hfs/architecture/hooks-are-hooks.mjs +0 -118
  103. package/runtime/scripts/hfs/architecture/i18n-keys.mjs +0 -213
  104. package/runtime/scripts/hfs/architecture/identity.mjs +0 -121
  105. package/runtime/scripts/hfs/architecture/index.mjs +0 -402
  106. package/runtime/scripts/hfs/architecture/injection-token-exported.mjs +0 -69
  107. package/runtime/scripts/hfs/architecture/jwt-ast.mjs +0 -231
  108. package/runtime/scripts/hfs/architecture/machine-ast.mjs +0 -232
  109. package/runtime/scripts/hfs/architecture/managed-scripts.mjs +0 -32
  110. package/runtime/scripts/hfs/architecture/module-per-transport.mjs +0 -237
  111. package/runtime/scripts/hfs/architecture/next-data-contract.mjs +0 -126
  112. package/runtime/scripts/hfs/architecture/next-data-inference.mjs +0 -192
  113. package/runtime/scripts/hfs/architecture/next-data-key.mjs +0 -374
  114. package/runtime/scripts/hfs/architecture/next-data-symbols.mjs +0 -26
  115. package/runtime/scripts/hfs/architecture/next-data.mjs +0 -425
  116. package/runtime/scripts/hfs/architecture/operation-contract-roots.mjs +0 -55
  117. package/runtime/scripts/hfs/architecture/owners.mjs +0 -142
  118. package/runtime/scripts/hfs/architecture/package-shape.mjs +0 -92
  119. package/runtime/scripts/hfs/architecture/presentation.mjs +0 -173
  120. package/runtime/scripts/hfs/architecture/reachability.mjs +0 -330
  121. package/runtime/scripts/hfs/architecture/register-once.mjs +0 -212
  122. package/runtime/scripts/hfs/architecture/registration.mjs +0 -372
  123. package/runtime/scripts/hfs/architecture/render-graph.mjs +0 -449
  124. package/runtime/scripts/hfs/architecture/render-prop-across-server.mjs +0 -58
  125. package/runtime/scripts/hfs/architecture/required-files.mjs +0 -237
  126. package/runtime/scripts/hfs/architecture/root-packages.mjs +0 -78
  127. package/runtime/scripts/hfs/architecture/route-files-thin.mjs +0 -133
  128. package/runtime/scripts/hfs/architecture/schema-owner.mjs +0 -288
  129. package/runtime/scripts/hfs/architecture/server-action.mjs +0 -78
  130. package/runtime/scripts/hfs/architecture/side-boundary.mjs +0 -13
  131. package/runtime/scripts/hfs/architecture/source-names-shape.mjs +0 -320
  132. package/runtime/scripts/hfs/architecture/source-names.mjs +0 -393
  133. package/runtime/scripts/hfs/architecture/sql-keys.mjs +0 -344
  134. package/runtime/scripts/hfs/architecture/sql-owner.mjs +0 -291
  135. package/runtime/scripts/hfs/architecture/sql-returning.mjs +0 -76
  136. package/runtime/scripts/hfs/architecture/sql-token-forms.mjs +0 -117
  137. package/runtime/scripts/hfs/architecture/sql-tokens.mjs +0 -587
  138. package/runtime/scripts/hfs/architecture/staged-consumers.mjs +0 -42
  139. package/runtime/scripts/hfs/architecture/surface-nesting.mjs +0 -127
  140. package/runtime/scripts/hfs/architecture/surface.mjs +0 -88
  141. package/runtime/scripts/hfs/architecture/symbols.mjs +0 -273
  142. package/runtime/scripts/hfs/architecture/test-world-files.mjs +0 -263
  143. package/runtime/scripts/hfs/architecture/tiers.mjs +0 -256
  144. package/runtime/scripts/hfs/architecture/transport-owner.mjs +0 -248
  145. package/runtime/scripts/hfs/architecture/type-context.mjs +0 -335
  146. package/runtime/scripts/hfs/architecture/typescript.mjs +0 -477
  147. package/runtime/scripts/hfs/architecture/unit-spec-providers.mjs +0 -165
  148. package/runtime/scripts/hfs/declaration-shape.mjs +0 -196
  149. package/runtime/scripts/hfs/declaration-slots.mjs +0 -89
  150. package/runtime/scripts/hfs/edition-slots.mjs +0 -80
  151. package/runtime/scripts/hfs/explicit-surface-rule.mjs +0 -59
  152. package/runtime/scripts/hfs/linear-text.mjs +0 -30
  153. package/runtime/scripts/hfs/manifest-shape.mjs +0 -474
  154. package/runtime/scripts/hfs/param-names.mjs +0 -13
  155. package/runtime/scripts/hfs/path-findings.mjs +0 -167
  156. package/runtime/scripts/hfs/repo-identity.mjs +0 -89
  157. package/runtime/scripts/hfs/rule-catalog.mjs +0 -458
  158. package/runtime/scripts/hfs/rule-params-shape.mjs +0 -103
  159. package/runtime/scripts/hfs/rules/database-constants.mjs +0 -25
  160. package/runtime/scripts/hfs/rules/database-migrations.mjs +0 -684
  161. package/runtime/scripts/hfs/rules/fe-no-tests.mjs +0 -68
  162. package/runtime/scripts/hfs/rules/read.mjs +0 -45
  163. package/runtime/scripts/hfs/rules/secrets.mjs +0 -79
  164. package/runtime/scripts/hfs/rules/spec-placement.mjs +0 -28
  165. package/runtime/scripts/hfs/slot-app-view.mjs +0 -97
  166. package/runtime/scripts/hfs/slot-classify.mjs +0 -69
  167. package/runtime/scripts/hfs/slot-errors.mjs +0 -12
  168. package/runtime/scripts/hfs/slot-imports.mjs +0 -98
  169. package/runtime/scripts/hfs/slot-manifest-shape.mjs +0 -111
  170. package/runtime/scripts/hfs/slot-match.mjs +0 -164
  171. package/runtime/scripts/hfs/slot-path.mjs +0 -6
  172. package/runtime/scripts/hfs/slot-required.mjs +0 -95
  173. package/runtime/scripts/hfs/slot-semantic-problems.mjs +0 -175
  174. package/runtime/scripts/hfs/slot-side-problems.mjs +0 -32
  175. package/runtime/scripts/hfs/slots.mjs +0 -306
  176. package/runtime/scripts/hfs/test-world-slot.mjs +0 -5
  177. package/runtime/scripts/hfs/trailing-slashes.mjs +0 -8
  178. package/runtime/scripts/hfs/typescript-programs.mjs +0 -95
  179. package/runtime/scripts/hfs/view.mjs +0 -180
  180. package/runtime/scripts/lib/declaration-surface.mjs +0 -166
  181. package/runtime/scripts/lib/dockerfile.mjs +0 -164
  182. package/runtime/scripts/lib/env.mjs +0 -18
  183. package/runtime/scripts/lib/event-contract.mjs +0 -102
  184. package/runtime/scripts/lib/git-hooks-dir.mjs +0 -30
  185. package/runtime/scripts/lib/git.mjs +0 -35
  186. package/runtime/scripts/lib/glob.mjs +0 -32
  187. package/runtime/scripts/lib/grammar-lint.mjs +0 -57
  188. package/runtime/scripts/lib/i18n.mjs +0 -82
  189. package/runtime/scripts/lib/in-order.mjs +0 -90
  190. package/runtime/scripts/lib/json-clone.mjs +0 -70
  191. package/runtime/scripts/lib/json.mjs +0 -44
  192. package/runtime/scripts/lib/language.mjs +0 -233
  193. package/runtime/scripts/lib/list.mjs +0 -26
  194. package/runtime/scripts/lib/mutation-fence.mjs +0 -20
  195. package/runtime/scripts/lib/package-at.mjs +0 -62
  196. package/runtime/scripts/lib/path-key.mjs +0 -124
  197. package/runtime/scripts/lib/read-text.mjs +0 -47
  198. package/runtime/scripts/lib/regex.mjs +0 -3
  199. package/runtime/scripts/lib/rule-packs.mjs +0 -243
  200. package/runtime/scripts/lib/same-text.mjs +0 -4
  201. package/runtime/scripts/lib/secret-patterns.mjs +0 -230
  202. package/runtime/scripts/lib/sops-envelope.mjs +0 -212
  203. package/runtime/scripts/lib/stack-services.mjs +0 -191
  204. package/runtime/scripts/lib/ts-analysis.mjs +0 -39
  205. package/runtime/scripts/lib/ts-ast.mjs +0 -63
  206. package/runtime/scripts/lib/walk.mjs +0 -45
  207. package/runtime/scripts/lib/yaml-cached.mjs +0 -14
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 9.15.1 - 2026-11-05
4
+
5
+ - Fixed (FE-PACKAGES-2): the package config (`starciFePackagesConfig` and `scopeToPackages`, which the Grammar family's `...PackagesConfig` reads) covered only `packages/*/src/workbench/**` and `src/public/**`, and the back-end package config takes no `.tsx`, so a `.tsx` file anywhere else in a root package (a `src/client/` renderer of a block library) matched no config and was never linted. `PACKAGE_SOURCE_FILES` now also lists `packages/*/src/**/*.tsx`: every React file of a package source gets the front-end canon and the Grammar family rules, as the files of `fe/packages` do. The workbench contract stays back end; a plain `.ts` file outside the two subpaths stays the back-end canon's.
6
+
7
+ ## 9.15.0 - 2026-11-05
8
+
9
+ - Changed (decision release-only-what-changed): the canon reads the @starci/hfs runtime from the installed hfs at run time, which it peers by `~5.13.0`, and bundles no copy; `runtime/` keeps only the project graph rule, the jsdoc, sonar and next helpers and the package-scripts template, and the stale forks (slots 3.13.0) are gone.
10
+
3
11
  ## 9.14.4 - 2026-11-05
4
12
 
5
13
  - Changed: the runtime copy of the canon pins gives the Grammar family its same-minor range (decision grammar-patch-range) and names `@starci/hfs` 5.12.0 and the Grammar family 0.22.0.
package/dist/comments.js CHANGED
@@ -13,7 +13,7 @@
13
13
  * IS the other language, and a fixture reproducing a real string has to reproduce it exactly. A
14
14
  * judgement-based exception would be argued per file forever. The Vietnamese rule has no placement exemption at all.
15
15
  */
16
- import { hasSecondLanguage } from "#runtime/scripts/lib/language.mjs";
16
+ import { hasSecondLanguage } from "@starci/hfs/runtime/scripts/lib/language.mjs";
17
17
  import { jsdocBefore } from "#runtime/scripts/lib/jsdoc.mjs";
18
18
  import { defineRule } from "./lib/rule.js";
19
19
  import { fileOf, inSlot } from "./lib/scope.js";
@@ -8,7 +8,7 @@
8
8
  * cache reads (`declarationSurface` of the bundled runtime), so the rule reports exactly the files the cache counts as open.
9
9
  */
10
10
  import ts from "typescript";
11
- import { explicitSurfaceRule } from "#runtime/scripts/hfs/explicit-surface-rule.mjs";
11
+ import { explicitSurfaceRule } from "@starci/hfs/runtime/scripts/hfs/explicit-surface-rule.mjs";
12
12
  /** The rules this law contributes to the plugin. */
13
13
  export const rules = {
14
14
  "explicit-export-surface": explicitSurfaceRule({ ts }),
package/dist/index.js CHANGED
@@ -8,7 +8,7 @@
8
8
  * Published IDs identify their owning law. Namespace migrations are explicit in the removed-vocabulary
9
9
  * catalog; compatibility aliases cannot create a second owner for a rule.
10
10
  */
11
- import { packEslintConfigs } from "#runtime/scripts/lib/rule-packs.mjs";
11
+ import { packEslintConfigs } from "@starci/hfs/runtime/scripts/lib/rule-packs.mjs";
12
12
  import { createRequire } from "node:module";
13
13
  import { join } from "node:path";
14
14
  import { pathToFileURL } from "node:url";
@@ -88,7 +88,7 @@ export declare const buildPlainSourceConfig: ({ root, plugin, hooks, reactHooks,
88
88
  readonly sonar: SonarPlugins;
89
89
  readonly canon?: boolean;
90
90
  }) => Linter.Config[];
91
- /** The front-end subpaths of a root workspace package: its workbench (drawn with Grammar) and its public face; the React-free workbench contract stays back end. */
91
+ /** The front-end files of a root workspace package: its workbench (drawn with Grammar) and its public face, and every `.tsx` file of the package source wherever it sits (a `src/client/` renderer is drawn too: FE-PACKAGES-2); the React-free workbench contract stays back end. */
92
92
  export declare const PACKAGE_SOURCE_FILES: readonly string[];
93
93
  /** What a package folder never lints: installed packages, build output, generated wire types. */
94
94
  export declare const PACKAGE_IGNORED: readonly string[];
@@ -148,8 +148,8 @@ export const buildPlainSourceConfig = ({ root, plugin, hooks, reactHooks, tsPlug
148
148
  { files: [...PLAIN_SOURCE_FILES], ignores: [...OUTSIDE_THE_SCAN_FILES], plugins: { sonarjs: sonar.sonarjs, unicorn: sonar.unicorn }, rules: sonarWayRules(sonar.sonarjs, "fe").rules },
149
149
  ];
150
150
  };
151
- /** The front-end subpaths of a root workspace package: its workbench (drawn with Grammar) and its public face; the React-free workbench contract stays back end. */
152
- export const PACKAGE_SOURCE_FILES = Object.freeze(["packages/*/src/workbench/**/*.{ts,tsx}", "packages/*/src/public/**/*.{ts,tsx}"]);
151
+ /** The front-end files of a root workspace package: its workbench (drawn with Grammar) and its public face, and every `.tsx` file of the package source wherever it sits (a `src/client/` renderer is drawn too: FE-PACKAGES-2); the React-free workbench contract stays back end. */
152
+ export const PACKAGE_SOURCE_FILES = Object.freeze(["packages/*/src/workbench/**/*.{ts,tsx}", "packages/*/src/public/**/*.{ts,tsx}", "packages/*/src/**/*.tsx"]);
153
153
  const PACKAGE_CONTRACT = Object.freeze(["packages/*/src/workbench/contract/**"]);
154
154
  /** What a package folder never lints: installed packages, build output, generated wire types. */
155
155
  export const PACKAGE_IGNORED = Object.freeze(["**/node_modules/**", "**/.next/**", "**/dist/**", "**/coverage/**", "**/__generated__/**"]);
@@ -9,8 +9,8 @@
9
9
  */
10
10
  import { readFileSync } from "node:fs";
11
11
  import { join } from "node:path";
12
- import { parseYaml } from "#runtime/engine/yaml.mjs";
13
- import { globExpression } from "#runtime/scripts/lib/glob.mjs";
12
+ import { parseYaml } from "@starci/hfs/runtime/engine/yaml.mjs";
13
+ import { globExpression } from "@starci/hfs/runtime/scripts/lib/glob.mjs";
14
14
  import { RUNTIME_ROOT } from "./package-root.js";
15
15
  const CATALOG = join(RUNTIME_ROOT, "knowledge", "hfs", "fe-stack.yaml");
16
16
  /**
package/dist/lib/hfs.js CHANGED
@@ -13,16 +13,18 @@
13
13
  */
14
14
  import { dirname } from "node:path";
15
15
  import { fileURLToPath } from "node:url";
16
- import { declaredHfsView, declaredPackagesHfsView, openHfsView, openPackagesHfsView } from "#runtime/scripts/hfs/view.mjs";
16
+ import { declaredHfsView, declaredPackagesHfsView, openHfsView, openPackagesHfsView } from "@starci/hfs/runtime/scripts/hfs/view.mjs";
17
17
  import { RUNTIME_ROOT } from "./package-root.js";
18
18
  const RUNTIME = RUNTIME_ROOT;
19
+ /** The view @starci/hfs returns, read through this package's own HfsView type (the runtime object is the same; the types are declared here). */
20
+ const asView = (view) => view;
19
21
  /**
20
22
  * The HFS view of the side whose `eslint.config.mjs` (in fe/) calls this.
21
23
  *
22
24
  * @param configUrl - `import.meta.url` of the repository's `eslint.config.mjs`.
23
25
  * @returns The frozen HFS view.
24
26
  */
25
- export const loadHfs = (configUrl) => openHfsView({ runtimeRoot: RUNTIME, repoRoot: dirname(fileURLToPath(configUrl)) });
27
+ export const loadHfs = (configUrl) => asView(openHfsView({ runtimeRoot: RUNTIME, repoRoot: dirname(fileURLToPath(configUrl)) }));
26
28
  /**
27
29
  * The HFS view of the fe side of an in-memory app declaration, for rule tests.
28
30
  *
@@ -30,7 +32,7 @@ export const loadHfs = (configUrl) => openHfsView({ runtimeRoot: RUNTIME, repoRo
30
32
  * @param repoRoot - The absolute fe side folder the linted filenames live under.
31
33
  * @returns The frozen HFS view.
32
34
  */
33
- export const hfsFromDeclaration = (declaration, repoRoot) => declaredHfsView({ runtimeRoot: RUNTIME, declaration, repoRoot, side: "fe" });
35
+ export const hfsFromDeclaration = (declaration, repoRoot) => asView(declaredHfsView({ runtimeRoot: RUNTIME, declaration, repoRoot, side: "fe" }));
34
36
  /**
35
37
  * The HFS view of the root workspace packages of an app, judged by the laws of the fe side: the managed root `eslint.config.mjs`
36
38
  * (`packages/*` of the app root) calls this. Paths are the app's own; a package file is of the tier `package`.
@@ -38,7 +40,7 @@ export const hfsFromDeclaration = (declaration, repoRoot) => declaredHfsView({ r
38
40
  * @param configUrl - `import.meta.url` of the app root's `eslint.config.mjs`.
39
41
  * @returns The frozen HFS view (profile fe over the paths of the app root).
40
42
  */
41
- export const loadPackagesHfs = (configUrl) => openPackagesHfsView({ runtimeRoot: RUNTIME, repoRoot: dirname(fileURLToPath(configUrl)), side: "fe" });
43
+ export const loadPackagesHfs = (configUrl) => asView(openPackagesHfsView({ runtimeRoot: RUNTIME, repoRoot: dirname(fileURLToPath(configUrl)), side: "fe" }));
42
44
  /**
43
45
  * The HFS view of the root packages of an in-memory app declaration, for rule tests.
44
46
  *
@@ -46,7 +48,7 @@ export const loadPackagesHfs = (configUrl) => openPackagesHfsView({ runtimeRoot:
46
48
  * @param repoRoot - The absolute app root the linted filenames live under.
47
49
  * @returns The frozen HFS view.
48
50
  */
49
- export const packagesHfsFromDeclaration = (declaration, repoRoot) => declaredPackagesHfsView({ runtimeRoot: RUNTIME, declaration, repoRoot, side: "fe" });
51
+ export const packagesHfsFromDeclaration = (declaration, repoRoot) => asView(declaredPackagesHfsView({ runtimeRoot: RUNTIME, declaration, repoRoot, side: "fe" }));
50
52
  /** True for a value that carries the view's resolver (`slotOf`), the test the canon has always made of `settings.starci.hfs`. */
51
53
  export const isHfsView = (value) => typeof value === "object" && value !== null && "slotOf" in value && typeof value.slotOf === "function";
52
54
  /** The `starci.hfs` entry of a settings object, read without trusting its shape. */
@@ -10,9 +10,9 @@ import { resolveImport } from "./scope.js";
10
10
  import { hfsOf } from "./hfs.js";
11
11
  import { walk } from "./ast.js";
12
12
  import { sourceCodeView } from "./eslint-boundary.js";
13
- import { loadArchitectureConfig } from "#runtime/scripts/hfs/architecture/config.mjs";
14
- import { workspaceSourceEntry } from "#runtime/scripts/hfs/architecture/typescript.mjs";
15
- import { openHfs } from "#runtime/scripts/hfs/slots.mjs";
13
+ import { loadArchitectureConfig } from "@starci/hfs/runtime/scripts/hfs/architecture/config.mjs";
14
+ import { workspaceSourceEntry } from "@starci/hfs/runtime/scripts/hfs/architecture/typescript.mjs";
15
+ import { openHfs } from "@starci/hfs/runtime/scripts/hfs/slots.mjs";
16
16
  const RUNTIME = RUNTIME_ROOT;
17
17
  const roots = new WeakMap();
18
18
  const origins = new WeakMap();
@@ -27,15 +27,17 @@ const stateOf = (context) => {
27
27
  return state;
28
28
  };
29
29
  /** A workspace package from the text of its `package.json`. */
30
- const workspaceOf = (root, text) => {
30
+ const workspaceOf = (root, relative, text) => {
31
31
  const manifest = JSON.parse(text);
32
32
  const record = typeof manifest === "object" && manifest !== null ? manifest : {};
33
33
  return {
34
34
  root,
35
+ relative,
36
+ app: false,
35
37
  workspace: true,
36
38
  name: "name" in record && typeof record.name === "string" ? record.name : null,
37
39
  manifest,
38
- exports: "exports" in record ? record.exports : undefined
40
+ ...("exports" in record ? { exports: record.exports } : {})
39
41
  };
40
42
  };
41
43
  const workspaceFile = (context, source) => {
@@ -45,7 +47,7 @@ const workspaceFile = (context, source) => {
45
47
  const config = loadArchitectureConfig(state.root, { hfs });
46
48
  state.workspaces = config.workspaces.map((relative) => {
47
49
  const root = path.join(state.root, relative);
48
- return workspaceOf(root, fs.readFileSync(path.join(root, "package.json"), "utf8"));
50
+ return workspaceOf(root, relative, fs.readFileSync(path.join(root, "package.json"), "utf8"));
49
51
  });
50
52
  }
51
53
  const workspace = state.workspaces.find((entry) => entry.name && (source === entry.name || source.startsWith(`${entry.name}/`)));
@@ -1,4 +1,9 @@
1
1
  /** The folder holding this package's package.json. */
2
2
  export declare const PACKAGE_ROOT: string;
3
- /** The bundled runtime the canon reads the slot manifest, the architecture machine and its catalogs from. */
3
+ /**
4
+ * The runtime of the installed @starci/hfs (its peer, a same-minor range): the slot manifest, the architecture machine and its catalogs are read from it
5
+ * at run time, never from a copy bundled here, so an hfs data change releases hfs alone (decision release-only-what-changed).
6
+ */
4
7
  export declare const RUNTIME_ROOT: string;
8
+ /** The files this package keeps of its own in runtime/ (the project graph rule, the jsdoc, sonar and next helpers, the package-scripts template). */
9
+ export declare const OWN_RUNTIME_ROOT: string;
@@ -2,9 +2,15 @@
2
2
  * The package's own root, the same from the TypeScript source (`src/lib`) and from the build (`dist/lib`): both sit two
3
3
  * levels below it, so every file the package reads beside its code (the bundled `runtime/`, the fixtures) resolves here.
4
4
  */
5
- import { join } from "node:path";
5
+ import { createRequire } from "node:module";
6
+ import { dirname, join } from "node:path";
6
7
  import { fileURLToPath } from "node:url";
7
8
  /** The folder holding this package's package.json. */
8
9
  export const PACKAGE_ROOT = fileURLToPath(new URL("../..", import.meta.url));
9
- /** The bundled runtime the canon reads the slot manifest, the architecture machine and its catalogs from. */
10
- export const RUNTIME_ROOT = join(PACKAGE_ROOT, "runtime");
10
+ /**
11
+ * The runtime of the installed @starci/hfs (its peer, a same-minor range): the slot manifest, the architecture machine and its catalogs are read from it
12
+ * at run time, never from a copy bundled here, so an hfs data change releases hfs alone (decision release-only-what-changed).
13
+ */
14
+ export const RUNTIME_ROOT = join(dirname(createRequire(import.meta.url).resolve("@starci/hfs/package.json")), "runtime");
15
+ /** The files this package keeps of its own in runtime/ (the project graph rule, the jsdoc, sonar and next helpers, the package-scripts template). */
16
+ export const OWN_RUNTIME_ROOT = join(PACKAGE_ROOT, "runtime");
@@ -1,5 +1,5 @@
1
- import { grammarContractFor } from "#runtime/scripts/lib/grammar-lint.mjs";
2
- import { canonicalStatusOwnerBinding } from "#runtime/scripts/hfs/architecture/canon-jsx-clones.mjs";
1
+ import { grammarContractFor } from "@starci/hfs/runtime/scripts/lib/grammar-lint.mjs";
2
+ import { canonicalStatusOwnerBinding } from "@starci/hfs/runtime/scripts/hfs/architecture/canon-jsx-clones.mjs";
3
3
  import { attribute, attributeValue, stringOf, walk } from "./ast.js";
4
4
  import { isFn, unwrap, variableOf } from "./bindings.js";
5
5
  import { hfsOf } from "./hfs.js";
@@ -5,7 +5,7 @@
5
5
  */
6
6
  import fs from "node:fs";
7
7
  import path from "node:path";
8
- import { grammarContractFor } from "#runtime/scripts/lib/grammar-lint.mjs";
8
+ import { grammarContractFor } from "@starci/hfs/runtime/scripts/lib/grammar-lint.mjs";
9
9
  import { attribute, attributeValue, walk } from "./ast.js";
10
10
  import { importOf, isFn, unwrap, variableOf } from "./bindings.js";
11
11
  import { hfsOf } from "./hfs.js";
@@ -7,7 +7,7 @@
7
7
  * rules and their codes is `LINT_ENFORCERS` of the machine (scripts/hfs/architecture/surface.mjs); `starci app check` keeps the
8
8
  * findings that have no TypeScript file to sit on. A graph that cannot be built stops the run with the machine's message.
9
9
  */
10
- import { LINT_ENFORCERS, belongsTo, codeOf } from "#runtime/scripts/hfs/architecture/surface.mjs";
10
+ import { LINT_ENFORCERS, belongsTo, codeOf } from "@starci/hfs/runtime/scripts/hfs/architecture/surface.mjs";
11
11
  import { projectGraph as buildProjectGraph, resetProjectGraphs } from "#runtime/scripts/hfs/project-graph.mjs";
12
12
  import { projectRule } from "#runtime/scripts/hfs/project-rule.mjs";
13
13
  import { hfsOf } from "./lib/hfs.js";
@@ -3,7 +3,7 @@ import { hfsOf } from "./lib/hfs.js";
3
3
  import { readFileSync, readdirSync } from "node:fs";
4
4
  import { join } from "node:path";
5
5
  import ts from "typescript";
6
- import { isBoundsExport } from "#runtime/scripts/hfs/architecture/contract-bounds.mjs";
6
+ import { isBoundsExport } from "@starci/hfs/runtime/scripts/hfs/architecture/contract-bounds.mjs";
7
7
  import { stringOf, walk } from "./lib/ast.js";
8
8
  import { functionOf } from "./lib/bindings.js";
9
9
  import { defineRule } from "./lib/rule.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@starci/eslint-canon-fe",
3
- "version": "9.14.4",
3
+ "version": "9.15.1",
4
4
  "description": "Universal front-end lint laws for TypeScript and Next.js, independent of the selected Grammar family.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -51,6 +51,7 @@
51
51
  "node": ">=22.13.0"
52
52
  },
53
53
  "peerDependencies": {
54
+ "@starci/hfs": "~5.13.0",
54
55
  "eslint": ">=9",
55
56
  "eslint-plugin-react-hooks": ">=7",
56
57
  "typescript": ">=5.9"
@@ -78,6 +79,7 @@
78
79
  "eslint-plugin-unicorn": "65.0.0"
79
80
  },
80
81
  "devDependencies": {
82
+ "@starci/hfs": "file:../hfs",
81
83
  "@starci/tsconfig": "file:../tsconfig",
82
84
  "@types/node": "^24.19.2",
83
85
  "eslint": "^9.18.0",
@@ -1,201 +1,13 @@
1
1
  {
2
- "generated": [
3
- "config.example.yaml",
4
- "engine/by-code-unit.mjs",
5
- "engine/model-config.mjs",
6
- "engine/orca-config.mjs",
7
- "engine/plain-object.mjs",
8
- "engine/release-config.mjs",
9
- "engine/removed-vocabulary.mjs",
10
- "engine/resources-config.mjs",
11
- "engine/runtime-root.mjs",
12
- "engine/secrets.mjs",
13
- "engine/sonar-config.mjs",
14
- "engine/temp-root.mjs",
15
- "engine/yaml.mjs",
16
- "knowledge/grammars/index.yaml",
17
- "knowledge/hfs/canon-pins.yaml",
18
- "knowledge/hfs/fe-stack.yaml",
19
- "knowledge/patterns/fe/folder.yaml",
20
- "knowledge/sonar-gate.yaml",
21
- "modules/kernel/removed-vocabulary.yaml",
22
- "modules/models/registry.yaml",
23
- "modules/models/runtimes.yaml",
24
- "modules/models/tiers.yaml",
25
- "scripts/api/git/cat-file.mjs",
26
- "scripts/api/git/config-get.mjs",
27
- "scripts/api/git/diff.mjs",
28
- "scripts/api/git/lib.mjs",
29
- "scripts/api/git/ls-files.mjs",
30
- "scripts/api/git/ls-tree.mjs",
31
- "scripts/api/git/merge-base.mjs",
32
- "scripts/api/git/remote.mjs",
33
- "scripts/api/git/rev-parse-query.mjs",
34
- "scripts/api/git/show.mjs",
35
- "scripts/api/git/tag.mjs",
36
- "scripts/hfs/allows.mjs",
37
- "scripts/hfs/architecture/ast-walks.mjs",
38
- "scripts/hfs/architecture/automatic-gates.mjs",
39
- "scripts/hfs/architecture/backend-app-files.mjs",
40
- "scripts/hfs/architecture/backend.mjs",
41
- "scripts/hfs/architecture/background-unowned.mjs",
42
- "scripts/hfs/architecture/canon-clones.mjs",
43
- "scripts/hfs/architecture/canon-jsx-clones.mjs",
44
- "scripts/hfs/architecture/client-reaches-server.mjs",
45
- "scripts/hfs/architecture/clones.mjs",
46
- "scripts/hfs/architecture/component-tiers.mjs",
47
- "scripts/hfs/architecture/config-unread.mjs",
48
- "scripts/hfs/architecture/config.mjs",
49
- "scripts/hfs/architecture/connection-map.mjs",
50
- "scripts/hfs/architecture/constructor-deps.mjs",
51
- "scripts/hfs/architecture/context-coupling.mjs",
52
- "scripts/hfs/architecture/context-map.mjs",
53
- "scripts/hfs/architecture/context-owner.mjs",
54
- "scripts/hfs/architecture/context-platform-tables.mjs",
55
- "scripts/hfs/architecture/context-transaction.mjs",
56
- "scripts/hfs/architecture/contract-bounds.mjs",
57
- "scripts/hfs/architecture/contract-fixture-guard.mjs",
58
- "scripts/hfs/architecture/contracts-readonly.mjs",
59
- "scripts/hfs/architecture/contracts.mjs",
60
- "scripts/hfs/architecture/cross-app-duplicate.mjs",
61
- "scripts/hfs/architecture/dead-exports-bindings.mjs",
62
- "scripts/hfs/architecture/dead-exports.mjs",
63
- "scripts/hfs/architecture/default-deny.mjs",
64
- "scripts/hfs/architecture/doc-language.mjs",
65
- "scripts/hfs/architecture/entity-registry.mjs",
66
- "scripts/hfs/architecture/entrypoint.mjs",
67
- "scripts/hfs/architecture/error-codes.mjs",
68
- "scripts/hfs/architecture/error-masked.mjs",
69
- "scripts/hfs/architecture/fe-slot-allows.mjs",
70
- "scripts/hfs/architecture/feature-shape.mjs",
71
- "scripts/hfs/architecture/framework-pinned.mjs",
72
- "scripts/hfs/architecture/frontend-block-render.mjs",
73
- "scripts/hfs/architecture/frontend-grammar.mjs",
74
- "scripts/hfs/architecture/frontend-routing.mjs",
75
- "scripts/hfs/architecture/frontend-world-render.mjs",
76
- "scripts/hfs/architecture/frontend-world.mjs",
77
- "scripts/hfs/architecture/frontend.mjs",
78
- "scripts/hfs/architecture/function-spec-providers.mjs",
79
- "scripts/hfs/architecture/hfs-graph.mjs",
80
- "scripts/hfs/architecture/hooks-are-hooks.mjs",
81
- "scripts/hfs/architecture/i18n-keys.mjs",
82
- "scripts/hfs/architecture/identity.mjs",
83
- "scripts/hfs/architecture/index.mjs",
84
- "scripts/hfs/architecture/injection-token-exported.mjs",
85
- "scripts/hfs/architecture/jwt-ast.mjs",
86
- "scripts/hfs/architecture/machine-ast.mjs",
87
- "scripts/hfs/architecture/managed-scripts.mjs",
88
- "scripts/hfs/architecture/module-per-transport.mjs",
89
- "scripts/hfs/architecture/next-data-contract.mjs",
90
- "scripts/hfs/architecture/next-data-inference.mjs",
91
- "scripts/hfs/architecture/next-data-key.mjs",
92
- "scripts/hfs/architecture/next-data-symbols.mjs",
93
- "scripts/hfs/architecture/next-data.mjs",
94
- "scripts/hfs/architecture/operation-contract-roots.mjs",
95
- "scripts/hfs/architecture/owners.mjs",
96
- "scripts/hfs/architecture/package-shape.mjs",
97
- "scripts/hfs/architecture/presentation.mjs",
98
- "scripts/hfs/architecture/reachability.mjs",
99
- "scripts/hfs/architecture/register-once.mjs",
100
- "scripts/hfs/architecture/registration.mjs",
101
- "scripts/hfs/architecture/render-graph.mjs",
102
- "scripts/hfs/architecture/render-prop-across-server.mjs",
103
- "scripts/hfs/architecture/required-files.mjs",
104
- "scripts/hfs/architecture/root-packages.mjs",
105
- "scripts/hfs/architecture/route-files-thin.mjs",
106
- "scripts/hfs/architecture/schema-owner.mjs",
107
- "scripts/hfs/architecture/server-action.mjs",
108
- "scripts/hfs/architecture/side-boundary.mjs",
109
- "scripts/hfs/architecture/source-names-shape.mjs",
110
- "scripts/hfs/architecture/source-names.mjs",
111
- "scripts/hfs/architecture/sql-keys.mjs",
112
- "scripts/hfs/architecture/sql-owner.mjs",
113
- "scripts/hfs/architecture/sql-returning.mjs",
114
- "scripts/hfs/architecture/sql-token-forms.mjs",
115
- "scripts/hfs/architecture/sql-tokens.mjs",
116
- "scripts/hfs/architecture/staged-consumers.mjs",
117
- "scripts/hfs/architecture/surface-nesting.mjs",
118
- "scripts/hfs/architecture/surface.mjs",
119
- "scripts/hfs/architecture/symbols.mjs",
120
- "scripts/hfs/architecture/test-world-files.mjs",
121
- "scripts/hfs/architecture/tiers.mjs",
122
- "scripts/hfs/architecture/transport-owner.mjs",
123
- "scripts/hfs/architecture/type-context.mjs",
124
- "scripts/hfs/architecture/typescript.mjs",
125
- "scripts/hfs/architecture/unit-spec-providers.mjs",
126
- "scripts/hfs/declaration-shape.mjs",
127
- "scripts/hfs/declaration-slots.mjs",
128
- "scripts/hfs/edition-slots.mjs",
129
- "scripts/hfs/explicit-surface-rule.mjs",
130
- "scripts/hfs/linear-text.mjs",
131
- "scripts/hfs/param-names.mjs",
132
- "scripts/hfs/path-findings.mjs",
133
- "scripts/hfs/repo-identity.mjs",
134
- "scripts/hfs/rule-catalog.mjs",
135
- "scripts/hfs/rule-params-shape.mjs",
136
- "scripts/hfs/rules/database-migrations.mjs",
137
- "scripts/hfs/rules/fe-no-tests.mjs",
138
- "scripts/hfs/rules/read.mjs",
139
- "scripts/hfs/rules/spec-placement.mjs",
140
- "scripts/hfs/slot-app-view.mjs",
141
- "scripts/hfs/slot-classify.mjs",
142
- "scripts/hfs/slot-errors.mjs",
143
- "scripts/hfs/slot-imports.mjs",
144
- "scripts/hfs/slot-manifest-shape.mjs",
145
- "scripts/hfs/slot-match.mjs",
146
- "scripts/hfs/slot-path.mjs",
147
- "scripts/hfs/slot-required.mjs",
148
- "scripts/hfs/slot-semantic-problems.mjs",
149
- "scripts/hfs/slot-side-problems.mjs",
150
- "scripts/hfs/slots.mjs",
151
- "scripts/hfs/test-world-slot.mjs",
152
- "scripts/hfs/trailing-slashes.mjs",
153
- "scripts/hfs/typescript-programs.mjs",
154
- "scripts/hfs/view.mjs",
155
- "scripts/lib/declaration-surface.mjs",
156
- "scripts/lib/dockerfile.mjs",
157
- "scripts/lib/env.mjs",
158
- "scripts/lib/event-contract.mjs",
159
- "scripts/lib/git.mjs",
160
- "scripts/lib/glob.mjs",
161
- "scripts/lib/grammar-lint.mjs",
162
- "scripts/lib/i18n.mjs",
163
- "scripts/lib/in-order.mjs",
164
- "scripts/lib/json-clone.mjs",
165
- "scripts/lib/json.mjs",
166
- "scripts/lib/language.mjs",
167
- "scripts/lib/list.mjs",
168
- "scripts/lib/mutation-fence.mjs",
169
- "scripts/lib/path-key.mjs",
170
- "scripts/lib/read-text.mjs",
171
- "scripts/lib/regex.mjs",
172
- "scripts/lib/rule-packs.mjs",
173
- "scripts/lib/same-text.mjs",
174
- "scripts/lib/sops-envelope.mjs",
175
- "scripts/lib/stack-services.mjs",
176
- "scripts/lib/ts-analysis.mjs",
177
- "scripts/lib/ts-ast.mjs",
178
- "scripts/lib/walk.mjs",
179
- "scripts/lib/yaml-cached.mjs"
180
- ],
2
+ "generated": [],
181
3
  "own": [
182
- "engine/config.mjs",
183
- "engine/invalid-config.mjs",
184
- "knowledge/hfs/slots.yaml",
185
4
  "packages/hfs/templates/app/package-scripts/package.json",
186
5
  "scripts/api/git/recorded-lines.mjs",
187
- "scripts/hfs/architecture/hfs.mjs",
188
- "scripts/hfs/manifest-shape.mjs",
189
6
  "scripts/hfs/project-graph.mjs",
190
7
  "scripts/hfs/project-rule.mjs",
191
- "scripts/hfs/rules/database-constants.mjs",
192
- "scripts/hfs/rules/secrets.mjs",
193
- "scripts/lib/git-hooks-dir.mjs",
194
8
  "scripts/lib/jsdoc.mjs",
195
9
  "scripts/lib/line-count.mjs",
196
10
  "scripts/lib/next-contract.mjs",
197
- "scripts/lib/package-at.mjs",
198
- "scripts/lib/secret-patterns.mjs",
199
11
  "scripts/lib/sonar-syntax-rules.mjs",
200
12
  "scripts/lib/sonar-way.mjs"
201
13
  ]
@@ -2,12 +2,12 @@
2
2
  // size-growth rule compares the working file with.
3
3
  import path from 'node:path';
4
4
  import { existsSync } from 'node:fs';
5
- import { runGit } from './lib.mjs';
6
- import { mergeBase } from './merge-base.mjs';
7
- import { withoutGitLocalEnv } from '../../lib/git.mjs';
5
+ import { runGit } from '@starci/hfs/runtime/scripts/api/git/lib.mjs';
6
+ import { mergeBase } from '@starci/hfs/runtime/scripts/api/git/merge-base.mjs';
7
+ import { withoutGitLocalEnv } from '@starci/hfs/runtime/scripts/lib/git.mjs';
8
8
  import { lineCount } from '../../lib/line-count.mjs';
9
- import { readEnv } from '../../lib/env.mjs';
10
- import { folded } from '../../lib/event-contract.mjs';
9
+ import { readEnv } from '@starci/hfs/runtime/scripts/lib/env.mjs';
10
+ import { folded } from '@starci/hfs/runtime/scripts/lib/event-contract.mjs';
11
11
 
12
12
  const ok = (result) => !result.error && result.status === 0;
13
13
  const pathKey = (value) => process.platform === 'win32' ? value.toLowerCase() : value;
@@ -13,12 +13,12 @@
13
13
  // A graph that cannot be built (no tsconfig, unresolvable import, invalid declaration) is an error: a check that cannot run is
14
14
  // never a pass, so `projectGraph` throws the machine's own message and the lint run stops.
15
15
  import fs from 'node:fs';
16
- import { checkArchitecture } from './architecture/index.mjs';
17
- import { openHfs } from './slots.mjs';
18
- import { pathFindings } from './path-findings.mjs';
19
- import { lsFiles } from '../api/git/ls-files.mjs';
20
- import { posixPath } from '../lib/path-key.mjs';
21
- import { onLintSurface } from './architecture/surface.mjs';
16
+ import { checkArchitecture } from '@starci/hfs/runtime/scripts/hfs/architecture/index.mjs';
17
+ import { openHfs } from '@starci/hfs/runtime/scripts/hfs/slots.mjs';
18
+ import { pathFindings } from '@starci/hfs/runtime/scripts/hfs/path-findings.mjs';
19
+ import { lsFiles } from '@starci/hfs/runtime/scripts/api/git/ls-files.mjs';
20
+ import { posixPath } from '@starci/hfs/runtime/scripts/lib/path-key.mjs';
21
+ import { onLintSurface } from '@starci/hfs/runtime/scripts/hfs/architecture/surface.mjs';
22
22
 
23
23
  const cache = new Map();
24
24
 
@@ -8,8 +8,8 @@
8
8
  // Both lint canons ship a byte copy of this file in runtime/ and build their rules with it.
9
9
  import path from 'node:path';
10
10
  import { projectGraph } from './project-graph.mjs';
11
- import { posixPath } from '../lib/path-key.mjs';
12
- import { belongsTo, codeOf } from './architecture/surface.mjs';
11
+ import { posixPath } from '@starci/hfs/runtime/scripts/lib/path-key.mjs';
12
+ import { belongsTo, codeOf } from '@starci/hfs/runtime/scripts/hfs/architecture/surface.mjs';
13
13
 
14
14
  /**
15
15
  * A rule reporting the graph findings of `codes` on the linted file.
@@ -23,7 +23,7 @@ export const projectRule = ({ enforcer, runtimeRoot, hfsOf }) => {
23
23
  create(context) {
24
24
  const hfs = hfsOf(context);
25
25
  const rel = posixPath(path.relative(hfs.repoRoot, context.filename));
26
- if (rel.startsWith('..')) return {};
26
+ if (rel.startsWith('@starci/hfs/runtime/scripts')) return {};
27
27
  const { byFile } = projectGraph({ repoRoot: hfs.repoRoot, runtimeRoot: context.settings?.starci?.injectedRuntimeRoot ?? runtimeRoot, injectedTypeScript: context.settings?.starci?.injectedTypeScript?.() });
28
28
  const mine = (byFile.get(rel) ?? []).filter((finding) => belongsTo(enforcer, finding));
29
29
  return {