AIToday
Zenn AI/MLPublished: Oct 16, 2026, 22:01 JST

ai-deslop plugin catches AI's sloppy TypeScript

ai-deslop plugin catches AI's sloppy TypeScript

3 Key Points

  1. What happened

    The author ran ai-deslop, an Oxlint JS plugin posted to Show HN on October 14, 2026, against deliberately AI-flavored TypeScript and got 25 errors spanning 16 rules.

  2. Why it matters

    Rather than banning everything, the plugin draws lines — it flags double casts, chained filters, and mock tests, yet allows argument-checking tests, so AI-written code can be machine-checked for flimsiness.

Not sure about something? Ask the AI

Questions and answers are published on this page.

Summaries like this, in your inbox every morning.

Context & Analysis

ai-deslop, a plugin posted to Show HN on October 14, 2026, still lacks a Japanese explanation. The test setup was fully local: no LLM API key or cloud account was needed. The deliberate sample combined common AI-writing habits in one place — a double cast from unknown to a domain type, a filter().map() chain, a conditional spread, and a test that only asserted a mock had been called. Running oxlint on that code produced 25 errors across 16 rules at exit code 1. The author then refactored toward a single I/O-boundary parse function and domain types, and the same lint run returned 0 warnings and 0 errors in 304ms on 1 file with 135 rules.

Beyond the happy path, gotchas the README does not cover are documented. Installing ai-deslop without oxlint-tsgolint halts the run; using a TypeScript config file on Node 20.20.2 fails even though the error message mentions ^20.19.0; and when environment variables like CLAUDECODE or AI_AGENT are set, oxlint silently switches to one-line agent output. The author also notes the plugin is opinionated — no-shape-in-symbol-names bans names like UserShape outright, and no-module-mocking bans vi.mock — and that these can be turned off per team policy. For gradual adoption, the post suggests running rules as warnings under a --max-warnings ceiling and lowering the ceiling as fixes land, with the ceiling matched to the current warning count.

FAQ
What exactly does ai-deslop catch?
It detects low-evidence patterns like double casts, unknown/object parameters, chained filter().map() calls, conditional empty-object spreads, and tests that only check whether a mock was called.
Does the plugin ban all type assertions?
No. It requires a // SAFETY: comment explaining the assumption behind the cast; removing the comment triggers an error.
Why does the plugin recommend warn mode with --max-warnings?
Adding all rules as errors would turn existing CI red immediately, so the author suggests setting warn and a warning ceiling, then lowering it as code is fixed.

AI news that matters for your work, delivered every morning.

Pick your industry and the AI tools you use, and get news related to your work every day.

Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →

Ask AI

Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.

Questions and answers are published on this page.

Next articlePerplexity to open-source SPACE agent sandbox