-
Notifications
You must be signed in to change notification settings - Fork 219
Review usage of imports and be consistent for external vs internal dependency sequence. #2052
Comments
should be external, woocommerce and internal, or simply external and internal, external is confusing since a lot of our internal code is aliased to an "external name" |
For reference, that was discussed some months ago in #1127 (comment). With time, we got more and more |
My opinion hasn't changed much from #1127. The question I ask is, what value do we get from adding another code block for In my opinion, the only thing that really matters from a code review (cursory glance) standpoint is whether an import is relative or "external" (either via node_modules import, external reference, or aliased reference). I'm wary of adding additional groupings that introduce more code churn in existing code and additional overhead in writing imports (for negligible benefit). With that said, I think the woocommerce/admin repository does group |
I'm not sure on which side I sit regarding a section for I'm happy to find the external/internal violations though :) |
Found using regex |
💯 |
Given us the option in #2775 |
Implementing #2957 will fix this so I'm going to close this issue in favor of the other. |
In one of my recent pulls, @mikejolley noted that I had been defining internal dependencies before external dependencies. I didn't even realize I was doing it wrong and it should be external dependencies defined before internal dependencies.
This issue is to make sure a review is done to fix the inconsistency (and maybe a good opportunity to add a lint rule?)
The text was updated successfully, but these errors were encountered: