Skip to content

build(prettier): switch formatter to @prettier/plugin-oxc#822

Merged
lcottercertinia merged 1 commit into
certinia:mainfrom
lukecotter:chore-prettier-oxc
Jun 19, 2026
Merged

build(prettier): switch formatter to @prettier/plugin-oxc#822
lcottercertinia merged 1 commit into
certinia:mainfrom
lukecotter:chore-prettier-oxc

Conversation

@lukecotter

Copy link
Copy Markdown
Collaborator

📝 PR Overview

Replaces prettier-plugin-organize-imports with @prettier/plugin-oxc, swapping Prettier's printer for oxc's faster Rust-based formatter. Output matches the existing code style, so no repo-wide reformat is needed.

🛠️ Changes made

  • Swap the Prettier plugin in .prettierrc and devDependencies: prettier-plugin-organize-imports@prettier/plugin-oxc.
  • Verified prettier --check is clean across the repo under oxc — no formatting churn.

🧩 Type of change (check all applicable)

  • 🐛 Bug fix - something not working as expected
  • ✨ New feature – adds new functionality
  • ♻️ Refactor - internal changes with no user impact
  • ⚡ Performance Improvement
  • 📝 Documentation - README or documentation site changes
  • 🔧 Chore - dev tooling, CI, config
  • 💥 Breaking change

📷 Screenshots / gifs / video [optional]

N/A — tooling/config only.

✅ Tests added?

  • 👍 yes
  • 🙅 no, not needed
  • 🙋 no, I need help

📚 Docs updated?

  • 🔖 README.md
  • 🔖 CHANGELOG.md
  • 📖 help site
  • 🧪 Marked any pre-release-only features (README 🧪 badge — see RELEASING.md)
  • 🙅 not needed

Anything else we need to know? [optional]

Behavior trade-off (intentional): @prettier/plugin-oxc is a formatter only — unlike prettier-plugin-organize-imports, it does not sort imports or remove unused ones. Unused imports now surface as @typescript-eslint/no-unused-vars errors at lint time rather than being auto-stripped on format. A dedicated sort plugin (e.g. @ianvs/prettier-plugin-sort-imports) can be layered on later if import ordering needs enforcing.

Faster Rust-based printer; output matches existing style so no repo-wide reformat.

- replace prettier-plugin-organize-imports with @prettier/plugin-oxc in .prettierrc and devDependencies
- drops format-time import sorting and unused-import removal — unused imports now surface as
  @typescript-eslint/no-unused-vars errors instead of being auto-stripped
@lcottercertinia lcottercertinia merged commit 7b693c8 into certinia:main Jun 19, 2026
7 checks passed
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.

2 participants