@fullstacksjs/eslint-config 14.5.0 → 14.6.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 (54) hide show
  1. package/README.md +95 -60
  2. package/cjs/index.js +12 -2
  3. package/cjs/modules/base.js +4 -2
  4. package/cjs/modules/cypress.js +8 -3
  5. package/cjs/modules/ignore.js +1 -1
  6. package/cjs/modules/imports.js +4 -3
  7. package/cjs/modules/jest.js +4 -2
  8. package/cjs/modules/next.js +8 -3
  9. package/cjs/modules/node.js +4 -2
  10. package/cjs/modules/perfectionist.js +6 -3
  11. package/cjs/modules/playwright.js +8 -3
  12. package/cjs/modules/prettier.js +8 -3
  13. package/cjs/modules/promise.js +7 -2
  14. package/cjs/modules/react.js +7 -2
  15. package/cjs/modules/regex.js +4 -2
  16. package/cjs/modules/storybook.js +8 -3
  17. package/cjs/modules/stylistic.js +5 -3
  18. package/cjs/modules/tailwind.js +4 -2
  19. package/cjs/modules/tests.js +4 -2
  20. package/cjs/modules/typescript.js +4 -2
  21. package/cjs/modules/vitest.js +5 -2
  22. package/cjs/{index.d.ts → types/index.d.ts} +50 -52
  23. package/cjs/types/modules/import.d.ts +7 -0
  24. package/cjs/types/modules/react.d.ts +5 -0
  25. package/cjs/types/modules/regex.d.ts +5 -0
  26. package/cjs/types/modules/tailwind.d.ts +20 -0
  27. package/cjs/types/modules/typescript.d.ts +38 -0
  28. package/package.json +3 -2
  29. package/src/index.mjs +12 -2
  30. package/src/modules/base.mjs +5 -2
  31. package/src/modules/cypress.mjs +9 -3
  32. package/src/modules/ignore.mjs +1 -1
  33. package/src/modules/imports.mjs +4 -3
  34. package/src/modules/jest.mjs +5 -2
  35. package/src/modules/next.mjs +9 -3
  36. package/src/modules/node.mjs +5 -2
  37. package/src/modules/perfectionist.mjs +7 -3
  38. package/src/modules/playwright.mjs +9 -3
  39. package/src/modules/prettier.mjs +9 -3
  40. package/src/modules/promise.mjs +8 -2
  41. package/src/modules/react.mjs +8 -2
  42. package/src/modules/regex.mjs +5 -2
  43. package/src/modules/storybook.mjs +9 -3
  44. package/src/modules/stylistic.mjs +5 -3
  45. package/src/modules/tailwind.mjs +6 -2
  46. package/src/modules/tests.mjs +5 -2
  47. package/src/modules/typescript.mjs +5 -2
  48. package/src/modules/vitest.mjs +6 -2
  49. package/src/{index.d.ts → types/index.d.ts} +50 -52
  50. package/src/types/modules/import.d.ts +7 -0
  51. package/src/types/modules/react.d.ts +5 -0
  52. package/src/types/modules/regex.d.ts +5 -0
  53. package/src/types/modules/tailwind.d.ts +20 -0
  54. package/src/types/modules/typescript.d.ts +38 -0
@@ -1,8 +1,12 @@
1
1
  import plugin from '@next/eslint-plugin-next';
2
+ import { mergeConfigs } from 'eslint-flat-config-utils';
2
3
 
3
- /** @type { import('eslint').Linter.Config } */
4
- function next() {
5
- return {
4
+ /**
5
+ * @param { import('../types').Options } options
6
+ * @return { import('eslint').Linter.Config }
7
+ */
8
+ function next(options = {}) {
9
+ const nextConfig = {
6
10
  name: 'next',
7
11
  plugins: { next: plugin },
8
12
  rules: {
@@ -29,6 +33,8 @@ function next() {
29
33
  'next/no-unwanted-polyfillio': 'warn',
30
34
  },
31
35
  };
36
+
37
+ return mergeConfigs(nextConfig, options.next.overrides ?? {});
32
38
  }
33
39
 
34
40
  export default next;
@@ -1,13 +1,14 @@
1
+ import { mergeConfigs } from 'eslint-flat-config-utils';
1
2
  import plugin from 'eslint-plugin-n';
2
3
 
3
4
  import { strict } from '../utils/conditions.mjs';
4
5
 
5
6
  /**
6
- * @param { import('..').Options } options
7
+ * @param { import('../types').Options } options
7
8
  * @return { import('eslint').Linter.Config }
8
9
  */
9
10
  function node(options = {}) {
10
- return {
11
+ const nodeConfig = {
11
12
  name: 'node',
12
13
  plugins: { n: plugin },
13
14
  rules: {
@@ -56,6 +57,8 @@ function node(options = {}) {
56
57
  'n/no-missing-require': 'off',
57
58
  },
58
59
  };
60
+
61
+ return mergeConfigs(nodeConfig, options.node.overrides ?? {});
59
62
  }
60
63
 
61
64
  export default node;
@@ -1,10 +1,12 @@
1
+ import { mergeConfigs } from 'eslint-flat-config-utils';
1
2
  import plugin from 'eslint-plugin-perfectionist';
2
3
 
3
4
  /**
4
- * @return { import('eslint').Linter.Config }
5
+ * @param { import('../types').Options } options
6
+ * @return { Promise<import('eslint').Linter.Config> }
5
7
  */
6
- function perfectionist() {
7
- return {
8
+ function perfectionist(options = {}) {
9
+ const perfectionistConfig = {
8
10
  name: 'perfectionist',
9
11
  plugins: { perfectionist: plugin },
10
12
  rules: {
@@ -69,6 +71,8 @@ function perfectionist() {
69
71
  'perfectionist/sort-variable-declarations': 'warn',
70
72
  },
71
73
  };
74
+
75
+ return mergeConfigs(perfectionistConfig, options.sort.overrides ?? {});
72
76
  }
73
77
 
74
78
  export default perfectionist;
@@ -1,10 +1,14 @@
1
+ import { mergeConfigs } from 'eslint-flat-config-utils';
1
2
  import plugin from 'eslint-plugin-playwright';
2
3
 
3
4
  import { globs } from '../utils/globs.mjs';
4
5
 
5
- /** @return { import('eslint').Linter.Config } */
6
- function playwright() {
7
- return {
6
+ /**
7
+ * @param { import('../types').Options } options
8
+ * @return { Promise<import('eslint').Linter.Config> }
9
+ */
10
+ function playwright(options = {}) {
11
+ const playwrightConfig = {
8
12
  name: 'playwright',
9
13
  plugins: { playwright: plugin },
10
14
  files: globs.e2e,
@@ -69,6 +73,8 @@ function playwright() {
69
73
  'playwright/valid-title': 'warn',
70
74
  },
71
75
  };
76
+
77
+ return mergeConfigs(playwrightConfig, options.playwright.overrides ?? {});
72
78
  }
73
79
 
74
80
  export default playwright;
@@ -1,8 +1,12 @@
1
+ import { mergeConfigs } from 'eslint-flat-config-utils';
1
2
  import plugin from 'eslint-plugin-prettier';
2
3
 
3
- /** @return { import('eslint').Linter.Config } */
4
- function prettier() {
5
- return {
4
+ /**
5
+ * @param { import('../types').Options } options
6
+ * @return { Promise<import('eslint').Linter.Config> }
7
+ */
8
+ function prettier(options = {}) {
9
+ const prettierConfig = {
6
10
  name: 'prettier',
7
11
  plugins: { prettier: plugin },
8
12
  rules: {
@@ -88,6 +92,8 @@ function prettier() {
88
92
  'vue/template-curly-spacing': 'off',
89
93
  },
90
94
  };
95
+
96
+ return mergeConfigs(prettierConfig, options.prettier.overrides ?? {});
91
97
  }
92
98
 
93
99
  export default prettier;
@@ -1,10 +1,14 @@
1
+ import { mergeConfigs } from 'eslint-flat-config-utils';
1
2
  import plugin from 'eslint-plugin-promise';
2
3
 
3
4
  import { strict } from '../utils/conditions.mjs';
4
5
 
5
- /** @return { import('eslint').Linter.Config } */
6
+ /**
7
+ * @param { import('../types').Options } options
8
+ * @return { Promise<import('eslint').Linter.Config> }
9
+ */
6
10
  function promise(options = {}) {
7
- return {
11
+ const promiseConfig = {
8
12
  name: 'promise',
9
13
  plugins: { promise: plugin },
10
14
  rules: {
@@ -27,6 +31,8 @@ function promise(options = {}) {
27
31
  'promise/spec-only': 'warn',
28
32
  },
29
33
  };
34
+
35
+ return mergeConfigs(promiseConfig, options.promise.overrides ?? {});
30
36
  }
31
37
 
32
38
  export default promise;
@@ -1,4 +1,5 @@
1
1
  import reactPlugin from '@eslint-react/eslint-plugin';
2
+ import { mergeConfigs } from 'eslint-flat-config-utils';
2
3
  import a11yPlugin from 'eslint-plugin-jsx-a11y';
3
4
  import hooksPlugin from 'eslint-plugin-react-hooks';
4
5
  import { parser } from 'typescript-eslint';
@@ -6,11 +7,14 @@ import { parser } from 'typescript-eslint';
6
7
  import { predicate, strict } from '../utils/conditions.mjs';
7
8
  import { globs } from '../utils/globs.mjs';
8
9
 
9
- /** @return { import('eslint').Linter.Config } */
10
+ /**
11
+ * @param { import('../types').Options } options
12
+ * @return { Promise<import('eslint').Linter.Config> }
13
+ */
10
14
  function react(options = {}) {
11
15
  const projectService = options.typescript && options.typescript.tsconfigRootDir && options.typescript.projectService;
12
16
 
13
- return {
17
+ const reactConfig = {
14
18
  name: 'react',
15
19
  files: [globs.js, globs.jsx, globs.ts, globs.tsx],
16
20
  plugins: {
@@ -171,6 +175,8 @@ function react(options = {}) {
171
175
  'jsx-a11y/prefer-tag-over-role': 'off',
172
176
  },
173
177
  };
178
+
179
+ return mergeConfigs(reactConfig, options.react.overrides ?? {});
174
180
  }
175
181
 
176
182
  export default react;
@@ -1,11 +1,12 @@
1
+ import { mergeConfigs } from 'eslint-flat-config-utils';
1
2
  import * as plugin from 'eslint-plugin-regexp';
2
3
 
3
4
  /**
4
- * @param { import('..').Options } options
5
+ * @param { import('../types').Options } options
5
6
  * @return { Promise<import('eslint').Linter.Config> }
6
7
  */
7
8
  function regex(options = {}) {
8
- return {
9
+ const regexConfig = {
9
10
  name: 'regex',
10
11
  plugins: { regexp: plugin },
11
12
  settings: {
@@ -102,6 +103,8 @@ function regex(options = {}) {
102
103
  'no-empty-character-class': 'off',
103
104
  },
104
105
  };
106
+
107
+ return mergeConfigs(regexConfig, options.regex.overrides ?? {});
105
108
  }
106
109
 
107
110
  export default regex;
@@ -1,10 +1,14 @@
1
+ import { mergeConfigs } from 'eslint-flat-config-utils';
1
2
  import plugin from 'eslint-plugin-storybook';
2
3
 
3
4
  import { globs } from '../utils/globs.mjs';
4
5
 
5
- /** @return { import('eslint').Linter.Config } */
6
- function storybook() {
7
- return {
6
+ /**
7
+ * @param { import('../types').Options } options
8
+ * @return { Promise<import('eslint').Linter.Config> }
9
+ */
10
+ function storybook(options = {}) {
11
+ const storybookConfig = {
8
12
  name: 'storybook',
9
13
  files: globs.storybook,
10
14
  plugins: { storybook: plugin },
@@ -33,6 +37,8 @@ function storybook() {
33
37
  'react-hooks/rules-of-hooks': 'off',
34
38
  },
35
39
  };
40
+
41
+ return mergeConfigs(storybookConfig, options.storybook.overrides ?? {});
36
42
  }
37
43
 
38
44
  export default storybook;
@@ -1,11 +1,12 @@
1
1
  import stylisticPlugin from '@stylistic/eslint-plugin';
2
+ import { mergeConfigs } from 'eslint-flat-config-utils';
2
3
 
3
4
  /**
4
- * @param { import('..').Options } options
5
+ * @param { import('../types').Options } options
5
6
  * @return { Promise<import('eslint').Linter.Config> }
6
7
  */
7
- function stylistic() {
8
- return {
8
+ function stylistic(options = {}) {
9
+ const stylisticConfig = {
9
10
  name: 'stylistic',
10
11
  plugins: { '@stylistic': stylisticPlugin },
11
12
  rules: {
@@ -43,6 +44,7 @@ function stylistic() {
43
44
  ],
44
45
  },
45
46
  };
47
+ return mergeConfigs(stylisticConfig, options.stylistic.overrides ?? {});
46
48
  }
47
49
 
48
50
  export default stylistic;
@@ -1,12 +1,14 @@
1
+ import { mergeConfigs } from 'eslint-flat-config-utils';
2
+
1
3
  import { strict } from '../utils/conditions.mjs';
2
4
 
3
5
  /**
4
- * @param { import('..').Options } options
6
+ * @param { import('../types').Options } options
5
7
  * @return { Promise<import('eslint').Linter.Config> }
6
8
  */
7
9
  async function tailwind(options = {}) {
8
10
  const plugin = await import('eslint-plugin-better-tailwindcss');
9
- return {
11
+ const tailwindConfig = {
10
12
  name: 'tailwind',
11
13
  plugins: { 'better-tailwindcss': plugin.default ?? plugin },
12
14
  settings: {
@@ -35,6 +37,8 @@ async function tailwind(options = {}) {
35
37
  'better-tailwindcss/no-unnecessary-whitespace': 'warn',
36
38
  },
37
39
  };
40
+
41
+ return mergeConfigs(tailwindConfig, options.tailwind.overrides ?? {});
38
42
  }
39
43
 
40
44
  export default tailwind;
@@ -1,16 +1,17 @@
1
1
  import plugin from '@vitest/eslint-plugin';
2
+ import { mergeConfigs } from 'eslint-flat-config-utils';
2
3
  import globals from 'globals';
3
4
 
4
5
  import { predicate } from '../utils/conditions.mjs';
5
6
  import { globs } from '../utils/globs.mjs';
6
7
 
7
8
  /**
8
- * @param { import('..').Options } options
9
+ * @param { import('../types').Options } options
9
10
  * @return { import('eslint').Linter.Config }
10
11
  */
11
12
 
12
13
  function tests(options = {}) {
13
- return {
14
+ const testsConfug = {
14
15
  name: 'tests',
15
16
  files: [...globs.test, ...globs.e2e],
16
17
  plugins: { vitest: plugin },
@@ -38,6 +39,8 @@ function tests(options = {}) {
38
39
  }),
39
40
  },
40
41
  };
42
+
43
+ return mergeConfigs(testsConfug, options.test.overrides ?? {});
41
44
  }
42
45
 
43
46
  export default tests;
@@ -1,3 +1,4 @@
1
+ import { mergeConfigs } from 'eslint-flat-config-utils';
1
2
  import { parser, plugin } from 'typescript-eslint';
2
3
 
3
4
  import { predicate, strict } from '../utils/conditions.mjs';
@@ -5,13 +6,13 @@ import { globs } from '../utils/globs.mjs';
5
6
  import { namingConvention } from '../utils/naming-convention.mjs';
6
7
 
7
8
  /**
8
- * @param { import('..').Options } options
9
+ * @param { import('../types').Options } options
9
10
  * @return { import('eslint').Linter.Config }
10
11
  */
11
12
  function typescript(options = {}) {
12
13
  const projectService = options.typescript && options.typescript.tsconfigRootDir && options.typescript.projectService;
13
14
 
14
- return {
15
+ const typescriptConfig = {
15
16
  name: 'typescript',
16
17
  files: [globs.ts, globs.tsx],
17
18
  plugins: { '@typescript-eslint': plugin },
@@ -248,6 +249,8 @@ function typescript(options = {}) {
248
249
  'no-duplicate-imports': 'off',
249
250
  },
250
251
  };
252
+
253
+ return mergeConfigs(typescriptConfig, options.typescript.overrides ?? {});
251
254
  }
252
255
 
253
256
  export default typescript;
@@ -1,12 +1,14 @@
1
1
  import plugin from '@vitest/eslint-plugin';
2
+ import { mergeConfigs } from 'eslint-flat-config-utils';
2
3
 
3
4
  import { globs } from '../utils/globs.mjs';
4
5
 
5
6
  /**
7
+ * @param { import('../types').Options } options
6
8
  * @return { import('eslint').Linter.Config }
7
9
  */
8
- function vitest() {
9
- return {
10
+ function vitest(options = {}) {
11
+ const vitestConfig = {
10
12
  name: 'vitest',
11
13
  files: globs.test,
12
14
  plugins: { vitest: plugin },
@@ -100,6 +102,8 @@ function vitest() {
100
102
  'vitest/warn-todo': 'warn',
101
103
  },
102
104
  };
105
+
106
+ return mergeConfigs(vitestConfig, options.vitest.overrides ?? {});
103
107
  }
104
108
 
105
109
  export default vitest;
@@ -1,69 +1,57 @@
1
1
  import type { Linter } from 'eslint';
2
+ import type { ConfigWithExtends } from 'eslint-flat-config-utils';
2
3
 
3
- /**
4
- * Granular options to configure the project service.
5
- */
6
- export interface ProjectServiceOptions {
7
- /**
8
- * Globs of files to allow running with the default project compiler options
9
- * despite not being matched by the project service.
10
- */
11
- allowDefaultProject?: string[];
12
-
13
- /**
14
- * Path to a TSConfig to use instead of TypeScript's default project configuration.
15
- * @default 'tsconfig.json'
16
- */
17
- defaultProject?: string;
18
-
19
- /**
20
- * Whether to allow TypeScript plugins as configured in the TSConfig.
21
- */
22
- loadTypeScriptPlugins?: boolean;
4
+ import type { ImportOptions } from './modules/import';
5
+ import type { ReactOptions } from './modules/react';
6
+ import type { RegexOptions } from './modules/regex';
7
+ import type { TailwindOptions } from './modules/tailwind';
8
+ import type { TypeScriptOptions } from './modules/typescript';
23
9
 
10
+ interface ConfigWithOverrides {
24
11
  /**
25
- * The maximum number of files {@link allowDefaultProject} may match.
26
- * Each file match slows down linting, so if you do need to use this, please
27
- * file an informative issue on typescript-eslint explaining why - so we can
28
- * help you avoid using it!
29
- * @default 8
12
+ * Override the configuration.
13
+ *
14
+ * The properties of this object are merged with and take precedence over the default configuration.
15
+ *
16
+ * There is no guarantee that the resulting configuration works correctly — it depends on the options you provide.
17
+ *
18
+ * @see [eslint-flat-config-utils: `mergeConfigs`](https://jsr.io/@antfu/eslint-flat-config-utils/doc/~/mergeConfigs)
30
19
  */
31
- maximumDefaultProjectFileMatchCount_THIS_WILL_SLOW_DOWN_LINTING?: number;
20
+ overrides?: ConfigWithExtends;
32
21
  }
33
22
 
34
- type TailwindConfig = {
35
- callees?: string[];
36
- variables?: string[];
37
- attributes?: string[];
38
- tags?: string[];
39
- } & ({ entryPoint: string; tailwindConfig?: string } | { entryPoint?: string; tailwindConfig: string });
40
-
41
23
  export interface Options extends Linter.Config {
24
+ /**
25
+ * Controls Base.
26
+ * @default true
27
+ */
28
+ base?: boolean | ConfigWithOverrides;
42
29
  /**
43
30
  * Controls React plugin.
44
31
  * @default true - If you have `react` or `react-dom` in your dependencies.
45
32
  */
46
- react?: boolean | { additionalEffectHooks?: string };
33
+ react?: boolean | ReactOptions;
47
34
  /**
35
+ * Controls [Perfectionist plugin](https://www.npmjs.com/package/eslint-plugin-perfectionist).
48
36
  * @default true
49
37
  */
50
- sort?: boolean;
38
+ sort?: boolean | ConfigWithOverrides;
51
39
  /**
52
40
  * Controls Next plugin.
53
41
  * @default true - If you have `next` in your dependencies.
54
42
  */
55
- next?: boolean;
43
+ next?: boolean | ConfigWithOverrides;
56
44
  /**
57
45
  * Controls Tailwind plugin.
58
46
  * @default false
59
47
  * @see https://github.com/schoero/eslint-plugin-better-tailwindcss/blob/main/docs/settings/settings.md
60
48
  */
61
- tailwind?: false | TailwindConfig;
49
+ tailwind?: false | TailwindOptions;
62
50
  /**
63
51
  * Controls [Node plugin](https://www.npmjs.com/package/eslint-plugin-n).
64
52
  * @default false
65
53
  */
66
- node?: boolean;
54
+ node?: boolean | ConfigWithOverrides;
67
55
  /**
68
56
  * Enables all strict rules.
69
57
  * @default false
@@ -73,7 +61,7 @@ export interface Options extends Linter.Config {
73
61
  * Controls [import plugin](https://www.npmjs.com/package/eslint-plugin-import-x).
74
62
  * @default true
75
63
  */
76
- import?: boolean | { internalRegExp?: string; lifetime?: number; projects?: string | string[] };
64
+ import?: boolean | ImportOptions;
77
65
  /**
78
66
  * @default true - If you have `type: module` in your `package.json`.
79
67
  */
@@ -82,42 +70,57 @@ export interface Options extends Linter.Config {
82
70
  * Controls [test plugin](https://www.npmjs.com/package/eslint-plugin-jest-formatting).
83
71
  * @default true - If you have one of `jest`, `vitest`, `cypress`, `@playwright/test` in your dependencies.
84
72
  */
85
- test?: boolean;
73
+ test?: boolean | ConfigWithOverrides;
86
74
  /**
87
75
  * Controls [Jest plugin](https://www.npmjs.com/package/eslint-plugin-jest).
88
76
  * @default true - If you have `jest` in your dependencies.
89
77
  */
90
- jest?: boolean;
78
+ jest?: boolean | ConfigWithOverrides;
91
79
  /**
92
80
  * Controls [Vitest plugin](https://www.npmjs.com/package/eslint-plugin-vitest).
93
81
  * @default true - If you have `vitest` in your dependencies.
94
82
  */
95
- vitest?: boolean;
83
+ vitest?: boolean | ConfigWithOverrides;
96
84
  /**
97
85
  * Controls [Cypress plugin](https://www.npmjs.com/package/eslint-plugin-cypress).
98
86
  * @default true - If you have `cypress` in your dependencies.
99
87
  */
100
- cypress?: boolean;
88
+ cypress?: boolean | ConfigWithOverrides;
101
89
  /**
102
90
  * Controls [Storybook plugin](https://www.npmjs.com/package/eslint-plugin-storybook).
103
91
  * @default true if you have `storybook` in your dependencies.
104
92
  */
105
- storybook?: boolean;
93
+ storybook?: boolean | ConfigWithOverrides;
106
94
  /**
107
95
  * Controls [Prettier plugin](https://www.npmjs.com/package/eslint-plugin-prettier).
108
96
  * @default true - If you have `prettier` in your dependencies.
109
97
  */
110
- prettier?: boolean;
98
+ prettier?: boolean | ConfigWithOverrides;
111
99
  /**
112
100
  * Controls [Playwright plugin](https://www.npmjs.com/package/eslint-plugin-playwright).
113
101
  * @default true - If you have `@playwright/test` in your dependencies.
114
102
  */
115
- playwright?: boolean;
103
+ playwright?: boolean | ConfigWithOverrides;
104
+ /**
105
+ * Controls [Promise plugin](https://www.npmjs.com/package/eslint-plugin-promise).
106
+ * @default true
107
+ */
108
+ promise?: boolean | ConfigWithOverrides;
109
+ /**
110
+ * Controls [Stylistic plugin](https://www.npmjs.com/package/@stylistic/eslint-plugin).
111
+ * @default true
112
+ */
113
+ stylistic?: boolean | ConfigWithOverrides;
116
114
  /**
117
115
  * Controls [TypeScript plugin](https://www.npmjs.com/package/typescript-eslint).
118
116
  * @default true - If you have `typescript` in your dependencies.
119
117
  */
120
- typescript?: boolean | { projectService?: boolean | ProjectServiceOptions; tsconfigRootDir?: string; cacheLifetime?: number };
118
+ typescript?: boolean | TypeScriptOptions;
119
+ /**
120
+ * Controls [Regex plugin](https://www.npmjs.com/package/eslint-plugin-regexp).
121
+ * @default { allowedCharacterRanges: ['all'] }
122
+ */
123
+ regex?: boolean | RegexOptions;
121
124
  /**
122
125
  * Disables expensive rules.
123
126
  * @default false
@@ -133,11 +136,6 @@ export interface Options extends Linter.Config {
133
136
  * @default './.gitignore'
134
137
  */
135
138
  gitignore?: string | false;
136
- /**
137
- * Controls regex plugin.
138
- * @default { allowedCharacterRanges: ['all'] }
139
- */
140
- regex?: boolean | { allowedCharacterRanges: string[] };
141
139
  }
142
140
 
143
141
  export declare function defineConfig(initOptions?: Options, ...extend: Linter.Config[]): Linter.Config[];
@@ -0,0 +1,7 @@
1
+ import type { ConfigWithOverrides } from '..';
2
+
3
+ interface ImportOptions extends ConfigWithOverrides {
4
+ internalRegExp?: string;
5
+ lifetime?: number;
6
+ projects?: string | string[];
7
+ }
@@ -0,0 +1,5 @@
1
+ import type { ConfigWithOverrides } from '..';
2
+
3
+ interface ReactOptions extends ConfigWithOverrides {
4
+ additionalEffectHooks?: string;
5
+ }
@@ -0,0 +1,5 @@
1
+ import type { ConfigWithOverrides } from '..';
2
+
3
+ interface RegexOptions extends ConfigWithOverrides {
4
+ allowedCharacterRanges: string[];
5
+ }
@@ -0,0 +1,20 @@
1
+ import type { ConfigWithOverrides } from '..';
2
+
3
+ interface TailwindOptionsBase extends ConfigWithOverrides {
4
+ callees?: string[];
5
+ variables?: string[];
6
+ attributes?: string[];
7
+ tags?: string[];
8
+ }
9
+
10
+ interface TailwindOptionsWithEntryPoint extends TailwindOptionsBase {
11
+ entryPoint: string;
12
+ tailwindConfig?: string;
13
+ }
14
+
15
+ interface TailwindOptionsWithConfig extends TailwindOptionsBase {
16
+ entryPoint?: string;
17
+ tailwindConfig: string;
18
+ }
19
+
20
+ type TailwindOptions = TailwindOptionsWithConfig | TailwindOptionsWithEntryPoint;
@@ -0,0 +1,38 @@
1
+ import type { ConfigWithOverrides } from '..';
2
+
3
+ /**
4
+ * Granular options to configure the project service.
5
+ */
6
+ interface ProjectServiceOptions {
7
+ /**
8
+ * Globs of files to allow running with the default project compiler options
9
+ * despite not being matched by the project service.
10
+ */
11
+ allowDefaultProject?: string[];
12
+
13
+ /**
14
+ * Path to a TSConfig to use instead of TypeScript's default project configuration.
15
+ * @default 'tsconfig.json'
16
+ */
17
+ defaultProject?: string;
18
+
19
+ /**
20
+ * Whether to allow TypeScript plugins as configured in the TSConfig.
21
+ */
22
+ loadTypeScriptPlugins?: boolean;
23
+
24
+ /**
25
+ * The maximum number of files {@link allowDefaultProject} may match.
26
+ * Each file match slows down linting, so if you do need to use this, please
27
+ * file an informative issue on typescript-eslint explaining why - so we can
28
+ * help you avoid using it!
29
+ * @default 8
30
+ */
31
+ maximumDefaultProjectFileMatchCount_THIS_WILL_SLOW_DOWN_LINTING?: number;
32
+ }
33
+
34
+ interface TypeScriptOptions extends ConfigWithOverrides {
35
+ projectService?: boolean | ProjectServiceOptions;
36
+ tsconfigRootDir?: string;
37
+ cacheLifetime?: number;
38
+ }