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
JS allows to have multiple imports/exports from the same source within one file. This can reduce readability of code and create some confusion when trying to understand the code.
Example:
I propose to add a rule, where combining those imports/exports is mandatory. I believe in one file we should only have one import/export from a particular source file. This will make it easier to understand and see the imports and exports in a file.
I agree that the code is easy to read when all the imports are grouped, but the quality criteria is about more than just readability. It's also about potential bugs that could break the code.
But I'm open to new things, just like your suggestion. Let's see, maybe someone will support this proposal too!
Problem
JS allows to have multiple imports/exports from the same source within one file. This can reduce readability of code and create some confusion when trying to understand the code.
Example:
Or the same with exports:
Proposal
I propose to add a rule, where combining those imports/exports is mandatory. I believe in one file we should only have one import/export from a particular source file. This will make it easier to understand and see the imports and exports in a file.
And for exports:
The text was updated successfully, but these errors were encountered: