@darksheep/eslint 5.2.1 → 5.3.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.
Files changed (39) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/package.json +8 -6
  3. package/src/configs/eslint-base.js +103 -103
  4. package/src/configs/eslint-complexity.js +24 -24
  5. package/src/configs/eslint-ignores.js +32 -32
  6. package/src/configs/eslint-recommended.js +4 -4
  7. package/src/configs/eslint-style.js +12 -12
  8. package/src/custom/index.js +5 -5
  9. package/src/custom/instance-of-array.js +44 -44
  10. package/src/custom/loose-types.js +128 -128
  11. package/src/custom/no-useless-expression.js +19 -19
  12. package/src/custom/sequence-expression.js +15 -15
  13. package/src/index.js +39 -37
  14. package/src/plugins/eslint-comments.js +19 -19
  15. package/src/plugins/jsdoc.js +57 -57
  16. package/src/plugins/json.js +43 -27
  17. package/src/plugins/node.js +108 -108
  18. package/src/plugins/package-json.js +25 -25
  19. package/src/plugins/perfectionist.js +200 -200
  20. package/src/plugins/promise.js +9 -9
  21. package/src/plugins/react.js +111 -111
  22. package/src/plugins/regexp.js +6 -6
  23. package/src/plugins/sca.js +32 -32
  24. package/src/plugins/security.js +14 -14
  25. package/src/plugins/sonarjs.js +11 -20
  26. package/src/plugins/style.js +236 -236
  27. package/src/plugins/typescript.js +65 -65
  28. package/src/plugins/unicorn.js +40 -40
  29. package/src/plugins/unused-imports.js +25 -25
  30. package/src/plugins/yml.js +41 -0
  31. package/src/types.d.ts +80 -80
  32. package/src/utilities/editorconfig.js +151 -141
  33. package/src/utilities/eslint-files.js +20 -20
  34. package/src/utilities/expand-glob.js +34 -34
  35. package/src/utilities/filesystem.js +30 -30
  36. package/src/utilities/make-compat.js +6 -6
  37. package/src/utilities/package.js +29 -29
  38. package/types/src/plugins/yml.d.ts +5 -0
  39. package/types/src/utilities/editorconfig.d.ts +7 -0
@@ -7,7 +7,7 @@ import { getPackageJson } from '../utilities/package.js';
7
7
  * @returns {T}
8
8
  */
9
9
  function idef(target) {
10
- return /** @type {{ default: T }} */ (target)?.default ?? target;
10
+ return /** @type {{ default: T }} */ (target)?.default ?? target;
11
11
  }
12
12
 
13
13
  /**
@@ -16,73 +16,73 @@ function idef(target) {
16
16
  * @returns {Promise<import('eslint').Linter.FlatConfig[]>}
17
17
  */
18
18
  export async function createEslintTypescriptConfig(root) {
19
- const packageJson = await getPackageJson(root, 'typescript');
19
+ const packageJson = await getPackageJson(root, 'typescript');
20
20
 
21
- // Typescript not installed
22
- if (packageJson == null) {
23
- return [];
24
- }
21
+ // Typescript not installed
22
+ if (packageJson == null) {
23
+ return [];
24
+ }
25
25
 
26
- const typescriptParser = idef(await import('@typescript-eslint/parser'));
27
- const typescriptPlugin = idef(await import('@typescript-eslint/eslint-plugin'));
26
+ const typescriptParser = idef(await import('@typescript-eslint/parser'));
27
+ const typescriptPlugin = idef(await import('@typescript-eslint/eslint-plugin'));
28
28
 
29
- return [ {
30
- name: 'typescript/custom',
31
- files: getTypescriptFiles(),
32
- languageOptions: {
33
- parser: typescriptParser,
34
- sourceType: 'module',
35
- parserOptions: {
36
- warnOnUnsupportedTypeScriptVersion: false,
37
- },
38
- },
39
- plugins: {
40
- '@typescript-eslint': /** @type {*} */ (typescriptPlugin),
41
- },
42
- rules: {
43
- // Rules that fight with typescript
44
- 'constructor-super': 'off',
45
- 'getter-return': 'off',
46
- 'no-const-assign': 'off',
47
- 'no-dupe-args': 'off',
48
- 'no-dupe-class-members': 'off',
49
- 'no-dupe-keys': 'off',
50
- 'no-func-assign': 'off',
51
- 'no-import-assign': 'off',
52
- // 'no-new-symbol': 'off',
53
- 'no-obj-calls': 'off',
54
- 'no-redeclare': 'off',
55
- 'no-setter-return': 'off',
56
- 'no-this-before-super': 'off',
57
- 'no-undef': 'off',
58
- 'no-unreachable': 'off',
59
- 'no-unsafe-negation': 'off',
60
- 'no-array-constructor': 'off',
29
+ return [ {
30
+ name: 'typescript/custom',
31
+ files: getTypescriptFiles(),
32
+ languageOptions: {
33
+ parser: typescriptParser,
34
+ sourceType: 'module',
35
+ parserOptions: {
36
+ warnOnUnsupportedTypeScriptVersion: false,
37
+ },
38
+ },
39
+ plugins: {
40
+ '@typescript-eslint': /** @type {*} */ (typescriptPlugin),
41
+ },
42
+ rules: {
43
+ // Rules that fight with typescript
44
+ 'constructor-super': 'off',
45
+ 'getter-return': 'off',
46
+ 'no-const-assign': 'off',
47
+ 'no-dupe-args': 'off',
48
+ 'no-dupe-class-members': 'off',
49
+ 'no-dupe-keys': 'off',
50
+ 'no-func-assign': 'off',
51
+ 'no-import-assign': 'off',
52
+ // 'no-new-symbol': 'off',
53
+ 'no-obj-calls': 'off',
54
+ 'no-redeclare': 'off',
55
+ 'no-setter-return': 'off',
56
+ 'no-this-before-super': 'off',
57
+ 'no-undef': 'off',
58
+ 'no-unreachable': 'off',
59
+ 'no-unsafe-negation': 'off',
60
+ 'no-array-constructor': 'off',
61
61
 
62
- // Rules that prevert some commmon ts issues
63
- 'no-var': 'error',
64
- 'prefer-const': 'error',
65
- 'prefer-rest-params': 'error',
66
- 'prefer-spread': 'error',
62
+ // Rules that prevert some commmon ts issues
63
+ 'no-var': 'error',
64
+ 'prefer-const': 'error',
65
+ 'prefer-rest-params': 'error',
66
+ 'prefer-spread': 'error',
67
67
 
68
- // ts eslint recommended
69
- '@typescript-eslint/ban-ts-comment': 'error',
70
- '@typescript-eslint/no-empty-object-type': 'error',
71
- '@typescript-eslint/no-unsafe-function-type': 'error',
72
- '@typescript-eslint/no-wrapper-object-types': 'error',
73
- '@typescript-eslint/no-array-constructor': 'error',
74
- '@typescript-eslint/no-duplicate-enum-values': 'error',
75
- '@typescript-eslint/no-explicit-any': 'error',
76
- '@typescript-eslint/no-extra-non-null-assertion': 'error',
77
- '@typescript-eslint/no-misused-new': 'error',
78
- '@typescript-eslint/no-namespace': [ 'error', { allowDeclarations: true } ],
79
- '@typescript-eslint/no-non-null-asserted-optional-chain': 'error',
80
- '@typescript-eslint/no-this-alias': 'error',
81
- '@typescript-eslint/no-unnecessary-type-constraint': 'error',
82
- '@typescript-eslint/no-unsafe-declaration-merging': 'error',
83
- '@typescript-eslint/no-require-imports': 'error',
84
- '@typescript-eslint/prefer-as-const': 'error',
85
- '@typescript-eslint/triple-slash-reference': 'error',
86
- },
87
- } ];
68
+ // ts eslint recommended
69
+ '@typescript-eslint/ban-ts-comment': 'error',
70
+ '@typescript-eslint/no-empty-object-type': 'error',
71
+ '@typescript-eslint/no-unsafe-function-type': 'error',
72
+ '@typescript-eslint/no-wrapper-object-types': 'error',
73
+ '@typescript-eslint/no-array-constructor': 'error',
74
+ '@typescript-eslint/no-duplicate-enum-values': 'error',
75
+ '@typescript-eslint/no-explicit-any': 'error',
76
+ '@typescript-eslint/no-extra-non-null-assertion': 'error',
77
+ '@typescript-eslint/no-misused-new': 'error',
78
+ '@typescript-eslint/no-namespace': [ 'error', { allowDeclarations: true } ],
79
+ '@typescript-eslint/no-non-null-asserted-optional-chain': 'error',
80
+ '@typescript-eslint/no-this-alias': 'error',
81
+ '@typescript-eslint/no-unnecessary-type-constraint': 'error',
82
+ '@typescript-eslint/no-unsafe-declaration-merging': 'error',
83
+ '@typescript-eslint/no-require-imports': 'error',
84
+ '@typescript-eslint/prefer-as-const': 'error',
85
+ '@typescript-eslint/triple-slash-reference': 'error',
86
+ },
87
+ } ];
88
88
  }
@@ -5,53 +5,53 @@ import unicorn from 'eslint-plugin-unicorn';
5
5
  * @returns {Promise<import('eslint').Linter.FlatConfig[]>}
6
6
  */
7
7
  export async function createEslintUnicornConfig() {
8
- return [ {
9
- name: 'unicorn/custom',
10
- plugins: { unicorn },
11
- rules: {
12
- /*
8
+ return [ {
9
+ name: 'unicorn/custom',
10
+ plugins: { unicorn },
11
+ rules: {
12
+ /*
13
13
  * Sanity checks
14
14
  */
15
- 'unicorn/better-regex': 'off',
16
- 'unicorn/no-empty-file': 'warn',
17
- 'unicorn/no-zero-fractions': 'error',
18
- 'unicorn/no-unreadable-array-destructuring': 'error',
19
- 'unicorn/no-useless-undefined': 'error',
20
- 'unicorn/no-abusive-eslint-disable': 'warn',
15
+ 'unicorn/better-regex': 'off',
16
+ 'unicorn/no-empty-file': 'warn',
17
+ 'unicorn/no-zero-fractions': 'error',
18
+ 'unicorn/no-unreadable-array-destructuring': 'error',
19
+ 'unicorn/no-useless-undefined': 'error',
20
+ 'unicorn/no-abusive-eslint-disable': 'warn',
21
21
 
22
- /*
22
+ /*
23
23
  * Error management
24
24
  */
25
- 'unicorn/catch-error-name': 'error',
26
- 'unicorn/custom-error-definition': 'off',
27
- 'unicorn/throw-new-error': 'error',
28
- 'unicorn/error-message': 'error',
29
- 'unicorn/prefer-type-error': 'error',
25
+ 'unicorn/catch-error-name': 'error',
26
+ 'unicorn/custom-error-definition': 'off',
27
+ 'unicorn/throw-new-error': 'error',
28
+ 'unicorn/error-message': 'error',
29
+ 'unicorn/prefer-type-error': 'error',
30
30
 
31
- // This breaks babel
32
- 'unicorn/prefer-optional-catch-binding': 'off',
31
+ // This breaks babel
32
+ 'unicorn/prefer-optional-catch-binding': 'off',
33
33
 
34
- /*
34
+ /*
35
35
  * Best practice
36
36
  */
37
- 'unicorn/consistent-destructuring': 'off',
38
- 'unicorn/escape-case': 'error',
39
- 'unicorn/filename-case': 'off',
40
- 'unicorn/no-console-spaces': 'error',
41
- 'unicorn/no-keyword-prefix': 'warn',
42
- 'unicorn/no-nested-ternary': 'warn',
43
- 'unicorn/no-new-array': 'error',
44
- 'unicorn/no-useless-promise-resolve-reject': 'error',
45
- 'unicorn/no-useless-switch-case': 'error',
46
- 'unicorn/prefer-add-event-listener': 'error',
47
- 'unicorn/prefer-default-parameters': 'error',
48
- 'unicorn/prefer-export-from': 'warn',
49
- 'unicorn/prefer-native-coercion-functions': 'error',
50
- 'unicorn/prefer-node-protocol': 'warn',
51
- 'unicorn/prefer-reflect-apply': 'warn',
52
- 'unicorn/prefer-regexp-test': 'warn',
53
- 'unicorn/require-array-join-separator': 'error',
54
- 'unicorn/text-encoding-identifier-case': 'error',
55
- },
56
- } ];
37
+ 'unicorn/consistent-destructuring': 'off',
38
+ 'unicorn/escape-case': 'error',
39
+ 'unicorn/filename-case': 'off',
40
+ 'unicorn/no-console-spaces': 'error',
41
+ 'unicorn/no-keyword-prefix': 'warn',
42
+ 'unicorn/no-nested-ternary': 'warn',
43
+ 'unicorn/no-new-array': 'error',
44
+ 'unicorn/no-useless-promise-resolve-reject': 'error',
45
+ 'unicorn/no-useless-switch-case': 'error',
46
+ 'unicorn/prefer-add-event-listener': 'error',
47
+ 'unicorn/prefer-default-parameters': 'error',
48
+ 'unicorn/prefer-export-from': 'warn',
49
+ 'unicorn/prefer-native-coercion-functions': 'error',
50
+ 'unicorn/prefer-node-protocol': 'warn',
51
+ 'unicorn/prefer-reflect-apply': 'warn',
52
+ 'unicorn/prefer-regexp-test': 'warn',
53
+ 'unicorn/require-array-join-separator': 'error',
54
+ 'unicorn/text-encoding-identifier-case': 'error',
55
+ },
56
+ } ];
57
57
  }
@@ -1,8 +1,8 @@
1
1
  import unused from 'eslint-plugin-unused-imports';
2
2
 
3
3
  import {
4
- getModuleFiles,
5
- getTypescriptFiles,
4
+ getModuleFiles,
5
+ getTypescriptFiles,
6
6
  } from '../utilities/eslint-files.js';
7
7
 
8
8
  /**
@@ -11,28 +11,28 @@ import {
11
11
  * @returns {Promise<import('eslint').Linter.FlatConfig[]>}
12
12
  */
13
13
  export async function createEslintUnusedImportsConfig(root) {
14
- return [
15
- {
16
- name: 'no-unused-imports/custom',
17
- files: [
18
- ...await getModuleFiles(root),
19
- ...getTypescriptFiles(),
20
- ],
21
- plugins: { 'unused-imports': unused },
22
- rules: {
23
- 'no-unused-vars': 'off',
24
- '@typescript-eslint/no-unused-vars': 'off',
14
+ return [
15
+ {
16
+ name: 'no-unused-imports/custom',
17
+ files: [
18
+ ...await getModuleFiles(root),
19
+ ...getTypescriptFiles(),
20
+ ],
21
+ plugins: { 'unused-imports': unused },
22
+ rules: {
23
+ 'no-unused-vars': 'off',
24
+ '@typescript-eslint/no-unused-vars': 'off',
25
25
 
26
- 'unused-imports/no-unused-imports': 'error',
27
- 'unused-imports/no-unused-vars': [
28
- 'error', {
29
- argsIgnorePattern: '^_',
30
- varsIgnorePattern: '^_',
31
- args: 'after-used',
32
- vars: 'local',
33
- },
34
- ],
35
- },
36
- },
37
- ];
26
+ 'unused-imports/no-unused-imports': 'error',
27
+ 'unused-imports/no-unused-vars': [
28
+ 'error', {
29
+ argsIgnorePattern: '^_',
30
+ varsIgnorePattern: '^_',
31
+ args: 'after-used',
32
+ vars: 'local',
33
+ },
34
+ ],
35
+ },
36
+ },
37
+ ];
38
38
  }
@@ -0,0 +1,41 @@
1
+ import yml from 'eslint-plugin-yml';
2
+ import parser from 'yaml-eslint-parser';
3
+
4
+ /**
5
+ * Get ESLint config for yml check
6
+ * @returns {Promise<import('eslint').Linter.FlatConfig[]>}
7
+ */
8
+ export async function createEslintYmlConfig() {
9
+ return [
10
+ {
11
+ name: 'yml/core',
12
+ files: [ '**/*.yaml', '**/*.yml' ],
13
+ languageOptions: { parser },
14
+ // @ts-expect-error jsonc does not match the plugin interface
15
+ plugins: { yml },
16
+ rules: {
17
+ 'yml/block-mapping-colon-indicator-newline': 'error',
18
+ 'yml/block-mapping-question-indicator-newline': 'error',
19
+ 'yml/block-mapping': 'error',
20
+ 'yml/block-sequence-hyphen-indicator-newline': [ 'error', 'never' ],
21
+ 'yml/block-sequence': 'error',
22
+ 'yml/flow-mapping-curly-newline': 'error',
23
+ 'yml/flow-mapping-curly-spacing': [ 'error', 'always' ],
24
+ 'yml/flow-sequence-bracket-newline': 'error',
25
+ 'yml/flow-sequence-bracket-spacing': [ 'error', 'always' ],
26
+ 'yml/key-spacing': 'error',
27
+ 'yml/no-empty-document': 'error',
28
+ 'yml/no-empty-key': 'error',
29
+ 'yml/no-empty-sequence-entry': 'error',
30
+ 'yml/no-irregular-whitespace': 'error',
31
+ 'yml/no-multiple-empty-lines': [ 'error', { max: 1 } ],
32
+ 'yml/no-tab-indent': 'error',
33
+ 'yml/no-trailing-zeros': 'error',
34
+ 'yml/plain-scalar': 'error',
35
+ 'yml/quotes': [ 'error' ],
36
+ 'yml/require-string-key': 'error',
37
+ 'yml/spaced-comment': 'error',
38
+ },
39
+ },
40
+ ];
41
+ }
package/src/types.d.ts CHANGED
@@ -3,121 +3,121 @@
3
3
  type WithRequired<T, K extends keyof T> = T & { [P in K]-?: T[P] };
4
4
 
5
5
  declare module '@eslint-community/eslint-plugin-eslint-comments' {
6
- import type { ESLint } from 'eslint';
7
- export default {} as ESLint.Plugin;
6
+ import type { ESLint } from 'eslint';
7
+ export default {} as ESLint.Plugin;
8
8
  }
9
9
 
10
10
  declare module 'eslint-plugin-import' {
11
- import type { ESLint, Linter } from 'eslint';
12
- export default {} as {
13
- configs: {
14
- 'electron': {
15
- settings: Required<ESLint.ConfigData['settings']>;
16
- };
17
- 'errors': {
18
- plugins: Required<ESLint.ConfigData['plugins']>;
19
- rules: Linter.RulesRecord;
20
- };
21
- 'react': {
22
- parserOptions: Required<ESLint.ConfigData['parserOptions']>;
23
- settings: Required<ESLint.ConfigData['settings']>;
24
- };
25
- 'react-native': {
26
- settings: Required<ESLint.ConfigData['settings']>;
27
- };
28
- 'recommended': {
29
- parserOptions: Required<ESLint.ConfigData['parserOptions']>;
30
- plugins: Required<ESLint.ConfigData['plugins']>;
31
- rules: Linter.RulesRecord;
32
- };
33
- 'stage-0': {
34
- plugins: Required<ESLint.ConfigData['plugins']>;
35
- rules: Linter.RulesRecord;
36
- };
37
- 'typescript': {
38
- rules: Linter.RulesRecord;
39
- settings: Required<ESLint.ConfigData['settings']>;
40
- };
41
- 'warnings': {
42
- plugins: Required<ESLint.ConfigData['plugins']>;
43
- rules: Linter.RulesRecord;
44
- };
45
- };
46
- rules: Required<ESLint.Plugin['rules']>;
11
+ import type { ESLint, Linter } from 'eslint';
12
+ export default {} as {
13
+ configs: {
14
+ 'electron': {
15
+ settings: Required<ESLint.ConfigData['settings']>;
16
+ };
17
+ 'errors': {
18
+ plugins: Required<ESLint.ConfigData['plugins']>;
19
+ rules: Linter.RulesRecord;
20
+ };
21
+ 'react': {
22
+ parserOptions: Required<ESLint.ConfigData['parserOptions']>;
23
+ settings: Required<ESLint.ConfigData['settings']>;
24
+ };
25
+ 'react-native': {
26
+ settings: Required<ESLint.ConfigData['settings']>;
27
+ };
28
+ 'recommended': {
29
+ parserOptions: Required<ESLint.ConfigData['parserOptions']>;
30
+ plugins: Required<ESLint.ConfigData['plugins']>;
31
+ rules: Linter.RulesRecord;
32
+ };
33
+ 'stage-0': {
34
+ plugins: Required<ESLint.ConfigData['plugins']>;
35
+ rules: Linter.RulesRecord;
36
+ };
37
+ 'typescript': {
38
+ rules: Linter.RulesRecord;
39
+ settings: Required<ESLint.ConfigData['settings']>;
40
+ };
41
+ 'warnings': {
42
+ plugins: Required<ESLint.ConfigData['plugins']>;
43
+ rules: Linter.RulesRecord;
44
+ };
47
45
  };
46
+ rules: Required<ESLint.Plugin['rules']>;
47
+ };
48
48
  }
49
49
 
50
50
  declare module 'eslint-plugin-jest' {
51
- import type { ESLint } from 'eslint';
52
- export default {} as WithRequired<ESLint.Plugin, 'environments'>;
51
+ import type { ESLint } from 'eslint';
52
+ export default {} as WithRequired<ESLint.Plugin, 'environments'>;
53
53
  }
54
54
 
55
55
  declare module 'eslint-plugin-perfectionist' {
56
- import type { ESLint } from 'eslint';
57
- export default {} as WithRequired<ESLint.Plugin, 'environments'>;
56
+ import type { ESLint } from 'eslint';
57
+ export default {} as WithRequired<ESLint.Plugin, 'environments'>;
58
58
  }
59
59
 
60
60
  declare module 'eslint-plugin-jsdoc' {
61
- import type { ESLint } from 'eslint';
62
- export default {} as WithRequired<ESLint.Plugin, 'environments'>;
61
+ import type { ESLint } from 'eslint';
62
+ export default {} as WithRequired<ESLint.Plugin, 'environments'>;
63
63
  }
64
64
 
65
65
  declare module '@stylistic/eslint-plugin' {
66
- import type { ESLint } from 'eslint';
67
- export default {} as WithRequired<ESLint.Plugin, 'environments'>;
66
+ import type { ESLint } from 'eslint';
67
+ export default {} as WithRequired<ESLint.Plugin, 'environments'>;
68
68
  }
69
69
 
70
70
  declare module 'eslint-plugin-jsx-a11y' {
71
- import type { ESLint } from 'eslint';
72
- export default {} as ESLint.Plugin;
71
+ import type { ESLint } from 'eslint';
72
+ export default {} as ESLint.Plugin;
73
73
  }
74
74
 
75
75
  declare module 'eslint-plugin-promise' {
76
- import type { ESLint } from 'eslint';
77
- export default {} as {
78
- configs: {
79
- recommended: WithRequired<ESLint.ConfigData, 'plugins' | 'rules'>;
80
- };
81
- rules: Required<ESLint.Plugin['rules']>;
76
+ import type { ESLint } from 'eslint';
77
+ export default {} as {
78
+ configs: {
79
+ recommended: WithRequired<ESLint.ConfigData, 'plugins' | 'rules'>;
82
80
  };
81
+ rules: Required<ESLint.Plugin['rules']>;
82
+ };
83
83
  }
84
84
 
85
85
  declare module 'eslint-plugin-react' {
86
- import type { ESLint } from 'eslint';
87
- export default {} as ESLint.Plugin;
86
+ import type { ESLint } from 'eslint';
87
+ export default {} as ESLint.Plugin;
88
88
  }
89
89
 
90
90
  declare module 'eslint-plugin-security' {
91
- import type { ESLint } from 'eslint';
92
- export default {} as {
93
- configs: {
94
- recommended: WithRequired<ESLint.ConfigData, 'plugins' | 'rules'>;
95
- };
96
- rules: Required<ESLint.Plugin['rules']>;
91
+ import type { ESLint } from 'eslint';
92
+ export default {} as {
93
+ configs: {
94
+ recommended: WithRequired<ESLint.ConfigData, 'plugins' | 'rules'>;
97
95
  };
96
+ rules: Required<ESLint.Plugin['rules']>;
97
+ };
98
98
  }
99
99
 
100
100
  declare module 'eslint-plugin-unused-imports' {
101
- import type { ESLint } from 'eslint';
102
- export default {} as ESLint.Plugin;
101
+ import type { ESLint } from 'eslint';
102
+ export default {} as ESLint.Plugin;
103
103
  }
104
104
 
105
105
  declare module 'eslint-plugin-n' {
106
- import type { ESLint, Linter } from 'eslint';
107
- export default {} as {
108
- configs: {
109
- 'flat/mixed-esm-and-cjs': Linter.FlatConfig;
110
- 'flat/recommended': Linter.FlatConfig;
111
- 'flat/recommended-module': Linter.FlatConfig;
112
- 'flat/recommended-script': Linter.FlatConfig;
113
- 'recommended': ESLint.ConfigData;
114
- 'recommended-module': ESLint.ConfigData;
115
- 'recommended-script': ESLint.ConfigData;
116
- };
117
- meta: {
118
- name: string;
119
- version: string;
120
- };
121
- rules: Required<ESLint.Plugin['rules']>;
106
+ import type { ESLint, Linter } from 'eslint';
107
+ export default {} as {
108
+ configs: {
109
+ 'flat/mixed-esm-and-cjs': Linter.FlatConfig;
110
+ 'flat/recommended': Linter.FlatConfig;
111
+ 'flat/recommended-module': Linter.FlatConfig;
112
+ 'flat/recommended-script': Linter.FlatConfig;
113
+ 'recommended': ESLint.ConfigData;
114
+ 'recommended-module': ESLint.ConfigData;
115
+ 'recommended-script': ESLint.ConfigData;
122
116
  };
117
+ meta: {
118
+ name: string;
119
+ version: string;
120
+ };
121
+ rules: Required<ESLint.Plugin['rules']>;
122
+ };
123
123
  }