Skip to main content

no-let-any

🚫 This rule is disabled in the ✅ recommended config.

Disallows declaring variables with let that do not have a type.

💭 This rule requires type information.

This is useful because the noImplicitAny TypeScript compiler flag does not always catch this pattern. If you want to purge all of the any from your codebase, you need this rule.

Rule Details​

// Bad
let foo;

// Good
let foo: string;

Options​

This rule is not configurable.

Resources​