Skip to content

Future: support linters/formatters beyond oxlint/oxfmt (eslint, prettier, biome) #8

Description

@robdmoore

Idea

The built-in lint and format checks are hard-wired to oxlint and oxfmt. Many projects use ESLint, Prettier, or Biome instead. Make the lint/format checks pluggable so those projects get first-class verifyx lint / verifyx format (with the same fix-locally / check-in-CI behaviour) instead of having to override with a raw verify:* script.

Today's workaround

A consumer can already override per check with a raw script, e.g.:

{
  "scripts": {
    "verify:lint": "eslint .",
    "verify:lint:fix": "eslint . --fix",
    "verify:format": "prettier --check .",
    "verify:format:fix": "prettier --write ."
  }
}

This works (and :fix variants pick fix vs check mode), but it's manual, loses the built-in's tool-name-on-failure hint, and verifyx init can't scaffold it.

What first-class support could look like

  • Detect the project's toolchain (presence of eslint/.eslintrc*, prettier/.prettierrc*, biome.json) and pick the matching built-in commands, each with check vs fix variants:
    • ESLint: eslint . / eslint . --fix
    • Prettier: prettier --check . / prettier --write .
    • Biome: biome lint + biome format --write (or biome check)
    • oxlint/oxfmt (current default)
  • verifyx init offers/auto-selects the detected toolchain and installs the right devDeps + knip ignores.
  • Keep the check named for its function (lint, format) — the tool stays an implementation detail (surfaced only in the failure hint).

Design notes

  • Probably a small "provider" abstraction: a lint/format check resolves its command from the detected (or configured) tool. Config override via verify.config.json / package.json#verify (e.g. "lint": "eslint").
  • Biome is interesting because one tool covers both lint + format — may warrant a combined provider.
  • Interacts with the changed-files mode idea — all of these accept file paths, so they're scopable.

Status

Parked. Not scheduled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions