ci: add Biome + Vitest + git-hook quality gates - #15
Merged
Conversation
Adopt one fast quality-gate stack for shell (template to scale to the other Mind apps): - Biome 2.5 for lint + format (one binary; replaces eslint/prettier, and `next lint` was removed in Next 16). Recommended ruleset + React/Next domains. Rules currently violated by existing code are set to "warn" (a visible baseline to ratchet to error per-app) so the gate goes green without behavior-changing autofixes. - Vitest runner (passWithNoTests for now; real tests land per-app). - husky hooks: pre-commit runs lint-staged (format + lint staged files, fast); pre-push runs lint + typecheck + test, skipping typecheck when the WASM bindings aren't built locally. - CI: build the Rust->WASM crypto bindings (`npm run wasm`) before tsc/build. Fixes the red `tsc --noEmit` gate (couldn't resolve ./pkg/crypto_core) and verifies the crypto FFI contract for real. Adds `biome ci` + test steps. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
🎯 What this does
Adds the standard quality-gate stack to shell — the pilot for fleet-wide rollout to the other
@mind-studio/uiconsumers.next lint(removed in Next 16). Config inbiome.json: recommended + React/Next domains, 2-space / width-100, scoped to app source.--passWithNoTestsfor now; real tests land per-app later).pre-commit→ lint-staged (biome check --writeon staged files, fast)pre-push→ lint + typecheck + test (skips typecheck when WASM bindings absent so non-Rust contributors aren't blocked; CI typechecks for real)ci.yml): now builds the Rust→WASM crypto core before typecheck, then runsbiome ci+tsc+test+build.🩹 Also fixes red CI
main's CI has been red since #12 —tsccouldn't resolve./pkg/crypto_corebecause CI never built the WASM bindings. This PR builds them in CI, so this should be the first fully-green CI since #12.🛠 Adoption pattern (no behavior change)
Format + safe Biome fixes only. Rules existing code violates are set to
warn(a visible baseline to ratchet per-app), so the gate is green without risky autofixes.--unsafewas never applied broadly (it rewrites React hook dep arrays — dangerous given single-flight OIDC + autosave invariants).✅ Verified locally
npm run wasm→biome ci(0 errors, 60 warns baseline) →tsc --noEmit(0) →test(0) →build(0). All green.📦 Commits
ci:tooling (biome.json, hooks, ci.yml, package.json) — rebased onto current main, keptcore ^0.7.0 / ui ^0.4.0style:69-file Biome formatting sweep, regenerated fresh against current main