murashit_codex-panel/scripts/grit/architecture/no-state-module-side-effects.grit
2026-06-27 23:43:56 +09:00

18 lines
607 B
Text

language js
or {
`Date.now()` as $stmt,
`new Date()` as $stmt,
`Math.random()` as $stmt,
`new AppServerClient($...)` as $stmt,
`new ConnectionManager($...)` as $stmt,
`new Notice($...)` as $stmt,
`setTimeout($...)` as $stmt,
`clearTimeout($...)` as $stmt,
`requestAnimationFrame($...)` as $stmt,
`document.$property` as $stmt,
`localStorage.$property` as $stmt,
`sessionStorage.$property` as $stmt
} where {
register_diagnostic(span=$stmt, message="Keep this state module deterministic and free of app-server, Obsidian, scheduling, and browser side effects.", severity="error")
}