diff --git a/packages/cli/src/utils/lintFormat.test.ts b/packages/cli/src/utils/lintFormat.test.ts index 1c31b5417b..63f8a2fc86 100644 --- a/packages/cli/src/utils/lintFormat.test.ts +++ b/packages/cli/src/utils/lintFormat.test.ts @@ -217,12 +217,19 @@ describe("formatLintStartupMessage", () => { }, ]); - it("collapses to a one-line summary by default, pointing at --lint-verbose (no Studio open)", () => { + it("collapses to a one-line summary by default, pointing at the lint command (no Studio open)", () => { const lines = formatLintStartupMessage(result, { kind: "summary" }); expect(lines).toHaveLength(1); expect(lines[0]).toContain("2 error(s), 1 warning(s)"); expect(lines[0]).not.toContain("Studio"); - expect(lines[0]).toContain("--lint-verbose"); + expect(lines[0]).toContain("hyperframes lint"); + }); + + it("does not name --lint-verbose, a flag lint and check do not take", () => { + for (const pointer of [undefined, "studio"] as const) { + const lines = formatLintStartupMessage(result, { kind: "summary", pointer }); + expect(lines[0]).not.toContain("--lint-verbose"); + } }); it("names the Studio badge and the lint command when pointer is 'studio'", () => { diff --git a/packages/cli/src/utils/lintFormat.ts b/packages/cli/src/utils/lintFormat.ts index 74d7eb83d7..7d490acd1f 100644 --- a/packages/cli/src/utils/lintFormat.ts +++ b/packages/cli/src/utils/lintFormat.ts @@ -76,8 +76,8 @@ function formatLintCounts( } /** Full findings in verbose mode, a one-line summary otherwise. `pointer` (summary - * mode) picks the hint: "cli" names --lint-verbose, "studio" also names the lint - * command, since preview's stdout may be read by an agent. */ + * mode) picks the hint: both name the lint command, "studio" also the Studio badge. --lint-verbose is + * not named: only render, preview and publish take it, and agents tried it on lint and check. */ export type LintMessageMode = | { kind: "verbose"; options?: LintFormatOptions } | { kind: "summary"; pointer?: "cli" | "studio" }; @@ -91,7 +91,7 @@ export function formatLintStartupMessage( const hint = mode.pointer === "studio" ? "see the Lint badge in Studio, or run `hyperframes lint` for full output" - : "run with --lint-verbose for full output"; + : "run `hyperframes lint` for full output"; return [` Lint: ${counts} — ${hint}.`]; }