Skip to content
Learn with RV – Tech Blog
Learn with RV – Tech Blog

#testautomation #qa #programming #linux #devops

  • Home
  • Who am I?
  • 1-on-1 Mentoring
  • Test Automation Incubator
  • 24 Testimonials
  • YouTube
  • LinkedIn
  • Contact
Learn with RV – Tech Blog

#testautomation #qa #programming #linux #devops

oxc-photo
April 28, 2026April 29, 2026

Oxfmt tutorial – the Prettier code formatter alternative, 30x faster

The Oxidation Compiler is creating a suite of high-performance tools for JavaScript and TypeScript, written in Rust – a formatter (oxfmt) and linter (oxlint) tools are important part of this tools suite.

Oxfmt is a high-performance formatter for the JavaScript ecosystem.

Oxfmt promises to be ~30x times faster than Prettier and 2x faster than Biome.

Supports: JavaScript, JSX, TypeScript, TSX, JSON, JSONC, JSON5, YAML, TOML, HTML, Angular, Vue, CSS, SCSS, Less, Markdown, MDX, GraphQL, Ember, Handlebars, and more.

Compatibility matrix HERE

Chapter 1 - How to migrate from Prettier to Oxfmt in simple steps

Simply run from CLI the following command:
npm add -D oxfmt@latest && npx oxfmt --migrate=prettier && npx oxfmt
 

What the above command does under the hood:
1. it is installing the oxfmt npm package as dev dependency,
2. migrates all the existing prettier rules a new configuration file called ‘.oxfmtrc.json’
3. runs the new oxfmt formatter command

Note: your project root contains ‘.oxfmtrc.json’ file, which is an alternative to the previous ‘.prettierrc’

oxfmt-config

How the .oxfmtrc.json file looks like

It contains all the rules that were migrated from the ‘.prettierrc’ file

When the migration process is complete, you can also modify/add new code format rules into that config file.
Full list of code formatting rules HERE

Note: the above config includes ‘ignorePatterns’ key that contains all the paths that we do not want to be in scope for code formatting. In prettier, we usually set them into .prettierignore file. If that file exists, during the migration process, they are automatically included in the above config file and oxfmt will be aware of them.

Add scripts to package.json

scripts-oxfmt

Format files

npm run fmt

Check formatting without writing files

npm run fmt:check

Chapter 2 - Installing Oxfmt from scratch

  1. install oxfmt as dev dependency

    npm add -D oxfmt

2. add scripts to package.json as shown above
{
"scripts": {
  "fmt": "oxfmt",
  "fmt:check": "oxfmt --check"
  }
}
3. generate the .oxfmtrc.json config file using
oxfmt --init

4. Add formatting rules and ignorePatterns into .oxfmtrc.json file accordingly (see example above, in Chapter 1)

Full list of code formatting rules HERE

5. simply run ‘npm run fmt’ to format file, or ‘npm run fmt:check’ to check formatting without writing files

Enjoyed this article?
I share more practical automation tips on YouTube and LinkedIn.

Need structured guidance instead of learning alone?
I offer 1-on-1 mentoring – learn more → HERE

Or email me at iamqarv [at] gmail [dot] com

Post Views: 56

Related

Share this article:
Tools

Post navigation

Previous post
Next post

Recent Posts

  • Upgrading Playwright package to latest version in simple steps
  • Oxfmt tutorial – the Prettier code formatter alternative, 30x faster
  • Configuring testIdAttribute in Playwright
  • Understanding p95 Percentiles in Load Testing (with k6 examples)
  • npm ci vs. npm install – what is the difference?

Recent Comments

  1. Paul on Web Accessibility: A step-by-step guide to Testing with pa11y
  2. Automated Tests for website Accessibility with Axe and TestCafe - Learn with RV - Tech Blog on How to generate E2E TestCafe Framework in seconds
  3. RV on Exploring Faker.js: A Powerful Tool for Generating Realistic Random Test Data
  4. Adrian Maciuc on Exploring Faker.js: A Powerful Tool for Generating Realistic Random Test Data
  5. Nick on Cypress vs Playwright vs Testcafe – which framework is faster?

Archives

  • April 2026
  • March 2026
  • February 2026
  • November 2025
  • October 2025
  • September 2025
  • August 2025
  • July 2025
  • June 2025
  • March 2025
  • February 2025
  • January 2025
  • November 2024
  • October 2024
  • September 2024
  • August 2024
  • July 2024
  • May 2024
  • April 2024
  • March 2024
  • February 2024
  • January 2024
  • December 2023
  • October 2023
  • September 2023
  • August 2023
  • July 2023
  • June 2023
  • May 2023
  • April 2023

Categories

  • Linux
  • Programming
  • QA
  • Tools
  • Uncategorized
©2026 Learn with RV – Tech Blog | WordPress Theme by SuperbThemes