From 3e63bf0cc8c21b47129fb5d106d397d89911052e Mon Sep 17 00:00:00 2001 From: "BZ (Brian Zhang)" Date: Sun, 18 Jul 2021 23:55:15 -0700 Subject: [PATCH] Revert "fix unexpected grouping of type imports with pathGroup" This reverts commit 6949297d8f328cabe9ad8fa2edf1cc850d6d3b02. --- src/rules/order.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/rules/order.js b/src/rules/order.js index 14607c035a..ce34604c64 100644 --- a/src/rules/order.js +++ b/src/rules/order.js @@ -308,11 +308,6 @@ function computePathRank(ranks, pathGroups, path, maxPosition) { } } -function shouldSeparateType(omittedTypes, impType) { - console.log('%c shouldSeparateType', 'color: #b0b', { omittedTypes, impType }); - return impType === 'type' && !('type' in omittedTypes); -} - function computeRank(context, ranks, importEntry, excludedImportTypes) { let impType; let rank; @@ -323,9 +318,8 @@ function computeRank(context, ranks, importEntry, excludedImportTypes) { } else { impType = importType(importEntry.value, context); } - console.log('%c computeRank', 'color: #b0b', { file: importEntry.value, impType }); - if (!excludedImportTypes.has(impType) && !shouldSeparateType(ranks.omittedTypes, impType)) { - rank = computePathRank(ranks.groups, ranks.pathGroups, importEntry.value, ranks.maxPosition, impType); + if (!excludedImportTypes.has(impType)) { + rank = computePathRank(ranks.groups, ranks.pathGroups, importEntry.value, ranks.maxPosition); } if (typeof rank === 'undefined') { rank = ranks.groups[impType];