@eslint/mcp 0.1.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -33,10 +33,10 @@ The following companies, organizations, and individuals support ESLint's ongoing
33
33
  to get your logo on our READMEs and [website](https://eslint.org/sponsors).
34
34
 
35
35
  <h3>Platinum Sponsors</h3>
36
- <p><a href="https://automattic.com"><img src="https://images.opencollective.com/automattic/d0ef3e1/logo.png" alt="Automattic" height="128"></a> <a href="https://www.airbnb.com/"><img src="https://images.opencollective.com/airbnb/d327d66/logo.png" alt="Airbnb" height="128"></a></p><h3>Gold Sponsors</h3>
37
- <p><a href="https://qlty.sh/"><img src="https://images.opencollective.com/qltysh/33d157d/logo.png" alt="Qlty Software" height="96"></a> <a href="https://trunk.io/"><img src="https://images.opencollective.com/trunkio/fb92d60/avatar.png" alt="trunk.io" height="96"></a> <a href="https://shopify.engineering/"><img src="https://avatars.githubusercontent.com/u/8085" alt="Shopify" height="96"></a></p><h3>Silver Sponsors</h3>
38
- <p><a href="https://vite.dev/"><img src="https://images.opencollective.com/vite/e6d15e1/logo.png" alt="Vite" height="64"></a> <a href="https://liftoff.io/"><img src="https://images.opencollective.com/liftoff/5c4fa84/logo.png" alt="Liftoff" height="64"></a> <a href="https://americanexpress.io"><img src="https://avatars.githubusercontent.com/u/3853301" alt="American Express" height="64"></a> <a href="https://stackblitz.com"><img src="https://avatars.githubusercontent.com/u/28635252" alt="StackBlitz" height="64"></a></p><h3>Bronze Sponsors</h3>
39
- <p><a href="https://cybozu.co.jp/"><img src="https://images.opencollective.com/cybozu/933e46d/logo.png" alt="Cybozu" height="32"></a> <a href="https://sentry.io"><img src="https://github.com/getsentry.png" alt="Sentry" height="32"></a> <a href="https://www.crosswordsolver.org/anagram-solver/"><img src="https://images.opencollective.com/anagram-solver/2666271/logo.png" alt="Anagram Solver" height="32"></a> <a href="https://icons8.com/"><img src="https://images.opencollective.com/icons8/7fa1641/logo.png" alt="Icons8" height="32"></a> <a href="https://discord.com"><img src="https://images.opencollective.com/discordapp/f9645d9/logo.png" alt="Discord" height="32"></a> <a href="https://www.gitbook.com"><img src="https://avatars.githubusercontent.com/u/7111340" alt="GitBook" height="32"></a> <a href="https://nx.dev"><img src="https://avatars.githubusercontent.com/u/23692104" alt="Nx" height="32"></a> <a href="https://opensource.mercedes-benz.com/"><img src="https://avatars.githubusercontent.com/u/34240465" alt="Mercedes-Benz Group" height="32"></a> <a href="https://herocoders.com"><img src="https://avatars.githubusercontent.com/u/37549774" alt="HeroCoders" height="32"></a> <a href="https://www.lambdatest.com"><img src="https://avatars.githubusercontent.com/u/171592363" alt="LambdaTest" height="32"></a></p>
36
+ <p><a href="https://automattic.com"><img src="https://images.opencollective.com/automattic/d0ef3e1/logo.png" alt="Automattic" height="128"></a></p><h3>Gold Sponsors</h3>
37
+ <p><a href="https://qlty.sh/"><img src="https://images.opencollective.com/qltysh/33d157d/logo.png" alt="Qlty Software" height="96"></a> <a href="https://shopify.engineering/"><img src="https://avatars.githubusercontent.com/u/8085" alt="Shopify" height="96"></a></p><h3>Silver Sponsors</h3>
38
+ <p><a href="https://vite.dev/"><img src="https://images.opencollective.com/vite/d472863/logo.png" alt="Vite" height="64"></a> <a href="https://liftoff.io/"><img src="https://images.opencollective.com/liftoff/2d6c3b6/logo.png" alt="Liftoff" height="64"></a> <a href="https://americanexpress.io"><img src="https://avatars.githubusercontent.com/u/3853301" alt="American Express" height="64"></a> <a href="https://stackblitz.com"><img src="https://avatars.githubusercontent.com/u/28635252" alt="StackBlitz" height="64"></a></p><h3>Bronze Sponsors</h3>
39
+ <p><a href="https://cybozu.co.jp/"><img src="https://images.opencollective.com/cybozu/933e46d/logo.png" alt="Cybozu" height="32"></a> <a href="https://opensource.sap.com"><img src="https://avatars.githubusercontent.com/u/2531208" alt="SAP" height="32"></a> <a href="https://www.crawljobs.com/"><img src="https://images.opencollective.com/crawljobs-poland/fa43a17/logo.png" alt="CrawlJobs" height="32"></a> <a href="https://depot.dev"><img src="https://images.opencollective.com/depot/39125a1/logo.png" alt="Depot" height="32"></a> <a href="https://www.n-ix.com/"><img src="https://images.opencollective.com/n-ix-ltd/575a7a5/logo.png" alt="N-iX Ltd" height="32"></a> <a href="https://icons8.com/"><img src="https://images.opencollective.com/icons8/7fa1641/logo.png" alt="Icons8" height="32"></a> <a href="https://discord.com"><img src="https://images.opencollective.com/discordapp/f9645d9/logo.png" alt="Discord" height="32"></a> <a href="https://www.gitbook.com"><img src="https://avatars.githubusercontent.com/u/7111340" alt="GitBook" height="32"></a> <a href="https://herocoders.com"><img src="https://avatars.githubusercontent.com/u/37549774" alt="HeroCoders" height="32"></a> <a href="https://www.lambdatest.com"><img src="https://avatars.githubusercontent.com/u/171592363" alt="TestMu AI Open Source Office (Formerly LambdaTest)" height="32"></a></p>
40
40
  <h3>Technology Sponsors</h3>
41
41
  Technology sponsors allow us to use their products and services for free as part of a contribution to the open source ecosystem and our work.
42
42
  <p><a href="https://netlify.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/netlify-icon.svg" alt="Netlify" height="32"></a> <a href="https://algolia.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/algolia-icon.svg" alt="Algolia" height="32"></a> <a href="https://1password.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/1password-icon.svg" alt="1Password" height="32"></a></p>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eslint/mcp",
3
- "version": "0.1.1",
3
+ "version": "0.3.0",
4
4
  "description": "MCP server for ESLint",
5
5
  "type": "module",
6
6
  "bin": "./src/mcp-cli.js",
@@ -15,8 +15,10 @@
15
15
  },
16
16
  "scripts": {
17
17
  "build": "tsc",
18
- "test": "mocha tests/*.js",
19
- "test:coverage": "c8 npm test"
18
+ "pretest": "npm run build",
19
+ "test": "npm run test:unit",
20
+ "test:coverage": "c8 npm run test:unit",
21
+ "test:unit": "mocha \"tests/**/*.test.js\""
20
22
  },
21
23
  "repository": {
22
24
  "type": "git",
@@ -33,11 +35,17 @@
33
35
  },
34
36
  "homepage": "https://github.com/eslint/rewrite/tree/main/packages/mcp#readme",
35
37
  "engines": {
36
- "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
38
+ "node": "^20.19.0 || ^22.13.0 || >=24"
37
39
  },
38
40
  "dependencies": {
39
- "@modelcontextprotocol/sdk": "^1.11.0",
40
- "eslint": "^9.26.0",
41
- "zod": "^3.24.4"
41
+ "@modelcontextprotocol/sdk": "1.25.3",
42
+ "eslint": "^10.0.0",
43
+ "zod": "^4.1.13"
44
+ },
45
+ "devDependencies": {
46
+ "@cfworker/json-schema": "^4.1.1",
47
+ "@eslint/plugin-kit": "^0.6.0",
48
+ "@types/express": "^5.0.6",
49
+ "@types/node": "^24.7.2"
42
50
  }
43
51
  }
package/src/mcp-server.js CHANGED
@@ -8,7 +8,7 @@
8
8
  //-----------------------------------------------------------------------------
9
9
 
10
10
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
11
- import { z } from "zod";
11
+ import { z } from "zod/v3";
12
12
  import { ESLint } from "eslint";
13
13
 
14
14
  //-----------------------------------------------------------------------------
@@ -17,7 +17,7 @@ import { ESLint } from "eslint";
17
17
 
18
18
  const mcpServer = new McpServer({
19
19
  name: "ESLint",
20
- version: "0.1.1", // x-release-please-version
20
+ version: "0.3.0", // x-release-please-version
21
21
  });
22
22
 
23
23
  // Important: Cursor throws an error when `describe()` is used in the schema.
@@ -29,15 +29,15 @@ const filePathsSchema = {
29
29
  // Tools
30
30
  //-----------------------------------------------------------------------------
31
31
 
32
- mcpServer.tool(
32
+ mcpServer.registerTool(
33
33
  "lint-files",
34
- "Lint files using ESLint. You must provide a list of absolute file paths to the files you want to lint. The absolute file paths should be in the correct format for your operating system (e.g., forward slashes on Unix-like systems, backslashes on Windows).",
35
- filePathsSchema,
34
+ {
35
+ description:
36
+ "Lint files using ESLint. You must provide a list of absolute file paths to the files you want to lint. The absolute file paths should be in the correct format for your operating system (e.g., forward slashes on Unix-like systems, backslashes on Windows).",
37
+ inputSchema: filePathsSchema,
38
+ },
36
39
  async ({ filePaths }) => {
37
- const eslint = new ESLint({
38
- // enable lookup from file rather than from cwd
39
- flags: ["unstable_config_lookup_from_file"],
40
- });
40
+ const eslint = new ESLint();
41
41
 
42
42
  const type = /** @type {const} */ ("text");
43
43
  const results = await eslint.lintFiles(filePaths);