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.
Motivation
Code formatter for the leo language. This is based on biome, which is a popular code formatter for javascript, written in rust. Fortunately, its main formatting engine is generic enough that it can be used to make a formatter for any language. In theory, it could even support the incremental formatting as potential in the issue #28579, as biome has its own version of rowan as the biome_rowan crate.
Testing can be more for edge cases and for fine-tuning for specific preferences, but this should work in the majority of the cases.
closes #28579
Test Plan
Seemed more suitable to test in unit tests itself due to self contained nature of formatting elements requiring little to no contextual information. Not sure if we need the runner pattern for tests.