diff --git a/scripts/generate-json-schema.ts b/scripts/generate-json-schema.ts index 51f4ee206..2cf3bcf17 100644 --- a/scripts/generate-json-schema.ts +++ b/scripts/generate-json-schema.ts @@ -12,7 +12,6 @@ import { } from "../src/constants/rulesync-paths.js"; import { RulesyncMcpFileSchema } from "../src/features/mcp/rulesync-mcp.js"; import { RulesyncPermissionsFileSchema } from "../src/types/permissions.js"; -import { runOxfmt } from "./run-oxfmt.js"; type SchemaMeta = { $id: string; @@ -69,5 +68,7 @@ generateSchema( permissionsOutputPath, ); -// Format generated schema files with oxfmt for consistent formatting -runOxfmt([outputPath, mcpOutputPath, permissionsOutputPath]); +// No oxfmt pass here: since oxfmt 0.62.0, gitignored paths are skipped even +// when passed explicitly, and these schema files are gitignored. The +// JSON.stringify output above is already deterministic, and no drift check +// compares these files, so the formatter pass is unnecessary. diff --git a/scripts/run-oxfmt.ts b/scripts/run-oxfmt.ts index b216a1fca..bea300498 100644 --- a/scripts/run-oxfmt.ts +++ b/scripts/run-oxfmt.ts @@ -6,7 +6,9 @@ export const repoRoot = join(import.meta.dirname, ".."); /** * Format generated files with the repo's formatter so drift checks compare * stable output. Shared by the generator scripts (docs content, supported-tools - * tables, JSON schemas) so a fix here reaches every call site. + * tables) so a fix here reaches every call site. Only pass tracked files: + * since oxfmt 0.62.0, gitignored paths are skipped even when passed + * explicitly, and the command fails with "Expected at least one target file". * * npx is npx.cmd on Windows; a shell resolves it. `--no-install` keeps npx from * silently fetching a different oxfmt version when the pinned devDependency is