Skip to content

Commit 66ada51

Browse files
committed
Fix warning message json-format suggestion to proper syntax
The warning message appears for example as "Use --json to see the list of exports TypeScript can see but Node.js cannot." However, passing `--json` leads to an error: `error: unknown option '--json'` Per `--help` argument definition, the correct syntax is `-f json` or `--format json`, which I confirmed both worked for me.
1 parent 035e965 commit 66ada51

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/kind-ducks-compare.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@arethetypeswrong/cli": patch
3+
---
4+
5+
Fix warning message json-format suggestion to use proper syntax

packages/cli/src/render/typed.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export async function typed(
4949
const summaryTexts = Object.keys(grouped).map((kind) => {
5050
const info = problemKindInfo[kind as core.ProblemKind];
5151
const description = marked(
52-
`${info.description}${info.details ? ` Use \`--json\` to see ${info.details}.` : ""} ${info.docsUrl}`,
52+
`${info.description}${info.details ? ` Use \`-f json\` to see ${info.details}.` : ""} ${info.docsUrl}`,
5353
);
5454
return `${emoji ? `${info.emoji} ` : ""}${description}`;
5555
});

0 commit comments

Comments
 (0)