Skip to content

chore: add eslint 10 + prettier to web#14

Merged
frecar merged 2 commits intomainfrom
chore/add-eslint
Apr 18, 2026
Merged

chore: add eslint 10 + prettier to web#14
frecar merged 2 commits intomainfrom
chore/add-eslint

Conversation

@frecar
Copy link
Copy Markdown
Owner

@frecar frecar commented Apr 18, 2026

Summary

Brings beam/web in line with the standardized lint stack across ~/code (elfai, soldprice).

Stack added

  • eslint 10 + @eslint/js 10
  • @typescript-eslint/* 8.58
  • eslint-plugin-simple-import-sort 13
  • prettier 3.8

No React rules — beam/web is vanilla TS, so no @eslint-react / jsx-a11y / react-hooks needed (and no .npmrc legacy-peer-deps workaround needed because there's no stale-peer plugin in the chain).

Brownfield adoption

Set as warnings (so tool lands + CI passes; promote to 'error' as we clean up):

  • @typescript-eslint/no-explicit-any (~25 sites)
  • @typescript-eslint/no-unsafe-function-type (~2 sites)
  • no-console (~16 sites — debug / recovery paths)

Real fix in this PR

  • main.ts: replaced inline as import('./connection').InputEvent with a top-level type InputEvent import (consistent-type-imports).

Reformat

Auto-applied prettier --write across web/src (~21 files normalized) and eslint --fix to sort imports.

CI

Web job adds two steps: eslint src + prettier --check src.

Verification (spark-1)

  • npx tsc --noEmit clean
  • npx eslint src 0 errors, 47 warnings (brownfield)
  • npx prettier --check src clean
  • npx vitest run 55/55 pass

Follow-up

Triage the 47 brownfield warnings.

frecar added 2 commits April 18, 2026 23:45
Brings beam/web in line with the standardized lint stack across
~/code: eslint 10, @typescript-eslint, simple-import-sort, prettier.
No React rules — beam/web is vanilla TS, so no @eslint-react /
jsx-a11y / react-hooks needed (and no .npmrc workaround needed
because there's no stale-peer plugin to install around).

Brownfield adoption choices (set as 'warn' so the tool lands and CI
passes; promote to 'error' as we clean up):
- @typescript-eslint/no-explicit-any (~25 sites)
- @typescript-eslint/no-unsafe-function-type (~2 sites)
- no-console (~16 sites in error-recovery / debug paths)

Real fix in this PR:
- main.ts: replaced inline `as import('./connection').InputEvent`
  with a top-level `type InputEvent` import to satisfy
  consistent-type-imports.

Auto-applied prettier --write across web/src (~21 files normalized).
Auto-applied eslint --fix to sort imports.

CI Web job adds two steps: eslint src + prettier --check src.

Verified on spark-1 against the real install: tsc clean, eslint 0
errors / 47 warnings (brownfield), prettier clean, 55/55 tests pass.
@frecar frecar merged commit c751846 into main Apr 18, 2026
3 checks passed
@frecar frecar deleted the chore/add-eslint branch April 18, 2026 22:50
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.

1 participant