From 0b2658f5b079b90de0439e9fbc0309ce9b175d55 Mon Sep 17 00:00:00 2001 From: Joan Xie Date: Thu, 21 Aug 2025 15:28:01 -0700 Subject: [PATCH] lint --- src/cli/cli.ts | 4 ++-- src/shared/config.ts | 2 +- src/types.ts | 4 +++- test/cli.test.ts | 2 +- test/config.test.ts | 2 +- test/schemas.test.ts | 2 +- test/sign.e2e.test.ts | 6 +++++- 7 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/cli/cli.ts b/src/cli/cli.ts index 2b3b939..ac38b52 100644 --- a/src/cli/cli.ts +++ b/src/cli/cli.ts @@ -153,7 +153,7 @@ program key: string; intermediate?: string[]; selfSigned?: boolean; - } + }, ) => { void (async () => { try { @@ -219,7 +219,7 @@ program process.exit(1); } })(); - } + }, ); // Verify command diff --git a/src/shared/config.ts b/src/shared/config.ts index 4e57d74..20e4262 100644 --- a/src/shared/config.ts +++ b/src/shared/config.ts @@ -1,7 +1,7 @@ import type { + Logger, McpbManifest, McpbUserConfigValues, - Logger, McpServerConfig, } from "../types.js"; diff --git a/src/types.ts b/src/types.ts index bfbc978..edd3f8c 100644 --- a/src/types.ts +++ b/src/types.ts @@ -20,7 +20,9 @@ export type McpServerConfig = z.infer; export type McpbManifestAuthor = z.infer; -export type McpbManifestRepository = z.infer; +export type McpbManifestRepository = z.infer< + typeof McpbManifestRepositorySchema +>; export type McpbManifestPlatformOverride = z.infer< typeof McpbManifestPlatformOverrideSchema diff --git a/test/cli.test.ts b/test/cli.test.ts index c083aba..142b916 100644 --- a/test/cli.test.ts +++ b/test/cli.test.ts @@ -41,7 +41,7 @@ describe("DXT CLI", () => { // Commander outputs help to stderr when no command is provided const execError = error as ExecSyncError; expect(execError.stderr.toString()).toContain( - "Usage: dxt [options] [command]", + "Usage: mcpb [options] [command]", ); } }); diff --git a/test/config.test.ts b/test/config.test.ts index d18b1fe..e76668c 100644 --- a/test/config.test.ts +++ b/test/config.test.ts @@ -3,7 +3,7 @@ import { hasRequiredConfigMissing, replaceVariables, } from "../src/shared/config"; -import type { McpbManifest, Logger } from "../src/types"; +import type { Logger, McpbManifest } from "../src/types"; describe("replaceVariables", () => { it("should replace variables in strings", () => { diff --git a/test/schemas.test.ts b/test/schemas.test.ts index 2519e9d..b85cdeb 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"); diff --git a/test/sign.e2e.test.ts b/test/sign.e2e.test.ts index ddfd87b..cbf1c4f 100755 --- a/test/sign.e2e.test.ts +++ b/test/sign.e2e.test.ts @@ -13,7 +13,11 @@ import * as fs from "fs"; import forge from "node-forge"; import * as path from "path"; -import { signMcpbFile, unsignMcpbFile, verifyMcpbFile } from "../src/node/sign.js"; +import { + signMcpbFile, + unsignMcpbFile, + verifyMcpbFile, +} from "../src/node/sign.js"; // Test directory const TEST_DIR = path.join(__dirname, "test-output");