Skip to content

Commit 1c7f5f0

Browse files
committed
fix(serve): use const cwd in POST /session (prefer-const lint)
CI lint failed with packages/cli/src/serve/server.ts:199:9 prefer-const: 'cwd' is never reassigned. The wave-4 rewrite split the original 'let cwd; if (!cwd) cwd = boundWorkspace' into a single ternary, which removes the only mutation path; the variable should be const accordingly.
1 parent c922a4e commit 1c7f5f0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/cli/src/serve/server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ export function createServeApp(
196196
.json({ error: '`cwd` must be a string absolute path when provided' });
197197
return;
198198
}
199-
let cwd = hasCwd ? (body['cwd'] as string) : boundWorkspace;
199+
const cwd = hasCwd ? (body['cwd'] as string) : boundWorkspace;
200200
if (!path.isAbsolute(cwd)) {
201201
res
202202
.status(400)

0 commit comments

Comments
 (0)