feat(router-generator): add option to format with specified tab width #4358
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.
First of, I know that there is a declined pull request which, among other things, implemented this: #1817
That being said, this is really more about the format of newly created route files from templates, rather than the route tree (that one Is just ignored in my Biome config).
Right now, route files are always created with two spaces, even if you set a custom scaffolding for the templates with the right number of spaces. This would eventually be fixed by Biome (which I do run in commit hooks), but until then, an IDE like WebStorm will detect that the file has two spaces and thus default to that for anything you write.
This is just a minor inconvenience, but one nonetheless, as after each file creation the first thing I have to do is to click on "2 spaces" and then "reformat as 4 spaces".
An alternative to this would be to be able to set an alternate formatter command in the plugin options. Though that is a lot more involved, it would allow the user to have full control over formatting of new files.