fix(FN-2179): suppress ANSI regex lint warning in dev server logs

This commit is contained in:
Fusion
2026-04-20 04:55:39 -07:00
committed by gsxdsm
parent 7b7883434f
commit c03868af48

View File

@@ -23,8 +23,11 @@ const STATUS_BADGE_CONFIG: Record<"stopped" | "starting" | "running" | "failed",
failed: { className: "dev-server-status-badge--failed", label: "Failed" },
};
// eslint-disable-next-line no-control-regex -- ANSI escape stripping is required for readable terminal logs.
const ANSI_ESCAPE_PATTERN = new RegExp("\\u001B\\[[0-9;]*m", "g");
function sanitizeLogLine(line: string): string {
return line.replace(/\x1b\[[0-9;]*m/g, "");
return line.replace(ANSI_ESCAPE_PATTERN, "");
}
function candidateKey(candidate: DevServerCandidate): string {