@eslint/mcp 0.2.0 → 0.3.1
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 +4 -4
- package/package.json +10 -6
- package/src/mcp-server.js +9 -9
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
|
|
37
|
-
<p><a href="https://qlty.sh/"><img src="https://images.opencollective.com/qltysh/33d157d/logo.png" alt="Qlty Software" height="96"></a
|
|
38
|
-
<p><a href="https://vite.dev/"><img src="https://images.opencollective.com/vite/
|
|
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://
|
|
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></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://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.
|
|
3
|
+
"version": "0.3.1",
|
|
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
|
-
"
|
|
19
|
-
"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",
|
|
@@ -36,12 +38,14 @@
|
|
|
36
38
|
"node": "^20.19.0 || ^22.13.0 || >=24"
|
|
37
39
|
},
|
|
38
40
|
"dependencies": {
|
|
39
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
40
|
-
"eslint": "^
|
|
41
|
-
"zod": "^
|
|
41
|
+
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
42
|
+
"eslint": "^10.0.2",
|
|
43
|
+
"zod": "^4.1.13"
|
|
42
44
|
},
|
|
43
45
|
"devDependencies": {
|
|
44
46
|
"@cfworker/json-schema": "^4.1.1",
|
|
47
|
+
"@eslint/plugin-kit": "^0.6.1",
|
|
48
|
+
"@types/express": "^5.0.6",
|
|
45
49
|
"@types/node": "^24.7.2"
|
|
46
50
|
}
|
|
47
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.
|
|
20
|
+
version: "0.3.1", // 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.
|
|
32
|
+
mcpServer.registerTool(
|
|
33
33
|
"lint-files",
|
|
34
|
-
|
|
35
|
-
|
|
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);
|