@alexlit/config-eslint 161.3.0 → 162.0.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.
@@ -1,109 +1,125 @@
1
1
  import plugin from 'eslint-plugin-perfectionist';
2
2
  import { defineConfig } from 'eslint/config';
3
3
 
4
- import { FILES } from '../base.js';
4
+ import { createPlugin, FILES } from '../base.js';
5
5
 
6
- /** @see [eslint-plugin-perfectionist](https://perfectionist.dev) */
7
- export const perfectionist = defineConfig([
8
- { ...plugin.configs['recommended-natural'], files: FILES },
9
- {
10
- files: FILES,
11
- rules: {
12
- 'perfectionist/sort-imports': [
13
- 'warn',
14
- {
15
- customGroups: [
16
- // hash (nuxt)
17
- { elementNamePattern: ['^#'], groupName: 'hash' },
6
+ /**
7
+ * Правила сортировки импортов, объектов, интерфейсов и типов.
8
+ *
9
+ * @param {import('eslint').Linter.Config} [options] - Дополнительные flat-опции
10
+ *
11
+ * @returns {import('eslint').Linter.Config[]}
12
+ *
13
+ * @see [eslint-plugin-perfectionist](https://perfectionist.dev)
14
+ */
15
+ export const perfectionist = createPlugin(() =>
16
+ defineConfig([
17
+ { ...plugin.configs['recommended-natural'], files: FILES },
18
+ {
19
+ files: FILES,
20
+ rules: {
21
+ 'perfectionist/sort-imports': [
22
+ 'warn',
23
+ {
24
+ customGroups: [
25
+ // hash (nuxt)
26
+ { elementNamePattern: ['^#'], groupName: 'hash' },
18
27
 
19
- // @@/
20
- { elementNamePattern: ['^@@/'], groupName: 'double-at' },
28
+ // @@/
29
+ { elementNamePattern: ['^@@/'], groupName: 'double-at' },
21
30
 
22
- // universal
23
- { elementNamePattern: ['^@/api'], groupName: 'universal-api' },
24
- {
25
- elementNamePattern: ['^@/assets'],
26
- groupName: 'universal-assets',
27
- },
28
- {
29
- elementNamePattern: ['^@/components'],
30
- groupName: 'universal-components',
31
- },
32
- {
33
- elementNamePattern: ['^@/composables'],
34
- groupName: 'universal-composables',
35
- },
36
- {
37
- elementNamePattern: ['^@/constants'],
38
- groupName: 'universal-constants',
39
- },
40
- {
41
- elementNamePattern: ['^@/directives'],
42
- groupName: 'universal-directives',
43
- },
44
- {
45
- elementNamePattern: ['^@/layouts'],
46
- groupName: 'universal-layouts',
47
- },
48
- { elementNamePattern: ['^@/pages'], groupName: 'universal-pages' },
49
- {
50
- elementNamePattern: ['^@/plugins'],
51
- groupName: 'universal-plugins',
52
- },
53
- {
54
- elementNamePattern: ['^@/stores'],
55
- groupName: 'universal-stores',
56
- },
57
- { elementNamePattern: ['^@/utils'], groupName: 'universal-utils' },
58
- ],
59
- groups: [
60
- 'type-import',
61
- ['value-builtin', 'value-external'],
31
+ // universal
32
+ { elementNamePattern: ['^@/api'], groupName: 'universal-api' },
33
+ {
34
+ elementNamePattern: ['^@/assets'],
35
+ groupName: 'universal-assets',
36
+ },
37
+ {
38
+ elementNamePattern: ['^@/components'],
39
+ groupName: 'universal-components',
40
+ },
41
+ {
42
+ elementNamePattern: ['^@/composables'],
43
+ groupName: 'universal-composables',
44
+ },
45
+ {
46
+ elementNamePattern: ['^@/constants'],
47
+ groupName: 'universal-constants',
48
+ },
49
+ {
50
+ elementNamePattern: ['^@/directives'],
51
+ groupName: 'universal-directives',
52
+ },
53
+ {
54
+ elementNamePattern: ['^@/layouts'],
55
+ groupName: 'universal-layouts',
56
+ },
57
+ {
58
+ elementNamePattern: ['^@/pages'],
59
+ groupName: 'universal-pages',
60
+ },
61
+ {
62
+ elementNamePattern: ['^@/plugins'],
63
+ groupName: 'universal-plugins',
64
+ },
65
+ {
66
+ elementNamePattern: ['^@/stores'],
67
+ groupName: 'universal-stores',
68
+ },
69
+ {
70
+ elementNamePattern: ['^@/utils'],
71
+ groupName: 'universal-utils',
72
+ },
73
+ ],
74
+ groups: [
75
+ 'type-import',
76
+ ['value-builtin', 'value-external'],
62
77
 
63
- // hash (nuxt)
64
- 'hash',
78
+ // hash (nuxt)
79
+ 'hash',
65
80
 
66
- // @@/
67
- 'double-at',
81
+ // @@/
82
+ 'double-at',
68
83
 
69
- // universal
70
- 'universal-api',
71
- 'universal-assets',
72
- 'universal-components',
73
- 'universal-composables',
74
- 'universal-constants',
75
- 'universal-directives',
76
- 'universal-layouts',
77
- 'universal-pages',
78
- 'universal-plugins',
79
- 'universal-stores',
80
- 'universal-utils',
84
+ // universal
85
+ 'universal-api',
86
+ 'universal-assets',
87
+ 'universal-components',
88
+ 'universal-composables',
89
+ 'universal-constants',
90
+ 'universal-directives',
91
+ 'universal-layouts',
92
+ 'universal-pages',
93
+ 'universal-plugins',
94
+ 'universal-stores',
95
+ 'universal-utils',
81
96
 
82
- 'type-internal',
83
- 'value-internal',
97
+ 'type-internal',
98
+ 'value-internal',
84
99
 
85
- ['type-parent', 'type-sibling', 'type-index'],
86
- ['value-parent', 'value-sibling', 'value-index'],
100
+ ['type-parent', 'type-sibling', 'type-index'],
101
+ ['value-parent', 'value-sibling', 'value-index'],
87
102
 
88
- 'ts-equals-import',
89
- 'unknown',
90
- ],
91
- internalPattern: ['^@@/.*', '^@/.*'],
92
- type: 'natural',
93
- },
94
- ],
95
- 'perfectionist/sort-interfaces': [
96
- 'warn',
97
- { newlinesBetween: 0, partitionByComment: false, type: 'natural' },
98
- ],
99
- 'perfectionist/sort-object-types': [
100
- 'warn',
101
- { newlinesBetween: 0, partitionByComment: false, type: 'natural' },
102
- ],
103
- 'perfectionist/sort-objects': [
104
- 'warn',
105
- { newlinesBetween: 0, partitionByComment: false, type: 'natural' },
106
- ],
103
+ 'ts-equals-import',
104
+ 'unknown',
105
+ ],
106
+ internalPattern: ['^@@/.*', '^@/.*'],
107
+ type: 'natural',
108
+ },
109
+ ],
110
+ 'perfectionist/sort-interfaces': [
111
+ 'warn',
112
+ { newlinesBetween: 0, partitionByComment: false, type: 'natural' },
113
+ ],
114
+ 'perfectionist/sort-object-types': [
115
+ 'warn',
116
+ { newlinesBetween: 0, partitionByComment: false, type: 'natural' },
117
+ ],
118
+ 'perfectionist/sort-objects': [
119
+ 'warn',
120
+ { newlinesBetween: 0, partitionByComment: false, type: 'natural' },
121
+ ],
122
+ },
107
123
  },
108
- },
109
- ]);
124
+ ]),
125
+ );
package/plugins/pinia.js CHANGED
@@ -1,16 +1,26 @@
1
1
  import plugin from 'eslint-plugin-pinia';
2
2
  import { defineConfig } from 'eslint/config';
3
3
 
4
- import { FILES } from '../base.js';
4
+ import { createPlugin, FILES } from '../base.js';
5
5
 
6
- /** @see [eslint-plugin-pinia](https://github.com/lisilinhart/eslint-plugin-pinia) */
7
- export const pinia = defineConfig([
8
- {
9
- ...plugin.configs['recommended-flat'],
10
- files: FILES,
11
- rules: {
12
- ...plugin.configs['recommended-flat'].rules,
13
- 'pinia/prefer-single-store-per-file': 'error',
6
+ /**
7
+ * Правила для Pinia-хранилищ.
8
+ *
9
+ * @param {import('eslint').Linter.Config} [options] - Дополнительные flat-опции
10
+ *
11
+ * @returns {import('eslint').Linter.Config[]}
12
+ *
13
+ * @see [eslint-plugin-pinia](https://github.com/lisilinhart/eslint-plugin-pinia)
14
+ */
15
+ export const pinia = createPlugin(() =>
16
+ defineConfig([
17
+ {
18
+ ...plugin.configs['recommended-flat'],
19
+ files: FILES,
20
+ rules: {
21
+ ...plugin.configs['recommended-flat'].rules,
22
+ 'pinia/prefer-single-store-per-file': 'error',
23
+ },
14
24
  },
15
- },
16
- ]);
25
+ ]),
26
+ );
@@ -2,7 +2,7 @@ import config from 'eslint-config-prettier';
2
2
  import plugin from 'eslint-plugin-prettier/recommended';
3
3
  import { defineConfig } from 'eslint/config';
4
4
 
5
- import { FILES, VUE_FILES } from '../base.js';
5
+ import { createPlugin, FILES, VUE_FILES } from '../base.js';
6
6
  import { STYLE_RULES } from '../rules/style.js';
7
7
 
8
8
  const fixes = {
@@ -17,14 +17,34 @@ const fixes = {
17
17
  ],
18
18
  };
19
19
 
20
- /** @see [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) */
21
- export const prettier = defineConfig([
22
- { files: FILES, ...plugin, rules: { ...plugin.rules, ...STYLE_RULES } },
23
- { files: VUE_FILES, rules: { ...fixes } },
24
- ]);
20
+ /**
21
+ * Форматирование кода самим Prettier (ESLint запускает Prettier как правило).
22
+ *
23
+ * @param {import('eslint').Linter.Config} [options] - Дополнительные flat-опции
24
+ *
25
+ * @returns {import('eslint').Linter.Config[]}
26
+ *
27
+ * @see [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier)
28
+ */
29
+ export const prettier = createPlugin(() =>
30
+ defineConfig([
31
+ { files: FILES, ...plugin, rules: { ...plugin.rules, ...STYLE_RULES } },
32
+ { files: VUE_FILES, rules: { ...fixes } },
33
+ ]),
34
+ );
25
35
 
26
- /** @see [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) */
27
- export const prettierConfig = defineConfig([
28
- { files: FILES, ...config, rules: { ...config.rules, ...STYLE_RULES } },
29
- { files: VUE_FILES, rules: { ...fixes } },
30
- ]);
36
+ /**
37
+ * Отключение правил, конфликтующих с Prettier.
38
+ *
39
+ * @param {import('eslint').Linter.Config} [options] - Дополнительные flat-опции
40
+ *
41
+ * @returns {import('eslint').Linter.Config[]}
42
+ *
43
+ * @see [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier)
44
+ */
45
+ export const prettierConfig = createPlugin(() =>
46
+ defineConfig([
47
+ { files: FILES, ...config, rules: { ...config.rules, ...STYLE_RULES } },
48
+ { files: VUE_FILES, rules: { ...fixes } },
49
+ ]),
50
+ );
package/plugins/regexp.js CHANGED
@@ -1,15 +1,25 @@
1
1
  import plugin from 'eslint-plugin-regexp';
2
2
  import { defineConfig } from 'eslint/config';
3
3
 
4
- import { FILES } from '../base.js';
4
+ import { createPlugin, FILES } from '../base.js';
5
5
 
6
- /** @see [eslint-plugin-regexp](https://github.com/ota-meshi/eslint-plugin-regexp) */
7
- export const regexp = defineConfig([
8
- {
9
- files: FILES,
10
- ...plugin.configs['flat/recommended'],
11
- settings: {
12
- regexp: { allowedCharacterRanges: ['alphanumeric', 'а-я', 'А-Я'] },
6
+ /**
7
+ * Правила для регулярных выражений.
8
+ *
9
+ * @param {import('eslint').Linter.Config} [options] - Дополнительные flat-опции
10
+ *
11
+ * @returns {import('eslint').Linter.Config[]}
12
+ *
13
+ * @see [eslint-plugin-regexp](https://github.com/ota-meshi/eslint-plugin-regexp)
14
+ */
15
+ export const regexp = createPlugin(() =>
16
+ defineConfig([
17
+ {
18
+ files: FILES,
19
+ ...plugin.configs['flat/recommended'],
20
+ settings: {
21
+ regexp: { allowedCharacterRanges: ['alphanumeric', 'а-я', 'А-Я'] },
22
+ },
13
23
  },
14
- },
15
- ]);
24
+ ]),
25
+ );
package/plugins/sonar.js CHANGED
@@ -1,18 +1,28 @@
1
1
  import plugin from 'eslint-plugin-sonarjs';
2
2
  import { defineConfig } from 'eslint/config';
3
3
 
4
- import { FILES } from '../base.js';
4
+ import { createPlugin, FILES } from '../base.js';
5
5
 
6
- /** @see [eslint-plugin-sonarjs](https://github.com/SonarSource/SonarJS/blob/master/packages/jsts/src/rules/README.md) */
7
- export const sonar = defineConfig([
8
- {
9
- files: FILES,
10
- ...plugin.configs.recommended,
11
- rules: {
12
- ...plugin.configs.recommended.rules,
13
- 'sonarjs/no-commented-code': 'warn',
14
- 'sonarjs/todo-tag': 'off',
15
- 'sonarjs/unused-import': 'off', // @typescript-eslint/no-unused-vars
6
+ /**
7
+ * Правила SonarJS.
8
+ *
9
+ * @param {import('eslint').Linter.Config} [options] - Дополнительные flat-опции
10
+ *
11
+ * @returns {import('eslint').Linter.Config[]}
12
+ *
13
+ * @see [eslint-plugin-sonarjs](https://github.com/SonarSource/SonarJS/blob/master/packages/jsts/src/rules/README.md)
14
+ */
15
+ export const sonar = createPlugin(() =>
16
+ defineConfig([
17
+ {
18
+ files: FILES,
19
+ ...plugin.configs.recommended,
20
+ rules: {
21
+ ...plugin.configs.recommended.rules,
22
+ 'sonarjs/no-commented-code': 'warn',
23
+ 'sonarjs/todo-tag': 'off',
24
+ 'sonarjs/unused-import': 'off', // @typescript-eslint/no-unused-vars
25
+ },
16
26
  },
17
- },
18
- ]);
27
+ ]),
28
+ );
@@ -1,106 +1,116 @@
1
1
  import plugin from '@stylistic/eslint-plugin';
2
2
  import { defineConfig } from 'eslint/config';
3
3
 
4
- import { DATA_FILES, FILES } from '../base.js';
4
+ import { createPlugin, DATA_FILES, FILES } from '../base.js';
5
5
 
6
- /** @see [@stylistic/eslint-plugin](https://eslint.style/) */
7
- export const stylistic = defineConfig([
8
- {
9
- ...plugin.configs.recommended,
10
- ignores: [...(plugin.configs.recommended.ignores ?? []), ...DATA_FILES],
11
- },
12
- {
13
- files: FILES,
14
- plugins: { '@stylistic': plugin },
15
- rules: {
16
- '@stylistic/lines-around-comment': [
17
- 'warn',
18
- {
19
- afterBlockComment: false,
20
- afterHashbangComment: true,
21
- afterLineComment: false,
22
- allowArrayEnd: true,
23
- allowArrayStart: true,
24
- allowBlockEnd: true,
25
- allowBlockStart: true,
26
- allowClassEnd: true,
27
- allowClassStart: true,
28
- allowEnumEnd: true,
29
- allowEnumStart: true,
30
- allowInterfaceEnd: true,
31
- allowInterfaceStart: true,
32
- allowModuleEnd: true,
33
- allowModuleStart: true,
34
- allowObjectEnd: true,
35
- allowObjectStart: true,
36
- allowTypeEnd: true,
37
- allowTypeStart: true,
38
- applyDefaultIgnorePatterns: true,
39
- beforeBlockComment: false,
40
- beforeLineComment: false,
41
- },
42
- ],
43
- '@stylistic/padding-line-between-statements': [
44
- 'warn',
45
- // always
46
- { blankLine: 'always', next: '*', prev: 'block-like' },
47
- { blankLine: 'always', next: '*', prev: 'case' },
48
- { blankLine: 'always', next: '*', prev: 'cjs-export' },
49
- { blankLine: 'always', next: '*', prev: 'cjs-import' },
50
- { blankLine: 'always', next: '*', prev: 'class' },
51
- { blankLine: 'always', next: '*', prev: 'default' },
52
- { blankLine: 'always', next: '*', prev: 'directive' },
53
- { blankLine: 'always', next: '*', prev: 'enum' },
54
- { blankLine: 'always', next: '*', prev: 'export' },
55
- { blankLine: 'always', next: '*', prev: 'expression' },
56
- { blankLine: 'always', next: '*', prev: 'iife' },
57
- { blankLine: 'always', next: '*', prev: 'import' },
58
- { blankLine: 'always', next: '*', prev: 'interface' },
59
- { blankLine: 'always', next: '*', prev: 'multiline-block-like' },
60
- { blankLine: 'always', next: '*', prev: 'multiline-const' },
61
- { blankLine: 'always', next: '*', prev: 'multiline-expression' },
62
- { blankLine: 'always', next: '*', prev: 'multiline-let' },
63
- { blankLine: 'always', next: '*', prev: 'multiline-var' },
64
- { blankLine: 'always', next: '*', prev: 'singleline-const' },
65
- { blankLine: 'always', next: '*', prev: 'singleline-let' },
66
- { blankLine: 'always', next: '*', prev: 'singleline-var' },
67
- { blankLine: 'always', next: '*', prev: 'type' },
68
- { blankLine: 'always', next: 'block-like', prev: '*' },
69
- { blankLine: 'always', next: 'cjs-export', prev: '*' },
70
- { blankLine: 'always', next: 'cjs-import', prev: '*' },
71
- { blankLine: 'always', next: 'class', prev: '*' },
72
- { blankLine: 'always', next: 'enum', prev: '*' },
73
- { blankLine: 'always', next: 'export', prev: '*' },
74
- { blankLine: 'always', next: 'expression', prev: '*' },
75
- { blankLine: 'always', next: 'function', prev: '*' },
76
- { blankLine: 'always', next: 'iife', prev: '*' },
77
- { blankLine: 'always', next: 'import', prev: '*' },
78
- { blankLine: 'always', next: 'interface', prev: '*' },
79
- { blankLine: 'always', next: 'multiline-block-like', prev: '*' },
80
- { blankLine: 'always', next: 'multiline-const', prev: '*' },
81
- { blankLine: 'always', next: 'multiline-expression', prev: '*' },
82
- { blankLine: 'always', next: 'multiline-let', prev: '*' },
83
- { blankLine: 'always', next: 'multiline-var', prev: '*' },
84
- { blankLine: 'always', next: 'return', prev: '*' },
85
- { blankLine: 'always', next: 'switch', prev: '*' },
86
- { blankLine: 'always', next: 'type', prev: '*' },
87
- // any
88
- { blankLine: 'any', next: 'expression', prev: 'expression' },
89
- {
90
- blankLine: 'any',
91
- next: 'singleline-const',
92
- prev: 'singleline-const',
93
- },
94
- { blankLine: 'any', next: 'export', prev: 'export' },
95
- { blankLine: 'any', next: 'import', prev: 'import' },
96
- { blankLine: 'any', next: 'singleline-let', prev: 'singleline-let' },
97
- { blankLine: 'any', next: 'singleline-var', prev: 'singleline-var' },
98
- // never
99
- { blankLine: 'never', next: 'cjs-export', prev: 'cjs-export' },
100
- { blankLine: 'never', next: 'cjs-import', prev: 'cjs-import' },
101
- { blankLine: 'never', next: 'directive', prev: 'directive' },
102
- { blankLine: 'never', next: 'function', prev: 'function-overload' },
103
- ],
6
+ /**
7
+ * Правила форматирования и стиля кода.
8
+ *
9
+ * @param {import('eslint').Linter.Config} [options] - Дополнительные flat-опции
10
+ *
11
+ * @returns {import('eslint').Linter.Config[]}
12
+ *
13
+ * @see [@stylistic/eslint-plugin](https://eslint.style/)
14
+ */
15
+ export const stylistic = createPlugin(() =>
16
+ defineConfig([
17
+ {
18
+ ...plugin.configs.recommended,
19
+ ignores: [...(plugin.configs.recommended.ignores ?? []), ...DATA_FILES],
104
20
  },
105
- },
106
- ]);
21
+ {
22
+ files: FILES,
23
+ plugins: { '@stylistic': plugin },
24
+ rules: {
25
+ '@stylistic/lines-around-comment': [
26
+ 'warn',
27
+ {
28
+ afterBlockComment: false,
29
+ afterHashbangComment: true,
30
+ afterLineComment: false,
31
+ allowArrayEnd: true,
32
+ allowArrayStart: true,
33
+ allowBlockEnd: true,
34
+ allowBlockStart: true,
35
+ allowClassEnd: true,
36
+ allowClassStart: true,
37
+ allowEnumEnd: true,
38
+ allowEnumStart: true,
39
+ allowInterfaceEnd: true,
40
+ allowInterfaceStart: true,
41
+ allowModuleEnd: true,
42
+ allowModuleStart: true,
43
+ allowObjectEnd: true,
44
+ allowObjectStart: true,
45
+ allowTypeEnd: true,
46
+ allowTypeStart: true,
47
+ applyDefaultIgnorePatterns: true,
48
+ beforeBlockComment: false,
49
+ beforeLineComment: false,
50
+ },
51
+ ],
52
+ '@stylistic/padding-line-between-statements': [
53
+ 'warn',
54
+ // always
55
+ { blankLine: 'always', next: '*', prev: 'block-like' },
56
+ { blankLine: 'always', next: '*', prev: 'case' },
57
+ { blankLine: 'always', next: '*', prev: 'cjs-export' },
58
+ { blankLine: 'always', next: '*', prev: 'cjs-import' },
59
+ { blankLine: 'always', next: '*', prev: 'class' },
60
+ { blankLine: 'always', next: '*', prev: 'default' },
61
+ { blankLine: 'always', next: '*', prev: 'directive' },
62
+ { blankLine: 'always', next: '*', prev: 'enum' },
63
+ { blankLine: 'always', next: '*', prev: 'export' },
64
+ { blankLine: 'always', next: '*', prev: 'expression' },
65
+ { blankLine: 'always', next: '*', prev: 'iife' },
66
+ { blankLine: 'always', next: '*', prev: 'import' },
67
+ { blankLine: 'always', next: '*', prev: 'interface' },
68
+ { blankLine: 'always', next: '*', prev: 'multiline-block-like' },
69
+ { blankLine: 'always', next: '*', prev: 'multiline-const' },
70
+ { blankLine: 'always', next: '*', prev: 'multiline-expression' },
71
+ { blankLine: 'always', next: '*', prev: 'multiline-let' },
72
+ { blankLine: 'always', next: '*', prev: 'multiline-var' },
73
+ { blankLine: 'always', next: '*', prev: 'singleline-const' },
74
+ { blankLine: 'always', next: '*', prev: 'singleline-let' },
75
+ { blankLine: 'always', next: '*', prev: 'singleline-var' },
76
+ { blankLine: 'always', next: '*', prev: 'type' },
77
+ { blankLine: 'always', next: 'block-like', prev: '*' },
78
+ { blankLine: 'always', next: 'cjs-export', prev: '*' },
79
+ { blankLine: 'always', next: 'cjs-import', prev: '*' },
80
+ { blankLine: 'always', next: 'class', prev: '*' },
81
+ { blankLine: 'always', next: 'enum', prev: '*' },
82
+ { blankLine: 'always', next: 'export', prev: '*' },
83
+ { blankLine: 'always', next: 'expression', prev: '*' },
84
+ { blankLine: 'always', next: 'function', prev: '*' },
85
+ { blankLine: 'always', next: 'iife', prev: '*' },
86
+ { blankLine: 'always', next: 'import', prev: '*' },
87
+ { blankLine: 'always', next: 'interface', prev: '*' },
88
+ { blankLine: 'always', next: 'multiline-block-like', prev: '*' },
89
+ { blankLine: 'always', next: 'multiline-const', prev: '*' },
90
+ { blankLine: 'always', next: 'multiline-expression', prev: '*' },
91
+ { blankLine: 'always', next: 'multiline-let', prev: '*' },
92
+ { blankLine: 'always', next: 'multiline-var', prev: '*' },
93
+ { blankLine: 'always', next: 'return', prev: '*' },
94
+ { blankLine: 'always', next: 'switch', prev: '*' },
95
+ { blankLine: 'always', next: 'type', prev: '*' },
96
+ // any
97
+ { blankLine: 'any', next: 'expression', prev: 'expression' },
98
+ {
99
+ blankLine: 'any',
100
+ next: 'singleline-const',
101
+ prev: 'singleline-const',
102
+ },
103
+ { blankLine: 'any', next: 'export', prev: 'export' },
104
+ { blankLine: 'any', next: 'import', prev: 'import' },
105
+ { blankLine: 'any', next: 'singleline-let', prev: 'singleline-let' },
106
+ { blankLine: 'any', next: 'singleline-var', prev: 'singleline-var' },
107
+ // never
108
+ { blankLine: 'never', next: 'cjs-export', prev: 'cjs-export' },
109
+ { blankLine: 'never', next: 'cjs-import', prev: 'cjs-import' },
110
+ { blankLine: 'never', next: 'directive', prev: 'directive' },
111
+ { blankLine: 'never', next: 'function', prev: 'function-overload' },
112
+ ],
113
+ },
114
+ },
115
+ ]),
116
+ );