no-unsafe-argument
Added in v0.1.4Configuration
rslint.config.ts
Rule Details
Disallow calling a function with a value with type any.
The any type in TypeScript is a dangerous escape hatch from the type system. Passing an any-typed value as an argument to a function defeats the purpose of the parameter's type safety. This rule flags cases where any-typed values are passed as arguments, including spread arguments.
Like typescript-eslint, this rule checks any, any[], and concrete tuple spreads. Other iterable spreads, including Set<any>, arrays with generic element types such as Set<any>[], and unresolved generic Parameters<T> spreads, are ignored without advancing the parameter position used to check later arguments.
Examples of incorrect code for this rule:
Examples of correct code for this rule: