Skip to content

ci: lint, format, package checks, dist-drift guard, and husky hooks - #21

Open
gmegidish wants to merge 2 commits into
mainfrom
ci/tooling
Open

ci: lint, format, package checks, dist-drift guard, and husky hooks#21
gmegidish wants to merge 2 commits into
mainfrom
ci/tooling

Conversation

@gmegidish

@gmegidish gmegidish commented Aug 25, 2026

Copy link
Copy Markdown
Member

Summary

Adds the CI/tooling layer discussed for this repo (stacked on #20; will auto-retarget to main when it merges):

  • GitHub Actions CI on PRs and pushes to main: tsc --noEmit, ESLint, Prettier check, vitest, build, dist-drift check (git diff --exit-code dist/ — dist is committed and installed straight from git, so CI fails if a PR ships src changes with a stale build), and package-shape validation.
  • ESLint — typescript-eslint + react-hooks (flat config). Fixed the dead code it found (unused imports/vars, unused test helper). The new react-hooks compiler-era rules (refs, set-state-in-effect) flag pre-existing deliberate patterns in the stream plumbing — kept as warnings.
  • Prettier — follows the repo's committed .editorconfig (tabs, width 150); this PR carries the one-time reformat. Generated files (skins, boot assets, dist) ignored.
  • publint + @arethetypeswrong/cli — already paid for themselves: attw caught a real FalseCJS bug (ESM importers were served the CJS type declarations). The exports map now gives import/require each their matching types (index.d.mts / index.d.ts).
  • husky pre-commit — lint-staged (eslint --fix + prettier on staged files), typecheck, tests, then rebuilds dist and re-stages it, killing dist drift at the source. prepare is guarded with || true so github: installs of this package don't fail outside a git work tree.

…d buttons

- NinePatchSkin.platform is optional again (defaults to 'ios' for the boot
  screen) so consumer-defined skin objects stay type-compatible.
- DeviceControls threads disabled into each button as the native disabled
  attribute, so greyed-out boot controls can't be focused or activated
  from the keyboard (pointer-events alone didn't block that).

Claude-Session: https://claude.ai/code/session_01VtCcrdjXTnBUCLYv4HVo99
- GitHub Actions workflow: typecheck, lint, format check, tests, build,
  dist-drift check (dist/ is committed and installed straight from git),
  and package-shape validation on every PR and push to main.
- ESLint (typescript-eslint + react-hooks flat config); fixed the dead
  code it found (unused imports/vars). The new react-hooks compiler rules
  flag pre-existing deliberate patterns (refs in render, setState in
  stream effects) — kept as warnings for now.
- Prettier + .editorconfig switched to 2-space indent (the repo was
  mixed: components 2-space, stream classes tabs — this one-time pass
  converts the tab-indented files). Generated files (skins, boot assets,
  dist) are ignored.
- publint + @arethetypeswrong/cli: fixed a real FalseCJS issue they
  caught — the exports map served ESM importers the CJS type
  declarations; now import/require each get matching types.
- husky pre-commit: lint-staged (eslint --fix + prettier on staged
  files), typecheck, tests, then rebuild dist and re-stage it so a
  commit can never ship src changes with a stale build. The prepare
  script is guarded (husky || true) so git-dependency installs of this
  package don't fail.

Claude-Session: https://claude.ai/code/session_01VtCcrdjXTnBUCLYv4HVo99
@gmegidish
gmegidish changed the base branch from feat/boot-screen to main August 25, 2026 10:18
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