diff --git a/.changeset/twenty-houses-sell.md b/.changeset/twenty-houses-sell.md new file mode 100644 index 0000000..e522625 --- /dev/null +++ b/.changeset/twenty-houses-sell.md @@ -0,0 +1,5 @@ +--- +'steiger': minor +--- + +Make the JSON reporter output to stderr to be consistent with the pretty reporter diff --git a/packages/steiger/src/cli.ts b/packages/steiger/src/cli.ts index d407875..0751978 100755 --- a/packages/steiger/src/cli.ts +++ b/packages/steiger/src/cli.ts @@ -102,7 +102,7 @@ try { const printDiagnostics = (diagnostics: Array) => { if (consoleArgs.reporter === 'json') { - console.log(JSON.stringify(diagnostics, null, 2)) + console.error(JSON.stringify(diagnostics, null, 2)) } else { reportPretty(diagnostics, process.cwd()) }