New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reverse imports/group-exports #2916
Comments
Not that I know of. Why would you want that? |
Because I prefer export declarations ^^ it's unfortunate that this package doesn't autofix exports |
If it was purely about aesthetics then an option would be acceptable, but
this is about readability and maintainability, so I think it's best not to make that easy. |
It kind of is aesthetics, no? Maintainability wise I think of these arguments:
I must admit that having an overview of exports is a really good argument, but it only applies in a minority of files. That's why I think a rule that prefers separate export declarations also makes sense. Do you have some pointers on how such an autofixable could be implemented? |
Aesthetics only matters when the choices are equivalent in all other respects. The rule currently allows a declaration when there's a single export, for the reason you indicated. if you keep your export group sorted and use trailing commas, there'll be no diff churn. If you are able to forget one, you're failing to write tests for it - and also failing to use the "no unused exports" rule we have. Adding autofixing to the current rule is perfectly fine if it's safe; you could make a PR to do so. |
Is there a way to transform each export group to export declarations?
The text was updated successfully, but these errors were encountered: