Skip to content

Commit 5c013af

Browse files
committed
fix: resolve final linting issues with type assertions and any types
1 parent b27059e commit 5c013af

File tree

2 files changed

+24
-4
lines changed

2 files changed

+24
-4
lines changed

src/generated/openapi.test.ts

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -322,14 +322,16 @@ describe('Generated OpenAPI Specification', () => {
322322
it('should have proper descriptions for all components', () => {
323323
Object.values(openapiSpec.paths).forEach((pathSpec: unknown) => {
324324
const spec = pathSpec as Record<string, unknown>;
325+
const pathSpec = spec as { post: { summary: string } };
325326
expect(pathSpec.post.summary).toBeTruthy();
326327
expect(pathSpec.post.summary.length).toBeGreaterThan(0);
327328
});
328329

329330
Object.entries(openapiSpec.components.schemas).forEach(
330331
([schemaName, schema]: [string, unknown]) => {
331332
const schemaObj = schema as Record<string, unknown>;
332-
Object.entries(schema.properties).forEach(([propName, property]: [string, any]) => {
333+
const schemaWithProps = schemaObj as { properties: Record<string, { description?: string }> };
334+
Object.entries(schemaWithProps.properties).forEach(([propName, property]) => {
333335
if (property.description) {
334336
expect(property.description.length).toBeGreaterThan(0);
335337
expect(property.description.trim()).toBe(property.description);
@@ -372,7 +374,25 @@ describe('Generated OpenAPI Specification', () => {
372374
// Collect all $ref references
373375
Object.values(openapiSpec.paths).forEach((pathSpec: unknown) => {
374376
const spec = pathSpec as Record<string, unknown>;
375-
const post = pathSpec.post;
377+
const postSpec = spec as {
378+
post: {
379+
requestBody?: {
380+
content?: {
381+
'application/json'?: {
382+
schema?: { $ref?: string }
383+
}
384+
}
385+
};
386+
responses: Record<string, {
387+
content?: {
388+
'application/json'?: {
389+
schema?: { $ref?: string }
390+
}
391+
}
392+
}>;
393+
}
394+
};
395+
const post = postSpec.post;
376396

377397
// Request body schema
378398
if (post.requestBody?.content?.['application/json']?.schema?.$ref) {
@@ -382,7 +402,7 @@ describe('Generated OpenAPI Specification', () => {
382402
}
383403

384404
// Response schemas
385-
Object.values(post.responses).forEach((response: any) => {
405+
Object.values(post.responses).forEach((response) => {
386406
if (response.content?.['application/json']?.schema?.$ref) {
387407
const ref = response.content['application/json'].schema.$ref;
388408
const schemaName = ref.replace('#/components/schemas/', '');

src/mcp-server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,10 @@ export function createMcpServer(): Server {
104104
options !== null &&
105105
!Array.isArray(options)
106106
) {
107-
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
108107
result = await markmv.moveFile(
109108
sourcePath,
110109
destinationPath,
110+
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
111111
options as Record<string, unknown>
112112
);
113113
} else {

0 commit comments

Comments
 (0)