Convex ESLint 6.0 flags non-deterministic queries
Convex released version 6.0.0 of its official ESLint plugin, introducing the no-time-or-random-in-queries rule to warn developers when query functions rely on wall-clock time or random values. The update also resolves type-aware linting issues across monorepos and multi-version dependency setups.
Convex queries must be pure, deterministic functions to power automatic caching and reactive client updates, but developers routinely shoot themselves in the foot by reaching for Date.now() or Math.random(). Enforcing query determinism at compile time via linting prevents insidious reactivity bugs and cache thrashing before they hit production.
- –Eliminates silent cache staleness: Because Convex queries only recompute when subscribed database records change, wall-clock time calculations inside queries never invalidate cache subscriptions, silently freezing dynamic time windows.
- –Deep static tracing: The no-time-or-random-in-queries rule inspects not just top-level query bodies but also local helpers and relative-import utility functions.
- –Multi-version monorepo stability: Previous type-aware linting failed to inspect queries typed by secondary versions of Convex in complex workspaces; v6.0.0 normalizes AST checks across conflicting dependency versions.
- –Guardrails for agentic code generation: As coding agents increasingly write database handlers, deterministic linter rules act as critical rails to prevent LLMs from writing non-reactive Convex query patterns.
DISCOVERED
15m ago
2026-11-26
PUBLISHED
43m ago
2026-11-26
RELEVANCE
AUTHOR
convex
