Closed buschtoens closed 5 years ago
Hi! I'm glad you've found the plugin useful. Thanks for your feedback!
While it does look cleaner to have the three imports grouped together, I think consistency is more valuable. The imports are ordered the same way in every file. There's value in defining the groups and separating them, even if the groups are small. In your first example, I can tell very quickly that the config file is a relative import. In the second, I have to look more carefully to realize it is a relative import.
I'm going to close this issue for now–we can revisit in the future if there's widespread interest.
Thanks for this great plugin! 🍻
I am using
newlinesBetween: "always"
in these two configurations:@clark/eslint-config-node-order-imports
@clark/eslint-config-ember-order-imports
This type of grouping, looks like this:
It works great for files, that have a lot of imports, like above, but it's total overkill for files with only a few imports of different groups, e.g.:
This would look cleaner IMO:
What do you think about an additional config that allows to specify the minimum number of imports per group for newlines to be inserted.