no-explicit-any
JavaScript / TypeScriptsuspiciousno fixdefault: offjs/typescript-eslint-recommendedjs/biome-recommended
What it does
Section titled “What it does”Reports the any type wherever a type is written (let a: any, any[], a constraint such as T extends any).
Why it matters
Section titled “Why it matters”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.
Example
Section titled “Example”let a: any = 1;...type B = {} & { a: 1 };...Configuration
Section titled “Configuration”js: lint: rules: no-explicit-any: warn # off (default), warn, errorEnabled 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.
Upstream equivalents
Section titled “Upstream equivalents”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 |