Format code after route generation
Which project does this relate to?
Router
Describe the bug
After the route generator runs and updates a route file, the output might not match the formatting rules enforced by tools like eslint, biome, prettier, etc. Here's a quick comparison:
before vs after You can see that some semicolons were dropped in the generated file, even though they were there originally.
A good way to handle this would be to introduce a new config option that accepts a string command to run after a file is modified. Something like:
eslint --fix {{path}} — with {{path}} being replaced by the actual file path.
This would make it easy to hook into any formatter without baking in support directly.
Your Example Website or App
na
Steps to Reproduce the Bug or Issue
Just run the generator in the newer version
Expected behavior
run the eslint command after the generator changes the file
Screenshots or Videos
No response
Platform
- OS: any
- Browser: any
- Version: alpha 1.121.0-alpha.27
Additional context
No response