Introduce oxfmt as a replacement for prettier

Open
#239 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
55/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Quiet
Tech stack
rust, typescript

Research direction

Start with the linked oxfmt compatibility matrix and migration instructions, then inspect the repository's current Prettier configuration and formatting command. Confirm that the existing formatting scope is covered by oxfmt and that the replacement preserves the repository's formatting behavior; done means formatting uses oxfmt instead of Prettier.

Written by the indexing model from the issue text.

Description

Prettier has the problem, that it relies purely on nodejs. Nodejs is single threaded, and does not allow multi-threaded operations out of the box, which in case of prettier results in poor speeds on this repository. On current development branches it takes 15-17s just to run a formating on all files that are not ignored by our config.

A solution that is compatible with prettier and is multi-threaded, is oxfmt. a rust based tool that handles style checking and formating.

Compability matrix: https://oxc.rs/compatibility.html
Migration instructions: https://oxc.rs/docs/guide/usage/formatter/migrate-from-prettier.html

Dominant language
TypeScript
Stars
1
Forks
0
Avg merge
22h 6m
Merged PRs (30d)
12

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from stackabletech/cockpit

All issues in stackabletech/cockpit

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.