Promote oxfmt formatter from experimental to first-class #5706

Open
opened 2026-02-16 17:55:54 -05:00 by yindo · 0 comments
Owner

Originally created by @kynnyhsap on GitHub (Jan 14, 2026).

Originally assigned to: @thdxr on GitHub.

Problem

Currently, oxfmt requires the OPENCODE_EXPERIMENTAL_OXFMT environment variable to be enabled before it can be used as a formatter. This is unnecessarily restrictive for projects that already use oxfmt.

If a project has:

  • An .oxfmtrc.json or .oxfmtrc.jsonc config file, or
  • oxfmt in their package.json dependencies

...they've already made a deliberate choice to use oxfmt. Requiring an additional experimental flag adds friction without providing value.

Proposal

  1. Remove the experimental flag requirement from oxfmt detection
  2. Add config file detection (.oxfmtrc.json, .oxfmtrc.jsonc) - similar to how biome is detected
  3. Expand supported extensions to match oxfmt's full capabilities (JSON, CSS, HTML, YAML, Markdown, etc.)
  4. Keep the env var (marked as deprecated) for backward compatibility

References

  • oxfmt docs
  • oxfmt supported languages: JavaScript, JSX, TypeScript, TSX, JSON, JSONC, JSON5, YAML, TOML, HTML, Vue, CSS, SCSS, Less, Markdown, MDX, GraphQL

Implementation

PR: #8420

Originally created by @kynnyhsap on GitHub (Jan 14, 2026). Originally assigned to: @thdxr on GitHub. ## Problem Currently, oxfmt requires the `OPENCODE_EXPERIMENTAL_OXFMT` environment variable to be enabled before it can be used as a formatter. This is unnecessarily restrictive for projects that already use oxfmt. If a project has: - An `.oxfmtrc.json` or `.oxfmtrc.jsonc` config file, or - `oxfmt` in their `package.json` dependencies ...they've already made a deliberate choice to use oxfmt. Requiring an additional experimental flag adds friction without providing value. ## Proposal 1. Remove the experimental flag requirement from oxfmt detection 2. Add config file detection (`.oxfmtrc.json`, `.oxfmtrc.jsonc`) - similar to how biome is detected 3. Expand supported extensions to match oxfmt's full capabilities (JSON, CSS, HTML, YAML, Markdown, etc.) 4. Keep the env var (marked as deprecated) for backward compatibility ## References - [oxfmt docs](https://oxc.rs/docs/guide/usage/formatter.html) - oxfmt supported languages: JavaScript, JSX, TypeScript, TSX, JSON, JSONC, JSON5, YAML, TOML, HTML, Vue, CSS, SCSS, Less, Markdown, MDX, GraphQL ## Implementation PR: #8420
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#5706