[PR #380] [MERGED] add oxfmt formatter #528

Closed
opened 2026-05-06 13:08:34 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/cloudflare/vinext/pull/380
Author: @james-elicx
Created: 3/9/2026
Status: Merged
Merged: 3/9/2026
Merged by: @james-elicx

Base: mainHead: opencode/misty-rocket


📝 Commits (5)

  • ce89bcc add oxfmt formatter: config, scripts, CI, editor setup, docs
  • 253d17f rebuild lockfile
  • d906073 fix: add Format to required checks list, remove dead ignore pattern
  • 2edc9a7 run fmt
  • fa2048b add format to agents.md again

📊 Changes

309 files changed (+7953 additions, -8574 deletions)

View changed files

📝 .agents/skills/migrate-to-vinext/SKILL.md (+31 -29)
📝 .agents/skills/migrate-to-vinext/references/compatibility.md (+65 -65)
📝 .agents/skills/migrate-to-vinext/references/config-examples.md (+16 -16)
📝 .agents/skills/migrate-to-vinext/references/troubleshooting.md (+11 -10)
📝 .github/scripts/send-email.mjs (+8 -13)
📝 .github/workflows/ci.yml (+8 -0)
📝 .gitignore (+0 -1)
📝 .opencode/agents/reviewer.md (+1 -1)
📝 .opencode/agents/viguy.md (+24 -18)
📝 .opencode/commands/address-review.md (+2 -0)
📝 .opencode/commands/autopilot.md (+6 -2)
📝 .opencode/commands/fix-issue.md (+3 -0)
📝 .opencode/commands/review-pr.md (+1 -0)
.oxfmtrc.json (+10 -0)
.vscode/extensions.json (+3 -0)
.vscode/settings.json (+5 -0)
.zed/settings.json (+48 -0)
📝 AGENTS.md (+46 -30)
📝 CONTRIBUTING.md (+1 -1)
📝 README.md (+89 -85)

...and 80 more files

📄 Description

Summary

  • Add oxfmt (Oxc formatter, beta) as a dev dependency alongside the existing oxlint setup
  • Configure `.oxfmtrc.json` to match the codebase's existing style (100-char print width, double quotes, semicolons, trailing commas, 2-space indent) to minimise diff blast radius when formatting is first applied
  • Add `fmt` and `fmt:check` scripts to `package.json`
  • Add a `Format` CI job to `ci.yml` that runs `fmt:check` on every PR
  • Add VS Code team setup (`.vscode/extensions.json` recommends `oxc.oxc-vscode`, `.vscode/settings.json` enables format-on-save)
  • Add Zed team setup (`.zed/settings.json` wires up the oxfmt LSP for TS, JS, JSON, Markdown, MDX with format-on-save)
  • Update `AGENTS.md`, `CLAUDE.md`, `CONTRIBUTING.md`, and `README.md` to document `fmt` / `fmt:check` alongside the existing lint command
  • Remove `.vscode/` from `.gitignore` so editor config is tracked

Notes

oxfmt is currently in beta (v0.36.0). The `.oxfmtrc.json` settings were chosen to match observed code style so the first `pnpm run fmt` produces minimal churn. This PR does not run `fmt` on the existing codebase — that can be a follow-up once this is merged.

The Zed config uses the Oxc Zed extension's LSP-based formatter (requires installing the Oxc extension from the Zed extension registry). The VS Code config requires the oxc-vscode extension.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/cloudflare/vinext/pull/380 **Author:** [@james-elicx](https://github.com/james-elicx) **Created:** 3/9/2026 **Status:** ✅ Merged **Merged:** 3/9/2026 **Merged by:** [@james-elicx](https://github.com/james-elicx) **Base:** `main` ← **Head:** `opencode/misty-rocket` --- ### 📝 Commits (5) - [`ce89bcc`](https://github.com/cloudflare/vinext/commit/ce89bcce5c07c84af25b71a731899e3718c8b2ac) add oxfmt formatter: config, scripts, CI, editor setup, docs - [`253d17f`](https://github.com/cloudflare/vinext/commit/253d17fe896c470dde0327ad88028813fce33497) rebuild lockfile - [`d906073`](https://github.com/cloudflare/vinext/commit/d90607346c6cd19220bfed3837212e367f01fd4f) fix: add Format to required checks list, remove dead ignore pattern - [`2edc9a7`](https://github.com/cloudflare/vinext/commit/2edc9a722896d2bcf8c0499109fe1776e4256440) run fmt - [`fa2048b`](https://github.com/cloudflare/vinext/commit/fa2048beb54a7ed62ff7f182fa351ca04e1bc789) add format to agents.md again ### 📊 Changes **309 files changed** (+7953 additions, -8574 deletions) <details> <summary>View changed files</summary> 📝 `.agents/skills/migrate-to-vinext/SKILL.md` (+31 -29) 📝 `.agents/skills/migrate-to-vinext/references/compatibility.md` (+65 -65) 📝 `.agents/skills/migrate-to-vinext/references/config-examples.md` (+16 -16) 📝 `.agents/skills/migrate-to-vinext/references/troubleshooting.md` (+11 -10) 📝 `.github/scripts/send-email.mjs` (+8 -13) 📝 `.github/workflows/ci.yml` (+8 -0) 📝 `.gitignore` (+0 -1) 📝 `.opencode/agents/reviewer.md` (+1 -1) 📝 `.opencode/agents/viguy.md` (+24 -18) 📝 `.opencode/commands/address-review.md` (+2 -0) 📝 `.opencode/commands/autopilot.md` (+6 -2) 📝 `.opencode/commands/fix-issue.md` (+3 -0) 📝 `.opencode/commands/review-pr.md` (+1 -0) ➕ `.oxfmtrc.json` (+10 -0) ➕ `.vscode/extensions.json` (+3 -0) ➕ `.vscode/settings.json` (+5 -0) ➕ `.zed/settings.json` (+48 -0) 📝 `AGENTS.md` (+46 -30) 📝 `CONTRIBUTING.md` (+1 -1) 📝 `README.md` (+89 -85) _...and 80 more files_ </details> ### 📄 Description ## Summary - Add [oxfmt](https://oxc.rs/docs/guide/usage/formatter) (Oxc formatter, beta) as a dev dependency alongside the existing oxlint setup - Configure \`.oxfmtrc.json\` to match the codebase's existing style (100-char print width, double quotes, semicolons, trailing commas, 2-space indent) to minimise diff blast radius when formatting is first applied - Add \`fmt\` and \`fmt:check\` scripts to \`package.json\` - Add a \`Format\` CI job to \`ci.yml\` that runs \`fmt:check\` on every PR - Add VS Code team setup (\`.vscode/extensions.json\` recommends \`oxc.oxc-vscode\`, \`.vscode/settings.json\` enables format-on-save) - Add Zed team setup (\`.zed/settings.json\` wires up the oxfmt LSP for TS, JS, JSON, Markdown, MDX with format-on-save) - Update \`AGENTS.md\`, \`CLAUDE.md\`, \`CONTRIBUTING.md\`, and \`README.md\` to document \`fmt\` / \`fmt:check\` alongside the existing lint command - Remove \`.vscode/\` from \`.gitignore\` so editor config is tracked ## Notes oxfmt is currently in beta (v0.36.0). The \`.oxfmtrc.json\` settings were chosen to match observed code style so the first \`pnpm run fmt\` produces minimal churn. This PR does not run \`fmt\` on the existing codebase — that can be a follow-up once this is merged. The Zed config uses the Oxc Zed extension's LSP-based formatter (requires installing the [Oxc extension](https://zed.dev/extensions/oxc) from the Zed extension registry). The VS Code config requires the [oxc-vscode extension](https://marketplace.visualstudio.com/items?itemName=oxc.oxc-vscode). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-06 13:08:34 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vinext#528
No description provided.