Skip to content

Clean up ESLint errors (frontend 77, backend 17) so CI lint gates can be enforced #913

Description

@feyishola

Context

When reviewing PR #898 (which tried to add npm run lint steps to CI), we found eslint --max-warnings 0 currently fails on the existing codebase, so the lint gates were deferred to keep CI green. This issue tracks clearing that lint debt so the gates can be re-added.

Reproduce:

(cd frontend && npm run lint)   # ✖ 77 problems (77 errors)
(cd backend && npm run lint)    # 17 errors

Frontend — 77 errors

Count Rule Notes
72 react-refresh/only-export-components Files export both a component and non-component values (common in context/provider/util files). Either split non-component exports into separate modules, or scope/relax this rule for those files (it is an HMR-only concern).
5 react/no-unescaped-entities Unescaped '/" in JSX text — replace with '/" or wrap in {'...'}.

Backend — 17 errors

Includes:

  • @typescript-eslint/require-await (×4) — async functions with no await; drop async or add the awaited call.
  • no-useless-escape (×3) — remove unnecessary escapes in regex/strings.
  • @typescript-eslint/no-misused-promises (×2) — promises passed where a void-returning callback is expected; wrap/await appropriately.
  • plus a few others (run the command above for the full list).

Definition of done

  1. cd frontend && npm run lint and cd backend && npm run lint both pass with --max-warnings 0.
  2. Re-add the Lint frontend / Lint backend steps to .github/workflows/ci.yml (the frontend and backend jobs) — these were intentionally left out of fix(ci): fix cache-dependency-paths and add lint and typecheck steps #898.

Note: the frontend react-refresh/only-export-components count is large but mostly mechanical / a lint-config decision; consider tackling it separately from the handful of genuine code fixes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions