Skip to content
Agent Friendly Code

Linter and formatter config: instant feedback for AI coding agents

This check looks for a committed linter or formatter config: ESLint, Prettier, Biome, Ruff, rustfmt, Clippy, golangci-lint, RuboCop, clang-format, Checkstyle and dozens of others across languages.

By Himanshu Singh · Updated · How we score →

How many repos commit a linter or formatter config?

Of the 434 repos on the leaderboard, 382 pass in full (88%), 0 pass in part (0%) and 52 fail (12%).

Why do AI coding agents need a linter config?

A linter makes style checkable: the agent runs it and fixes the errors instead of copying the nearest file. Aider lints every file it edits by default, but with its built-in linters unless lint-cmd runs yours.

How do I make Claude Code run the linter after every edit?

  • Put the lint and format commands in AGENTS.md so any agent can run them as a check.
  • For a rule with no exceptions, use a hook: Claude Code runs a PostToolUse hook after each tool call; the Edit|Write matcher limits it to file edits. The docs' example formats each edited file with Prettier.
  • Committed in .claude/settings.json, it applies to everyone in the repo once they trust the folder.
  • Aider needs no hook: it lints the files it edits by default, and lint-cmd in .aider.conf.yml swaps in your own linter.

.claude/settings.json

{
  "hooks": {
    "PostToolUse": [
      {
        "matcher": "Edit|Write",
        "hooks": [
          { "type": "command", "command": "f=$(jq -r '.tool_input.file_path') && npx prettier --write --ignore-unknown \"$f\"" }
        ]
      }
    ]
  }
}

382 of 434 leaderboard repos pass this check in full (88%). Sources: code.claude.com/hooks-guide (new tab), code.claude.com/best-practices (new tab), aider.chat/lint-test.html (new tab).

What counts as a linter or formatter config?

  • Full pass: a config file for a supported tool, at the repo root or in a top-level folder such as src/.
  • Also a full pass: linter settings inside a shared file, such as a [tool.ruff], [tool.black], [tool.flake8], [tool.pylint], [tool.isort] or [tool.mypy] section in pyproject.toml, a [flake8] section in tox.ini or setup.cfg, eslintConfig or prettier in package.json, [lints] in Cargo.toml, an addFmt step in build.zig, or Spotless, Checkstyle, PMD, Error Prone, detekt or ktlint in a Gradle or Maven build file. A Checkstyle XML two folders down also counts.
  • Also a full pass: an .editorconfig with dotnet_, csharp_, visual_basic_, fsharp_ or ktlint_ keys, or a Directory.Build.props that sets EnforceCodeStyleInBuild, AnalysisLevel or AnalysisMode. An .editorconfig with only indentation and charset settings does not count.
  • Fail: no config found. We do not run the linter.

How checks become a score: methodology.

How do I add a linter config to my repo?

Commit your language's standard linter config and put the lint command in AGENTS.md. A linter on default settings leaves no file to find.

Which AI coding agents weigh a linter config most?

Pass rate by language

Top-scoring repos that pass

Popular repos that fail it

Every check, grouped into what to do first: how to make your repo ready for AI coding agents.