Repository navigation
feat(gritlint): add the cell-architecture pack - #701
Merged
Merged
Conversation
Adds packs/cell-architecture with one rule, service-exports-no-layer: a *.service.ts module makes no Layer.* call, declares no class field named layer or *Layer, and exports no *Live name, as compound-packs/cell-architecture/ports-separate-from-layers.md requires. Six bad fixtures are refused: a static layer member, a tagless exported Layer, a *Live alias, a Layer factory, an aliased static field, and a Layer in one service module beside a clean port in the same directory. Four good fixtures pass: a port alone, a Layer in a driver module, a Layer.Layer type alias, and a *Live Layer in a non-service sibling module. The rule is multifile so that gritlint parses only *.service.ts modules. A multifile match is reported against the first file of its directory batch, so the finding names the first service module in the directory; the README records this and the TypeScript grammar gap that stops a scan on two generic call signatures separated only by a newline. CONST-E7 declaration: the author of this rule is also refactoring a consumer repository that the rule will grade. It lands here through this repository's own review, not through the consumer's.
systemfsoftware-maker
added a commit
to systemfsoftware/stryker-js-effect
that referenced
this pull request
Oct 9, 2026
…cture gritlint pack lint:conventions now fails when a *.service.ts module makes a Layer.* call, declares a layer or *Layer class field, or exports a *Live name (ADR-0002). The systemfsoftware input is locked to the head of systemfsoftware/systemfsoftware#701, which adds the pack; it moves to the merge commit on main before this lands.
ryanleecode
approved these changes
Oct 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A repository can now enable
"cell-architecture": {}ingritlint.jsonand get a failing check whenever a*.service.tsmodule builds a Layer. That turnscompound-packs/cell-architecture/ports-separate-from-layers.mdfrom a review note into a gate: importing a port no longer risks importing its driver.The rule,
service-exports-no-layer, refuses aLayer.*call, a class field namedlayeror*Layer, and an export named*Livein a service module. Layer types (Layer.Layer<...>) and Layers in other modules pass.Fixtures
layermember on the tagsrc/drivers/*LivealiasLayer.Layertype alias*LiveLayer in a non-service sibling moduleDesign decisions
dualoverloads). In one consumer workspace, 10 of 769 TypeScript files hit that, so a single-file rule would stop the scan on modules it never grades.*.service.tsmodules share a directory, the finding names the alphabetically first of them at line 1, not the module holding the Layer. The verdict is exact. The pack README records this and the grammar gap.Validation
gritlint test packs: 58 cases pass, including the 10 above.*.service.tsfilter removed from the rule, the good cases fail, so the fixtures catch a scope regression.gritlint schemamatchesnpm/gritlint/configuration_schema.json.CONST-E7 declaration: the author of this rule is also refactoring a consumer repository that the rule will grade. It lands here through this repository's own review, not through the consumer's.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.