← Back to Pull requests

chore(lint): add ESLint flat config + CI lint/build gate #6

Open
unknown opened this pull request with 201 lines diff across 2 files
View on GitHub
unknown unknown commented on Jun 10, 2026 22:37 UTC
Author

Summary

The repo has no linter today. This adds one to the v3.0.0 React codebase with a green baseline, plus a CI gate so future PRs get checked automatically.

Changes


  • eslint.config.mjs — ESLint 9 flat config: @eslint/js recommended + eslint-plugin-react (jsx-runtime) + eslint-plugin-react-hooks. Scoped to src/ (the live app) and the Node build scripts; legacy dirs (frontend/, electron/) and static sites (docs/, landing/) are ignored.

  • npm run lint script + dev dependencies (eslint@^9, pinned below 10 for eslint-plugin-react peer compatibility).

  • .github/workflows/ci.yml — runs npm run lint + npm run build:frontend on PRs and pushes to main. Full Tauri builds stay in the existing tag-triggered release.yml.
  • Baseline


    Green — 0 errors, 19 warnings (pre-existing exhaustive-deps / unused-var advisories, left as non-blocking signal). Two rules tuned to the codebase's intent rather than rewriting working code:
  • no-empty: { allowEmptyCatch: true } — the deliberate catch {} blocks are fine.

  • react-hooks/set-state-in-effect: 'warn' — the app intentionally syncs external config into state inside effects; surfaced, not blocked.
  • Bug caught on first run


    ESLint immediately flagged a real one: API.elevateNotchWindow in src/lib/api.js called a bare invoke that isn't defined in the module (every other method uses tauriInvoke), so calling it would throw ReferenceError at runtime. Fixed in this PR (one line).

    Testing


  • npm run lint → passes (exit 0)

  • npm ci → lockfile in sync

  • npm run build:frontend → clean
  • Diff: 201 lines (+150 / -51) across 2 files Reviewer: Builder106 Review duration: 254755m
    All Vouch review confidence checks passed
    Residual risk 0.37 = Change Risk (0.66) × (1 − Review Confidence (0.45)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.66 · 201 lines diff across 2 files
    0.66
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    44%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Shallow Review Depth shallow_review_depth
    0.344
    Diff Size diff_size
    0.318
    Sensitive Paths sensitive_paths
    0.066
    Real PR Conversation Timeline
    1 comments
    "Review active on #6"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: medium confidence: 44.7% reviewed sensitive_module
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 66.4% (HIGH) · Higher = larger blast radius
    66.4%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 44.7% · Lower = rushed or shallow review
    44.7%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 36.7% · Moderate risk
    36.7%