chore(lint): restore zero-error eslint baseline

This commit is contained in:
William Valentin
2026-02-15 22:25:29 -08:00
parent 8b529a18f2
commit 46538e71a8
11 changed files with 184 additions and 160 deletions
@@ -20,6 +20,7 @@ Scope: Production-risk-first audit of bugs, code improvements, and feature oppor
- ✅ F-015 addressed: retry defaults no longer classify timeout-style failures as non-retryable, improving resilience for transient timeout conditions.
- ✅ F-011 addressed: Slack user-name resolution now uses bounded TTL+LRU caching to prevent unbounded growth.
- ◑ F-013 partially addressed: reset-command normalization is now shared across Discord/Slack/WhatsApp adapters via `src/channels/utils.ts`, reducing duplicated command-parsing logic.
- ◑ F-004 partially addressed: lint error baseline is restored (`pnpm lint` now passes with 0 errors), while warning-burn-down remains open.
## Executive Summary
@@ -27,14 +28,14 @@ Current health snapshot:
- `pnpm typecheck`: passing
- `pnpm build`: passing
- `pnpm test:run`: passing (`140/140` files, `1773/1773` tests)
- `pnpm lint`: failing (`148 errors`, `530 warnings`)
- `pnpm lint`: passing with warnings only (`0 errors`, `539 warnings`)
Top conclusions:
- A critical Web UI security issue exists in markdown rendering (unsanitized HTML insertion).
- Runtime configuration edits from the settings page appear non-persistent across restart.
- Tool timeout behavior likely allows underlying side effects to continue after timeout.
- Gateway request-body handling and WebSocket ingress controls need abuse protections.
- Lint quality gates are currently broken at scale, reducing CI signal quality.
- Lint error-level gate is restored, but warning debt remains high.
## Methodology and Scope
@@ -125,7 +126,7 @@ Remediation update (2026-02-16):
- Severity: Medium
- Impact: CI noise, reduced confidence in static analysis, and slower defect detection.
- Evidence:
- `pnpm -s lint` => `148 errors`, `530 warnings`
- `pnpm -s lint` => `0 errors`, `539 warnings`
- Error concentration:
- `src/daemon/models.ts` (90 errors)
- `src/cli/tui.ts` (25 errors)
@@ -142,6 +143,10 @@ Remediation update (2026-02-16):
- CI check enforcing `eslint` errors = 0.
- Secondary threshold check for warning reduction trend.
Remediation update (2026-02-16):
- Stage 1 complete: fixed all error-level ESLint violations in impacted high-error files so `pnpm lint` now passes with `0` errors.
- Stage 2 pending: warning-burn-down remains (currently `539` warnings).
### F-005 Medium: ESLint browser globals mismatch causes avoidable UI lint failures
- Severity: Medium
@@ -443,9 +448,9 @@ pnpm -s lint
Observed outcomes:
- Typecheck/build/test: passing.
- Lint: failing with `148 errors` and `530 warnings`.
- Lint: passing with warnings only (`0` errors, `539` warnings).
Top lint error concentration snapshot:
Historical pre-remediation lint error concentration snapshot:
- `src/daemon/models.ts`: 90 errors
- `src/cli/tui.ts`: 25 errors
- `src/daemon/routing.ts`: 14 errors
+19
View File
@@ -2628,6 +2628,25 @@
"docs/plans/analysis/2026-02-16-codebase-audit-report.md"
],
"test_status": "pnpm test:run src/channels/utils.test.ts src/channels/discord/adapter.test.ts src/channels/slack/adapter.test.ts src/channels/whatsapp/adapter.test.ts + pnpm typecheck passing"
},
"audit-followup-lint-error-baseline": {
"status": "completed",
"date": "2026-02-16",
"updated": "2026-02-16",
"summary": "Completed stage-1 lint recovery by clearing all error-level ESLint violations in high-error files (`daemon/models.ts`, `cli/tui.ts`, `daemon/routing.ts`, `gateway/ui/pages/settings.js`) and adjacent return-await/no-useless-return issues so `pnpm lint` now passes with warnings only.",
"files_modified": [
"src/daemon/models.ts",
"src/cli/tui.ts",
"src/daemon/routing.ts",
"src/gateway/ui/pages/settings.js",
"src/backends/native/orchestrator.ts",
"src/frontends/tui/components/App.tsx",
"src/gateway/server.test.ts",
"src/hooks/engine.ts",
"src/tools/executor.test.ts",
"docs/plans/analysis/2026-02-16-codebase-audit-report.md"
],
"test_status": "pnpm test:run src/gateway/server.test.ts src/tools/executor.test.ts src/backends/native/orchestrator.test.ts src/daemon/routing.test.ts + pnpm typecheck + pnpm lint passing (0 errors, warnings remain)"
}
},
"overall_progress": {