eslint-plugin-imports-regulation 0.2.0 → 0.2.1

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.
@@ -8,8 +8,8 @@ type Options = [
8
8
  pattern: string;
9
9
  group: Origin;
10
10
  }[];
11
- blankLinesBetweenExternalAndInternalImports?: number;
12
- blankLinesAfterImports?: number;
11
+ blankLinesBetween?: number;
12
+ blankLinesAfter?: number;
13
13
  importsAddenda?: string[];
14
14
  preferTypeDeclarations?: boolean;
15
15
  }?
@@ -47,9 +47,9 @@ const rule = {
47
47
  },
48
48
  },
49
49
  // How many blank lines separate the external block from the internal block. 0 means none.
50
- blankLinesBetweenExternalAndInternalImports: { type: 'integer', minimum: 0 },
50
+ blankLinesBetween: { type: 'integer', minimum: 0 },
51
51
  // How many blank lines separate the imports from whatever follows them.
52
- blankLinesAfterImports: { type: 'integer', minimum: 0 },
52
+ blankLinesAfter: { type: 'integer', minimum: 0 },
53
53
  // Line globs that still count as part of the imports block, so the gap is measured
54
54
  // after them rather than after the last import.
55
55
  importsAddenda: { type: 'array', items: { type: 'string' }, uniqueItems: true },
@@ -77,8 +77,8 @@ const rule = {
77
77
  test: globToRegExp(entry.pattern),
78
78
  group: entry.group,
79
79
  }));
80
- const blankLinesBetween = options?.blankLinesBetweenExternalAndInternalImports ?? DEFAULT_BLANK_LINES_BETWEEN;
81
- const blankLinesAfter = options?.blankLinesAfterImports ?? DEFAULT_BLANK_LINES_AFTER;
80
+ const blankLinesBetween = options?.blankLinesBetween ?? DEFAULT_BLANK_LINES_BETWEEN;
81
+ const blankLinesAfter = options?.blankLinesAfter ?? DEFAULT_BLANK_LINES_AFTER;
82
82
  const addenda = (options?.importsAddenda ?? []).map(lineGlobToRegExp);
83
83
  const preferTypeDeclarations = options?.preferTypeDeclarations ?? true;
84
84
  const eol = BREAK.exec(source.text)?.[0] ?? '\n';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-imports-regulation",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Order imports: package type-only, package, blank line, local type-only, local — with type specifiers last inside each import.",
5
5
  "author": "Robert Sandiford",
6
6
  "type": "module",