Skip to content

Commit e627e89

Browse files
waltossclaude
andcommitted
Fix formatting (biome)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent c92a251 commit e627e89

3 files changed

Lines changed: 29 additions & 5 deletions

File tree

src/cli/parser.ts

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,25 @@ import { generateCommandHelp, printHelp, printHelpAgent } from "./help.ts";
33
import { registry } from "./registry.ts";
44
import type { GlobalFlags, ParsedArgs } from "./types.ts";
55

6-
const GLOBAL_FLAGS = new Set(["session", "json", "color", "verbose", "help-agent", "help", "version"]);
6+
const GLOBAL_FLAGS = new Set([
7+
"session",
8+
"json",
9+
"color",
10+
"verbose",
11+
"help-agent",
12+
"help",
13+
"version",
14+
]);
715

816
// Hardcoded defaults — merged with derived config from defineCommand() schemas
9-
const DEFAULT_BOOLEAN_FLAGS = new Set(["json", "color", "verbose", "help-agent", "help", "version"]);
17+
const DEFAULT_BOOLEAN_FLAGS = new Set([
18+
"json",
19+
"color",
20+
"verbose",
21+
"help-agent",
22+
"help",
23+
"version",
24+
]);
1025

1126
const DEFAULT_SHORT_MAP: Record<string, string> = {
1227
V: "version",

src/commands/stack.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,12 @@ defineCommand({
3333
return 0;
3434
}
3535

36-
console.log(formatStack(data, { color: shouldEnableColor(ctx.global.color), verbose: ctx.global.verbose }));
36+
console.log(
37+
formatStack(data, {
38+
color: shouldEnableColor(ctx.global.color),
39+
verbose: ctx.global.verbose,
40+
}),
41+
);
3742

3843
return 0;
3944
},

src/formatter/stack.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ export function formatStack(frames: StackFrame[], opts?: FormatStackOptions): st
5050
for (const seg of segments) {
5151
if ("ref" in seg) {
5252
maxRefLen = Math.max(maxRefLen, seg.ref.length);
53-
const nameLen = verbose ? seg.functionName.length : Math.min(seg.functionName.length, MAX_NAME_WIDTH);
53+
const nameLen = verbose
54+
? seg.functionName.length
55+
: Math.min(seg.functionName.length, MAX_NAME_WIDTH);
5456
maxNameLen = Math.max(maxNameLen, nameLen);
5557
}
5658
}
@@ -72,7 +74,9 @@ export function formatStack(frames: StackFrame[], opts?: FormatStackOptions): st
7274
}
7375

7476
const ref = frame.ref.padEnd(maxRefLen);
75-
const displayName = verbose ? frame.functionName : truncateName(frame.functionName, MAX_NAME_WIDTH);
77+
const displayName = verbose
78+
? frame.functionName
79+
: truncateName(frame.functionName, MAX_NAME_WIDTH);
7680
const name = displayName.padEnd(maxNameLen);
7781
const file = shortPath(frame.file, { verbose });
7882
const loc =

0 commit comments

Comments
 (0)