From 66ada5147f4a229da95e444c79c7621fe9d097ea Mon Sep 17 00:00:00 2001 From: Steven DeMartini <1647130+sjdemartini@users.noreply.github.com> Date: Sat, 14 Sep 2024 19:24:11 -0700 Subject: [PATCH] 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. --- .changeset/kind-ducks-compare.md | 5 +++++ packages/cli/src/render/typed.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/kind-ducks-compare.md diff --git a/.changeset/kind-ducks-compare.md b/.changeset/kind-ducks-compare.md new file mode 100644 index 0000000..b3c6536 --- /dev/null +++ b/.changeset/kind-ducks-compare.md @@ -0,0 +1,5 @@ +--- +"@arethetypeswrong/cli": patch +--- + +Fix warning message json-format suggestion to use proper syntax diff --git a/packages/cli/src/render/typed.ts b/packages/cli/src/render/typed.ts index eb17079..f2b10fd 100644 --- a/packages/cli/src/render/typed.ts +++ b/packages/cli/src/render/typed.ts @@ -49,7 +49,7 @@ export async function typed( const summaryTexts = Object.keys(grouped).map((kind) => { const info = problemKindInfo[kind as core.ProblemKind]; const description = marked( - `${info.description}${info.details ? ` Use \`--json\` to see ${info.details}.` : ""} ${info.docsUrl}`, + `${info.description}${info.details ? ` Use \`-f json\` to see ${info.details}.` : ""} ${info.docsUrl}`, ); return `${emoji ? `${info.emoji} ` : ""}${description}`; });