@starci/eslint-canon-be 3.4.56 → 3.5.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.
- package/CHANGELOG.md +9 -1
- package/LICENSE +1 -1
- package/README.md +7 -1
- package/package.json +15 -3
- package/runtime/knowledge/grammars/index.yaml +14 -23
- package/runtime/knowledge/hfs/canon-pins.yaml +23 -23
- package/runtime/knowledge/hfs/fe-stack.yaml +1 -1
- package/runtime/knowledge/hfs/rules.yaml +83 -60
- package/runtime/scripts/hfs/rule-catalog.mjs +2 -2
- package/runtime/scripts/lib/grammar-lint.mjs +16 -3
- package/runtime/scripts/lib/package-at.mjs +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 3.5.0 - 2026-10-27
|
|
4
|
+
|
|
5
|
+
- Changed: the bundled runtime copies follow the retirement of `@starci/cli`: the bundled canon pins replace the retired `@starci/cli` with `starci-harness` 1.1.0-alpha.1 (`source: cli/package.json`), the one command line a product installs for `starci app`, and follow the harness packages (Grammar family 0.14.0, hfs 4.9.0, canon-fe 9.3.0, canon-be 3.5.0); the runtime finds an app's `starci` bin in its installed `starci-harness`. No rule changes.
|
|
6
|
+
|
|
7
|
+
## 3.4.57 - 2026-10-27
|
|
8
|
+
|
|
9
|
+
- Changed: the bundled runtime copy follows the two-grammars ruling: the Grammar catalog declares `core` and `offset-pop` only, and the canon pins follow the harness packages. The spec fixture app selects `core`. No rule changes.
|
|
10
|
+
|
|
3
11
|
## 3.4.56 - 2026-10-27
|
|
4
12
|
|
|
5
|
-
- Changed:
|
|
13
|
+
- Changed: licensed MIT (was UNLICENSED); the package metadata names the repository, homepage and bugs so npm can attach provenance. No rule or behaviour changed.
|
|
6
14
|
|
|
7
15
|
## 3.4.55 - 2026-10-26
|
|
8
16
|
|
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -120,7 +120,7 @@ the first-statement proof.
|
|
|
120
120
|
A subscription provider may have one GET handler beside the one POST. Its first statement calls a declared domain verifier
|
|
121
121
|
and it echoes exactly that result, for example `const challenge = this.verifier.challenge(query); return challenge`.
|
|
122
122
|
The awaited form is required for an async verifier. GET has no intake and no other computed response. Both handlers carry
|
|
123
|
-
the signed-webhook public reason and strict rate tier. See `
|
|
123
|
+
the signed-webhook public reason and strict rate tier. See `contexts/code/be/webhooks.md` for the full Meta-style
|
|
124
124
|
door, receipt and reactor file tree.
|
|
125
125
|
|
|
126
126
|
## Companion
|
|
@@ -147,3 +147,9 @@ ESLint 9+ (flat config), Node 20.9+.
|
|
|
147
147
|
Every rule of this plugin is an enforcer of one HFS rule. The relation (rule id -> HFS rule -> catalogued Vietnamese why code)
|
|
148
148
|
lives in exactly one place, `knowledge/hfs/rules.yaml` (`enforcers`), and `scripts/checks/check-hfs-rules.mjs` refuses a
|
|
149
149
|
rule of this plugin that no catalog entry names. There is no second table here.
|
|
150
|
+
|
|
151
|
+
## The runtime copy
|
|
152
|
+
|
|
153
|
+
`runtime/` holds the StarCi runtime files the rules import (the slot manifest and view, the project graph and the
|
|
154
|
+
architecture machine it runs, the Sonar syntax rules), byte for byte at their runtime paths. It is committed source of
|
|
155
|
+
this package, edited in place ([packages/README.md](../README.md) says how the bundled copies move together).
|
package/package.json
CHANGED
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@starci/eslint-canon-be",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.0",
|
|
4
4
|
"description": "The StarCi back-end lint canon: every rule its laws publish, gathered as one flat-config plugin.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
|
+
"author": "starci183",
|
|
8
|
+
"homepage": "https://github.com/starci183/starci-harness/tree/main/packages/eslint-canon-be#readme",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/starci183/starci-harness.git",
|
|
12
|
+
"directory": "packages/eslint-canon-be"
|
|
13
|
+
},
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/starci183/starci-harness/issues"
|
|
16
|
+
},
|
|
7
17
|
"private": false,
|
|
8
18
|
"exports": {
|
|
9
19
|
".": "./index.mjs"
|
|
@@ -29,8 +39,6 @@
|
|
|
29
39
|
"access": "public"
|
|
30
40
|
},
|
|
31
41
|
"scripts": {
|
|
32
|
-
"prepack": "node ../../hfs/prep-runtime.mjs",
|
|
33
|
-
"pretest": "node ../../hfs/prep-runtime.mjs",
|
|
34
42
|
"test": "node --test \"*.spec.mjs\""
|
|
35
43
|
},
|
|
36
44
|
"keywords": [
|
|
@@ -44,5 +52,9 @@
|
|
|
44
52
|
"@typescript-eslint/parser": "^8.70.0",
|
|
45
53
|
"eslint-plugin-sonarjs": "4.2.1",
|
|
46
54
|
"eslint-plugin-unicorn": "65.0.0"
|
|
55
|
+
},
|
|
56
|
+
"devDependencies": {
|
|
57
|
+
"eslint": "^9.18.0",
|
|
58
|
+
"typescript": "^6.0.3"
|
|
47
59
|
}
|
|
48
60
|
}
|
|
@@ -24,7 +24,7 @@ guidance:
|
|
|
24
24
|
Do not treat this catalog as selecting a default Grammar family. Family choice belongs to the
|
|
25
25
|
current design specification and its explicit sides.fe.grammar declaration.
|
|
26
26
|
rationale: |
|
|
27
|
-
Silent fallback to
|
|
27
|
+
Silent fallback to a family would invent product direction and override an absent/ambiguous design.
|
|
28
28
|
- id: verify-before-use
|
|
29
29
|
requirement: |
|
|
30
30
|
Before applying snapshot APIs or recorded gaps, inspect the selected repository's package
|
|
@@ -47,11 +47,11 @@ topics:
|
|
|
47
47
|
Generated DNA snapshot of the `@starci/grammar/common` public entry: custom properties,
|
|
48
48
|
the 110 renderers of its registry, their classes, stamped rule ids and recorded gaps. The DNA owns the observed package
|
|
49
49
|
version and source inventory. Common supplies anatomy, not colour. The snapshot is drift-checked.
|
|
50
|
-
- id:
|
|
51
|
-
path:
|
|
52
|
-
title:
|
|
50
|
+
- id: core
|
|
51
|
+
path: core/index.yaml
|
|
52
|
+
title: Core Grammar
|
|
53
53
|
summary: |
|
|
54
|
-
Historical snapshot of the
|
|
54
|
+
Historical snapshot of the core family — DNA, idioms, playbook (including composing the
|
|
55
55
|
0.5.0 forms, overlays and navigation chrome) and family boundaries.
|
|
56
56
|
- id: offset-pop
|
|
57
57
|
path: offset-pop/index.yaml
|
|
@@ -61,16 +61,7 @@ topics:
|
|
|
61
61
|
shadow, one pink decision accent with a text-safe accent for text — with DNA, idioms, a
|
|
62
62
|
mobile-first playbook for playful learning or consumer apps, and family boundaries including two
|
|
63
63
|
decisions flagged for the family owner.
|
|
64
|
-
- id: heritage
|
|
65
|
-
path: heritage/DNA.yaml
|
|
66
|
-
title: Heritage Grammar
|
|
67
|
-
summary: |
|
|
68
|
-
Generated snapshot of the Heritage family's parity declaration, arrangement, scoped tokens and Common renderers.
|
|
69
64
|
families:
|
|
70
|
-
- id: heritage
|
|
71
|
-
title: heritage
|
|
72
|
-
contractRef: common
|
|
73
|
-
packageSnapshot: heritage/DNA.yaml
|
|
74
65
|
- id: common
|
|
75
66
|
title: common
|
|
76
67
|
componentContract:
|
|
@@ -85,18 +76,18 @@ families:
|
|
|
85
76
|
(`defineGrammarFamily`), not a family that ships a palette, so `authority`, `reusableStyle`,
|
|
86
77
|
`productComposition` and `index` have nothing to name here. Universal semantics, renderer anatomy,
|
|
87
78
|
state and accessibility remain owned by knowledge/ui.
|
|
88
|
-
- id:
|
|
89
|
-
title:
|
|
79
|
+
- id: core
|
|
80
|
+
title: core
|
|
90
81
|
contractRef: common
|
|
91
82
|
lint:
|
|
92
|
-
package: '@starci/eslint-grammar-
|
|
93
|
-
factory:
|
|
83
|
+
package: '@starci/eslint-grammar-core'
|
|
84
|
+
factory: coreGrammarConfig
|
|
94
85
|
prefix: starci-grammar
|
|
95
|
-
authority:
|
|
96
|
-
packageSnapshot:
|
|
97
|
-
reusableStyle:
|
|
98
|
-
productComposition:
|
|
99
|
-
index:
|
|
86
|
+
authority: core/family.yaml
|
|
87
|
+
packageSnapshot: core/DNA.yaml
|
|
88
|
+
reusableStyle: core/idioms.yaml
|
|
89
|
+
productComposition: core/playbook.yaml
|
|
90
|
+
index: core/index.yaml
|
|
100
91
|
- id: offset-pop
|
|
101
92
|
title: offset-pop
|
|
102
93
|
contractRef: common
|
|
@@ -21,7 +21,7 @@ pins:
|
|
|
21
21
|
install: registry
|
|
22
22
|
side: fe
|
|
23
23
|
source: packages/heroicons/package.json
|
|
24
|
-
why: 'StarCi custom Heroicons-compatible cuts; eslint-grammar-
|
|
24
|
+
why: 'StarCi custom Heroicons-compatible cuts; eslint-grammar-core (icon.mjs) admits @starci/heroicons/24/outline and /16/solid as icon sources, so an app that uses them gets this exact version.'
|
|
25
25
|
'@starci/event-stream':
|
|
26
26
|
version: 0.1.0
|
|
27
27
|
group: starci
|
|
@@ -30,61 +30,61 @@ pins:
|
|
|
30
30
|
source: packages/event-stream/package.json
|
|
31
31
|
why: 'the one server-sent-events client of every front end (fe-stack event-stream, owner:event-stream-package): the transport client layer (modules/api/sse/clients) creates one instance for the app with the bearer token source and the stream operations follow on it; it carries Last-Event-ID resume, the capped doubling backoff, the heartbeat timeout, the single 401 renewal and the useSWRSubscription adapter, so no app keeps a hand-written reader.'
|
|
32
32
|
'@starci/grammar':
|
|
33
|
-
version: 0.
|
|
33
|
+
version: 0.14.0
|
|
34
34
|
group: starci
|
|
35
35
|
install: registry
|
|
36
36
|
side: fe
|
|
37
37
|
source: packages/grammar/package.json
|
|
38
38
|
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.'
|
|
39
39
|
'@starci/eslint-canon-be':
|
|
40
|
-
version: 3.
|
|
40
|
+
version: 3.5.0
|
|
41
41
|
group: starci
|
|
42
42
|
install: registry
|
|
43
43
|
side: be
|
|
44
|
-
source: packages/eslint
|
|
44
|
+
source: packages/eslint-canon-be/package.json
|
|
45
45
|
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.'
|
|
46
46
|
'@starci/eslint-canon-fe':
|
|
47
|
-
version: 9.
|
|
47
|
+
version: 9.3.0
|
|
48
48
|
group: starci
|
|
49
49
|
install: registry
|
|
50
50
|
side: fe
|
|
51
|
-
source: packages/eslint
|
|
51
|
+
source: packages/eslint-canon-fe/package.json
|
|
52
52
|
why: 'the front-end ESLint canon: `loadHfs(import.meta.url)` of fe/eslint.config.mjs finds the app-root hfs.json (kind app) and gives every linted file the view of the fe 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; the front end has no tests (FE_NO_TESTS R97 in hfs) and no-vietnamese-in-source (R91) applies.'
|
|
53
|
-
'@starci/eslint-grammar-
|
|
54
|
-
version: 0.
|
|
53
|
+
'@starci/eslint-grammar-core':
|
|
54
|
+
version: 0.14.0
|
|
55
55
|
group: starci
|
|
56
56
|
install: registry
|
|
57
57
|
side: fe
|
|
58
|
-
source: packages/eslint
|
|
58
|
+
source: packages/eslint-grammar-core/package.json
|
|
59
59
|
why: 'the StarCi Grammar component API lint, versioned with @starci/grammar; front ends compose this family package with the universal FE canon.'
|
|
60
60
|
'@starci/eslint-grammar-offset-pop':
|
|
61
|
-
version: 0.
|
|
61
|
+
version: 0.14.0
|
|
62
62
|
group: starci
|
|
63
63
|
install: registry
|
|
64
64
|
side: fe
|
|
65
|
-
source: packages/eslint
|
|
65
|
+
source: packages/eslint-grammar-offset-pop/package.json
|
|
66
66
|
why: 'the Offset Pop Grammar component API lint, versioned with @starci/grammar; its shared component contract comes from the StarCi family lint without copying rules.'
|
|
67
67
|
'@starci/stylelint-canon':
|
|
68
|
-
version: 2.0
|
|
68
|
+
version: 2.1.0
|
|
69
69
|
group: starci
|
|
70
70
|
install: registry
|
|
71
71
|
side: fe
|
|
72
|
-
source: packages/stylelint/package.json
|
|
72
|
+
source: packages/stylelint-canon/package.json
|
|
73
73
|
why: 'the front-end stylelint canon: no-class-selector refuses a compound class selector (`div.card`); the brand layer accepts `--font-sans` and `--font-mono`; status-contrast measures the HeroUI soft pairs per theme; brand-layer-shape reads the shared :root,.light,.dark block and the info soft pair; appTokens come from loadAppTokens(import.meta.url) for the managed one-line stylelint.config.mjs.'
|
|
74
74
|
'@starci/tsconfig':
|
|
75
|
-
version: 2.0.
|
|
75
|
+
version: 2.0.8
|
|
76
76
|
group: starci
|
|
77
77
|
install: registry
|
|
78
78
|
side: both
|
|
79
79
|
source: packages/tsconfig/package.json
|
|
80
80
|
'@starci/prettier-config':
|
|
81
|
-
version: 1.0.
|
|
81
|
+
version: 1.0.5
|
|
82
82
|
group: starci
|
|
83
83
|
install: registry
|
|
84
84
|
side: both
|
|
85
85
|
source: packages/prettier-config/package.json
|
|
86
86
|
'@starci/jest-preset':
|
|
87
|
-
version: 2.3.
|
|
87
|
+
version: 2.3.7
|
|
88
88
|
group: starci
|
|
89
89
|
install: registry
|
|
90
90
|
side: be
|
|
@@ -97,20 +97,20 @@ pins:
|
|
|
97
97
|
side: be
|
|
98
98
|
source: packages/test-world/package.json
|
|
99
99
|
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.'
|
|
100
|
-
'
|
|
101
|
-
version: 1.
|
|
100
|
+
'starci-harness':
|
|
101
|
+
version: 1.1.0-alpha.1
|
|
102
102
|
group: starci
|
|
103
103
|
install: registry
|
|
104
104
|
side: both
|
|
105
|
-
source:
|
|
106
|
-
why: 'the
|
|
105
|
+
source: cli/package.json
|
|
106
|
+
why: 'the one StarCi command line (bins starci and starci-harness): a product repository installs it for starci app, which it runs in-process through its exact @starci/hfs dependency, and its codegen loads starci-harness/input-bounds.'
|
|
107
107
|
'@starci/hfs':
|
|
108
|
-
version: 4.
|
|
108
|
+
version: 4.9.0
|
|
109
109
|
group: starci
|
|
110
110
|
install: registry
|
|
111
111
|
side: both
|
|
112
112
|
source: packages/hfs/package.json
|
|
113
|
-
why: 'the
|
|
113
|
+
why: 'the app implementation starci-harness runs for starci app; it carries the generated runtime slice read by starci app commands.'
|
|
114
114
|
# --- tooling
|
|
115
115
|
typescript:
|
|
116
116
|
version: 5.9.3
|
|
@@ -406,7 +406,7 @@ pins:
|
|
|
406
406
|
version: 2.2.0
|
|
407
407
|
group: ui
|
|
408
408
|
side: fe
|
|
409
|
-
why: 'the base of the one application icon set (fe-stack icons, with @starci/heroicons for the glyphs it lacks); eslint-grammar-
|
|
409
|
+
why: 'the base of the one application icon set (fe-stack icons, with @starci/heroicons for the glyphs it lacks); eslint-grammar-core (icon.mjs) admits @heroicons/react/24/outline and /16/solid.'
|
|
410
410
|
'@dicebear/core':
|
|
411
411
|
version: 10.4.0
|
|
412
412
|
group: ui
|
|
@@ -251,7 +251,7 @@ concerns:
|
|
|
251
251
|
why: the canon lint and format configuration.
|
|
252
252
|
- id: grammar-lint
|
|
253
253
|
tier: opt
|
|
254
|
-
packages: ['@starci/eslint-grammar-
|
|
254
|
+
packages: ['@starci/eslint-grammar-core', '@starci/eslint-grammar-offset-pop']
|
|
255
255
|
home: [fe.source-root-pinned]
|
|
256
256
|
pattern: FE-RULE-OWNERSHIP
|
|
257
257
|
forbids: []
|
|
@@ -29,7 +29,7 @@ gates:
|
|
|
29
29
|
enforcerKinds:
|
|
30
30
|
eslint-be: a rule of the plugin @starci/eslint-canon-be (id without the plugin prefix)
|
|
31
31
|
eslint-fe: a universal rule of @starci/eslint-canon-fe (id without the plugin prefix)
|
|
32
|
-
eslint-grammar-
|
|
32
|
+
eslint-grammar-core: a selected Grammar family rule sharing the common component API, resolved through the family canon binding (id without the plugin prefix; FE-RULE-OWNERSHIP)
|
|
33
33
|
stylelint: a rule of the @starci/stylelint-canon package
|
|
34
34
|
machine: a check of the architecture machine (scripts/hfs/architecture), which reads the import graph
|
|
35
35
|
hfs: a check of the hfs CLI that reads the repository tree, configuration, contracts or catalogs
|
|
@@ -1273,49 +1273,49 @@ rules:
|
|
|
1273
1273
|
- {kind: stylelint, id: breakpoint-scale}
|
|
1274
1274
|
- {kind: stylelint, id: source-resolves}
|
|
1275
1275
|
- {kind: eslint-fe, id: no-raw-brand-value}
|
|
1276
|
-
- {kind: eslint-grammar-
|
|
1276
|
+
- {kind: eslint-grammar-core, id: no-fractional-step}
|
|
1277
1277
|
- {kind: eslint-fe, id: no-arbitrary-value}
|
|
1278
|
-
- {kind: eslint-grammar-
|
|
1279
|
-
- {kind: eslint-grammar-
|
|
1280
|
-
- {kind: eslint-grammar-
|
|
1281
|
-
- {kind: eslint-grammar-
|
|
1278
|
+
- {kind: eslint-grammar-core, id: no-hand-rolled-heading}
|
|
1279
|
+
- {kind: eslint-grammar-core, id: no-unresolved-token-class}
|
|
1280
|
+
- {kind: eslint-grammar-core, id: no-heading-tag-outside-heading-component}
|
|
1281
|
+
- {kind: eslint-grammar-core, id: status-text-uses-soft-foreground}
|
|
1282
1282
|
proves:
|
|
1283
1283
|
- {path: packages/stylelint/source-resolves.spec.mjs, editions: [lite, full], codes: [FE_STYLE_SOURCE_UNRESOLVED]}
|
|
1284
1284
|
- {path: packages/eslint/fe/brand-values.spec.mjs, editions: [lite, full], codes: [FE_STYLE_TOKEN_ONLY]}
|
|
1285
1285
|
- {path: packages/eslint/fe/tokens.spec.mjs, editions: [lite, full], codes: [FE_STYLE_TOKEN_ONLY]}
|
|
1286
|
-
- {path: packages/eslint/grammar-
|
|
1287
|
-
- {path: packages/eslint/grammar-
|
|
1288
|
-
- {path: packages/eslint/grammar-
|
|
1286
|
+
- {path: packages/eslint/grammar-core/status-colors.spec.mjs, editions: [lite, full], codes: [FE_STYLE_TOKEN_ONLY]}
|
|
1287
|
+
- {path: packages/eslint/grammar-core/typography.spec.mjs, editions: [lite, full], codes: [FE_STYLE_TOKEN_ONLY]}
|
|
1288
|
+
- {path: packages/eslint/grammar-core/tokens.spec.mjs, editions: [lite, full], codes: [FE_STYLE_TOKEN_ONLY]}
|
|
1289
1289
|
exemplifiedBy:
|
|
1290
1290
|
- {path: packages/hfs/templates/fe/skeleton-lite/apps/web/src/app/globals.css, edition: lite}
|
|
1291
1291
|
- {path: packages/hfs/templates/fe/skeleton/apps/app/src/app/globals.css, edition: full}
|
|
1292
1292
|
- {path: packages/stylelint/source-resolves.spec.mjs, editions: [lite, full], codes: [FE_STYLE_SOURCE_UNRESOLVED]}
|
|
1293
1293
|
- {path: packages/eslint/fe/brand-values.spec.mjs, editions: [lite, full], codes: [FE_STYLE_TOKEN_ONLY]}
|
|
1294
1294
|
- {path: packages/eslint/fe/tokens.spec.mjs, editions: [lite, full], codes: [FE_STYLE_TOKEN_ONLY]}
|
|
1295
|
-
- {path: packages/eslint/grammar-
|
|
1296
|
-
- {path: packages/eslint/grammar-
|
|
1297
|
-
- {path: packages/eslint/grammar-
|
|
1295
|
+
- {path: packages/eslint/grammar-core/status-colors.spec.mjs, editions: [lite, full], codes: [FE_STYLE_TOKEN_ONLY]}
|
|
1296
|
+
- {path: packages/eslint/grammar-core/typography.spec.mjs, editions: [lite, full], codes: [FE_STYLE_TOKEN_ONLY]}
|
|
1297
|
+
- {path: packages/eslint/grammar-core/tokens.spec.mjs, editions: [lite, full], codes: [FE_STYLE_TOKEN_ONLY]}
|
|
1298
1298
|
witness:
|
|
1299
1299
|
- {path: packages/stylelint/source-resolves.spec.mjs, editions: [lite, full], codes: [FE_STYLE_SOURCE_UNRESOLVED]}
|
|
1300
1300
|
- {path: packages/eslint/fe/brand-values.spec.mjs, editions: [lite, full], codes: [FE_STYLE_TOKEN_ONLY]}
|
|
1301
1301
|
- {path: packages/eslint/fe/tokens.spec.mjs, editions: [lite, full], codes: [FE_STYLE_TOKEN_ONLY]}
|
|
1302
|
-
- {path: packages/eslint/grammar-
|
|
1303
|
-
- {path: packages/eslint/grammar-
|
|
1304
|
-
- {path: packages/eslint/grammar-
|
|
1302
|
+
- {path: packages/eslint/grammar-core/status-colors.spec.mjs, editions: [lite, full], codes: [FE_STYLE_TOKEN_ONLY]}
|
|
1303
|
+
- {path: packages/eslint/grammar-core/typography.spec.mjs, editions: [lite, full], codes: [FE_STYLE_TOKEN_ONLY]}
|
|
1304
|
+
- {path: packages/eslint/grammar-core/tokens.spec.mjs, editions: [lite, full], codes: [FE_STYLE_TOKEN_ONLY]}
|
|
1305
1305
|
- id: R62
|
|
1306
1306
|
code: "FE_NATIVE_FORM_CONTROL"
|
|
1307
1307
|
editions: [lite, full]
|
|
1308
1308
|
docs: [docs/architecture.md#r62, knowledge/patterns/fe/index.yaml#FE-RULE-OWNERSHIP]
|
|
1309
1309
|
proves:
|
|
1310
|
-
- {path: packages/eslint/grammar-
|
|
1310
|
+
- {path: packages/eslint/grammar-core/r62-structural-elements-coverage.spec.mjs, editions: [lite, full], codes: [FE_NATIVE_FORM_CONTROL]}
|
|
1311
1311
|
- {path: packages/eslint/fe/r62-native-controls-coverage.spec.mjs, editions: [lite, full]}
|
|
1312
1312
|
exemplifiedBy:
|
|
1313
|
-
- {path: packages/eslint/grammar-
|
|
1313
|
+
- {path: packages/eslint/grammar-core/r62-structural-elements-coverage.spec.mjs, editions: [lite, full], codes: [FE_NATIVE_FORM_CONTROL]}
|
|
1314
1314
|
- {path: packages/hfs/templates/fe/skeleton-lite/apps/web/src/features/pages/AppHomePage/component.tsx, edition: lite}
|
|
1315
1315
|
- {path: packages/hfs/templates/fe/skeleton/apps/__app__/src/components/blocks/SignInForm/component.tsx, edition: full}
|
|
1316
1316
|
- {path: packages/eslint/fe/r62-native-controls-coverage.spec.mjs, editions: [lite, full]}
|
|
1317
1317
|
witness:
|
|
1318
|
-
- {path: packages/eslint/grammar-
|
|
1318
|
+
- {path: packages/eslint/grammar-core/r62-structural-elements-coverage.spec.mjs, editions: [lite, full], codes: [FE_NATIVE_FORM_CONTROL]}
|
|
1319
1319
|
- {path: packages/eslint/fe/r62-native-controls-coverage.spec.mjs, edition: lite, codes: [FE_NATIVE_FORM_CONTROL, FE_NATIVE_IMAGE]}
|
|
1320
1320
|
- {path: packages/eslint/fe/r62-native-controls-coverage.spec.mjs, edition: full, codes: [FE_NATIVE_FORM_CONTROL, FE_NATIVE_IMAGE]}
|
|
1321
1321
|
law: "Product tiers compose the selected Grammar renderers for form controls, images and structural elements that the Grammar owns; they never reproduce those renderers with raw HTML."
|
|
@@ -1325,7 +1325,7 @@ rules:
|
|
|
1325
1325
|
enforcers:
|
|
1326
1326
|
- {kind: eslint-fe, id: no-native-form-control}
|
|
1327
1327
|
- {kind: eslint-fe, id: no-native-img}
|
|
1328
|
-
- {kind: eslint-grammar-
|
|
1328
|
+
- {kind: eslint-grammar-core, id: no-raw-structural-element}
|
|
1329
1329
|
- {kind: eslint-fe, id: image-has-size}
|
|
1330
1330
|
|
|
1331
1331
|
- id: R63
|
|
@@ -1878,7 +1878,7 @@ rules:
|
|
|
1878
1878
|
- {kind: eslint-fe, id: base-props-atom}
|
|
1879
1879
|
- {kind: eslint-fe, id: base-import-pair}
|
|
1880
1880
|
- {kind: eslint-fe, id: no-data-status-shape}
|
|
1881
|
-
- {kind: eslint-grammar-
|
|
1881
|
+
- {kind: eslint-grammar-core, id: slot-status-through-slotview}
|
|
1882
1882
|
- {kind: eslint-fe, id: presentational-purity}
|
|
1883
1883
|
- {kind: eslint-fe, id: connected-block-has-presentational-twin}
|
|
1884
1884
|
- {kind: eslint-fe, id: no-resting-twin-component}
|
|
@@ -1891,18 +1891,18 @@ rules:
|
|
|
1891
1891
|
editions: [lite, full]
|
|
1892
1892
|
docs: [docs/architecture.md#r92, knowledge/patterns/fe/index.yaml#FE-RULE-OWNERSHIP]
|
|
1893
1893
|
proves:
|
|
1894
|
-
- {path: packages/eslint/grammar-
|
|
1894
|
+
- {path: packages/eslint/grammar-core/r92-slot-status-coverage.spec.mjs, editions: [lite, full], codes: [FE_COMPONENT_API]}
|
|
1895
1895
|
- {path: packages/eslint/fe/r92-fetch-barrel.spec.mjs, editions: [lite, full]}
|
|
1896
1896
|
- {path: packages/eslint/fe/r92-component-surface-coverage.spec.mjs, editions: [lite, full]}
|
|
1897
1897
|
- {path: packages/eslint/fe/r56-r92-graph-coverage.spec.mjs, editions: [lite, full]}
|
|
1898
1898
|
exemplifiedBy:
|
|
1899
|
-
- {path: packages/eslint/grammar-
|
|
1899
|
+
- {path: packages/eslint/grammar-core/r92-slot-status-coverage.spec.mjs, editions: [lite, full], codes: [FE_COMPONENT_API]}
|
|
1900
1900
|
- {path: packages/hfs/templates/fe/skeleton/apps/__app__/src/components/blocks/SignInForm/component.tsx, editions: [lite, full]}
|
|
1901
1901
|
- {path: packages/eslint/fe/r92-fetch-barrel.spec.mjs, editions: [lite, full]}
|
|
1902
1902
|
- {path: packages/eslint/fe/r92-component-surface-coverage.spec.mjs, editions: [lite, full]}
|
|
1903
1903
|
- {path: packages/eslint/fe/r56-r92-graph-coverage.spec.mjs, editions: [lite, full]}
|
|
1904
1904
|
witness:
|
|
1905
|
-
- {path: packages/eslint/grammar-
|
|
1905
|
+
- {path: packages/eslint/grammar-core/r92-slot-status-coverage.spec.mjs, editions: [lite, full], codes: [FE_COMPONENT_API]}
|
|
1906
1906
|
- {path: packages/eslint/fe/r92-fetch-barrel.spec.mjs, editions: [lite, full]}
|
|
1907
1907
|
- {path: packages/eslint/fe/r92-component-surface-coverage.spec.mjs, editions: [lite, full]}
|
|
1908
1908
|
- {path: packages/eslint/fe/r56-r92-graph-coverage.spec.mjs, editions: [lite, full]}
|
|
@@ -1913,29 +1913,29 @@ rules:
|
|
|
1913
1913
|
gates: [pre-commit, settle, land, ci]
|
|
1914
1914
|
failureCodes: ["FE_VENDOR_BOUNDARY", "ARCH_GRAMMAR_CONTRACT_INVALID", "ARCH_GRAMMAR_EXPORT_BYPASS"]
|
|
1915
1915
|
enforcers:
|
|
1916
|
-
- {kind: eslint-grammar-
|
|
1917
|
-
- {kind: eslint-grammar-
|
|
1918
|
-
- {kind: eslint-grammar-
|
|
1919
|
-
- {kind: eslint-grammar-
|
|
1920
|
-
- {kind: eslint-grammar-
|
|
1921
|
-
- {kind: eslint-grammar-
|
|
1922
|
-
- {kind: eslint-grammar-
|
|
1916
|
+
- {kind: eslint-grammar-core, id: no-vendor-icon-outside-icon-leaf}
|
|
1917
|
+
- {kind: eslint-grammar-core, id: heroicons-is-the-glyph-vendor}
|
|
1918
|
+
- {kind: eslint-grammar-core, id: no-off-scale-glyph-size}
|
|
1919
|
+
- {kind: eslint-grammar-core, id: no-icon-size-class}
|
|
1920
|
+
- {kind: eslint-grammar-core, id: destructive-menu-entry-needs-danger-tone}
|
|
1921
|
+
- {kind: eslint-grammar-core, id: no-decorative-icon-in-metric-cell}
|
|
1922
|
+
- {kind: eslint-grammar-core, id: vendor-primitive-has-named-owner}
|
|
1923
1923
|
- {kind: eslint-fe, id: grammar-entry}
|
|
1924
1924
|
- {kind: machine, id: grammar, at: scripts/hfs/architecture/frontend-grammar.mjs}
|
|
1925
1925
|
editions: [lite, full]
|
|
1926
1926
|
docs: ["docs/code-pattern-enforcement.md#r93-vendor-and-grammar-ownership", knowledge/patterns/fe/index.yaml#FE-RULE-OWNERSHIP]
|
|
1927
1927
|
templateNa: "Vendor boundary violations and installed Grammar package contracts are checked against consumer ownership; no managed template scaffolds a vendor install or a forbidden import."
|
|
1928
1928
|
proves:
|
|
1929
|
-
- packages/eslint/grammar-
|
|
1929
|
+
- packages/eslint/grammar-core/r93-vendor-coverage.spec.mjs
|
|
1930
1930
|
- packages/eslint/fe/r93-grammar-ownership.spec.mjs
|
|
1931
|
-
- packages/eslint/grammar-
|
|
1931
|
+
- packages/eslint/grammar-core/menu-entries.spec.mjs
|
|
1932
1932
|
exemplifiedBy:
|
|
1933
|
-
- {path: packages/eslint/grammar-
|
|
1933
|
+
- {path: packages/eslint/grammar-core/r93-vendor-coverage.spec.mjs, editions: [lite, full]}
|
|
1934
1934
|
- {path: packages/eslint/fe/r93-grammar-ownership.spec.mjs, editions: [lite, full]}
|
|
1935
|
-
- {path: packages/eslint/grammar-
|
|
1935
|
+
- {path: packages/eslint/grammar-core/menu-entries.spec.mjs, editions: [lite, full]}
|
|
1936
1936
|
witness:
|
|
1937
|
-
- {path: packages/eslint/grammar-
|
|
1938
|
-
- {path: packages/eslint/grammar-
|
|
1937
|
+
- {path: packages/eslint/grammar-core/menu-entries.spec.mjs, editions: [lite, full], codes: [FE_VENDOR_BOUNDARY]}
|
|
1938
|
+
- {path: packages/eslint/grammar-core/r93-vendor-coverage.spec.mjs, editions: [lite, full], codes: [FE_VENDOR_BOUNDARY]}
|
|
1939
1939
|
- {path: packages/eslint/fe/r93-grammar-ownership.spec.mjs, editions: [lite, full], codes: [ARCH_GRAMMAR_CONTRACT_INVALID, ARCH_GRAMMAR_EXPORT_BYPASS]}
|
|
1940
1940
|
- id: R94
|
|
1941
1941
|
code: "FE_SLOT_FILE_ROLE"
|
|
@@ -5006,20 +5006,20 @@ rules:
|
|
|
5006
5006
|
enforcers:
|
|
5007
5007
|
- {kind: eslint-fe, id: no-copy-in-call}
|
|
5008
5008
|
- {kind: eslint-fe, id: no-alert}
|
|
5009
|
-
- {kind: eslint-grammar-
|
|
5009
|
+
- {kind: eslint-grammar-core, id: no-inline-svg-outside-brand-mark-leaf}
|
|
5010
5010
|
editions: [lite, full]
|
|
5011
5011
|
docs: [docs/quality-bar.md#r286, knowledge/patterns/fe/index.yaml#FE-RULE-OWNERSHIP]
|
|
5012
5012
|
exemplifiedBy:
|
|
5013
5013
|
- {path: packages/eslint/fe/translation.spec.mjs, editions: [lite, full], codes: [FE_COPY_IN_CALL, FE_NO_ALERT]}
|
|
5014
|
-
- {path: packages/eslint/grammar-
|
|
5014
|
+
- {path: packages/eslint/grammar-core/icon.spec.mjs, editions: [lite, full], codes: [FE_ICON_INLINE_SVG]}
|
|
5015
5015
|
- {path: packages/hfs/templates/fe/skeleton/apps/__app__/src/components/leaves/Icon/index.tsx, editions: [lite, full]}
|
|
5016
5016
|
- {path: packages/hfs/templates/fe/skeleton/apps/__app__/src/modules/toast, editions: [lite, full]}
|
|
5017
5017
|
proves:
|
|
5018
5018
|
- {path: packages/eslint/fe/translation.spec.mjs, editions: [lite, full], codes: [FE_COPY_IN_CALL, FE_NO_ALERT]}
|
|
5019
|
-
- {path: packages/eslint/grammar-
|
|
5019
|
+
- {path: packages/eslint/grammar-core/icon.spec.mjs, editions: [lite, full], codes: [FE_ICON_INLINE_SVG]}
|
|
5020
5020
|
witness:
|
|
5021
5021
|
- {path: packages/eslint/fe/translation.spec.mjs, editions: [lite, full], codes: [FE_COPY_IN_CALL, FE_NO_ALERT]}
|
|
5022
|
-
- {path: packages/eslint/grammar-
|
|
5022
|
+
- {path: packages/eslint/grammar-core/icon.spec.mjs, editions: [lite, full], codes: [FE_ICON_INLINE_SVG]}
|
|
5023
5023
|
|
|
5024
5024
|
- id: R287
|
|
5025
5025
|
code: "FE_CALLBACK_SHAPE"
|
|
@@ -5476,19 +5476,19 @@ rules:
|
|
|
5476
5476
|
gates: [pre-commit, settle, land, ci]
|
|
5477
5477
|
failureCodes: ["FE_APP_SHELL_FRAME"]
|
|
5478
5478
|
enforcers:
|
|
5479
|
-
- {kind: eslint-grammar-
|
|
5479
|
+
- {kind: eslint-grammar-core, id: app-shell-frame}
|
|
5480
5480
|
editions: [lite, full]
|
|
5481
5481
|
docs:
|
|
5482
5482
|
- knowledge/patterns/fe/index.yaml#FE-RULE-OWNERSHIP
|
|
5483
5483
|
- {path: knowledge/ui/composition/app-shell.yaml, editions: [lite, full]}
|
|
5484
5484
|
proves:
|
|
5485
|
-
- {path: packages/eslint/grammar-
|
|
5485
|
+
- {path: packages/eslint/grammar-core/app-shell.spec.mjs, editions: [lite, full], codes: [FE_APP_SHELL_FRAME]}
|
|
5486
5486
|
exemplifiedBy:
|
|
5487
|
-
- {path: packages/eslint/grammar-
|
|
5487
|
+
- {path: packages/eslint/grammar-core/app-shell.spec.mjs, editions: [lite, full], codes: [FE_APP_SHELL_FRAME]}
|
|
5488
5488
|
- {path: examples/full-app/fe/apps/app/src/features/layouts/ShopLayout/component.tsx, edition: full}
|
|
5489
5489
|
- {path: examples/lite-app/fe/apps/web/src/features/layouts/WorkspaceLayout/component.tsx, edition: lite}
|
|
5490
5490
|
witness:
|
|
5491
|
-
- {path: packages/eslint/grammar-
|
|
5491
|
+
- {path: packages/eslint/grammar-core/app-shell.spec.mjs, editions: [lite, full], codes: [FE_APP_SHELL_FRAME]}
|
|
5492
5492
|
templateNa: "The app composes its shell from product destinations and identity; full and lite example shells provide the reference."
|
|
5493
5493
|
- id: R314
|
|
5494
5494
|
code: "FE_NAVBAR_CONTROL_SIZE"
|
|
@@ -5497,19 +5497,19 @@ rules:
|
|
|
5497
5497
|
gates: [pre-commit, settle, land, ci]
|
|
5498
5498
|
failureCodes: ["FE_NAVBAR_CONTROL_SIZE"]
|
|
5499
5499
|
enforcers:
|
|
5500
|
-
- {kind: eslint-grammar-
|
|
5500
|
+
- {kind: eslint-grammar-core, id: navbar-control-size}
|
|
5501
5501
|
editions: [lite, full]
|
|
5502
5502
|
docs:
|
|
5503
5503
|
- knowledge/patterns/fe/index.yaml#FE-RULE-OWNERSHIP
|
|
5504
5504
|
- {path: knowledge/ui/composition/app-shell.yaml, editions: [lite, full]}
|
|
5505
5505
|
proves:
|
|
5506
|
-
- {path: packages/eslint/grammar-
|
|
5506
|
+
- {path: packages/eslint/grammar-core/app-shell.spec.mjs, editions: [lite, full], codes: [FE_NAVBAR_CONTROL_SIZE]}
|
|
5507
5507
|
exemplifiedBy:
|
|
5508
|
-
- {path: packages/eslint/grammar-
|
|
5508
|
+
- {path: packages/eslint/grammar-core/app-shell.spec.mjs, editions: [lite, full], codes: [FE_NAVBAR_CONTROL_SIZE]}
|
|
5509
5509
|
- {path: examples/full-app/fe/packages/ecommerce-ui/src/branches/WorkspaceNavbar/component.tsx, edition: full}
|
|
5510
5510
|
- {path: examples/lite-app/fe/apps/web/src/components/branches/Navbar/component.tsx, edition: lite}
|
|
5511
5511
|
witness:
|
|
5512
|
-
- {path: packages/eslint/grammar-
|
|
5512
|
+
- {path: packages/eslint/grammar-core/app-shell.spec.mjs, editions: [lite, full], codes: [FE_NAVBAR_CONTROL_SIZE]}
|
|
5513
5513
|
templateNa: "The app composes its shell from product destinations and identity; full and lite example shells provide the reference."
|
|
5514
5514
|
- id: R315
|
|
5515
5515
|
code: "FE_NAVBAR_CLUSTER"
|
|
@@ -5518,19 +5518,19 @@ rules:
|
|
|
5518
5518
|
gates: [pre-commit, settle, land, ci]
|
|
5519
5519
|
failureCodes: ["FE_NAVBAR_CLUSTER"]
|
|
5520
5520
|
enforcers:
|
|
5521
|
-
- {kind: eslint-grammar-
|
|
5521
|
+
- {kind: eslint-grammar-core, id: navbar-cluster}
|
|
5522
5522
|
editions: [lite, full]
|
|
5523
5523
|
docs:
|
|
5524
5524
|
- knowledge/patterns/fe/index.yaml#FE-RULE-OWNERSHIP
|
|
5525
5525
|
- {path: knowledge/ui/composition/app-shell.yaml, editions: [lite, full]}
|
|
5526
5526
|
proves:
|
|
5527
|
-
- {path: packages/eslint/grammar-
|
|
5527
|
+
- {path: packages/eslint/grammar-core/app-shell.spec.mjs, editions: [lite, full], codes: [FE_NAVBAR_CLUSTER]}
|
|
5528
5528
|
exemplifiedBy:
|
|
5529
|
-
- {path: packages/eslint/grammar-
|
|
5529
|
+
- {path: packages/eslint/grammar-core/app-shell.spec.mjs, editions: [lite, full], codes: [FE_NAVBAR_CLUSTER]}
|
|
5530
5530
|
- {path: examples/full-app/fe/packages/ecommerce-ui/src/branches/WorkspaceNavbar/component.tsx, edition: full}
|
|
5531
5531
|
- {path: examples/lite-app/fe/apps/web/src/components/branches/Navbar/component.tsx, edition: lite}
|
|
5532
5532
|
witness:
|
|
5533
|
-
- {path: packages/eslint/grammar-
|
|
5533
|
+
- {path: packages/eslint/grammar-core/app-shell.spec.mjs, editions: [lite, full], codes: [FE_NAVBAR_CLUSTER]}
|
|
5534
5534
|
templateNa: "The app composes its shell from product destinations and identity; full and lite example shells provide the reference."
|
|
5535
5535
|
- id: R316
|
|
5536
5536
|
code: "FE_APP_SHELL_BOTTOM_TABS"
|
|
@@ -5539,19 +5539,19 @@ rules:
|
|
|
5539
5539
|
gates: [pre-commit, settle, land, ci]
|
|
5540
5540
|
failureCodes: ["FE_APP_SHELL_BOTTOM_TABS"]
|
|
5541
5541
|
enforcers:
|
|
5542
|
-
- {kind: eslint-grammar-
|
|
5542
|
+
- {kind: eslint-grammar-core, id: no-shell-bottom-tabs}
|
|
5543
5543
|
editions: [lite, full]
|
|
5544
5544
|
docs:
|
|
5545
5545
|
- knowledge/patterns/fe/index.yaml#FE-RULE-OWNERSHIP
|
|
5546
5546
|
- {path: knowledge/ui/composition/app-shell.yaml, editions: [lite, full]}
|
|
5547
5547
|
proves:
|
|
5548
|
-
- {path: packages/eslint/grammar-
|
|
5548
|
+
- {path: packages/eslint/grammar-core/app-shell.spec.mjs, editions: [lite, full], codes: [FE_APP_SHELL_BOTTOM_TABS]}
|
|
5549
5549
|
exemplifiedBy:
|
|
5550
|
-
- {path: packages/eslint/grammar-
|
|
5550
|
+
- {path: packages/eslint/grammar-core/app-shell.spec.mjs, editions: [lite, full], codes: [FE_APP_SHELL_BOTTOM_TABS]}
|
|
5551
5551
|
- {path: examples/full-app/fe/apps/app/src/features/layouts/ShopLayout/component.tsx, edition: full}
|
|
5552
5552
|
- {path: examples/lite-app/fe/apps/web/src/features/layouts/WorkspaceLayout/component.tsx, edition: lite}
|
|
5553
5553
|
witness:
|
|
5554
|
-
- {path: packages/eslint/grammar-
|
|
5554
|
+
- {path: packages/eslint/grammar-core/app-shell.spec.mjs, editions: [lite, full], codes: [FE_APP_SHELL_BOTTOM_TABS]}
|
|
5555
5555
|
templateNa: "The app composes its shell from product destinations and identity; full and lite example shells provide the reference."
|
|
5556
5556
|
- id: R317
|
|
5557
5557
|
code: "FE_NAVBAR_CREATE"
|
|
@@ -5560,19 +5560,19 @@ rules:
|
|
|
5560
5560
|
gates: [pre-commit, settle, land, ci]
|
|
5561
5561
|
failureCodes: ["FE_NAVBAR_CREATE"]
|
|
5562
5562
|
enforcers:
|
|
5563
|
-
- {kind: eslint-grammar-
|
|
5563
|
+
- {kind: eslint-grammar-core, id: no-navbar-create}
|
|
5564
5564
|
editions: [lite, full]
|
|
5565
5565
|
docs:
|
|
5566
5566
|
- knowledge/patterns/fe/index.yaml#FE-RULE-OWNERSHIP
|
|
5567
5567
|
- {path: knowledge/ui/composition/app-shell.yaml, editions: [lite, full]}
|
|
5568
5568
|
proves:
|
|
5569
|
-
- {path: packages/eslint/grammar-
|
|
5569
|
+
- {path: packages/eslint/grammar-core/app-shell.spec.mjs, editions: [lite, full], codes: [FE_NAVBAR_CREATE]}
|
|
5570
5570
|
exemplifiedBy:
|
|
5571
|
-
- {path: packages/eslint/grammar-
|
|
5571
|
+
- {path: packages/eslint/grammar-core/app-shell.spec.mjs, editions: [lite, full], codes: [FE_NAVBAR_CREATE]}
|
|
5572
5572
|
- {path: examples/full-app/fe/packages/ecommerce-ui/src/branches/WorkspaceNavbar/component.tsx, edition: full}
|
|
5573
5573
|
- {path: examples/lite-app/fe/apps/web/src/components/branches/Navbar/component.tsx, edition: lite}
|
|
5574
5574
|
witness:
|
|
5575
|
-
- {path: packages/eslint/grammar-
|
|
5575
|
+
- {path: packages/eslint/grammar-core/app-shell.spec.mjs, editions: [lite, full], codes: [FE_NAVBAR_CREATE]}
|
|
5576
5576
|
templateNa: "The app composes its shell from product destinations and identity; full and lite example shells provide the reference."
|
|
5577
5577
|
- id: R318
|
|
5578
5578
|
code: "FE_NESTED_VARIANT"
|
|
@@ -5664,3 +5664,26 @@ rules:
|
|
|
5664
5664
|
source: owner
|
|
5665
5665
|
quote: "The size of the buttons and controls is uneven; the teacher thinks height = 40px (h-10) should be fixed for every button, switch, input, tabs and so on, what do you think? (translated from Vietnamese)"
|
|
5666
5666
|
ruling: "One 40px control height is the default of every standalone control (owner ruling control-height-40): Grammar draws it, an app omits size, sm is for a nested item or dense toolbar row, lg only for a landing hero call to action, and controls of one row share one size."
|
|
5667
|
+
- id: R322
|
|
5668
|
+
code: "FE_CHIP_LABEL_CASE"
|
|
5669
|
+
law: "The label of a status chip (a StatusDot with text, a Badge) starts with an uppercase letter, so every chip of an app reads in one vocabulary."
|
|
5670
|
+
kinds: [lint, codemod]
|
|
5671
|
+
gates: [pre-commit, settle, land, ci]
|
|
5672
|
+
failureCodes: ["FE_CHIP_LABEL_CASE"]
|
|
5673
|
+
enforcers:
|
|
5674
|
+
- {kind: eslint-grammar-core, id: chip-label-starts-uppercase}
|
|
5675
|
+
editions: [lite, full]
|
|
5676
|
+
docs: [knowledge/patterns/fe/index.yaml#FE-RULE-OWNERSHIP]
|
|
5677
|
+
templateNa: "A template states no chip label; the words are the app's."
|
|
5678
|
+
proves:
|
|
5679
|
+
- packages/eslint/grammar-core/chip-label.spec.mjs
|
|
5680
|
+
exemplifiedBy:
|
|
5681
|
+
- {path: packages/eslint/grammar-core/chip-label.spec.mjs, editions: [lite, full], codes: [FE_CHIP_LABEL_CASE]}
|
|
5682
|
+
witness:
|
|
5683
|
+
- {path: packages/eslint/grammar-core/chip-label.spec.mjs, editions: [lite, full], codes: [FE_CHIP_LABEL_CASE]}
|
|
5684
|
+
cases:
|
|
5685
|
+
- id: case-1
|
|
5686
|
+
date: "2026-10-27"
|
|
5687
|
+
source: owner
|
|
5688
|
+
quote: "A chip label starts uppercase."
|
|
5689
|
+
ruling: "The label of a status chip starts with an uppercase letter (owner ruling chip-label-uppercase); StatusDot capitalises a text label it renders, and the lint refuses a lowercase literal label at its source."
|
|
@@ -12,7 +12,7 @@ import { fail } from './slot-errors.mjs';
|
|
|
12
12
|
|
|
13
13
|
const HFS_RULES_FILE = 'knowledge/hfs/rules.yaml';
|
|
14
14
|
const RULE_GATES = Object.freeze(['pre-commit', 'pre-push', 'settle', 'land', 'ci', 'sonar', 'runtime']);
|
|
15
|
-
const ENFORCER_FAMILIES = Object.freeze(['eslint-be', 'eslint-fe', 'eslint-grammar-
|
|
15
|
+
const ENFORCER_FAMILIES = Object.freeze(['eslint-be', 'eslint-fe', 'eslint-grammar-core', 'stylelint', 'machine', 'hfs', 'work-validate', 'sonar', 'runtime']);
|
|
16
16
|
const RULE_KINDS = Object.freeze(['codemod', 'lint', 'check', 'design']);
|
|
17
17
|
const FINDING_CODE = /^[A-Z][A-Z0-9]*(_[A-Z0-9]+)+$/;
|
|
18
18
|
const ENFORCER_ID = /^[a-z][a-z0-9]*(-[a-z0-9]+)*$/;
|
|
@@ -346,7 +346,7 @@ export function loadRuleCatalog({ root = skillRoot, file = path.join(root, HFS_R
|
|
|
346
346
|
/** The catalogued why code of a lint finding's rule id (`starci-be/<id>`, `starci-fe/<id>`), or undefined. */
|
|
347
347
|
lintCode: (ruleId) => {
|
|
348
348
|
const [plugin, id] = String(ruleId ?? '').split('/');
|
|
349
|
-
const kind = (plugin === 'starci-be' && 'eslint-be') || (plugin === 'starci-fe' && 'eslint-fe') || (plugin === 'starci-grammar' && 'eslint-grammar-
|
|
349
|
+
const kind = (plugin === 'starci-be' && 'eslint-be') || (plugin === 'starci-fe' && 'eslint-fe') || (plugin === 'starci-grammar' && 'eslint-grammar-core') || null;
|
|
350
350
|
return kind ? list.find((rule) => rule.enforcers.some((enforcer) => enforcer.kind === kind && enforcer.id === id))?.code : undefined;
|
|
351
351
|
},
|
|
352
352
|
/** The rules one enforcer judges, e.g. forEnforcer('eslint-be', 'error-home'). */
|
|
@@ -4,14 +4,27 @@ import { parseYamlCached } from './yaml-cached.mjs';
|
|
|
4
4
|
|
|
5
5
|
const CATALOG_FILE = new URL('../../knowledge/grammars/index.yaml', import.meta.url);
|
|
6
6
|
|
|
7
|
+
function readCatalog() {
|
|
8
|
+
return parseYamlCached(fs.readFileSync(CATALOG_FILE, 'utf8'));
|
|
9
|
+
}
|
|
10
|
+
|
|
7
11
|
function selectedFamily(family) {
|
|
8
12
|
if (typeof family !== 'string' || !family.trim()) throw new Error('sides.fe.grammar must explicitly name the selected Grammar family');
|
|
9
|
-
const catalog =
|
|
13
|
+
const catalog = readCatalog();
|
|
10
14
|
const matches = (catalog.families ?? []).filter(entry => entry.id === family);
|
|
11
15
|
if (matches.length !== 1) throw new Error(`Grammar family ${family} has no declared lint contract in knowledge/grammars/index.yaml`);
|
|
12
16
|
return { catalog, selected: matches[0] };
|
|
13
17
|
}
|
|
14
18
|
|
|
19
|
+
/**
|
|
20
|
+
* Resolve a selection to its declared family id; only a catalog family id resolves, there are no aliases.
|
|
21
|
+
* @param {string} family - The id an app or caller names (sides.fe.grammar).
|
|
22
|
+
* @returns {{ id: string }} The declared family id.
|
|
23
|
+
*/
|
|
24
|
+
export function resolveGrammarFamily(family) {
|
|
25
|
+
return Object.freeze({ id: selectedFamily(family).selected.id });
|
|
26
|
+
}
|
|
27
|
+
|
|
15
28
|
/** The explicitly selected authored family entry; callers share the catalog lookup rather than inferring a family. */
|
|
16
29
|
export function grammarFamilyFor(family) {
|
|
17
30
|
return Object.freeze(selectedFamily(family).selected);
|
|
@@ -24,13 +37,13 @@ export function grammarLintFor(family) {
|
|
|
24
37
|
throw new Error(`Grammar family ${family} has no declared lint contract in knowledge/grammars/index.yaml`);
|
|
25
38
|
}
|
|
26
39
|
const lint = selected.lint;
|
|
27
|
-
if (lint.package === null) return Object.freeze({ family, package: null });
|
|
40
|
+
if (lint.package === null) return Object.freeze({ family: selected.id, package: null });
|
|
28
41
|
if (typeof lint.package !== 'string' || !lint.package.startsWith('@starci/eslint-grammar-')
|
|
29
42
|
|| typeof lint.factory !== 'string' || !/^[a-zA-Z][a-zA-Z0-9]*$/.test(lint.factory)
|
|
30
43
|
|| typeof lint.prefix !== 'string' || !/^[a-z][a-z0-9-]*$/.test(lint.prefix)) {
|
|
31
44
|
throw new Error(`Grammar family ${family} has an invalid lint contract in knowledge/grammars/index.yaml`);
|
|
32
45
|
}
|
|
33
|
-
return Object.freeze({ family, package: lint.package, factory: lint.factory, prefix: lint.prefix });
|
|
46
|
+
return Object.freeze({ family: selected.id, package: lint.package, factory: lint.factory, prefix: lint.prefix });
|
|
34
47
|
}
|
|
35
48
|
|
|
36
49
|
/** The selected family's shared component/export contract, resolved through its catalog reference. */
|
|
@@ -13,9 +13,9 @@ export const packageAt = (dir, name) => {
|
|
|
13
13
|
/** This runtime's own `starci` bin (packages/cli is the only package that declares one). */
|
|
14
14
|
const RUNTIME_STARCI_BIN = path.join(skillRoot, 'packages', 'cli', 'bin', 'starci.mjs');
|
|
15
15
|
|
|
16
|
-
/** The `starci` bin of the
|
|
16
|
+
/** The `starci` bin of the starci-harness that `dir` installs (a product runs its own pinned CLI), else this runtime's own. */
|
|
17
17
|
function starciBin(dir) {
|
|
18
|
-
const packageFile = packageAt(dir, '
|
|
18
|
+
const packageFile = packageAt(dir, 'starci-harness');
|
|
19
19
|
if (packageFile) {
|
|
20
20
|
try {
|
|
21
21
|
const { bin } = JSON.parse(fs.readFileSync(packageFile, 'utf8'));
|
|
@@ -50,13 +50,13 @@ export const loadTypescript = (...dirs) => {
|
|
|
50
50
|
};
|
|
51
51
|
|
|
52
52
|
/**
|
|
53
|
-
* The app's command line and the app implementation behind it: `bin` the `starci` bin of the app's installed
|
|
53
|
+
* The app's command line and the app implementation behind it: `bin` the `starci` bin of the app's installed starci-harness, else
|
|
54
54
|
* this runtime's packages/cli/bin/starci.mjs (starciBin); `dir` the @starci/hfs that answers
|
|
55
|
-
* `starci app` - the app's own install, else the one beside its
|
|
55
|
+
* `starci app` - the app's own install, else the one beside its starci-harness, else this runtime's packages/hfs - whose runtime
|
|
56
56
|
* slice the gate's base lint (scripts/gates/gate.mjs) and the READ digest (scripts/gates/read-digest.mjs) load in-process.
|
|
57
57
|
*/
|
|
58
58
|
export function hfsEntry(root) {
|
|
59
|
-
const cli = packageAt(root, '
|
|
59
|
+
const cli = packageAt(root, 'starci-harness');
|
|
60
60
|
const manifest = packageAt(root, '@starci/hfs') ?? (cli && packageAt(path.dirname(cli), '@starci/hfs'));
|
|
61
61
|
return { dir: manifest ? path.dirname(manifest) : path.join(skillRoot, 'packages', 'hfs'), bin: starciBin(root) };
|
|
62
62
|
}
|