AI Guard: Open-Source ESLint Plugin With 18 Rules Catching AI-Generated Code Smells
Yashhh_21 · reddit · 2026-09-11
A developer released AI Guard (MIT), an ESLint plugin with 18 deterministic rules targeting recurring bad patterns in AI-assisted JS/TS development: floating promises, empty catch blocks, hardcoded secrets, string-concatenated SQL, await-in-loop, and async callbacks in forEach.
It ships as a CLI (npx ai-guard run), a GitHub Action with SARIF output for Code Scanning and inline PR annotations, and an init-context command that generates CLAUDE.md / .cursorrules / copilot-instructions.md so agents learn the rules before writing code.
Design rationale: these are fixed AST patterns, not judgment calls — millisecond deterministic checks in CI beat LLM review on drift and cost. The hard part was precision; the recommended preset is deliberately conservative. The plugin does not detect AI authorship — it catches bad patterns regardless of who wrote them.
More from coding & agent
- Microsoft Foundry swaps Model Router pool to GPT-5.6 variants and Claude Opus 4.8, ships Hosted Agents GA — WirelessLife · 2026-09-11
- Cua offers scaled computer-use agent fleets, but top frontier agent clears just 6 of 25 KiCad tasks — lucasmeijer · 2026-09-11
- App Store Connect CLI 5.2.0 adds API-based country availability and rating resets — rudrank · 2026-09-11
- Ouroboros traces program execution for LLM debugging, boosting small-model accuracy by up to 34 points — The_Homeless_God · 2026-09-11
- Coding agents have stopped writing code: they do the job themselves instead — doooyle · 2026-09-11
- Atto launches beta MCP server giving AI assistants a wallet with user-approved spending limits — Rotilho · 2026-09-11