Skip to content

Commit 14fe9ae

Browse files
committed
style: Apply Prettier formatting to GLOBAL_STATE_AUDIT.md
1 parent 68d6d42 commit 14fe9ae

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Docs/GLOBAL_STATE_AUDIT.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -178,15 +178,14 @@ constructor(activityOrDeps) {
178178
}
179179
```
180180

181-
182181
### Phase 4: Bind Dependencies Locally for Readability
183182

184183
To reduce verbosity while maintaining explicit dependency injection, bind commonly-used dependencies as local properties in the constructor:
185184

186185
```javascript
187186
constructor(activityOrDeps) {
188187
// ... dependency injection setup ...
189-
188+
190189
// Bind commonly-used dependencies locally for readability
191190
// This reduces verbosity while maintaining explicit dependency injection
192191
this.blocks = this.deps.blocks;
@@ -196,10 +195,11 @@ constructor(activityOrDeps) {
196195
```
197196

198197
This allows using `this.blocks.doSomething()` instead of `this.deps.blocks.doSomething()` throughout the class, while still preserving:
199-
- **Explicit dependency tracking**: All dependencies are declared in the constructor
200-
- **Grep-ability**: Can search for `this.blocks` to find all usages
201-
- **Auditability**: Clear what external dependencies the class uses
202-
- **No behavior change**: Functionally equivalent to `this.deps.*` access
198+
199+
- **Explicit dependency tracking**: All dependencies are declared in the constructor
200+
- **Grep-ability**: Can search for `this.blocks` to find all usages
201+
- **Auditability**: Clear what external dependencies the class uses
202+
- **No behavior change**: Functionally equivalent to `this.deps.*` access
203203

204204
**Note**: Both `this.deps.*` (maximum audit clarity) and locally bound references (improved readability) are acceptable patterns. Choose based on the specific needs of each subsystem.
205205

0 commit comments

Comments
 (0)