chore: quality-tightening (oxfmt + oxlint + tsgo + vitest + husky + CI)#2
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
eslint-plugin-unicorn(no prior eslint config beyondeslint-plugin-prettierandeslint-plugin-unicorn39 which weren't actually wired up to a runner)@vitest/coverage-istanbul. 13 unit tests coveringEventBuffer(FIFO, length invariants, flush) andDateFormat.simpleTimeIn24HourFormat(zero padding, midnight/23:59 edges, Date vs timestamp inputs).scripts/ensure-husky.mjsself-heal +lint-staged. Conventional-commit enforcement wasn't used downstream and was a custom local-only check..github/workflows/checks.ymlruns format + lint + typecheck + test on every PR + push. Repo had no CI before.tsgo scope
Typecheck is scoped to
model/(the part that doesn't depend on react/firebase/classnames peer deps). Thehooks/,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.tshas a pre-existingrnd.match(...)reassignment that confuses TS5 (the file is documented as based ontracker1/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-objectFunctiontypes, etc.)yarn format:check\u2014 clean (56 files)yarn typecheck\u2014 clean (scoped)yarn test\u2014 13 / 13