Skip to content

Feat/migrate prettier to oxfmt#583

Open
adriangohjw wants to merge 5 commits intomainfrom
feat/migrate-prettier-to-oxfmt
Open

Feat/migrate prettier to oxfmt#583
adriangohjw wants to merge 5 commits intomainfrom
feat/migrate-prettier-to-oxfmt

Conversation

@adriangohjw
Copy link
Copy Markdown

@adriangohjw adriangohjw commented Mar 20, 2026

Problem

What problem are you trying to solve? What issue does this close?

Standardize the monorepo on Oxfmt (Oxc formatter) instead of Prettier and the shared @acme/prettier-config, so formatting is faster, aligned with the Oxc toolchain, and configured in one place (.oxfmtrc.jsonc). This also updates editor setup so contributors format with the Oxc VS Code extension instead of Prettier.

Solution

How did you solve the problem?

  • Introduced .oxfmtrc.jsonc at the repo root (print width, quotes, semicolons, Tailwind class sorting for cn / cva, package.json script sorting, import sorting with React/Next/@acme groups). Turbo generator Handlebars templates are excluded via ignorePatterns.
  • Removed the Prettier–centric workflow: dropped @acme/prettier-config / direct prettier from packages that used them (e.g. apps/web), removed the tooling/prettier package from the documented tree, and registered oxfmt on the pnpm catalog with oxfmt as a dev dependency where format runs.
  • Replaced prettier --check-style format scripts with oxfmt, still respecting .gitignore via --ignore-path where used; root pnpm format / pnpm format:fix continue to run formatting through Turbo.
  • VS Code: recommend oxc.oxc-vscode, set editor.defaultFormatter to it, oxc.fmt.configPath to .oxfmtrc.jsonc, removed Prettier-specific settings.
  • Docs: README now describes ESLint + Oxfmt and mentions .oxfmtrc.jsonc.
  • Reformatted the codebase to match Oxfmt (notably import grouping / ordering and trailing comma style).
  • Minor: fixed GitHub Actions YAML indentation in .github/workflows/codeql.yml.

Features:

  • Single Oxfmt config with import sorting, Tailwind class sorting, and package.json script sorting.

Improvements:

  • Formatter/editor alignment with Oxc; removed dedicated Prettier config package from the monorepo layout.

Bug Fixes:

  • CodeQL workflow on.push / on.pull_request branch list indentation normalized.

Before & After Screenshots

⚡️ It's ~2x faster

Before After
Screenshot 2026-03-20 at 5 54 17 PM Screenshot 2026-03-20 at 5 54 22 PM

Up to ~2.8x faster on Isomer

Screenshot 2026-03-21 at 4 54 59 AM

Tests

What tests should be run to confirm functionality?

  • pnpm install (lockfile consistent)
  • pnpm format (and/or pnpm format:fix then a clean git diff review)
  • pnpm lint
  • pnpm typecheck
  • pnpm test or pnpm test:ci as you normally run in CI

Optional: open the repo in VS Code and confirm Format Document uses Oxc and picks up .oxfmtrc.jsonc.

Deploy Notes

Notes regarding deployment of the contained body of work.

New environment variables:

  • None.

New scripts:

  • None at root semantics; per-package format now invokes oxfmt instead of prettier.

New dependencies:

  • None for runtime apps.

New dev dependencies:

  • oxfmt (via pnpm catalog:, e.g. ^0.41.0) — repo-wide formatter CLI and editor integration target.

Removed / stopped using:

  • @acme/prettier-config, direct prettier in packages that previously depended on them for formatting (Prettier may still appear transitively via tools like Storybook in the lockfile; that is unchanged by this migration).

…ations

- Added .oxfmtrc.jsonc for oxfmt configuration, specifying formatting rules and patterns.
- Replaced prettier with oxfmt in package.json files across multiple packages for consistent formatting.
- Updated pnpm-lock.yaml and pnpm-workspace.yaml to reflect the new oxfmt dependency.
- Adjusted scripts in various package.json files to utilize oxfmt for formatting tasks.

This change enhances code consistency and streamlines the formatting process across the monorepo.
…ttings

- Updated VSCode extension recommendations to include oxc.oxc-vscode.
- Replaced Prettier with oxfmt as the default formatter in settings.json.
- Added oxfmt configuration path for enhanced formatting control.

This change aligns with the recent integration of oxfmt for consistent code formatting across the project.
…to oxfmt

- Deleted Prettier configuration files including index.js, package.json, and tsconfig.json from the tooling/prettier directory.
- This change supports the ongoing migration to oxfmt for code formatting across the project.
- Replaced mentions of Prettier with Oxfmt in the README.
- Added .oxfmtrc.jsonc file reference for Oxfmt configuration.
- Adjusted formatting table for clarity and consistency.

This change ensures the documentation aligns with the recent migration to Oxfmt for code formatting.
- Reformatted various files to ensure consistent code style, including adding and removing whitespace.
- Updated import statements and comments for clarity and consistency.
- This change enhances code readability and maintains uniformity across the project.
@adriangohjw adriangohjw self-assigned this Mar 20, 2026
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
starter-kit Ready Ready Preview, Comment Mar 20, 2026 9:50am

Request Review

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant