Skip to content

Conversation

@kynnyhsap
Copy link
Contributor

Summary

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

Changes

  • Remove experimental flag requirement - No longer requires OPENCODE_EXPERIMENTAL_OXFMT env var
  • 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
  • Mark flag as deprecated - Added @deprecated JSDoc comment to OPENCODE_EXPERIMENTAL_OXFMT flag for backward compatibility

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)

Why keep the env var?

The OPENCODE_EXPERIMENTAL_OXFMT flag is kept (but marked as @deprecated) for backward compatibility. Users who already have this flag set in their environment won't experience any breaking changes - the flag simply becomes a no-op.

References

kynnyhsap and others added 3 commits January 12, 2026 21:48
Biome's 'check' command includes formatting AND import sorting, while 'format' only does formatting.

See: https://biomejs.dev/reference/cli/#biome-check
- Remove experimental flag requirement (OPENCODE_EXPERIMENTAL_OXFMT)
- Add config file detection (.oxfmtrc.json, .oxfmtrc.jsonc)
- Expand supported extensions to match oxfmt capabilities:
  JS/TS, JSON, HTML, Vue, CSS, SCSS, Less, YAML, TOML, Markdown, GraphQL
@github-actions
Copy link
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions
Copy link
Contributor

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant