[PR #10714] feat(format): promote oxfmt to first-class formatter #13537

Open
opened 2026-02-16 18:18:23 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/10714

State: open
Merged: No


Promotes oxfmt from experimental to first-class formatter status with improved detection and full extension support.

Changes

  • Remove experimental flag - Fully removes OPENCODE_EXPERIMENTAL_OXFMT env var (no backward compat needed)
  • Add config file detection - Detects .oxfmtrc.json and .oxfmtrc.jsonc (similar to biome pattern)
  • Expand supported extensions - From 8 to 22 extensions matching oxfmt's capabilities

Supported Extensions

Category Extensions
JS/TS .js, .jsx, .mjs, .cjs, .ts, .tsx, .mts, .cts
JSON .json, .jsonc
Markup .html, .vue
Styles .css, .scss, .less
Data .yaml, .yml, .toml
Docs .md, .mdx
GraphQL .graphql, .gql

Detection Priority

  1. Config files (.oxfmtrc.json, .oxfmtrc.jsonc)
  2. package.json dependencies (oxfmt in deps or devDeps)

References

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/10714 **State:** open **Merged:** No --- Promotes oxfmt from experimental to first-class formatter status with improved detection and full extension support. ## Changes - **Remove experimental flag** - Fully removes `OPENCODE_EXPERIMENTAL_OXFMT` env var (no backward compat needed) - **Add config file detection** - Detects `.oxfmtrc.json` and `.oxfmtrc.jsonc` (similar to biome pattern) - **Expand supported extensions** - From 8 to 22 extensions matching oxfmt's capabilities ## Supported Extensions | Category | Extensions | |----------|------------| | JS/TS | `.js`, `.jsx`, `.mjs`, `.cjs`, `.ts`, `.tsx`, `.mts`, `.cts` | | JSON | `.json`, `.jsonc` | | Markup | `.html`, `.vue` | | Styles | `.css`, `.scss`, `.less` | | Data | `.yaml`, `.yml`, `.toml` | | Docs | `.md`, `.mdx` | | GraphQL | `.graphql`, `.gql` | ## Detection Priority 1. Config files (`.oxfmtrc.json`, `.oxfmtrc.jsonc`) 2. `package.json` dependencies (`oxfmt` in deps or devDeps) ## References - [oxfmt docs](https://oxc.rs/docs/guide/usage/formatter.html) - [oxfmt config reference](https://oxc.rs/docs/guide/usage/formatter/config)
yindo added the pull-request label 2026-02-16 18:18:23 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#13537