Catching Nested any in typescript-eslint
dev.to·1d·
Discuss: DEV
Preview
Report Post

For my open source contribution I decided to keep working in the TypeScript linting space and picked a feature request that asks the no-unsafe-* family of rules to catch any nested inside object arguments, not just at the top level. I read the rule docs for no-unsafe-argument and no-unsafe-assignment to understand how they work today, and why nested any can slip through, for example when you pass { foo: any } to a function that expects { foo: number }. These rules exist to stop unsafe any from leaking into calls and assignments, so closing this gap matters for real apps, not just theory. I also reviewed the project’s guidance on typed linting performance to stay mindful…

Similar Posts

Loading similar posts...