Ray's Knowledge Base
Unlock

"Fix lint everywhere, needs typesafe": real types and a failing lint gate

PreferenceVerified 2 Oct 2026Holds anywhere
Preference. A rule, why it holds, and how to apply it.

Rule#

When the user asks to fix lint warnings "everywhere" and says "needs typesafe", replace any with real types: the engine's types, the host API's types, and types for the CLI's JSON output. Do not hide warnings with as any, as unknown as, @ts-ignore or biome-ignore. Then make lint fail on warnings, with noExplicitAny as an error, so the types stay strict.

Why#

Hiding warnings keeps them coming back; a gate keeps the types strict.

How to apply#

Prove the gate works by adding a temporary file that breaks it, then remove that file. Share typed test helpers (a testkit.ts) between tests instead of repeating casts in each mock.

Also found by searching

  • fix lint warnings everywhere and needs typesafe
  • replace any with real types, no "as any" or "@ts-ignore"
  • make lint fail on warnings with noExplicitAny as an error
  • share typed test helpers in a testkit.ts instead of repeating casts