From 21c97105842bf09d213d3bdc0bd35073095b8e25 Mon Sep 17 00:00:00 2001 From: Joan Xie Date: Mon, 3 Nov 2025 15:57:20 -0800 Subject: [PATCH] Fix lint errors in types.ts and remove any casts - Use import type for VERSIONED_MANIFEST_SCHEMAS and DEFAULT_MANIFEST_VERSION - Remove unnecessary any type annotations from test file --- src/types.ts | 4 ++-- test/schemas.test.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/types.ts b/src/types.ts index 90c5c1d..63e5e38 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,7 +1,8 @@ import type * as z from "zod"; import type { McpbManifestSchema as McpbManifestSchemaAny } from "./schemas/any.js"; -import { VERSIONED_MANIFEST_SCHEMAS } from "./schemas/index.js"; +import type { VERSIONED_MANIFEST_SCHEMAS } from "./schemas/index.js"; +import type { DEFAULT_MANIFEST_VERSION } from "./shared/constants.js"; // Import schema types from the version matching DEFAULT_MANIFEST_VERSION import type { McpbManifestAuthorSchema, @@ -17,7 +18,6 @@ import type { McpbUserConfigValuesSchema, McpServerConfigSchema, } from "./schemas/0.2.js"; -import { DEFAULT_MANIFEST_VERSION } from "./shared/constants.js"; export type McpServerConfig = z.infer; diff --git a/test/schemas.test.ts b/test/schemas.test.ts index 6dab726..52943e0 100644 --- a/test/schemas.test.ts +++ b/test/schemas.test.ts @@ -27,7 +27,7 @@ describe("McpbManifestSchema", () => { expect(result.success).toBe(false); if (!result.success) { - const errors = result.error.issues.map((issue: any) => issue.path.join(".")); + const errors = result.error.issues.map((issue) => issue.path.join(".")); expect(errors).toContain("author.name"); expect(errors).toContain("author.email"); expect(errors).toContain("server.type"); @@ -273,7 +273,7 @@ describe("McpbManifestSchema", () => { const result = v0_3.McpbManifestSchema.safeParse(manifest); expect(result.success).toBe(false); if (!result.success) { - const messages = result.error.issues.map((issue: any) => issue.message); + const messages = result.error.issues.map((issue) => issue.message); expect(messages.join(" ")).toContain("${locale}"); } });