Skip to content

tech-debt batch 2: type-checked ESLint + CI hygiene (#149/#160)#163

Merged
delabrcd merged 2 commits into
mainfrom
tech-debt/batch-2-tooling
Jun 22, 2026
Merged

tech-debt batch 2: type-checked ESLint + CI hygiene (#149/#160)#163
delabrcd merged 2 commits into
mainfrom
tech-debt/batch-2-tooling

Conversation

@delabrcd

Copy link
Copy Markdown
Owner

Tech-debt batch 2 — tooling hardening (epic #161). No runtime/feature change; surfaces future debt automatically + speeds CI.

Closes #149, closes #160.

#149 — type-checked ESLint

  • Added @typescript-eslint/{eslint-plugin,parser}@7.18.0 (v7 = the ESLint 8.57 / eslint-config-next 14.2.x era).
  • New overrides block scoped to src/lib/** enables no-floating-promises (error), no-misused-promises (error), no-explicit-any (warn). next/core-web-vitals kept; next build enforces the rules (no ignoreDuringBuilds).
  • Zero floating/misused-promise errors in existing code — the async scraper/scheduler already awaits correctly; no await/void added, no behavior change, no suppressions. 28 no-explicit-any warnings remain (warnings; collect.ts typing is deferred to Scraper dedup + typed GraphQL (auth login-fill, collect.ts any cluster, shared date/err helpers) #152).
  • Verified the rule fires (not a silent no-op): a deliberately-injected floating promise is flagged as an error; reverted.

#160 — CI hygiene (dependency bumps deferred)

  • Build cache: test + smoke-boot now use docker buildx with a shared GHA cache (distinct scope=test/scope=smoke, --load preserves the image for the run/boot steps). Targets/tags/assertions unchanged.
  • Coverage (report-only): added @vitest/coverage-v8@2.1.8 + a test:coverage script + a non-gating if: always() step that prints the src/lib/** coverage summary to the job summary. No thresholds → cannot fail CI. (Pure libs are high: series.ts 100%, prediction.ts 96.9%.)
  • Node-24 action bumps: checkout@v7, setup-node@v6, setup-buildx-action@v4, build-push-action@v7, login-action@v4, metadata-action@v6 — all confirmed to exist + target Node 24 (the prior actions logged a Node-20 deprecation warning).
  • Deferred (NOT in this PR): the runtime dep bumps (next/prisma/playwright/recharts/react/eslint) — those go via the staging/update path per the issue, each its own PR (playwright is image-coupled).

Verification (local, CI path)

  • Docker test stage: 63 files / 921 tests. Production builder stage (next build = lint+typecheck+build gate): green. Coverage summary renders. No numeric/scraper logic touched.

delabrcd added 2 commits June 22, 2026 17:01
Add @typescript-eslint/eslint-plugin + parser (v7.18.0, matching the
ESLint 8.57 / eslint-config-next 14.2.x era) as devDependencies and wire
type-checked linting via an overrides block scoped to src/lib/** so the
blast radius stays bounded.

- no-floating-promises -> error
- no-misused-promises  -> error
- no-explicit-any      -> warn (deferred typing tracked in #152)

parserOptions.project points at ./tsconfig.json so the type-aware rules
run under next lint (and thus next build, which has no ignoreDuringBuilds).
No floating/misused-promise errors surfaced in the existing src/lib code,
so no scraper/scheduler behavior was changed.

Closes #149
…n bumps (#160)

- Switch the test and smoke-boot docker build steps to buildx with a shared
  type=gha cache (distinct scope=test / scope=smoke), keeping --load and the
  same targets/tags so the subsequent docker run/boot steps are unchanged.
- Add @vitest/coverage-v8 (matching vitest 2.1.8), a test:coverage script, and
  a non-gating CI step that prints a pure-libs (src/lib/**) coverage summary to
  the job summary. No thresholds — report-only first (standards §1).
- Bump the Node-20 GitHub Actions to their latest Node-24 majors: checkout v4->v7,
  setup-node v4->v6, setup-buildx-action v3->v4, build-push-action v6->v7,
  login-action v3->v4, metadata-action v5->v6.

Out of scope (deferred to the operator staging/update path): the next/prisma/
playwright/recharts/react/eslint dependency bumps.
@delabrcd delabrcd merged commit 225181c into main Jun 22, 2026
6 checks passed
@delabrcd delabrcd deleted the tech-debt/batch-2-tooling branch June 22, 2026 17:13
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.

CI build caching + coverage report + staged dependency bumps Add @typescript-eslint rules (no-floating-promises, no-misused-promises) scoped to lib/

1 participant