Skip to content

Commit d372e75

Browse files
committed
save commit
1 parent ebeacac commit d372e75

File tree

9 files changed

+105
-24
lines changed

9 files changed

+105
-24
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// @ts-check
2+
3+
import * as eslint from '@eslint/js';
4+
import tseslint from 'typescript-eslint';
5+
import * as eslintConfigPrettier from 'eslint-config-prettier/flat';
6+
import * as nodePlugin from 'eslint-plugin-n';
7+
8+
export default tseslint.config(
9+
eslint.configs.recommended,
10+
...tseslint.configs.recommended,
11+
{
12+
linterOptions: {
13+
reportUnusedDisableDirectives: false
14+
},
15+
plugins: {
16+
n: nodePlugin
17+
},
18+
rules: {
19+
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
20+
'n/prefer-node-protocol': 'error'
21+
}
22+
},
23+
{
24+
ignores: ['src/spec.types.ts']
25+
},
26+
{
27+
files: ['src/client/**/*.ts', 'src/server/**/*.ts'],
28+
ignores: ['**/*.test.ts'],
29+
rules: {
30+
'no-console': 'error'
31+
}
32+
},
33+
eslintConfigPrettier
34+
);

common/eslint-config/package.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"name": "@modelcontextprotocol/eslint-config",
3+
"private": true,
4+
"main": "tsconfig.json",
5+
"type": "module",
6+
"dependencies": {
7+
"typescript": "catalog:"
8+
},
9+
"repository": {
10+
"type": "git",
11+
"url": "https://github.com/modelcontextprotocol/typescript-sdk.git"
12+
},
13+
"bugs": {
14+
"url": "https://github.com/modelcontextprotocol/typescript-sdk/issues"
15+
},
16+
"homepage": "https://github.com/modelcontextprotocol/typescript-sdk/tree/develop/common/eslint-config",
17+
"publishConfig": {
18+
"registry": "https://npm.pkg.github.com/"
19+
},
20+
"version": "2.0.0",
21+
"devDependencies": {
22+
"@modelcontextprotocol/tsconfig": "workspace:^",
23+
"eslint": "^9.8.0",
24+
"eslint-config-prettier": "^10.1.8",
25+
"eslint-plugin-n": "^17.23.1",
26+
"prettier": "3.6.2",
27+
"typescript": "^5.5.4",
28+
"typescript-eslint": "^8.48.1",
29+
"@eslint/js": "^9.39.1"
30+
}
31+
}

common/eslint-config/tsconfig.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"extends": "@modelcontextprotocol/tsconfig",
3+
"include": ["./"],
4+
"exclude": ["node_modules", "dist"],
5+
"compilerOptions": {
6+
"baseUrl": "."
7+
}
8+
}

common/vitest-config/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"bugs": {
1414
"url": "https://github.com/modelcontextprotocol/typescript-sdk/issues"
1515
},
16-
"homepage": "https://github.com/modelcontextprotocol/typescript-sdk/tree/develop/common/ts-config",
16+
"homepage": "https://github.com/modelcontextprotocol/typescript-sdk/tree/develop/common/vitest-config",
1717
"publishConfig": {
1818
"registry": "https://npm.pkg.github.com/"
1919
},

packages/client/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@
8383
"devDependencies": {
8484
"@modelcontextprotocol/tsconfig": "workspace:^",
8585
"@modelcontextprotocol/vitest-config": "workspace:^",
86+
"@modelcontextprotocol/eslint-config": "workspace:^",
8687
"@cfworker/json-schema": "^4.1.1",
8788
"@eslint/js": "^9.39.1",
8889
"@types/content-type": "^1.1.8",

packages/server/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@
8383
"devDependencies": {
8484
"@modelcontextprotocol/tsconfig": "workspace:^",
8585
"@modelcontextprotocol/vitest-config": "workspace:^",
86+
"@modelcontextprotocol/eslint-config": "workspace:^",
8687
"@cfworker/json-schema": "^4.1.1",
8788
"@eslint/js": "^9.39.1",
8889
"@types/content-type": "^1.1.8",

packages/shared/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@
8484
"devDependencies": {
8585
"@modelcontextprotocol/tsconfig": "workspace:^",
8686
"@modelcontextprotocol/vitest-config": "workspace:^",
87+
"@modelcontextprotocol/eslint-config": "workspace:^",
8788
"@cfworker/json-schema": "^4.1.1",
8889
"@eslint/js": "^9.39.1",
8990
"@types/content-type": "^1.1.8",

pnpm-lock.yaml

Lines changed: 28 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tsconfig.json

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)