eslint-plugin-imports-regulation 0.2.7 → 0.2.8

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.
@@ -65,7 +65,7 @@ const rule = {
65
65
  messages: {
66
66
  groupOrder: 'Expected this {{group}} import before the {{other}} imports.',
67
67
  blankLinesBetween: 'Expected {{expected}} blank {{lines}} between external imports and internal imports, found {{actual}}.',
68
- unexpectedBlankLine: 'Unexpected blank line between imports in the same group.',
68
+ unexpectedBlankLine: 'Expected no blank lines between imports in the same group, found {{actual}}.',
69
69
  typeSpecifiersLast: 'Type specifiers must come after value specifiers.',
70
70
  markTypeOnly: 'An import of nothing but types must be written `import type { A }`.',
71
71
  typeOnlyImport: 'Everything this imports is only used as a type — write `import type`.',
@@ -486,6 +486,8 @@ const rule = {
486
486
  const wanted = boundary ? blankLinesBetween : 0;
487
487
  if (blank === wanted)
488
488
  continue;
489
+ // Every gap, each with the whole-run fix: ESLint applies one, and the rest are gone on
490
+ // the next pass.
489
491
  if (boundary) {
490
492
  context.report({
491
493
  node: entry.node,
@@ -495,9 +497,13 @@ const rule = {
495
497
  });
496
498
  }
497
499
  else {
498
- context.report({ node: entry.node, messageId: 'unexpectedBlankLine', fix: rewrite });
500
+ context.report({
501
+ node: entry.node,
502
+ messageId: 'unexpectedBlankLine',
503
+ data: { actual: String(blank) },
504
+ fix: rewrite,
505
+ });
499
506
  }
500
- return;
501
507
  }
502
508
  };
503
509
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-imports-regulation",
3
- "version": "0.2.7",
3
+ "version": "0.2.8",
4
4
  "description": "Order imports: external type-only, external, blank line, internal type-only, internal — with type specifiers last inside each import.",
5
5
  "author": "Robert Sandiford",
6
6
  "type": "module",