@so1ve/eslint-plugin-sort-imports 3.24.0 → 3.25.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/shared.js +4 -8
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@so1ve/eslint-plugin-sort-imports",
3
- "version": "3.24.0",
3
+ "version": "3.25.0",
4
4
  "author": "Simon Lydell",
5
5
  "contributors": [
6
6
  "Ray <i@mk1.io> (https://github.com/so1ve)"
package/src/shared.js CHANGED
@@ -381,10 +381,8 @@ function printSortedItems(sortedItems, originalItems, sourceCode) {
381
381
  includeComments: true,
382
382
  filter: (token) =>
383
383
  !isLineComment(token) &&
384
- !(
385
- isBlockComment(token) &&
386
- token.loc.end.line === lastOriginalItem.node.loc.end.line
387
- ),
384
+ (!isBlockComment(token) ||
385
+ token.loc.end.line !== lastOriginalItem.node.loc.end.line),
388
386
  })
389
387
  : undefined;
390
388
  const maybeNewline =
@@ -576,10 +574,8 @@ function printWithSortedSpecifiers(node, sourceCode, getSpecifiers) {
576
574
  const maybeNewline =
577
575
  previous != null &&
578
576
  needsStartingNewline(item.before) &&
579
- !(
580
- previous.after.length > 0 &&
581
- isNewline(previous.after[previous.after.length - 1])
582
- )
577
+ (previous.after.length <= 0 ||
578
+ !isNewline(previous.after[previous.after.length - 1]))
583
579
  ? [{ type: "Newline", code: newline }]
584
580
  : [];
585
581