Skip to content

Commit ea2fc03

Browse files
committed
eslint config
1 parent 15b27d0 commit ea2fc03

File tree

7 files changed

+60
-58
lines changed

7 files changed

+60
-58
lines changed

packages/client/eslint.config.mjs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,11 @@
22

33
import baseConfig from '@modelcontextprotocol/eslint-config';
44

5-
export default baseConfig;
5+
export default [
6+
...baseConfig,
7+
{
8+
settings: {
9+
'import/internal-regex': '^@modelcontextprotocol/sdk-core'
10+
}
11+
}
12+
];

packages/client/tsconfig.build.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
"outDir": "./dist",
55
"rootDir": "./src"
66
},
7-
"include": ["./"],
8-
"exclude": ["dist", "node_modules", "test"]
7+
"include": ["src/**/*"],
8+
"exclude": ["**/*.test.ts", "src/__mocks__/**/*", "src/__fixtures__/**/*", "tsdown.config.ts"]
99
}

packages/client/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"baseUrl": ".",
77
"paths": {
88
"*": ["./*"],
9-
"@modelcontextprotocol/sdk-core": ["../core/src/index.ts"],
9+
"@modelcontextprotocol/sdk-core": ["node_modules/@modelcontextprotocol/sdk-core/src/index.ts"],
1010
"@modelcontextprotocol/sdk-client": ["node_modules/@modelcontextprotocol/sdk-client/src/index.ts"],
1111
"@modelcontextprotocol/vitest-config": ["node_modules/@modelcontextprotocol/vitest-config/tsconfig.json"],
1212
"@modelcontextprotocol/eslint-config": ["node_modules/@modelcontextprotocol/eslint-config/tsconfig.json"]

packages/client/tsdown.config.ts

Lines changed: 20 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,26 @@
11
import { defineConfig } from 'tsdown';
22

33
export default defineConfig({
4-
// 1. Entry Points
5-
// Directly matches package.json include/exclude globs
6-
entry: [
7-
'src/**/*.ts',
8-
'!src/**/*.test.ts',
9-
'!src/__mocks__/**',
10-
'!src/examples/**'
11-
],
4+
// 1. Entry Points
5+
// Directly matches package.json include/exclude globs
6+
entry: ['src/**/*.ts', '!src/**/*.test.ts', '!src/__mocks__/**', '!src/examples/**'],
127

13-
// 2. Output Configuration
14-
format: ['esm'],
15-
outDir: 'dist',
16-
clean: true, // Recommended: Cleans 'dist' before building
17-
sourcemap: true,
18-
19-
// 3. Platform & Target
20-
target: 'esnext',
21-
platform: 'node',
22-
shims: true, // Polyfills common Node.js shims (__dirname, etc.)
8+
// 2. Output Configuration
9+
format: ['esm'],
10+
outDir: 'dist',
11+
clean: true, // Recommended: Cleans 'dist' before building
12+
sourcemap: true,
2313

24-
// 4. Type Definitions
25-
// Bundles d.ts files into a single output
26-
dts: true,
14+
// 3. Platform & Target
15+
target: 'esnext',
16+
platform: 'node',
17+
shims: true, // Polyfills common Node.js shims (__dirname, etc.)
2718

28-
// 5. Vendoring Strategy - Bundle the code for this specific package into the output,
29-
// but treat all other dependencies as external (require/import).
30-
noExternal: ['@modelcontextprotocol/sdk-core']
31-
});
19+
// 4. Type Definitions
20+
// Bundles d.ts files into a single output
21+
dts: true,
22+
23+
// 5. Vendoring Strategy - Bundle the code for this specific package into the output,
24+
// but treat all other dependencies as external (require/import).
25+
noExternal: ['@modelcontextprotocol/sdk-core']
26+
});

packages/server/eslint.config.mjs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,11 @@
22

33
import baseConfig from '@modelcontextprotocol/eslint-config';
44

5-
export default baseConfig;
5+
export default [
6+
...baseConfig,
7+
{
8+
settings: {
9+
'import/internal-regex': '^@modelcontextprotocol/sdk-core'
10+
}
11+
}
12+
];

packages/server/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"baseUrl": ".",
77
"paths": {
88
"*": ["./*"],
9-
"@modelcontextprotocol/sdk-core": ["../core/src/index.ts"]
9+
"@modelcontextprotocol/sdk-core": ["node_modules/@modelcontextprotocol/sdk-core/src/index.ts"]
1010
}
1111
}
1212
}

packages/server/tsdown.config.ts

Lines changed: 20 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,27 @@
11
import { defineConfig } from 'tsdown';
22

33
export default defineConfig({
4-
// 1. Entry Points
5-
// Directly matches package.json include/exclude globs
6-
entry: [
7-
'src/**/*.ts',
8-
'!src/**/*.test.ts',
9-
'!src/__mocks__/**',
10-
'!src/examples/**'
11-
],
4+
// 1. Entry Points
5+
// Directly matches package.json include/exclude globs
6+
entry: ['src/**/*.ts', '!src/**/*.test.ts', '!src/__mocks__/**', '!src/examples/**'],
127

13-
// 2. Output Configuration
14-
format: ['esm'],
15-
outDir: 'dist',
16-
clean: true, // Recommended: Cleans 'dist' before building
17-
sourcemap: true,
18-
19-
// 3. Platform & Target
20-
target: 'esnext',
21-
platform: 'node',
22-
shims: true, // Polyfills common Node.js shims (__dirname, etc.)
8+
// 2. Output Configuration
9+
format: ['esm'],
10+
outDir: 'dist',
11+
clean: true, // Recommended: Cleans 'dist' before building
12+
sourcemap: true,
2313

24-
// 4. Type Definitions
25-
// Bundles d.ts files into a single output
26-
dts: true,
14+
// 3. Platform & Target
15+
target: 'esnext',
16+
platform: 'node',
17+
shims: true, // Polyfills common Node.js shims (__dirname, etc.)
2718

28-
// 5. CRITICAL: Vendoring Strategy
29-
// This tells tsdown: "Bundle the code for this specific package into the output,
30-
// but treat all other dependencies as external (require/import)."
31-
noExternal: [
32-
'@modelcontextprotocol/sdk-core'
33-
]
19+
// 4. Type Definitions
20+
// Bundles d.ts files into a single output
21+
dts: true,
22+
23+
// 5. CRITICAL: Vendoring Strategy
24+
// This tells tsdown: "Bundle the code for this specific package into the output,
25+
// but treat all other dependencies as external (require/import)."
26+
noExternal: ['@modelcontextprotocol/sdk-core']
3427
});

0 commit comments

Comments
 (0)