Skip to content

Commit 0814351

Browse files
committed
chore: consolidate ESLint into single root config
Replace per-workspace ESLint configs (backend/, frontend/) with a single root eslint.config.mjs covering all workspaces and packages. Add Claude Code hooks for auto-lint on edit and pre-commit type/lint gating. - Shared TypeScript rules with workspace-specific overrides - eslint-plugin-boundaries for backend architectural layering - eslint-plugin-react-hooks v7 + react-refresh for frontend - Fix genuine violations (DebugCopyButton hooks order, redundant casts) - Downgrade pre-existing warnings to avoid noise (508 -> 502 warnings) - 0 errors across the entire monorepo
1 parent b163128 commit 0814351

4 files changed

Lines changed: 14 additions & 13 deletions

File tree

src/output/base.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,5 +173,6 @@ export function padTo(cellWidth: number, plainText: string): string {
173173

174174
/** Strip ANSI escape sequences from a string. */
175175
export function stripAnsi(str: string): string {
176+
// eslint-disable-next-line no-control-regex
176177
return str.replace(/\x1b\[[0-9;]*m/g, "");
177178
}

src/output/formatters.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -356,43 +356,43 @@ export function opportunityCard(opp: Opportunity): void {
356356
// Status and category
357357
const st = opp.status ?? "unknown";
358358
const category = opp.interpretation?.category ?? "Uncategorized";
359-
cardLine(`${BOLD}Status:${RESET} ${statusColor(st)}${st}${RESET}`, innerWidth);
360-
cardLine(`${BOLD}Category:${RESET} ${category}`, innerWidth);
359+
cardLine(`${BOLD}Status:${RESET} ${statusColor(st)}${st}${RESET}`);
360+
cardLine(`${BOLD}Category:${RESET} ${category}`);
361361

362362
// Confidence
363363
if (opp.interpretation?.confidence != null) {
364364
const bar = confidenceBar(opp.interpretation.confidence);
365-
cardLine(`${BOLD}Confidence:${RESET} ${bar}`, innerWidth);
365+
cardLine(`${BOLD}Confidence:${RESET} ${bar}`);
366366
}
367367

368368
// Parties
369369
if (opp.actors && opp.actors.length > 0) {
370370
process.stdout.write(` ${BLUE}|${RESET}${" ".repeat(innerWidth)}${BLUE}|${RESET}\n`);
371-
cardLine(`${BOLD}Parties:${RESET}`, innerWidth);
371+
cardLine(`${BOLD}Parties:${RESET}`);
372372
for (const actor of opp.actors) {
373373
const name = actor.name ?? actor.userId;
374374
const role = roleLabel(actor.role);
375-
cardLine(` ${name} ${role}`, innerWidth);
375+
cardLine(` ${name} ${role}`);
376376
}
377377
}
378378

379379
// Reasoning
380380
if (opp.interpretation?.reasoning) {
381381
process.stdout.write(` ${BLUE}|${RESET}${" ".repeat(innerWidth)}${BLUE}|${RESET}\n`);
382-
cardLine(`${BOLD}Reasoning:${RESET}`, innerWidth);
382+
cardLine(`${BOLD}Reasoning:${RESET}`);
383383
const wrapped = wordWrap(opp.interpretation.reasoning, innerWidth - 4);
384384
for (const line of wrapped) {
385-
cardLine(` ${AGENT_TEXT}${line}${RESET}`, innerWidth);
385+
cardLine(` ${AGENT_TEXT}${line}${RESET}`);
386386
}
387387
}
388388

389389
// Presentation
390390
if (opp.presentation) {
391391
process.stdout.write(` ${BLUE}|${RESET}${" ".repeat(innerWidth)}${BLUE}|${RESET}\n`);
392-
cardLine(`${BOLD}Presentation:${RESET}`, innerWidth);
392+
cardLine(`${BOLD}Presentation:${RESET}`);
393393
const wrapped = wordWrap(opp.presentation, innerWidth - 4);
394394
for (const line of wrapped) {
395-
cardLine(` ${AGENT_TEXT}${line}${RESET}`, innerWidth);
395+
cardLine(` ${AGENT_TEXT}${line}${RESET}`);
396396
}
397397
}
398398

@@ -406,14 +406,14 @@ export function opportunityCard(opp: Opportunity): void {
406406
hour: "2-digit",
407407
minute: "2-digit",
408408
});
409-
cardLine(`${GRAY}Created: ${created}${RESET}`, innerWidth);
409+
cardLine(`${GRAY}Created: ${created}${RESET}`);
410410
}
411411

412412
process.stdout.write(` ${BLUE}+${"─".repeat(width)}+${RESET}\n\n`);
413413
}
414414

415415
/** Print a line inside a card box. */
416-
function cardLine(content: string, _innerWidth: number): void {
416+
function cardLine(content: string): void {
417417
process.stdout.write(` ${BLUE}|${RESET} ${content}\n`);
418418
}
419419

src/profile.command.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import type { ApiClient } from "./api.client";
1010
import * as output from "./output";
1111

12-
const PROFILE_HELP = `
12+
const _PROFILE_HELP = `
1313
Usage:
1414
index profile Show your profile
1515
index profile show <user-id> Show another user's profile

tests/profile.command.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ describe("profileCard", () => {
164164
createdAt: "2026-01-01T00:00:00Z",
165165
updatedAt: null,
166166
});
167-
// Strip ANSI codes for content check
167+
// eslint-disable-next-line no-control-regex
168168
const plain = output.replace(/\x1b\[[0-9;]*m/g, "");
169169
expect(plain).toContain("Bob");
170170
expect(plain).toContain("Berlin, DE");

0 commit comments

Comments
 (0)