I Analyzed 500 AI Coding Mistakes and Built an ESLint Plugin to Catch Them
Here's a pattern you've probably seen: const results = items.map(async (item) => { return await fetchItem(item); }); Looks fine, right? Your AI assistant wrote it. Tests pass. Code review approv...

Source: DEV Community
Here's a pattern you've probably seen: const results = items.map(async (item) => { return await fetchItem(item); }); Looks fine, right? Your AI assistant wrote it. Tests pass. Code review approves it. Then production hits, and results is an array of Promises — not the values you expected. The await on line 2 does nothing. You needed Promise.all(items.map(...)) or a for...of loop. This isn't a TypeScript bug. It's a common LLM coding mistake — one of hundreds I found when I started researching AI-generated code quality. The Problem: AI Writes Code That Works, Not Code That's Right LLMs are excellent at writing code that passes tests. They're terrible at writing code that handles edge cases, maintains consistency, and follows best practices under the hood. After reviewing several empirical studies on LLM-generated code bugs — including an analysis of 333 bugs and PromptHub's study of 558 incorrect snippets — I found clear patterns emerging: Bug Type Frequency Missing corner cases 15.3