@starci/eslint-grammar-core 0.21.33 → 0.21.35
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
|
+
## 0.21.35 - 2026-11-05
|
|
4
|
+
|
|
5
|
+
- Changed: version stamp only, with `@starci/grammar` 0.21.35; requires `@starci/eslint-canon-fe` 9.14.0. The runtime copies carry the `rulePacks` key of the declaration check, R16, R381 and R382, and the canon pins of `@starci/hfs` 5.11.0.
|
|
6
|
+
|
|
7
|
+
## 0.21.34 - 2026-11-05
|
|
8
|
+
|
|
9
|
+
- Changed: version stamp only, with `@starci/grammar` 0.21.34; requires `@starci/eslint-canon-fe` 9.13.16. The runtime copy of the canon pins names `@starci/hfs` 5.10.4.
|
|
10
|
+
|
|
3
11
|
## 0.21.33 - 2026-11-05
|
|
4
12
|
|
|
5
13
|
- Changed: version stamp, with `@starci/grammar` 0.21.33; requires `@starci/eslint-canon-fe` 9.13.15. The runtime copy of the canon pins names `@starci/hfs` 5.10.3.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@starci/eslint-grammar-core",
|
|
3
|
-
"version": "0.21.
|
|
3
|
+
"version": "0.21.35",
|
|
4
4
|
"description": "ESLint rules for the core Grammar's component, token and composition contracts.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"node": ">=22"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"@starci/eslint-canon-fe": "9.
|
|
44
|
+
"@starci/eslint-canon-fe": "9.14.0",
|
|
45
45
|
"eslint": ">=9",
|
|
46
46
|
"typescript": ">=5.9"
|
|
47
47
|
},
|
|
@@ -38,7 +38,7 @@ pins:
|
|
|
38
38
|
source: packages/next-data/package.json
|
|
39
39
|
why: 'the SWR data helpers of every front end (fe-stack data, owner:next-data-package): pollingRestart, the viewer and tenant key helpers, viewerSwrConfig and the viewer cache; each operation hook stays in the app and the package holds no component.'
|
|
40
40
|
'@starci/grammar':
|
|
41
|
-
version: 0.21.
|
|
41
|
+
version: 0.21.35
|
|
42
42
|
group: starci
|
|
43
43
|
install: registry
|
|
44
44
|
side: fe
|
|
@@ -52,28 +52,28 @@ pins:
|
|
|
52
52
|
source: packages/next-i18n/package.json
|
|
53
53
|
why: 'the next-intl stack of every front end (fe-stack i18n, owner:next-i18n-package): defineI18n over the locales of the app, the locale-negotiating proxy, the locale-aware navigation, the request config that loads the catalogs of the app and the locale read of the [locale] layout; the app keeps its message catalogs and writes none of the stack.'
|
|
54
54
|
'@starci/eslint-canon-be':
|
|
55
|
-
version: 3.
|
|
55
|
+
version: 3.18.0
|
|
56
56
|
group: starci
|
|
57
57
|
install: registry
|
|
58
58
|
side: be
|
|
59
59
|
source: packages/eslint-canon-be/package.json
|
|
60
60
|
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.'
|
|
61
61
|
'@starci/eslint-canon-fe':
|
|
62
|
-
version: 9.
|
|
62
|
+
version: 9.14.0
|
|
63
63
|
group: starci
|
|
64
64
|
install: registry
|
|
65
65
|
side: fe
|
|
66
66
|
source: packages/eslint-canon-fe/package.json
|
|
67
67
|
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.'
|
|
68
68
|
'@starci/eslint-grammar-core':
|
|
69
|
-
version: 0.21.
|
|
69
|
+
version: 0.21.35
|
|
70
70
|
group: starci
|
|
71
71
|
install: registry
|
|
72
72
|
side: fe
|
|
73
73
|
source: packages/eslint-grammar-core/package.json
|
|
74
74
|
why: 'the StarCi Grammar component API lint, versioned with @starci/grammar; front ends compose this family package with the universal FE canon.'
|
|
75
75
|
'@starci/eslint-grammar-offset-pop':
|
|
76
|
-
version: 0.21.
|
|
76
|
+
version: 0.21.35
|
|
77
77
|
group: starci
|
|
78
78
|
install: registry
|
|
79
79
|
side: fe
|
|
@@ -155,7 +155,7 @@ pins:
|
|
|
155
155
|
source: packages/mail/package.json
|
|
156
156
|
why: 'outgoing mail of a back end: a NestJS module and the Mailer port over SMTP (connect, greeting, socket and total timeouts, STARTTLS required by default, recipient, message and attachment checks, a shared SMTP target policy, coded errors, typed escaping render helpers returning { subject, text, html }), with @starci/mail/testing for its specs; the only importer of nodemailer (R90).'
|
|
157
157
|
'@starci/hfs':
|
|
158
|
-
version: 5.
|
|
158
|
+
version: 5.11.0
|
|
159
159
|
group: starci
|
|
160
160
|
install: registry
|
|
161
161
|
side: both
|
|
@@ -292,7 +292,7 @@ rules:
|
|
|
292
292
|
code: "HFS_TOOL_CONFIG_LOCAL"
|
|
293
293
|
editions: ["lite", "full"]
|
|
294
294
|
docs: ["docs/managed-tooling-coverage.md#local-tool-configuration"]
|
|
295
|
-
law: "Configs only call the factories; no local rules."
|
|
295
|
+
law: "Configs only call the factories; no local rules. An app's own lint rules come only through the rule packs of hfs.json rulePacks, which the canon factories load (R381, PROJECT-LINT-3)."
|
|
296
296
|
kinds: [check, codemod]
|
|
297
297
|
gates: [land, ci]
|
|
298
298
|
failureCodes: ["HFS_TOOL_CONFIG_LOCAL"]
|
|
@@ -6698,7 +6698,7 @@ rules:
|
|
|
6698
6698
|
- {path: packages/hfs/src/branch-profile.spec.mjs, editions: [lite, full]}
|
|
6699
6699
|
- id: R379
|
|
6700
6700
|
code: "LINT_RATCHET_RAISED"
|
|
6701
|
-
law: "On a branch whose profile runs lint as report, a commit never adds lint findings to a file it touches: each touched source file has no more ESLint error findings than at the base (the parent commit for the pre-commit hook, the merge-base with the pushed range or the remote branch, else HEAD^, for the pre-push hook and CI) and a new file has none, judged by linting both versions of the touched files through the side's installed config; the findings a file already carried stay report-only, and a ratchet violation blocks at any count."
|
|
6701
|
+
law: "On a branch whose profile runs lint as report, a commit never adds lint findings to a file it touches: each touched source file has no more ESLint error findings than at the base (the parent commit for the pre-commit hook, the merge-base with the pushed range or the remote branch, else HEAD^, for the pre-push hook and CI) and a new file has none, judged by the lint records of the base commit's committed cache and of the run when both hold a file and no rule rose, else by linting both versions of the touched files through the side's installed config in bounded children; the findings a file already carried stay report-only, and a ratchet violation blocks at any count."
|
|
6702
6702
|
kinds: [check]
|
|
6703
6703
|
gates: [pre-commit, settle, land, ci]
|
|
6704
6704
|
failureCodes: ["LINT_RATCHET_RAISED"]
|
|
@@ -6728,3 +6728,33 @@ rules:
|
|
|
6728
6728
|
- {path: packages/eslint/grammar-core/choice-controls.spec.mjs, editions: [lite, full], codes: [FE_GROUPED_CHOICE_CONTROL]}
|
|
6729
6729
|
witness:
|
|
6730
6730
|
- {path: packages/eslint/grammar-core/choice-controls.spec.mjs, editions: [lite, full], codes: [FE_GROUPED_CHOICE_CONTROL]}
|
|
6731
|
+
- id: R381
|
|
6732
|
+
code: "HFS_RULE_PACK_INVALID"
|
|
6733
|
+
law: "An app adds its own laws only through rule packs hfs.json rulePacks names: an installed package that exports ./rule-pack, a starci/rule-pack@1 manifest whose every rule carries an id, a finding code, a severity, its spec and its doc and exactly one engine (a machine rule the app check runs, or an ESLint rule the canon factories load); a pack only adds, so a rule with any other key, a code the harness reports, an id or code another pack holds, a rule that throws or a finding without a path refuses the pack, which then lends nothing; its findings go through the harness's policy (a machine rule blocks like hfs, an ESLint rule follows the lint gate, its branch profile and the ratchet)."
|
|
6734
|
+
kinds: [check]
|
|
6735
|
+
gates: [settle, land, ci]
|
|
6736
|
+
failureCodes: ["HFS_RULE_PACK_INVALID"]
|
|
6737
|
+
enforcers:
|
|
6738
|
+
- {kind: hfs, id: rule-packs, at: scripts/hfs/rules/app-extension-findings.mjs}
|
|
6739
|
+
editions: [lite, full]
|
|
6740
|
+
docs:
|
|
6741
|
+
- {path: contexts/project/lint.md#project-lint-3-an-app-extends-the-law-through-rule-packs-and-package-slot-manifests, editions: [lite, full]}
|
|
6742
|
+
proves:
|
|
6743
|
+
- {path: packages/hfs/src/rule-packs.spec.mjs, editions: [lite, full]}
|
|
6744
|
+
witness:
|
|
6745
|
+
- {path: packages/hfs/src/rule-packs.spec.mjs, editions: [lite, full]}
|
|
6746
|
+
- id: R382
|
|
6747
|
+
code: "HFS_PACKAGE_SLOT_UNPLACED"
|
|
6748
|
+
law: "A root workspace package that declares packages/<name>/slots.yaml (starci/package-slots@1) is held to it as the be and fe sides are held to theirs: every file below its src/ belongs to a declared slot (unless closed is false), each instance of a folder slot holds every file the slot requires and nothing its allows leave out, and the manifest itself is readable; its coverage follows the slots, every file measured at 100 per file but the barrels, the type files and a slot that opts out with coverage: { none: <reason> }."
|
|
6749
|
+
kinds: [check]
|
|
6750
|
+
gates: [settle, land, ci]
|
|
6751
|
+
failureCodes: ["HFS_PACKAGE_SLOT_UNPLACED", "HFS_PACKAGE_SLOT_MISSING", "HFS_PACKAGE_SLOT_DISALLOWED", "HFS_PACKAGE_SLOTS_INVALID"]
|
|
6752
|
+
enforcers:
|
|
6753
|
+
- {kind: hfs, id: package-slots, at: scripts/hfs/rules/app-extension-findings.mjs}
|
|
6754
|
+
editions: [lite, full]
|
|
6755
|
+
docs:
|
|
6756
|
+
- {path: contexts/project/lint.md#project-lint-3-an-app-extends-the-law-through-rule-packs-and-package-slot-manifests, editions: [lite, full]}
|
|
6757
|
+
proves:
|
|
6758
|
+
- {path: packages/hfs/src/package-slots.spec.mjs, editions: [lite, full]}
|
|
6759
|
+
witness:
|
|
6760
|
+
- {path: packages/hfs/src/package-slots.spec.mjs, editions: [lite, full]}
|
|
@@ -149,7 +149,9 @@ function observeBlockProblems(observe) {
|
|
|
149
149
|
bad.push('observe.reporter must name the optional error reporter');
|
|
150
150
|
return bad;
|
|
151
151
|
}
|
|
152
|
-
const DECLARATION_KEYS = new Set(['hfs', 'kind', 'project', 'edition', 'db', 'sides', 'browser', 'modules', 'lexicon', 'observe']);
|
|
152
|
+
const DECLARATION_KEYS = new Set(['hfs', 'kind', 'project', 'edition', 'db', 'sides', 'browser', 'modules', 'lexicon', 'observe', 'rulePacks']);
|
|
153
|
+
/** A rule pack hfs.json names (PROJECT-LINT-3): an npm package name, each once. */
|
|
154
|
+
const RULE_PACK_NAME = /^(?:@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*$/u;
|
|
153
155
|
const RUNTIME_DECLARATION_KEYS = new Set(['hfs', 'kind', 'project']);
|
|
154
156
|
function productDeclarationProblems(declaration, profiles) {
|
|
155
157
|
const bad = [];
|
|
@@ -159,6 +161,8 @@ function productDeclarationProblems(declaration, profiles) {
|
|
|
159
161
|
bad.push(...dbBlockProblems(declaration.db), ...lexiconBlockProblems(declaration.lexicon), ...observeBlockProblems(declaration.observe));
|
|
160
162
|
if (declaration.browser !== undefined && declaration.browser !== true)
|
|
161
163
|
bad.push('browser is `true` when the app has a browser journey (slot app.browser), and is left out otherwise');
|
|
164
|
+
if (declaration.rulePacks !== undefined && (!Array.isArray(declaration.rulePacks) || declaration.rulePacks.length === 0 || declaration.rulePacks.some((name) => typeof name !== 'string' || !RULE_PACK_NAME.test(name)) || new Set(declaration.rulePacks).size !== declaration.rulePacks.length))
|
|
165
|
+
bad.push('rulePacks is a non-empty list of the installed rule pack packages the app adds its laws with, each once (PROJECT-LINT-3)');
|
|
162
166
|
if (declaration.modules !== undefined && declaration.modules !== 'data')
|
|
163
167
|
bad.push('modules is `"data"` when the app keeps its modules as data (seeds, no rendered registry package), and is left out otherwise');
|
|
164
168
|
if (declaration.kind !== APP_KIND)
|