Skip to content

no-explicit-any

Reports the any type wherever a type is written (let a: any, any[], a constraint such as T extends any).

any turns off type checking for everything that touches the value, and the value spreads: a call result, a property and an assignment of an any are any too, so one hole hides errors far from where it is written.

To fix, use unknown (it must be checked before use) or a real type.

Reported
let a: any = 1;
...
type B = {} & { a: 1 };
...
js:
lint:
rules:
no-explicit-any: warn # off (default), warn, error

Enabled by the presets: js/typescript-eslint-recommended, js/biome-recommended.

Suppress one line with sudsy-disable-next-line no-explicit-any in a comment of the file’s language.

The same check in other tools. full: Sudsy reports what the upstream rule reports; partial: only part of it, as the last column says.

Tool Rule Match What differs
typescript-eslint no-explicit-any partial the options (ignoreRestArgs, fixToUnknown) keep their defaults