Code linting via ESLint
## ESLint MCP Server: Intelligent JavaScript Code Quality Analysis The **ESLint MCP Server** brings powerful JavaScript and TypeScript linting capabilities directly into Google Antigravity, enabling automated code quality enforcement, style consistency, and bug prevention through AI-assisted analysis. ### Why ESLint MCP? - **Real-Time Analysis**: Get instant feedback on code quality issues as you write, catching bugs before they reach production - **Auto-Fix Capabilities**: Automatically fix common issues like formatting, import ordering, and simple code patterns - **Custom Rules**: Configure project-specific rules and extend with plugins for React, Vue, Node.js, and more - **TypeScript Support**: Full TypeScript integration with type-aware linting rules for enhanced accuracy - **IDE Integration**: Seamless integration providing inline warnings, quick fixes, and hover documentation ### Key Features #### 1. Code Analysis ```python from anthropic import Anthropic client = Anthropic() response = client.messages.create( model="claude-sonnet-4-20250514", max_tokens=1024, messages=[{ "role": "user", "content": "Run ESLint on the src/ directory and show all errors grouped by rule" }] ) ``` #### 2. Auto-Fix Application ```python # Apply automatic fixes response = client.messages.create( model="claude-sonnet-4-20250514", max_tokens=1024, messages=[{ "role": "user", "content": "Auto-fix all ESLint issues in components/ that can be safely fixed automatically" }] ) ``` #### 3. Configuration Management ```python # Manage ESLint config response = client.messages.create( model="claude-sonnet-4-20250514", max_tokens=1024, messages=[{ "role": "user", "content": "Update ESLint config to add React Hooks rules and enforce import ordering" }] ) ``` #### 4. Rule Explanation ```python # Understand lint errors response = client.messages.create( model="claude-sonnet-4-20250514", max_tokens=1024, messages=[{ "role": "user", "content": "Explain why no-unused-vars is triggered on line 45 and suggest how to fix it" }] ) ``` ### Configuration ```json { "mcpServers": { "eslint": { "command": "npx", "args": ["-y", "@anthropic/mcp-server-eslint"], "env": { "ESLINT_CONFIG_PATH": ".eslintrc.json", "ESLINT_FIX_ON_SAVE": "true" } } } } ``` ### Use Cases **Code Review Automation**: Pre-screen pull requests for style violations and common bugs before human review begins. **Team Standardization**: Enforce consistent coding patterns across your team with shared ESLint configurations. **Migration Assistance**: Identify deprecated patterns and security issues when upgrading frameworks or libraries. **Learning Tool**: Understand why certain patterns are discouraged with detailed rule explanations and fix suggestions. The ESLint MCP Server transforms code quality from a manual review burden into an automated, intelligent system that helps developers write better code from the start.
{
"mcpServers": {
"eslint": {
"mcpServers": {
"eslint": {
"args": [
"-y",
"eslint-mcp-server"
],
"command": "npx"
}
}
}
}
}