TypeScript · architecture
no-storage-in-stateless-modules
eslint:no-storage-in-stateless-modules Disallow SQL or key/value access inside configured stateless modules; derive state from a system of record instead.
- Default
- error
- Fix
- none
- Languages
- typescript
Why
Private storage in a stateless workflow creates another source of truth that can silently diverge.
Fix
Read from the system of record or derive state from an artifact the workflow already produces.
Before / after
Executed by this rule’s unit tests.
Before
Do not write private state in a stateless module
await kv.put('digest:last', timestamp); After
Read from the system of record
const issues = await linear.listIssues(); Limits
- The rule is disabled until module path patterns are configured and recognizes only configured storage method names.
Message IDs
storageInStatelessModule