Group Const Then Let
Within a scope, list every `const` binding before any `let` binding. The reader can then scan the top of the scope and immediately see which bindings are fixed and which will mutate, without re-checking each line.
$ prime install @web-style/rule-group-const-then-let Projection
Always in _index.xml · the agent never has to ask for this.
GroupConstThenLet [rule] v0.1.0
Within a scope, list every const binding before any let binding. The reader can then scan the top of the scope and immediately see which bindings are fixed and which will mutate, without re-checking each line.
Loaded when retrieval picks the atom as adjacent / supporting.
GroupConstThenLet [rule] v0.1.0
Within a scope, list every const binding before any let binding. The reader can then scan the top of the scope and immediately see which bindings are fixed and which will mutate, without re-checking each line.
Checks
- All
constdeclarations appear above the firstletin the same scope. - Imports and other top-of-file boilerplate sit above this group.
- Reordering a
constto fit this rule does not change its initialisation order — declare the dependencyconstbefore theconstthat needs it.
Label
Group all const declarations first, then group all let declarations
Loaded when retrieval picks the atom as a focal / direct hit.
GroupConstThenLet [rule] v0.1.0
Within a scope, list every const binding before any let binding. The reader can then scan the top of the scope and immediately see which bindings are fixed and which will mutate, without re-checking each line.
Checks
- All
constdeclarations appear above the firstletin the same scope. - Imports and other top-of-file boilerplate sit above this group.
- Reordering a
constto fit this rule does not change its initialisation order — declare the dependencyconstbefore theconstthat needs it.
Label
Group all const declarations first, then group all let declarations
Label
Group all const declarations first, then group all let declarations
Source
prime-system/examples/web-style/primes/compiled/@web-style/rule-group-const-then-let/atom.yaml