Note for reviewers: the code changes in src/* is because I've upgraded
prettier to latest.
the @prettier/plugin-oxc it self only improve performance and doesnt
affect format rules
## Summary
Integrates `@prettier/plugin-oxc` to improve Prettier performance by
~20%.
The oxc plugin provides a faster parser written in Rust, significantly
speeding up formatting operations across the codebase.
## Changes
- Added `@prettier/plugin-oxc` as dev dependency
- Updated `.prettierrc` to use oxc plugin alongside existing
sort-imports plugin
- Added `scripts/benchmark-prettier.js` to measure performance
improvements
- Updated `knip.config.ts` to ignore the oxc plugin
- Updated `eslint.config.ts` to ignore the benchmark script
## Benchmark Results
Ran 3 benchmarks comparing formatting performance on the entire
codebase:
**Without oxc:**
- Median: 32.76s
- Average: 32.89s
- Min: 32.49s
- Max: 33.43s
**With oxc:**
- Median: 26.13s
- Average: 26.35s
- Min: 25.24s
- Max: 27.69s
**Improvement: 20.26% faster (6.64s saved)**
## Testing
The benchmark script can be run with:
```bash
node scripts/benchmark-prettier.js
```
This will:
1. Test formatting performance without oxc plugin
2. Test formatting performance with oxc plugin
3. Display comparison results
4. Restore original configuration
🤖 Generated with [Claude Code](https://claude.com/claude-code)
┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-6088-feat-Add-prettier-plugin-oxc-for-faster-formatting-28e6d73d365081aabb24d3af98c11bb0)
by [Unito](https://www.unito.io)
---------
Co-authored-by: DrJKL <DrJKL0424@gmail.com>
Co-authored-by: GitHub Action <action@github.com>