GitHunt
BR

brxck/claude-eslint

ESLint LSP for Claude with autofix

claude-eslint

ESLint diagnostics and auto-fix plugin for Claude Code.

Why

Running eslint as a one-off command on a large codebase is slow — it has to parse and analyze every file from scratch each time. By keeping a long-running ESLint LSP server warm for the entire session, this plugin can lint and auto-fix instantly after every agent edit, without the cold-start penalty.

Prerequisites

  • Node.js >= 16
  • eslint installed in your project (flat config eslint.config.js or legacy .eslintrc.*)

Usage

claude --plugin-dir /path/to/claude-eslint

How It Works

This plugin runs a single ESLint LSP server (from sublimelsp/LSP-eslint) via a proxy daemon:

  • LSP Diagnostics: Claude Code sees ESLint issues natively through the LSP integration (.lsp.json)
  • Auto-fix on Edit: A PostToolUse hook automatically applies ESLint fixes after every file edit/write

The proxy daemon (scripts/eslint-daemon.mjs) sits between Claude Code and the ESLint server:

  1. Forwards all LSP messages bidirectionally (transparent proxy)
  2. Caches textDocument/publishDiagnostics for fast access
  3. Exposes a Unix socket at /tmp/claude-eslint-<hash>.sock for the auto-fix hook

The hook (scripts/eslint-autofix.mjs) connects to the daemon's socket after each edit to request source.fixAll.eslint code actions, which are applied directly to disk. Remaining unfixable issues are reported back to Claude.

Debugging

claude --plugin-dir /path/to/claude-eslint --debug

Check for the daemon socket while a session is active:

ls /tmp/claude-eslint-*.sock

Languages

JavaScript100.0%

Contributors

Created February 16, 2026
Updated February 16, 2026