Open IgnusG opened 2 years ago
Might be an improvement on (continuation of) https://github.com/mscolnick/export-typescript/issues/8
I've found it to be sufficient to enable format on save
and that just runs prettier or your-favorite-formatter right after code generation. happy to take contributions to this one though
Is your feature request related to a problem? Please describe. An option to format code after index.ts is written by the default formatter. If it's prettier it might change how the lines are indented. If it's something more complex it might sort exports etc.
Describe the solution you'd like A config option that when enabled runs the default formatter right after generating index.ts
Describe alternatives you've considered It might be a good idea to have this turned on by default by it might require a breaking change update. A config option, even if off by default, would be great though.
Additional context I see that export-typescript already applies some style by multi-lining exports when there are more than one. Some code-base styles would still inline these instead. Instead of taking sides or adding options to change how the code is generated, running the default formatter would fix most styling issues automatically and could be adjusted independently of this extension.