Skip to content

Clear the pre-existing lint backlog in index.jsx, main.js, and preload.js - #114

Merged
juanmaguitar merged 1 commit into
trunkfrom
juanmaguitar/lint-backlog-cleanup
Aug 5, 2026
Merged

Clear the pre-existing lint backlog in index.jsx, main.js, and preload.js#114
juanmaguitar merged 1 commit into
trunkfrom
juanmaguitar/lint-backlog-cleanup

Conversation

@juanmaguitar

Copy link
Copy Markdown
Collaborator

Summary

  • The repo had no linter until Add automated PR review: ESLint for style, an agent for judgement #112, so eslint . reports pre-existing findings across files nobody had touched since — 57 of them concentrated in src/renderer/index.jsx, src/main.js, and src/preload.js. These three kept blocking Add an update path so sites can move to the latest trunk #111's lint check on lines that PR never modified.
  • Clears all of them in these three files. lint.yml still only lints changed files, but once eslint eventually moves to the full repo, these three won't be part of the remaining work.
  • Mechanical fixes (unused vars/imports, nested ternaries, no-unused-expressions, no-shadow, eqeqeq, prefer-const, JSDoc @param) preserve behavior exactly.
  • Judgment calls, each documented inline:
    • console.* in the SMTP handler → the existing logEvent/logError helpers from ./logging, matching the rest of the main process.
    • alert()/confirm() are left in place with justified eslint-disable comments — replacing this file's whole alert-based UX convention is a separate, larger change than a lint cleanup should make.
    • Two dead zip-download-era leftovers removed: downloadFile() and WORDPRESS_ZIP_URL (and their now-unused https/extract-zip imports) — the app clones via git now, nothing calls either.
    • A couple of genuine accessibility gaps fixed: the email list row gets a keyboard handler alongside its click handler, and an anchor styled as a button became a real <button>.

Test plan

  • npx eslint --max-warnings=0 --no-warn-ignored src/renderer/index.jsx src/main.js src/preload.js — clean
  • npm test — 113/113 passing
  • npx eslint . — remaining findings are all outside these three files (untouched by this PR)

🤖 Generated with Claude Code

…d.js

The repo had no linter until #112, so eslint . reports pre-existing
findings across files nobody had touched since. These three files kept
blocking PR #111's lint check on lines it never modified. Clears them so
CI can eventually move eslint from changed-files-only to the full repo.

Mechanical fixes (unused vars/imports, nested ternaries, no-unused-expressions,
no-shadow, eqeqeq, prefer-const, JSDoc) preserve behavior exactly. Judgment
calls, documented inline: console.* -> the existing logEvent/logError helpers
in the SMTP handler; alert()/confirm() left in place with justified
eslint-disable comments (replacing the app's whole alert-based UX convention
is a separate, larger change); two dead zip-download-era functions
(downloadFile, WORDPRESS_ZIP_URL) and their now-unused imports removed;
a few genuine a11y gaps fixed (keyboard handler on the email list row,
anchor-as-button converted to a real button).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

Findings: 0 🔴 · 0 🟡 · 0 🔵 — no findings across the five dimensions.

This is the first automated review pass on this PR (no prior summary to reconcile).

Verified against .github/ai-review-rules.md:

  • Architecture — no spawns, IPC surface, persistence shape, or streaming path touched. downloadFile/WORDPRESS_ZIP_URL/extract-zip import removal is dead code from the retired zip-download flow (confirmed no remaining references anywhere in src/, test/).
  • Security — no IPC handler, url:open, loopback binding, or spawn shell option touched.
  • Performance — no change to per-chunk log handling or work that scales with the site registry.
  • Cross-platform — no path composition, process-kill, or Windows-specific code touched.
  • Tests — pure lint cleanup with no behavior change, so no new test is required. Spot-checked the two reordering diffs in src/main.js (playground:start's buildDir, startWpDebugTail's wpContentDir/filePath) — both moves are after their guard return, so no early-use regression.

Also checked by hand, since these are exactly the kind of thing a mechanical lint pass can get wrong silently:

  • src/renderer/index.jsx: sidebar's dead createdLabel/statusLabel locals were never rendered in that scope (confirmed against origin/trunk) — distinct from SiteRow's own createdLabel, which is untouched and still renders. emailViewTab state was already write-only (no read site found) before being trimmed to [, setEmailViewTab]. The webStarting/serverUrl ternary-to-sibling-JSX-expression splits render the same output.
  • src/main.js: SMTP handler's console.log/console.errorlogEvent/logError matches the pattern already used everywhere else in this file (playground:start, playground-web:start, quit sweep).
Style / process notes (non-blocking)
  • extract-zip is still listed in package.json/package-lock.json but, after this PR, has no remaining call site in the source tree. Worth pruning in a follow-up so the dependency list matches actual usage — not urgent, and outside this PR's stated scope (lint backlog, not dependency hygiene).

@juanmaguitar
juanmaguitar merged commit d111b18 into trunk Aug 5, 2026
4 checks passed
@juanmaguitar
juanmaguitar deleted the juanmaguitar/lint-backlog-cleanup branch August 11, 2026 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant