You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm seeing some behavior I don't like with the import/order rule around it trying to enforce single-groups, rather than trusting the human to create import groups that make semantic sense to them. I think this is more important than alphabetization, and personally, if I had to chose one, I'd rather have the ability for humans to group imports (and encourage people to do this) than have them in one large block in alphabetical order.
I tried applying eslint to webpack.config.js, and it went from this:
To this (which it still errored out on due to the newline, but if it had succeeded, it would not have allowed webpack plugins to be a separate group o fimports from path, sass, and webpack, which I think lowers code quality):
Firstly, related to my comment about comments, it looks like the answer is that import/order as we've configured it can't handle comments, which is not great. Secondly, I believe that grouping imports with comments is a very good pattern, and the is a human judgement call that shouldn't be enforced by the linter.
My ideal here would be if we could configure the linter to treat a newline as a group, and to enforce alphabetical within the group, but not enforce grouping everything into a huge block of imports.
The text was updated successfully, but these errors were encountered:
I'm seeing some behavior I don't like with the import/order rule around it trying to enforce single-groups, rather than trusting the human to create import groups that make semantic sense to them. I think this is more important than alphabetization, and personally, if I had to chose one, I'd rather have the ability for humans to group imports (and encourage people to do this) than have them in one large block in alphabetical order.
I tried applying eslint to webpack.config.js, and it went from this:
To this (which it still errored out on due to the newline, but if it had succeeded, it would not have allowed webpack plugins to be a separate group o fimports from path, sass, and webpack, which I think lowers code quality):
Firstly, related to my comment about comments, it looks like the answer is that import/order as we've configured it can't handle comments, which is not great. Secondly, I believe that grouping imports with comments is a very good pattern, and the is a human judgement call that shouldn't be enforced by the linter.
My ideal here would be if we could configure the linter to treat a newline as a group, and to enforce alphabetical within the group, but not enforce grouping everything into a huge block of imports.
The text was updated successfully, but these errors were encountered: