Skip to content

Add Oxlint as complementary JS/TS linter with tsgolint integration #2198

@gregkonush

Description

@gregkonush

Summary

Adopt Oxlint across the monorepo as a complementary JS/TS linter alongside existing tooling (Biome, ktlint, gofmt, buf, etc.), and integrate type-aware checks via tsgolint where supported. This should add new lint entrypoints without replacing current ones.

Context

  • JS/TS linting today is Biome-centric (root biome.json, workspace scripts call bunx biome check or biome lint).
  • CI workflows invoke Biome checks per app/service.
  • Type-aware linting is desired, but tsgolint (typescript-go) has limitations (e.g., baseUrl in tsconfig).
  • Many generated artifacts are excluded in Biome and should remain excluded in Oxlint.

Desired Outcome

  • Oxlint configured at the repo root with shared rules and ignore patterns.
  • New scripts for Oxlint (non-type-aware and type-aware variants) added without removing existing lint scripts.
  • Optional type-aware linting enabled per workspace based on tsconfig compatibility.
  • CI runs Oxlint as an additional check (non-blocking or phased to blocking).
  • Clear docs for developers on when/how to run Oxlint and how it coexists with Biome.

Scope

  • In scope:
    • Root Oxlint config (e.g., .oxlintrc.json) and ignore rules.
    • New lint scripts in root and workspace package.json files.
    • CI workflow updates to add Oxlint checks.
    • Lint-specific tsconfig(s) (as needed) to enable --type-aware.
    • Docs updates describing dual-tool workflow.
  • Out of scope:
    • Removing or replacing Biome, ktlint, gofmt, buf, or other existing linters.
    • Large-scale code reformatting.
    • Changing production infra or ArgoCD manifests.

Constraints & Risks

  • tsgolint/type-aware mode uses typescript-go and does not support some TS options (notably baseUrl), which may require lint-only tsconfigs.
  • Oxlint config is JSON-only and nested configs do not merge; enforce a single canonical config.
  • Avoid lint noise on generated or vendored files.

Rollout / Ops Notes

  • Start with a pilot workspace (e.g., apps/froussard or packages/codex) and run Oxlint side-by-side with existing lint.
  • Expand to remaining workspaces after tuning rules and ignore patterns.
  • Consider non-blocking CI at first, then switch to blocking once stable.

Validation

  • bun run lint:oxlint (repo or workspace) passes on pilot workspace.
  • bun run lint:oxlint:type passes on pilot workspace where enabled.
  • Existing lint commands (Biome, ktlint, gofmt, buf) still pass.
  • CI workflows include Oxlint step and stay green.

Codex Prompt

Implement Oxlint as a complementary JS/TS linter in this monorepo (do not replace existing tooling). Add root Oxlint config + ignore patterns mirroring current Biome excludes, install oxlint and oxlint-tsgolint, and add new lint scripts (e.g., lint:oxlint, lint:oxlint:type) alongside existing ones. Introduce lint-specific tsconfig(s) to enable oxlint --type-aware where compatible (avoid unsupported TS options like baseUrl). Update CI to run Oxlint as an additional check with phased enforcement. Update docs describing the dual-tool workflow. Focus on JS/TS workspaces only; do not touch infra or generated directories.

Additional Context

  • Repo root biome.json already lists many generated file excludes; port these to Oxlint ignore patterns.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions