Skip to content

Commit 3b0562f

Browse files
[chore] Update MCP DevKit server to use ESM/vitest
1 parent 0fa3be8 commit 3b0562f

50 files changed

Lines changed: 3268 additions & 4459 deletions

Some content is hidden

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

.editorconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
root = true
2+
3+
[*]
4+
indent_size = 2
5+
indent_style = space
6+
end_of_line = lf
7+
insert_final_newline = true
8+
charset = utf-8

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,10 @@ dist/
55
.env
66
.env.local
77
.env.*.local
8+
9+
# tshy
10+
.tshy/
11+
.tshy-build/
12+
13+
# Test results
14+
test-results.xml

eslint.config.mjs

Lines changed: 15 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -1,97 +1,25 @@
1-
import js from '@eslint/js';
2-
import typescript from '@typescript-eslint/eslint-plugin';
3-
import typescriptParser from '@typescript-eslint/parser';
4-
import prettier from 'eslint-config-prettier';
5-
import importPlugin from 'eslint-plugin-import';
6-
import unusedImports from 'eslint-plugin-unused-imports';
1+
import eslint from '@eslint/js';
2+
import { defineConfig } from 'eslint/config';
3+
import tseslint from 'typescript-eslint';
4+
import globals from 'globals';
75

8-
export default [
6+
export default defineConfig(
7+
eslint.configs.recommended,
8+
tseslint.configs.recommended,
99
{
10-
ignores: ['dist/**', 'node_modules/**', '*.js', '*.cjs', '*.mjs']
11-
},
12-
{
13-
files: ['**/*.test.ts', '**/*.spec.ts', '**/*.test-helpers.ts'],
1410
languageOptions: {
1511
globals: {
16-
describe: 'readonly',
17-
test: 'readonly',
18-
it: 'readonly',
19-
expect: 'readonly',
20-
beforeEach: 'readonly',
21-
afterEach: 'readonly',
22-
jest: 'readonly',
23-
fetch: 'readonly',
24-
global: 'readonly'
25-
},
12+
...globals.node,
13+
}
2614
},
2715
rules: {
28-
'no-undef': 'off',
29-
'@typescript-eslint/no-unused-vars': 'off',
30-
'unused-imports/no-unused-imports': 'off',
31-
'import/order': 'off',
32-
},
16+
"@typescript-eslint/no-explicit-any": "warn",
17+
}
3318
},
34-
js.configs.recommended,
3519
{
36-
files: ['src/**/*.ts', 'src/**/*.tsx'],
37-
languageOptions: {
38-
parser: typescriptParser,
39-
parserOptions: {
40-
ecmaVersion: 'latest',
41-
sourceType: 'module',
42-
project: './tsconfig.json'
43-
},
44-
globals: {
45-
fetch: 'readonly',
46-
process: 'readonly',
47-
global: 'readonly',
48-
globalThis: 'readonly',
49-
URL: 'readonly',
50-
Request: 'readonly',
51-
RequestInit: 'readonly',
52-
Response: 'readonly',
53-
Buffer: 'readonly',
54-
console: 'readonly',
55-
require: 'readonly',
56-
__dirname: 'readonly',
57-
__filename: 'readonly',
58-
},
59-
},
60-
plugins: {
61-
'@typescript-eslint': typescript,
62-
'import': importPlugin,
63-
'unused-imports': unusedImports
64-
},
20+
files: ["test/**/*.ts"],
6521
rules: {
66-
...typescript.configs.recommended.rules,
67-
'@typescript-eslint/no-unused-vars': 'off',
68-
'unused-imports/no-unused-imports': 'error',
69-
'unused-imports/no-unused-vars': [
70-
'warn',
71-
{
72-
vars: 'all',
73-
varsIgnorePattern: '^_',
74-
args: 'after-used',
75-
argsIgnorePattern: '^_'
76-
}
77-
],
78-
'import/order': [
79-
'error',
80-
{
81-
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'],
82-
'newlines-between': 'never',
83-
alphabetize: {
84-
order: 'asc'
85-
}
86-
}
87-
],
88-
'no-console': 'warn',
89-
'@typescript-eslint/explicit-function-return-type': 'off',
90-
'@typescript-eslint/no-explicit-any': 'warn',
91-
'@typescript-eslint/no-non-null-assertion': 'warn',
92-
'@typescript-eslint/no-require-imports': 'off',
93-
'no-undef': 'off' // TypeScript handles this
22+
"@typescript-eslint/no-unused-vars": "off",
9423
}
95-
},
96-
prettier
97-
];
24+
}
25+
);

jest.config.js

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

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"dxt_version": "0.1",
33
"name": "@mapbox/mcp-devkit-server",
44
"display_name": "Mapbox MCP DevKit Server",
5-
"version": "0.3.1",
5+
"version": "0.3.2",
66
"description": "Mapbox MCP devkit server",
77
"author": {
88
"name": "Mapbox, Inc."

0 commit comments

Comments
 (0)