Skip to content

Promote oxfmt formatter from experimental to first-class #8421

@kynnyhsap

Description

@kynnyhsap

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions