ci: migrate to oxlint + biome + husky

Closed
TH
3mo ago
+2839-1374

Summary

Migrate linting and formatting stack from ESLint + Prettier to oxlint + Biome. Add husky pre-commit hook for auto-formatting.

BeforeAfter
ESLint 9 + typescript-eslintoxlint
PrettierBiome formatter
No pre-commit hookhusky + lint-staged

Changes

  • Removed: eslint, prettier, typescript-eslint
  • Added: oxlint, @biomejs/biome, husky, lint-staged
  • eslint.config.mjs → .oxlintrc.json — typescript plugin, correctness category, _-prefix unused-var ignore
  • biome.json — 2-space indent, 80 width, double quotes, semicolons, trailing commas, formatWithErrors
  • All 16 packages/project.json — eslint src → oxlint src in lint target
  • nx.json — lint input .eslintrc.json → .oxlintrc.json
  • .husky/pre-commit — runs lint-staged → biome format --write on staged files
  • package.json — format and format:check scripts, lint-staged config

Husky pre-commit

Every git commit auto-formats staged *.{ts,js,mjs,json} files with Biome. Verified working — this commit was formatted by the hook.

Test plan

  • bun run lint — 16 projects, 0 errors (oxlint)
  • bun run build — 16 projects green
  • bun run test — 15/16 green (compiler-gitlab pre-existing syntax error)
  • bun run typecheck — 15/16 green (same pre-existing issue)
  • bun run format — 91 files reformatted, no breakage
  • husky pre-commit — formats staged files, commit succeeds

Stacked on #20

Generated with Devin


Summary by cubic

Migrated linting/formatting to oxlint + @biomejs/biome, added a husky pre-commit hook, and hardened CI to run format/lint/typecheck/build/test with Nx caching and security gates. Follow-ups tighten rules and workflows: stricter linting (typescript/no-explicit-any: error), CodeQL PR annotations, a top‑down merge‑stack flow with bounded retries, a more resilient GC watchdog, collision‑free matrix ID encoding, and minor Biome/docs polish.

  • Dependencies

    • Removed: eslint, prettier, typescript-eslint; Added: oxlint, @biomejs/biome, husky, lint-staged
    • Config: .oxlintrc.json (TS plugin; correctness; _-ignored unused vars; tests linted as warn), biome.json (2‑space, 80 cols; excludes .claude/, lock), Nx lint inputs → .oxlintrc.json
    • CI & hooks: GitHub Actions runs format/lint/typecheck/build/test with Nx caching; actions pinned; Bun 1.3.14 + Node 24; bun install --frozen-lockfile --ignore-scripts; CodeQL (security‑extended) emits PR annotations with escaped properties; Codacy and Sonar configured; husky pre‑commit runs bunx lint-staged → biome format --write
  • Bug Fixes

    • GC watchdog: tolerate transient gc status/bd list failures; unknown SUSPENDED/CONTROLLER; safe per‑command errors; accurate counts
    • Core IDs: type‑tagged matrix value encoding to prevent cross‑type collisions
    • CLI: doctor uses spawnSync (no shell); init checks args.force === true
    • Checks: generated Node resolver entries (bun/npm/yarn/pnpm for lint/test/typecheck) to remove duplication; behavior unchanged
    • Tests: fixed invalid regex in GitLab tests; restored test lint; Docker integration tests require SVERKA_DOCKER === "1"; all projects pass typecheck and tests
    • Merge tooling: added merge-stack formula + sverka-merge-stack skill with TOP‑DOWN merge flow, bounded /act --loop retries, and retrospective via Beads
    • Polish: Biome formatting touch‑ups; SKILL.md markdown fixes (code fence language, indentation) to satisfy review gates