Skip to content

Commit 9fc7e28

Browse files
v2 ESlint fixes (modelcontextprotocol#1403)
Co-authored-by: Matt <77928207+mattzcarey@users.noreply.github.com>
1 parent 9296459 commit 9fc7e28

File tree

84 files changed

+1672
-1346
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+1672
-1346
lines changed

.github/workflows/conformance.yml

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,51 @@
11
name: Conformance Tests
22

33
on:
4-
push:
5-
branches: [main]
6-
pull_request:
7-
workflow_dispatch:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
workflow_dispatch:
88

99
concurrency:
10-
group: conformance-${{ github.ref }}
11-
cancel-in-progress: true
10+
group: conformance-${{ github.ref }}
11+
cancel-in-progress: true
1212

1313
permissions:
14-
contents: read
14+
contents: read
1515

1616
jobs:
17-
client-conformance:
18-
runs-on: ubuntu-latest
19-
continue-on-error: true
20-
steps:
21-
- uses: actions/checkout@v4
22-
- name: Install pnpm
23-
uses: pnpm/action-setup@v4
24-
with:
25-
run_install: false
26-
- uses: actions/setup-node@v4
27-
with:
28-
node-version: 24
29-
cache: pnpm
30-
cache-dependency-path: pnpm-lock.yaml
31-
- run: pnpm install
32-
- run: pnpm run build:all
33-
- run: pnpm run test:conformance:client:all
17+
client-conformance:
18+
runs-on: ubuntu-latest
19+
continue-on-error: true
20+
steps:
21+
- uses: actions/checkout@v4
22+
- name: Install pnpm
23+
uses: pnpm/action-setup@v4
24+
with:
25+
run_install: false
26+
- uses: actions/setup-node@v4
27+
with:
28+
node-version: 24
29+
cache: pnpm
30+
cache-dependency-path: pnpm-lock.yaml
31+
- run: pnpm install
32+
- run: pnpm run build:all
33+
- run: pnpm run test:conformance:client:all
3434

35-
server-conformance:
36-
runs-on: ubuntu-latest
37-
continue-on-error: true
38-
steps:
39-
- uses: actions/checkout@v4
40-
- name: Install pnpm
41-
uses: pnpm/action-setup@v4
42-
with:
43-
run_install: false
44-
- uses: actions/setup-node@v4
45-
with:
46-
node-version: 24
47-
cache: pnpm
48-
cache-dependency-path: pnpm-lock.yaml
49-
- run: pnpm install
50-
- run: pnpm run build:all
51-
- run: pnpm run test:conformance:server
35+
server-conformance:
36+
runs-on: ubuntu-latest
37+
continue-on-error: true
38+
steps:
39+
- uses: actions/checkout@v4
40+
- name: Install pnpm
41+
uses: pnpm/action-setup@v4
42+
with:
43+
run_install: false
44+
- uses: actions/setup-node@v4
45+
with:
46+
node-version: 24
47+
cache: pnpm
48+
cache-dependency-path: pnpm-lock.yaml
49+
- run: pnpm install
50+
- run: pnpm run build:all
51+
- run: pnpm run test:conformance:server

CONTRIBUTING.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ This repository has two main branches:
6363

6464
Small PRs get reviewed fast. Large PRs sit in the queue.
6565

66-
We can review a few dozen lines in a few minutes. But a PR touching hundreds of lines across many files takes real effort to verify—and things inevitably slip through. If your change is big, break it into a stack of smaller PRs or get clear alignment from a maintainer on your approach in an issue before submitting a large PR.
66+
We can review a few dozen lines in a few minutes. But a PR touching hundreds of lines across many files takes real effort to verify—and things inevitably slip through. If your change is big, break it into a stack of smaller PRs or get clear alignment from a maintainer on your
67+
approach in an issue before submitting a large PR.
6768

6869
### What Gets Rejected
6970

@@ -183,6 +184,4 @@ Please review our [Security Policy](SECURITY.md) for reporting security vulnerab
183184

184185
### License
185186

186-
By contributing, you agree that your code contributions will be licensed under
187-
the Apache License 2.0. Documentation contributions (excluding specifications)
188-
are licensed under CC-BY 4.0. See the [LICENSE](LICENSE) file for details.
187+
By contributing, you agree that your code contributions will be licensed under the Apache License 2.0. Documentation contributions (excluding specifications) are licensed under CC-BY 4.0. See the [LICENSE](LICENSE) file for details.

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# MCP TypeScript SDK
22

3-
> [!IMPORTANT]
4-
> **This is the `main` branch which contains v2 of the SDK (currently in development, pre-alpha).**
3+
> [!IMPORTANT] **This is the `main` branch which contains v2 of the SDK (currently in development, pre-alpha).**
54
>
65
> We anticipate a stable v2 release in Q1 2026. Until then, **v1.x remains the recommended version** for production use. v1.x will continue to receive bug fixes and security updates for at least 6 months after v2 ships to give people time to upgrade.
76
>

common/eslint-config/eslint.config.mjs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import eslintConfigPrettier from 'eslint-config-prettier/flat';
88
import importPlugin from 'eslint-plugin-import';
99
import nodePlugin from 'eslint-plugin-n';
1010
import simpleImportSortPlugin from 'eslint-plugin-simple-import-sort';
11+
import eslintPluginUnicorn from 'eslint-plugin-unicorn';
1112
import { configs } from 'typescript-eslint';
1213

1314
const __dirname = path.dirname(fileURLToPath(import.meta.url));
@@ -17,6 +18,7 @@ export default defineConfig(
1718
...configs.recommended,
1819
importPlugin.flatConfigs.recommended,
1920
importPlugin.flatConfigs.typescript,
21+
eslintPluginUnicorn.configs.recommended,
2022
{
2123
languageOptions: {
2224
parserOptions: {
@@ -42,6 +44,10 @@ export default defineConfig(
4244
}
4345
},
4446
rules: {
47+
'unicorn/prevent-abbreviations': 'off',
48+
'unicorn/no-null': 'off',
49+
'unicorn/prefer-add-event-listener': 'off',
50+
'unicorn/no-useless-undefined': ['error', { checkArguments: false }],
4551
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
4652
'n/prefer-node-protocol': 'error',
4753
'@typescript-eslint/consistent-type-imports': ['error', { disallowTypeAnnotations: false }],
@@ -64,6 +70,12 @@ export default defineConfig(
6470
optionalDependencies: false,
6571
peerDependencies: true
6672
}
73+
],
74+
'unicorn/filename-case': [
75+
'error',
76+
{
77+
case: 'camelCase'
78+
}
6779
]
6880
}
6981
},

common/eslint-config/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"eslint-plugin-import": "^2.32.0",
3030
"eslint-plugin-n": "catalog:devTools",
3131
"eslint-plugin-simple-import-sort": "^12.1.1",
32+
"eslint-plugin-unicorn": "^62.0.0",
3233
"prettier": "catalog:devTools",
3334
"typescript": "catalog:devTools",
3435
"typescript-eslint": "catalog:devTools"

common/vitest-config/vitest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default defineConfig({
1414
exclude: ignorePatterns,
1515
deps: {
1616
moduleDirectories: ['node_modules', path.resolve(__dirname, '../../packages'), path.resolve(__dirname, '../../common')]
17-
},
17+
}
1818
},
1919
poolOptions: {
2020
threads: {

0 commit comments

Comments
 (0)