@so1ve/eslint-plugin-sort-imports 3.1.0 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/shared.js +6 -6
package/package.json
CHANGED
package/src/shared.js
CHANGED
|
@@ -811,16 +811,16 @@ function getSpecifierItems(tokens) {
|
|
|
811
811
|
const sliceIndex =
|
|
812
812
|
// If both a newline and a multiline block comment exists, choose the
|
|
813
813
|
// earlier one.
|
|
814
|
-
newlineIndex >= 0 && multilineBlockCommentIndex
|
|
814
|
+
newlineIndex >= 0 && multilineBlockCommentIndex !== -1
|
|
815
815
|
? Math.min(newlineIndex, multilineBlockCommentIndex)
|
|
816
816
|
: newlineIndex >= 0
|
|
817
817
|
? newlineIndex
|
|
818
|
-
: multilineBlockCommentIndex
|
|
819
|
-
?
|
|
820
|
-
: // If there are no newlines, move the last whitespace into `result.after`.
|
|
821
|
-
endsWithSpaces(after)
|
|
818
|
+
: multilineBlockCommentIndex === -1
|
|
819
|
+
? endsWithSpaces(after)
|
|
822
820
|
? after.length - 1
|
|
823
|
-
: -1
|
|
821
|
+
: -1
|
|
822
|
+
: // If there are no newlines, move the last whitespace into `result.after`.
|
|
823
|
+
multilineBlockCommentIndex;
|
|
824
824
|
|
|
825
825
|
current.specifier = specifier;
|
|
826
826
|
current.after = sliceIndex === -1 ? after : after.slice(0, sliceIndex);
|