Skip to content

Commit 6fd2c2e

Browse files
Merge pull request #276 from DeRaowl/fix/percy-session-const-lint
fix(percy): use const for session state in percy-session
2 parents 7912f7a + 0bbeeb9 commit 6fd2c2e

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

src/lib/percy-api/percy-session.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export interface PercySessionState {
2424
orgId?: string;
2525
}
2626

27-
let session: PercySessionState = {};
27+
const session: PercySessionState = {};
2828

2929
// ── Setters ─────────────────────────────────────────────────────────────────
3030

@@ -94,11 +94,9 @@ export function formatActiveBuild(): string {
9494
let out = `\n### Active Build\n\n`;
9595
out += `| | |\n|---|---|\n`;
9696
out += `| **Build ID** | ${session.buildId} |\n`;
97-
if (session.buildNumber)
98-
out += `| **Build #** | ${session.buildNumber} |\n`;
97+
if (session.buildNumber) out += `| **Build #** | ${session.buildNumber} |\n`;
9998
if (session.buildUrl) out += `| **URL** | ${session.buildUrl} |\n`;
100-
if (session.buildBranch)
101-
out += `| **Branch** | ${session.buildBranch} |\n`;
99+
if (session.buildBranch) out += `| **Branch** | ${session.buildBranch} |\n`;
102100
return out;
103101
}
104102

@@ -108,9 +106,7 @@ export function formatSessionSummary(): string {
108106
const masked = session.projectToken
109107
? `****${session.projectToken.slice(-4)}`
110108
: "";
111-
parts.push(
112-
`**Project:** ${session.projectName} (${masked})`,
113-
);
109+
parts.push(`**Project:** ${session.projectName} (${masked})`);
114110
}
115111
if (session.buildId) {
116112
parts.push(

0 commit comments

Comments
 (0)