Skip to content

Clean up ESLint/Prettier debt + expand CI gate to full validate #33

Description

@vincentvella

Problem

bun run validate (= typecheck && lint && format) is currently red: expo lint reports ~114 errors (plus 3 warnings). CI only gates typecheck for now, so Renovate auto-merges are protected against type breaks but not lint/format regressions.

Breakdown of the lint errors:

  • ~102 Prettier formatting errors (auto-fixable with bun run lint:fix / bun run format:fix).
  • local/use-effect-in-custom-hook-only — the custom rule fires in several components (EditableAvatar, Skeleton, SocialSignIn, TriedThisModal, …) that call useEffect directly in a component.
  • @typescript-eslint/no-non-null-assertion — non-null ! assertions in a few spots.
  • a couple of no-unused-vars warnings.

Proposed approach

  1. Run bun run format:fix + bun run lint:fix to clear the ~102 auto-fixable ones (review the diff).
  2. Manually resolve the remainder: either refactor the useEffect call sites to satisfy the custom hook rule (or scope/disable the rule deliberately if it's too strict), and replace the non-null assertions with proper guards.
  3. Once bun run validate is green, flip the CI gate in .github/workflows/ci.yml from bun run typecheckbun run validate so lint/format are enforced going forward.

Affected

  • Repo-wide (components/, scripts/), .github/workflows/ci.yml
  • ESLint config (the custom local/use-effect-in-custom-hook-only rule)

Metadata

Metadata

Assignees

Labels

tech-debtCode health / refactor / debt

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions