@starci/eslint-canon-fe 8.2.15 → 8.2.17

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,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 8.2.17 - 2026-10-14
4
+
5
+ - Fixed: `dead-exports` (`HFS_UNUSED_EXPORT`) counts an import by another public entry the slot declares in `entries` as a use: a `graphql/{queries,mutations}/types/<x>.ts` export its operation file `query-<x>.ts`/`mutation-<x>.ts` imports is part of that operation's signature and is no longer reported. A barrel or any other non-entry file of the owner still does not count, so an operation reached only through a re-export of `modules/api/index.ts` stays dead.
6
+
7
+ ## 8.2.16 - 2026-10-13
8
+
9
+ - Changed: the heroicons family is the one application icon set again (owner ruling 2026-10-13): `heroicons-is-the-glyph-vendor` admits exactly `@heroicons/react/24/outline`, `@heroicons/react/16/solid` and the matching `@starci/heroicons` subpaths (read from the fe-stack `icons` concern), and refuses Phosphor and every other glyph catalogue, a package the catalog forbids included; `one-icon-set` (8.2.15) is gone. Only the Icon leaf and the toast module import a glyph. The bundled runtime mirror carries the fe-stack catalog and the canon pins with `@heroicons/react` 2.2.0 and `@starci/heroicons` 0.3.3.
10
+
3
11
  ## 8.2.15 - 2026-10-13
4
12
 
5
13
  - Changed: carry the runtime mirror of HFS manifest 3.0.0 (one front-end standard for the lite and the full edition, owner ruling 2026-10-13) and the canon pins for Grammar 0.9.14, HFS 4.2.14, jest-preset 2.2.7 and CLI 1.2.14.
package/icon.mjs CHANGED
@@ -13,7 +13,7 @@
13
13
  */
14
14
 
15
15
  import { isClassAttribute, staticText } from "./lib/ast.mjs"
16
- import { canonicalPackages, forbiddingConcern, packageNameOf } from "./lib/fe-stack.mjs"
16
+ import { canonicalPackages } from "./lib/fe-stack.mjs"
17
17
  import { hfsOf } from "./lib/hfs.mjs"
18
18
  import { fileOf, inSlot, isComponentFile, isProductSource, kindOfFile, roleOfFile } from "./lib/scope.mjs"
19
19
 
@@ -45,11 +45,15 @@ const GLYPH_PACKAGES = [
45
45
  /** Package-name signal for a glyph catalogue not yet listed explicitly. */
46
46
  const GLYPH_PACKAGE_NAME = /(?:icon|glyph|lucide|feather|tabler|fortawesome)/i
47
47
 
48
+ /** The two optical families of the heroicons family: the 24px outline heading cut and the 16px solid micro cut. */
49
+ const GLYPH_CUTS = ["24/outline", "16/solid"]
50
+
48
51
  /**
49
- * True when an import names the one application icon set (fe-stack `icons`, `@phosphor-icons/react`), subpaths included
50
- * (`@phosphor-icons/react/dist/ssr` is its server-component entry). Read from the catalog, so the set is named once.
52
+ * The closed glyph surface: each package of the one application icon set (fe-stack `icons`: upstream `@heroicons/react`,
53
+ * used first, and StarCi's custom-only `@starci/heroicons` for the glyphs it lacks) on each of the two cuts. Read from the
54
+ * catalog, so the set is named once.
51
55
  */
52
- const isCanonicalIconSet = (source) => canonicalPackages("icons").includes(packageNameOf(source) ?? "")
56
+ const glyphSurface = () => canonicalPackages("icons").flatMap((name) => GLYPH_CUTS.map((cut) => `${name}/${cut}`))
53
57
 
54
58
  /**
55
59
  * True when the file is the entry (slot role `entry`) of the component owner named `owner` in the layer `kind`.
@@ -107,19 +111,18 @@ export const noVendorIconOutsideIconLeaf = {
107
111
  // -- ICON-7 ----------------------------------------------------------------------------------------
108
112
 
109
113
  /**
110
- * The icon leaf owns the map, but that ownership does not license a second glyph vocabulary: every glyph comes from the one
111
- * application icon set of the front-end stack (fe-stack `icons`). A glyph package the catalog forbids by name is
112
- * `fe-stack-import`'s finding; this rule refuses every other glyph catalogue (Heroicons, Iconify, ...), which no list can name
113
- * in advance.
114
+ * The icon leaf owns the map, but that ownership does not license a second glyph vocabulary: every glyph comes from the
115
+ * heroicons family on its two cuts. Phosphor, Iconify, Lucide and every other glyph catalogue are refused, including the
116
+ * ones no list can name in advance.
114
117
  */
115
- export const oneIconSet = {
118
+ export const heroiconsIsTheGlyphVendor = {
116
119
  meta: {
117
120
  type: "problem",
118
- docs: { description: "Product glyphs come only from the one application icon set of the front-end stack (`@phosphor-icons/react`)." },
121
+ docs: { description: "Only the Heroicons heading and micro families (`@heroicons/react`, then `@starci/heroicons`) may supply product glyphs." },
119
122
  schema: [],
120
123
  messages: {
121
124
  vendor:
122
- "`{{source}}` is a second glyph catalogue. The front end has one application icon set, {{canonical}}: two sets draw the same meaning with two strokes, two grids and two weights, and the screen looks assembled from parts. Take the glyph from {{canonical}} in the icon leaf.",
125
+ "`{{source}}` is outside StarCi's closed glyph surface ({{surface}}). Use upstream `@heroicons/react/24/outline` or `16/solid` when the icon exists; use the matching `@starci/heroicons` subpath only for a custom cut missing upstream, and add a missing glyph there. The StarCi package never re-exports upstream icons. Phosphor, Iconify and every other glyph catalogue are refused: two sets draw the same meaning with two strokes, two grids and two weights.",
123
126
  },
124
127
  },
125
128
  create(context) {
@@ -127,9 +130,9 @@ export const oneIconSet = {
127
130
  return {
128
131
  ImportDeclaration(node) {
129
132
  const source = node.source && node.source.value
130
- if (!isGlyphImport(source) || isCanonicalIconSet(source) || forbiddingConcern(source)) return
131
- const canonical = canonicalPackages("icons").map((name) => `\`${name}\``).join(", ")
132
- context.report({ node, messageId: "vendor", data: { source, canonical } })
133
+ const surface = glyphSurface()
134
+ if (!isGlyphImport(source) || surface.includes(String(source))) return
135
+ context.report({ node, messageId: "vendor", data: { source, surface: surface.map((name) => `\`${name}\``).join(", ") } })
133
136
  },
134
137
  }
135
138
  },
@@ -195,7 +198,7 @@ export const noDecorativeIconInMetricCell = {
195
198
  /** The rules this law contributes to the plugin. */
196
199
  export const rules = {
197
200
  "no-vendor-icon-outside-icon-leaf": noVendorIconOutsideIconLeaf,
198
- "one-icon-set": oneIconSet,
201
+ "heroicons-is-the-glyph-vendor": heroiconsIsTheGlyphVendor,
199
202
  "no-off-scale-glyph-size": noOffScaleGlyphSize,
200
203
  "no-decorative-icon-in-metric-cell": noDecorativeIconInMetricCell,
201
204
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@starci/eslint-canon-fe",
3
- "version": "8.2.15",
3
+ "version": "8.2.17",
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",
@@ -14,8 +14,13 @@ purpose: >-
14
14
  pins:
15
15
  # --- @starci packages. Every @starci package is a PUBLISHED npm package (install: registry): a product repository
16
16
  # installs the exact pinned version from the npm registry in the root and every workspace package.json, never `file:`.
17
- # @starci/heroicons has no pin since 1.0.0-alpha.13: the application icon set is @phosphor-icons/react (fe-stack.yaml
18
- # icons) and eslint-canon-fe one-icon-set refuses every other glyph catalogue, so no product repository installs it.
17
+ '@starci/heroicons':
18
+ version: 0.3.4
19
+ group: starci
20
+ install: registry
21
+ side: fe
22
+ source: packages/heroicons/package.json
23
+ why: 'StarCi custom Heroicons-compatible cuts; eslint-canon-fe (icon.mjs) admits @starci/heroicons/24/outline and /16/solid as icon sources, so an app that uses them gets this exact version.'
19
24
  '@starci/grammar':
20
25
  version: 0.9.14
21
26
  group: starci
@@ -24,14 +29,14 @@ pins:
24
29
  source: packages/grammar/package.json
25
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.'
26
31
  '@starci/eslint-canon-be':
27
- version: 3.2.16
32
+ version: 3.2.18
28
33
  group: starci
29
34
  install: registry
30
35
  side: be
31
36
  source: packages/eslint/be/package.json
32
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.'
33
38
  '@starci/eslint-canon-fe':
34
- version: 8.2.15
39
+ version: 8.2.17
35
40
  group: starci
36
41
  install: registry
37
42
  side: fe
@@ -71,14 +76,14 @@ pins:
71
76
  source: packages/test-world/package.json
72
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.'
73
78
  '@starci/cli':
74
- version: 1.2.14
79
+ version: 1.2.16
75
80
  group: starci
76
81
  install: registry
77
82
  side: both
78
83
  source: packages/cli/package.json
79
84
  why: 'the only StarCi command package; product repositories install it for starci app, while @starci/hfs remains its pinned transitive implementation.'
80
85
  '@starci/hfs':
81
- version: 4.2.14
86
+ version: 4.2.16
82
87
  group: starci
83
88
  install: registry
84
89
  side: both
@@ -360,11 +365,11 @@ pins:
360
365
  group: framework
361
366
  side: fe
362
367
  why: 'the fan-out emitter behind the socket side-effect component (fe-stack realtime); version read from the starci-academy package-lock on 2026-10-13.'
363
- '@phosphor-icons/react':
364
- version: 2.1.10
368
+ '@heroicons/react':
369
+ version: 2.2.0
365
370
  group: ui
366
371
  side: fe
367
- why: 'the one application icon set (fe-stack icons); version read from the starci-academy package-lock on 2026-10-13.'
372
+ why: 'the base of the one application icon set (fe-stack icons, with @starci/heroicons for the glyphs it lacks); eslint-canon-fe (icon.mjs) admits @heroicons/react/24/outline and /16/solid.'
368
373
  'next-themes':
369
374
  version: 0.4.6
370
375
  group: ui
@@ -99,11 +99,14 @@ concerns:
99
99
  why: the grammar renderers over HeroUI and Tailwind; no second UI kit and no CSS-in-JS.
100
100
  - id: icons
101
101
  tier: core
102
- packages: ['@phosphor-icons/react']
102
+ packages: ['@heroicons/react', '@starci/heroicons']
103
103
  home: [fe.components]
104
104
  pattern: FE-ICON
105
- forbids: [react-icons, lucide-react, '@iconify/react', '@gravity-ui/icons', '@tabler/icons-react', '@fortawesome/react-fontawesome']
106
- why: one application icon set.
105
+ forbids: ['@phosphor-icons/react', react-icons, lucide-react, '@iconify/react', '@gravity-ui/icons', '@tabler/icons-react', '@fortawesome/react-fontawesome']
106
+ why: >-
107
+ one application icon set, the heroicons family (owner ruling 2026-10-13), on the 24/outline and 16/solid cuts. @heroicons/react
108
+ is the base set and is used first; @starci/heroicons holds only the glyphs heroicons lacks (brand or domain glyphs drawn in
109
+ heroicons style), never duplicates a heroicons glyph, and a missing glyph is added to it.
107
110
  - id: theme
108
111
  tier: core
109
112
  packages: [next-themes]
@@ -309,8 +309,3 @@ removed:
309
309
  name: anonymousActions
310
310
  use: 'the front end holds no Server Action (R243 FE_SERVER_ACTION_FORBIDDEN), so no slot lists anonymous ones'
311
311
  since: 1.0.0-alpha.13
312
- - id: lint-heroicons-is-the-glyph-vendor
313
- kind: vocabulary
314
- name: heroicons-is-the-glyph-vendor
315
- use: 'the eslint-fe rule is one-icon-set: the application icon set is @phosphor-icons/react (knowledge/hfs/fe-stack.yaml icons), imported only by the Icon leaf; the grammar Icon takes whatever glyph the app supplies'
316
- since: 1.0.0-alpha.13
@@ -9,7 +9,10 @@
9
9
  *
10
10
  * Owner = every graph.ownerRoots unit whose tier is not `app` and whose public entry file is in the graph (index.ts or
11
11
  * index.tsx, a package's src/index.ts). The `entries` its slot declares (slot data: a second public entry file of the owner) are further
12
- * public entries of the same owner, judged exactly like the entry. The exported names of an entry are its named exports, `export { a as b }`,
12
+ * public entries of the same owner, judged like the entry, with one addition: a name another declared entry of the owner
13
+ * imports (not re-exports) is used, because it is part of that entry's public signature (an operation file
14
+ * `graphql/queries/query-<x>.ts` typing its request and answer with `graphql/queries/types/<x>.ts`). A barrel or any other
15
+ * non-entry file of the owner still does not count. The exported names of an entry are its named exports, `export { a as b }`,
13
16
  * `export { x } from`, declarations with `export`, and `default` for `export default`. `export *` is refused by owners.mjs
14
17
  * and contributes no name here.
15
18
  *
@@ -330,11 +333,22 @@ const unusedExportViolation = (publicEntry, name, line, owner) => ({
330
333
  message: `${publicEntry} exports ${name}, but no production file outside ${owner.root || 'the repository root'} imports it; remove the export (only a unit role spec, a fixture builder, a test world file, or an integration spec of this integration's own provider folder counts besides production files).`,
331
334
  });
332
335
 
333
- /** The unused-export violations and the export count of one public entry of an owner. */
334
- const publicEntryExports = (context, key, owner, publicEntry) => {
336
+ /** Adds to `used` what another declared entry of the same owner imports from `publicEntry`: that entry's signature makes it public. */
337
+ const addSiblingEntryUses = (context, publicEntry, declared, used) => {
338
+ for (const edge of context.edgesTo.get(publicEntry) ?? []) {
339
+ if (edge.reexport || edge.from === publicEntry || !declared.has(edge.from)) continue;
340
+ const bindings = bindingsOf(context.ts, edge.edge.declaration);
341
+ if (bindings.all) used.all = true;
342
+ for (const pair of bindings.pairs) used.names.add(pair.imported);
343
+ }
344
+ };
345
+
346
+ /** The unused-export violations and the export count of one public entry of an owner (`declared`: its slot's extra entries). */
347
+ const publicEntryExports = (context, key, owner, publicEntry, declared) => {
335
348
  const names = exportedNames(context.ts, context.graph.files.get(publicEntry).sourceFile);
336
349
  const used = consumedNames(context, publicEntry, key, 0, new Set([publicEntry]));
337
350
  addReexportedUses(context, key, publicEntry, used);
351
+ if (declared.has(publicEntry)) addSiblingEntryUses(context, publicEntry, declared, used);
338
352
  const violations = [...names]
339
353
  .filter(([name]) => !(used.all || used.names.has(name)))
340
354
  .map(([name, line]) => unusedExportViolation(publicEntry, name, line, owner));
@@ -351,8 +365,9 @@ const ownerExportFindings = (context, config) => {
351
365
  const entry = entryOf(graph, config, key, owner);
352
366
  if (!entry) continue;
353
367
  owners += 1;
354
- for (const publicEntry of [entry, ...extraEntries(graph, entry)]) {
355
- const found = publicEntryExports(context, key, owner, publicEntry);
368
+ const declared = new Set(extraEntries(graph, entry));
369
+ for (const publicEntry of [entry, ...declared]) {
370
+ const found = publicEntryExports(context, key, owner, publicEntry, declared);
356
371
  exports += found.exports;
357
372
  violations.push(...found.violations);
358
373
  }