Skip to content

fast-format

Formats code with oxfmt as part of your lint pass. No separate formatter step needed.

The rule runs oxfmt on each file during linting. When the file doesn’t match the formatted output, it reports a minimal set of edits (insert, delete, replace) and can apply them with --fix.

  1. The rule reads your file and identifies its language (TS, JS, TSX, JSX).
  2. It runs oxfmt on the source.
  3. It computes a minimal diff between original and formatted output.
  4. ESLint applies those edits when you run with --fix.

An LRU cache (default capacity: 32 files) skips unchanged files so repeated runs stay fast.

Rust-powered

oxfmt runs in native code. Formatting is fast.

LRU caching

Unchanged files get skipped via an internal cache keyed on filename + content.

Auto-fix

Works with eslint --fix and bun run lint:fix.

Unified tooling

No separate formatter step. Formatting runs alongside your other lint rules.

Run the fix command to format your project:

Terminal window
bun run lint:fix
eslint --fix src/
TypeMeaningExample
INSERTMissing whitespace or punctuationInsert " " at position 42
DELETEExtra or incorrect charactersDelete ";" at position 10
REPLACESwapping styles (e.g., quotes)Replace 'hello' with "hello"

The rule processes .js, .jsx, .ts, .tsx, .mjs, and .cjs files. Everything else gets skipped.