Skip to content

Commit 780010c

Browse files
committed
fix: resolve ESLint errors in generated files and strengthen type checking
- Add src/core/generated-resources.ts to ESLint ignore list alongside existing generated-plugins.ts - Fix TypeScript warnings in src/core/resources.ts by replacing 'any' with 'unknown' and adding explicit return type - Upgrade @typescript-eslint/no-explicit-any from warning to error to prevent future 'any' usage This resolves the GitHub CI build-and-test linting failures caused by auto-generated files being linted.
1 parent 92bc4df commit 780010c

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

eslint.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default [
66
eslint.configs.recommended,
77
...tseslint.configs.recommended,
88
{
9-
ignores: ['node_modules/**', 'build/**', 'dist/**', 'coverage/**', 'src/core/generated-plugins.ts'],
9+
ignores: ['node_modules/**', 'build/**', 'dist/**', 'coverage/**', 'src/core/generated-plugins.ts', 'src/core/generated-resources.ts'],
1010
},
1111
{
1212
files: ['**/*.{js,ts}'],
@@ -25,7 +25,7 @@ export default [
2525
rules: {
2626
'prettier/prettier': 'error',
2727
'@typescript-eslint/explicit-function-return-type': 'warn',
28-
'@typescript-eslint/no-explicit-any': 'warn',
28+
'@typescript-eslint/no-explicit-any': 'error',
2929
'@typescript-eslint/no-unused-vars': ['error', {
3030
argsIgnorePattern: '^_',
3131
varsIgnorePattern: '^_'

src/core/resources.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export async function registerResources(server: McpServer): Promise<boolean> {
6969

7070
for (const [uri, resource] of resources) {
7171
// Create a handler wrapper that matches ReadResourceCallback signature
72-
const readCallback = async (resourceUri: URL, _extra: any) => {
72+
const readCallback = async (resourceUri: URL, _extra: unknown): Promise<ReadResourceResult> => {
7373
const result = await resource.handler(resourceUri);
7474
// Transform the content to match MCP SDK expectations
7575
return {

0 commit comments

Comments
 (0)