/** * Error-Handling Convention Rules * Lints idiomatic use of 0.19.0 error-handling primitives: * `guard`, `retry`, `.!`, `.?`, and `#atom`. */ import type { ValidationRule } from '../types.js'; /** * Suggests explicit `on:` codes on `guard` blocks. A bare `guard { ... }` * recovers from any error; that hides intent and silences errors the author * never planned for. Prefer `guard` for explicit * recoverability. */ export declare const GUARD_BARE: ValidationRule; /** * Flags `retry` with N <= 1. A single attempt is what already happens * without `retry`; the block has no effect. Either remove the wrapper or * raise the attempt count. */ export declare const RETRY_TRIVIAL: ValidationRule; /** * Warns on `#ATOM` literals whose name is not a runtime builtin. Such atoms * must be registered by the host via `registerErrorCode` before use; the * lint cannot see host registrations, so this is a best-effort check. * Suppress per-file via config when the host registers the atom. */ export declare const ATOM_UNREGISTERED: ValidationRule; /** * Suggests selecting a field on `.!` probes used as values. Bare `.!` * yields the whole status record; `.!code`, `.!message`, or `.!provider` * are usually what callers want. Probes used in boolean position (the * direct condition of a Conditional/While/DoWhile) do not fire. */ export declare const STATUS_PROBE_NO_FIELD: ValidationRule; /** * Detects `($x == nil) ? fallback ! $x` and `($x != nil) ? $x ! fallback` * patterns. The default operator (`$x ?? fallback`) reads better and avoids * branching. */ export declare const PRESENCE_OVER_NULL_GUARD: ValidationRule; /** * Detects `Conditional` whose condition inspects a `.!` status probe. * Branching on `.!code == #TIMEOUT` is the manual try/catch shape; wrapping * the fallible call in `guard { ... }` is the idiomatic * 0.19.0 form. */ export declare const GUARD_OVER_TRY_CATCH: ValidationRule;