Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
add biome to format
json
andjavascript
things.biome
is a replacement forprettier
with better performance.I'm not using
npx
to run command sincenpx
noticeably slow down the startup ofbiome
.biome
refuse to format file with extensionjavascript
, thus I'm usingjs
instead ofjavascript
in the test.Estimated time consumption for different commands:
time npx prettier --stdin-filepath demo.json
Executed in 457.11 millis fish external
usr time 432.23 millis 0.00 micros 432.23 millis
sys time 199.27 millis 703.00 micros 198.57 millis
time npx @biomejs/biome format --write demo.json
Executed in 1.15 secs fish external
usr time 635.26 millis 0.40 millis 634.87 millis
sys time 340.36 millis 1.12 millis 339.24 millis
time prettier --stdin-filepath demo.json
Executed in 145.69 millis fish external
usr time 120.74 millis 363.00 micros 120.38 millis
sys time 89.82 millis 113.00 micros 89.71 millis
time biome format --write demo.json
Executed in 57.95 millis fish external
usr time 30.06 millis 415.00 micros 29.64 millis
sys time 48.54 millis 763.00 micros 47.78 millis