Skip to content

claude-code

Enforce your CLAUDE.md rules in CI, not in a markdown file

Claude News

A rule in CLAUDE.md is a suggestion: the agent follows it almost every time, but about 12% of violations still slip into prod. A CI check is law. Code that breaks the rule simply won't merge. That gap matters when an agent ships more code in an evening than a reviewer can read in a week.

The highest-leverage move, the author argues, is turning on ESLint's complexity limits that almost nobody enables: complexity, max-depth, max-lines-per-function, max-params, max-statements, plus cognitive-complexity from SonarJS. Without them, the agent hands you a 150-line function with a switch inside a try-catch inside a loop.

Complexity limits act as a proxy. Hit max-lines-per-function and the agent will either split the function into single-use helpers or drop in an eslint-disable-next-line. So the author says to ban disable comments outright with eslint-plugin-eslint-comments.

Related stories

  1. The new CLAUDE.md advice: delete, don't accumulate
  2. Analysis of Claude Code usage in 2026
  3. Claude Code command reference
  4. Claude Code 2.1.283 keeps new models out until admins say so
  5. Claude helped make claude.ai 3x faster in two weeks
  6. Claude Code skips AGENTS.md when telemetry is off

Comments

No comments yet. Be the first.

Join the conversation

Sign in with Google to leave a comment. Your name and avatar come from your Google profile, and the comment appears after moderation.

We only use your name and avatar from Google. We never store your email address.