Skip to content

chore: quality-tightening (oxfmt + oxlint + tsgo + vitest + husky + CI)#2

Merged
webbertakken merged 1 commit into
mainfrom
quality-tightening
May 5, 2026
Merged

chore: quality-tightening (oxfmt + oxlint + tsgo + vitest + husky + CI)#2
webbertakken merged 1 commit into
mainfrom
quality-tightening

Conversation

@webbertakken
Copy link
Copy Markdown
Owner

Standard rollout for this react/firebase/tailwind utility library. Was a published source library with husky 7 + commitlint + prettier 2.x; no tests, no CI.

  • prettier \u2192 oxfmt
  • new: oxlint with eslint-plugin-unicorn (no prior eslint config beyond eslint-plugin-prettier and eslint-plugin-unicorn 39 which weren't actually wired up to a runner)
  • new: vitest 4 + @vitest/coverage-istanbul. 13 unit tests covering EventBuffer (FIFO, length invariants, flush) and DateFormat.simpleTimeIn24HourFormat (zero padding, midnight/23:59 edges, Date vs timestamp inputs).
  • Drops husky 7 + commitlint; replaced with the standard husky 9 + scripts/ensure-husky.mjs self-heal + lint-staged. Conventional-commit enforcement wasn't used downstream and was a custom local-only check.
  • new: .github/workflows/checks.yml runs format + lint + typecheck + test on every PR + push. Repo had no CI before.
  • new: gitleaks, actionlint, shellcheck as mise-managed binaries.

tsgo scope

Typecheck is scoped to model/ (the part that doesn't depend on react/firebase/classnames peer deps). The hooks/, ui/, service/ trees are typechecked by consumers when they install this library along with its peers; running tsgo over them in CI here would just need the peer types as devDeps for no real value. utils/uuid.ts has a pre-existing rnd.match(...) reassignment that confuses TS5 (the file is documented as based on tracker1/node-uuid4); a follow-up PR should clean it up.

Verified locally

  • yarn lint \u2014 0 errors, 16 warnings (all pre-existing patterns: a11y on the modal, wrapper-object Function types, etc.)
  • yarn format:check \u2014 clean (56 files)
  • yarn typecheck \u2014 clean (scoped)
  • yarn test \u2014 13 / 13

Standard rollout for this react/firebase/tailwind utility library.
Was a published source library with husky 7 + commitlint + prettier
2.x; no tests, no CI.

- prettier -> oxfmt
- new: oxlint with eslint-plugin-unicorn (no prior eslint config
  beyond eslint-plugin-prettier and eslint-plugin-unicorn 39 which
  weren't actually wired up to a runner).
- new: vitest 4 + @vitest/coverage-istanbul; the repo had 0 tests
  before. 13 unit tests covering EventBuffer (FIFO queue, length
  invariants, flush) and DateFormat.simpleTimeIn24HourFormat (zero
  padding, midnight/23:59 edges, Date vs timestamp inputs).
- Drops husky 7 + .husky/commit-msg + commitlint; replaced with the
  standard husky 9 + scripts/ensure-husky.mjs self-heal +
  lint-staged. Conventional commits aren't enforced anywhere
  upstream of this repo and were a custom local-only check.
- new: .github/workflows/checks.yml runs format + lint + typecheck +
  test on every PR + push. Repo had no CI before.
- new: gitleaks, actionlint, shellcheck as mise-managed binaries.

tsgo: typecheck is scoped to model/ (the part that doesn't depend
on react/firebase/classnames peer deps). The hooks/, ui/, service/
trees are typechecked by consumers when they install this library
along with its peers; running tsgo over them in CI here would just
need the peer types as devDeps for no real value. utils/uuid.ts has
a pre-existing rnd.match(...) reassignment that confuses TS5 (the
file is documented as based on tracker1/node-uuid4); a follow-up
PR should clean it up.

Code-level oxlint fixes:
- 4 unused parameters prefixed with '_' (ErrorBoundary
  getDerivedStateFromError, utils/object.ts default replacer's
  value/root, useFirebaseDrop's onDrop event).

Verified locally: lint 0/16 (all pre-existing warnings),
format clean, typecheck clean (scoped), test 13/13.
@webbertakken webbertakken merged commit da3eb14 into main May 5, 2026
1 check passed
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