Skip to content

Replace explicit any with real types and make no-explicit-any an error - #519

Merged
Charlie-Carson merged 3 commits into
mainfrom
chore/types-cleanup
Nov 20, 2026
Merged

Charlie-Carson merged 3 commits into
mainfrom
chore/types-cleanup

Conversation

@jzongker-churchapps

Copy link
Copy Markdown
Contributor

This removes every explicit any from LessonsApp (161 → 0) and turns on @typescript-eslint/no-explicit-any as an error. It is three commits; reviewing commit by commit is easiest.

  1. Clear lint warnings (7 → 0). Removes unused catch bindings and params. PlaylistFeed had an unused handleChange, so I deleted it, and its state values are now discarded (the setters stay, so the existing fetch still runs).
  2. Replace explicit any with real types (56 files).
    • Each of the 22 edit forms has a local FormValues type.
    • New LessonFeedDataInterface, ProviderStatsInterface and DownloadGeoInterface.
    • Several interfaces are widened to match what the code already sends. Ids allow null, CustomizationInterface.actionContent is string | number, and the feed section/action types gained id/sort/roleId to match LessonsApi's models.
    • The home page stats annotation was wrong: it declared churchCount/lessonCount, but the API returns { providers, studies, lessons }. It's now correct.
  3. Make no-explicit-any a lint error.

No as unknown as, @ts-ignore, eslint-disable or ! assertions were added, and the any changes are meant to leave runtime behavior unchanged. The one spot to look at: CustomizationHelper's sort now compares Number(a.sort) < Number(b.sort). That is identical for numbers and nulls, and would only differ if sort values arrived as numeric strings.

Checks: tsc --noEmit 0 errors, eslint src/ clean, next build succeeds. Playwright was not run because this machine has no database.

🤖 Generated with Claude Code

@vercel

vercel Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
lessons-app Ready Ready Preview Nov 20, 2026 3:47am UTC

Request Review

@Charlie-Carson
Charlie-Carson merged commit d479af5 into main Nov 20, 2026
4 checks passed
@Charlie-Carson
Charlie-Carson deleted the chore/types-cleanup branch November 20, 2026 04:13

This branch was successfully deployed

1 active deployment
Preview — 5ddd62ad Deployed Nov 20, 2026 by vercel[bot]
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.

2 participants