@starci/eslint-canon-fe 8.4.11 → 8.4.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ## 8.4.13 - 2026-10-19
4
+ - Fixed: shared import classification selects an existing module file before virtual slot inference, so public auth barrels retain their resolved owner while impure redirect helpers remain refused.
5
+
3
6
  ## 8.4.11 - 2026-10-18
4
7
  - Changed: bundled canon pins follow @starci/hfs 4.7.5 and @starci/cli 1.7.5 for the managed Codecov coverage scope correction; canon rules are unchanged.
5
8
 
package/lib/scope.mjs CHANGED
@@ -7,6 +7,7 @@
7
7
  */
8
8
 
9
9
  import { dirname, join, resolve } from "node:path"
10
+ import ts from "typescript"
10
11
  import { hfsOf } from "./hfs.mjs"
11
12
  import { normalizePath } from "./path.mjs"
12
13
 
@@ -139,19 +140,26 @@ export const resolveImport = (context, specifier) => {
139
140
  }
140
141
 
141
142
  /**
142
- * The classification of the file an import specifier resolves to, trying the extensions a module file has. Null when the
143
- * specifier resolves to no path.
143
+ * The classification of an existing module file, resolving explicit files before extension and directory-index candidates.
144
+ * Virtual rule inputs with no existing candidate retain the path-only slot classification.
144
145
  *
145
146
  * @param {object} context - The ESLint rule context.
146
147
  * @param {string} specifier - The module specifier.
147
- * @returns {object | null} The slot classification (`{ slot, root, role, ... }`) of the first candidate a slot owns.
148
+ * @returns {object | null} The resolved file's owned slot classification, or the virtual-input classification when no file exists.
148
149
  */
149
150
  export const classifyImport = (context, specifier) => {
150
151
  const target = resolveImport(context, specifier)
151
152
  if (target === null) return null
152
153
  const hfs = hfsOf(context)
153
- // The specifier names no extension: try the ones a module file has and take the candidate a slot gives a role, else the first a slot owns.
154
- const owned = [`${target}.ts`, `${target}.tsx`, `${target}/index.ts`, `${target}/index.tsx`, target]
154
+ const candidates = [`${target}.ts`, `${target}.tsx`, `${target}/index.ts`, `${target}/index.tsx`, target]
155
+ // Match the owner helper's on-disk module order; a nonexistent auth.ts must not shadow auth/index.ts.
156
+ const existing = [target, ...candidates].find((candidate) => ts.sys.fileExists(candidate))
157
+ if (existing !== undefined) {
158
+ const found = hfs.classify(existing)
159
+ return found.slot && found.status === "owned" ? found : null
160
+ }
161
+ // RuleTester deliberately accepts virtual source paths; preserve its existing slot/role inference only without a real target.
162
+ const owned = candidates
155
163
  .map((candidate) => hfs.classify(candidate))
156
164
  .filter((found) => found.slot && found.status === "owned")
157
165
  return owned.find((found) => found.role) ?? owned[0] ?? null
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@starci/eslint-canon-fe",
3
- "version": "8.4.11",
3
+ "version": "8.4.13",
4
4
  "description": "The StarCi front-end lint canon: every rule its laws publish, gathered as one flat-config plugin and attached by one factory.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -29,14 +29,14 @@ pins:
29
29
  source: packages/grammar/package.json
30
30
  why: 'the grammar front ends read: the brand layer sets `--font-sans` and `--font-mono` and the grammar reads them; it carries the Input tel kind, the copyable and read-only Input, the IconButton disclosure props and count badge, ChatBubble, FillViewport, Textarea mentions and Enter-to-send, the leading PrimaryRailLayout rail, the plate-less Image, ListRow, the soft Alert, Progress steps, the floating primary IconButton, FlowGraph, the STATE-8 loading views and the bordered selectable TagGroup chips. The runtime source version wins for a @starci package.'
31
31
  '@starci/eslint-canon-be':
32
- version: 3.4.11
32
+ version: 3.4.13
33
33
  group: starci
34
34
  install: registry
35
35
  side: be
36
36
  source: packages/eslint/be/package.json
37
37
  why: 'the back-end ESLint canon: `loadHfs(import.meta.url)` of be/eslint.config.mjs finds the app-root hfs.json (kind app) and gives every linted file the view of the be side, and the project graph is built per side; its bundled runtime copies (slots, canon-pins, failure codes, the architecture machine) put .starcistacks and .sops.yaml at the app root; `starciBeConfig({ hfs: loadHfs(import.meta.url) })` is the typed factory and the BE-CONVENTION laws are its rules.'
38
38
  '@starci/eslint-canon-fe':
39
- version: 8.4.11
39
+ version: 8.4.13
40
40
  group: starci
41
41
  install: registry
42
42
  side: fe
@@ -76,14 +76,14 @@ pins:
76
76
  source: packages/test-world/package.json
77
77
  why: 'the shared e2e library of every back end (R47, R48), a devDependency of every back end: the warm stack behind toxiproxy, the network-edge fakes, the Nest boot, the typed useTestWorld handle, useSandbox for contract specs and the outage lock. Kafka is real own infra (the one digest-pinned apache/kafka KRaft image, a broker listener and proxy per slot, slot-prefixed topics, consumer groups and client ids) and Postgres is schema-per-context (a schema and a login role per context in a shared database). Each worker has its own data slot (<ns>_w<k>) with its own databases, Keycloak realm, leased Redis DB, bucket/collection/topic prefixes, fakes host, toxiproxy proxies and outage lock; a run provisions min(jest workers, workers cap, default 2) slots, and state file protocol 2 pairs exactly with @starci/jest-preset (TEST_WORLD_PAIR_MISMATCH otherwise). A modules world boots real peer apps beside its modules, world.apps.<name>.during(fn) is the outage of a peer app, w.keycloak.clientSecret(client) answers the run-generated secret of a confidential realm client, world.keycloak.events/sessions read the realm user events and live sessions, world.infra.postgresql.connection(name) takes one database connection down while the others serve, and world.resolve and scope.resolve take any Nest token. Every path a declaration names (`stack`, seeds, the realm, Dockerfiles) resolves from the app root (the directory of hfs.json); the globalSetup registers the path aliases as TypeScript resolves them. Its CLI main is exported at ./cli for starci app stack.'
78
78
  '@starci/cli':
79
- version: 1.7.5
79
+ version: 1.7.7
80
80
  group: starci
81
81
  install: registry
82
82
  side: both
83
83
  source: packages/cli/package.json
84
84
  why: 'the only StarCi command package; product repositories install it for starci app, while @starci/hfs remains its pinned transitive implementation.'
85
85
  '@starci/hfs':
86
- version: 4.7.5
86
+ version: 4.7.7
87
87
  group: starci
88
88
  install: registry
89
89
  side: both