Skip to content

Commit 1142137

Browse files
committed
fix(svelte-check): use machine format when run by Claude Code
Fixes #2868
1 parent 6ad05e5 commit 1142137

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/svelte-check/src/options.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,10 @@ const outputFormats = ['human', 'human-verbose', 'machine', 'machine-verbose'] a
9999
type OutputFormat = (typeof outputFormats)[number];
100100

101101
function getOutputFormat(opts: Record<string, any>): OutputFormat {
102+
// https://github.com/sveltejs/language-tools/issues/2868
103+
if (process.env.CLAUDECODE === '1' && !opts.output) {
104+
return 'machine';
105+
}
102106
return outputFormats.includes(opts.output) ? opts.output : 'human-verbose';
103107
}
104108

0 commit comments

Comments
 (0)