murashit_codex-panel/scripts/lint/no-pure-chat-state-side-effects.grit
2026-06-26 10:44:53 +09:00

18 lines
611 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 chat state transforms deterministic and free of app-server, Obsidian, scheduling, and browser side effects.", severity="error")
}