From 9dda9e88a3d689d18b973d646ad92a51e2f29449 Mon Sep 17 00:00:00 2001 From: Maxime Quandalle Date: Sat, 18 Oct 2025 06:57:46 +0200 Subject: [PATCH 1/2] feat: use machine format when run by Claude Code Fixes #2868 Co-Authored-By: Claude --- packages/svelte-check/src/options.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/svelte-check/src/options.ts b/packages/svelte-check/src/options.ts index b8ceca8f2..a8a347db8 100644 --- a/packages/svelte-check/src/options.ts +++ b/packages/svelte-check/src/options.ts @@ -99,7 +99,14 @@ const outputFormats = ['human', 'human-verbose', 'machine', 'machine-verbose'] a type OutputFormat = (typeof outputFormats)[number]; function getOutputFormat(opts: Record): OutputFormat { - return outputFormats.includes(opts.output) ? opts.output : 'human-verbose'; + if (outputFormats.includes(opts.output)) { + return opts.output; + } else if (process.env.CLAUDECODE === '1') { + // https://github.com/sveltejs/language-tools/issues/2868 + return 'machine'; + } else { + return 'human-verbose'; + } } function getWorkspaceUri(opts: Record) { From 24fc9baabdc9c0afb04bff204e43160b1860b15e Mon Sep 17 00:00:00 2001 From: Simon H <5968653+dummdidumm@users.noreply.github.com> Date: Tue, 11 Nov 2025 09:34:31 +0100 Subject: [PATCH 2/2] Change commit type from feat to chore --- .changeset/old-carrots-rescue.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/old-carrots-rescue.md diff --git a/.changeset/old-carrots-rescue.md b/.changeset/old-carrots-rescue.md new file mode 100644 index 000000000..5c3f5acad --- /dev/null +++ b/.changeset/old-carrots-rescue.md @@ -0,0 +1,5 @@ +--- +"svelte-check": patch +--- + +chore: use machine format when run by Claude Code