Why this matters
Using 'any' disables type checking and can lead to runtime errors. Always use specific types or generics to ensure type safety.
Detect the use of the 'any' type in TypeScript. Using 'any' disables type checking and can lead to runtime errors. Recommend using specific types or generics instead.
Using 'any' disables type checking and can lead to runtime errors. Always use specific types or generics to ensure type safety.
Side-by-side examples engineers can pattern-match during review.
let foo: any = "bar";let foo: string = "bar";let foo: any = "bar";let foo: string = "bar";From the same buckets as this rule.
Check if loops use equality operators (== or !=) in termination conditions. These can lead to infinite loops if the condition is never met exactly. Instead, use relational operators like < or > for safer loop termination.