@antfu/eslint-config 1.2.0 → 2.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.
- package/README.md +19 -18
- package/dist/cli.cjs +12 -13
- package/dist/cli.js +12 -13
- package/dist/index.cjs +103 -113
- package/dist/index.d.cts +35 -53
- package/dist/index.d.ts +35 -53
- package/dist/index.js +110 -101
- package/package.json +6 -6
package/dist/index.d.cts
CHANGED
|
@@ -1,45 +1,23 @@
|
|
|
1
1
|
import { FlatGitignoreOptions } from 'eslint-config-flat-gitignore';
|
|
2
2
|
import { ParserOptions } from '@typescript-eslint/parser';
|
|
3
|
-
import
|
|
4
|
-
export { parser as parserTs };
|
|
3
|
+
import { Linter } from 'eslint';
|
|
5
4
|
import { RuleConfig, MergeIntersection, RenamePrefix, VitestRules, YmlRules, NRules, Prefix, ImportRules, EslintRules, JsoncRules, VueRules, EslintCommentsRules, FlatESLintConfigItem } from '@antfu/eslint-define-config';
|
|
6
5
|
import { RuleOptions as RuleOptions$1 } from '@eslint-types/jsdoc/types';
|
|
7
6
|
import { RuleOptions } from '@eslint-types/typescript-eslint/types';
|
|
8
7
|
import { RuleOptions as RuleOptions$2 } from '@eslint-types/unicorn/types';
|
|
9
8
|
import { Rules as Rules$1 } from 'eslint-plugin-antfu';
|
|
10
|
-
export { default as pluginAntfu } from 'eslint-plugin-antfu';
|
|
11
9
|
import { UnprefixedRuleOptions, StylisticCustomizeOptions } from '@stylistic/eslint-plugin';
|
|
12
|
-
export { default as pluginStylistic } from '@stylistic/eslint-plugin';
|
|
13
|
-
export { default as pluginComments } from 'eslint-plugin-eslint-comments';
|
|
14
|
-
import * as eslintPluginI from 'eslint-plugin-i';
|
|
15
|
-
export { eslintPluginI as pluginImport };
|
|
16
|
-
export { default as pluginJsdoc } from 'eslint-plugin-jsdoc';
|
|
17
|
-
import * as eslintPluginJsonc from 'eslint-plugin-jsonc';
|
|
18
|
-
export { eslintPluginJsonc as pluginJsonc };
|
|
19
|
-
export { default as pluginMarkdown } from 'eslint-plugin-markdown';
|
|
20
|
-
export { default as pluginNode } from 'eslint-plugin-n';
|
|
21
|
-
export { default as pluginTs } from '@typescript-eslint/eslint-plugin';
|
|
22
|
-
export { default as pluginUnicorn } from 'eslint-plugin-unicorn';
|
|
23
|
-
export { default as pluginUnusedImports } from 'eslint-plugin-unused-imports';
|
|
24
|
-
export { default as pluginVue } from 'eslint-plugin-vue';
|
|
25
|
-
import * as eslintPluginYml from 'eslint-plugin-yml';
|
|
26
|
-
export { eslintPluginYml as pluginYaml };
|
|
27
|
-
export { default as pluginNoOnlyTests } from 'eslint-plugin-no-only-tests';
|
|
28
|
-
export { default as pluginVitest } from 'eslint-plugin-vitest';
|
|
29
|
-
export { default as pluginPerfectionist } from 'eslint-plugin-perfectionist';
|
|
30
|
-
export { default as parserVue } from 'vue-eslint-parser';
|
|
31
|
-
export { default as parserYaml } from 'yaml-eslint-parser';
|
|
32
|
-
export { default as parserJsonc } from 'jsonc-eslint-parser';
|
|
33
10
|
|
|
34
11
|
type WrapRuleConfig<T extends {
|
|
35
12
|
[key: string]: any;
|
|
36
13
|
}> = {
|
|
37
14
|
[K in keyof T]: T[K] extends RuleConfig ? T[K] : RuleConfig<T[K]>;
|
|
38
15
|
};
|
|
16
|
+
type Awaitable<T> = T | Promise<T>;
|
|
39
17
|
type Rules = WrapRuleConfig<MergeIntersection<RenamePrefix<RuleOptions, '@typescript-eslint/', 'ts/'> & RenamePrefix<VitestRules, 'vitest/', 'test/'> & RenamePrefix<YmlRules, 'yml/', 'yaml/'> & RenamePrefix<NRules, 'n/', 'node/'> & Prefix<UnprefixedRuleOptions, 'style/'> & Prefix<Rules$1, 'antfu/'> & RuleOptions$1 & ImportRules & EslintRules & JsoncRules & VueRules & RuleOptions$2 & EslintCommentsRules & {
|
|
40
18
|
'test/no-only-tests': RuleConfig<[]>;
|
|
41
19
|
}>>;
|
|
42
|
-
type
|
|
20
|
+
type FlatConfigItem = Omit<FlatESLintConfigItem<Rules, false>, 'plugins'> & {
|
|
43
21
|
/**
|
|
44
22
|
* Custom name of each config item
|
|
45
23
|
*/
|
|
@@ -51,6 +29,7 @@ type ConfigItem = Omit<FlatESLintConfigItem<Rules, false>, 'plugins'> & {
|
|
|
51
29
|
*/
|
|
52
30
|
plugins?: Record<string, any>;
|
|
53
31
|
};
|
|
32
|
+
type UserConfigItem = FlatConfigItem | Linter.FlatConfig;
|
|
54
33
|
interface OptionsComponentExts {
|
|
55
34
|
/**
|
|
56
35
|
* Additional extensions for components.
|
|
@@ -82,7 +61,7 @@ interface OptionsStylistic {
|
|
|
82
61
|
interface StylisticConfig extends Pick<StylisticCustomizeOptions, 'indent' | 'quotes' | 'jsx' | 'semi'> {
|
|
83
62
|
}
|
|
84
63
|
interface OptionsOverrides {
|
|
85
|
-
overrides?:
|
|
64
|
+
overrides?: FlatConfigItem['rules'];
|
|
86
65
|
}
|
|
87
66
|
interface OptionsIsInEditor {
|
|
88
67
|
isInEditor?: boolean;
|
|
@@ -158,68 +137,68 @@ interface OptionsConfig extends OptionsComponentExts {
|
|
|
158
137
|
* Provide overrides for rules for each integration.
|
|
159
138
|
*/
|
|
160
139
|
overrides?: {
|
|
161
|
-
javascript?:
|
|
162
|
-
typescript?:
|
|
163
|
-
test?:
|
|
164
|
-
vue?:
|
|
165
|
-
jsonc?:
|
|
166
|
-
markdown?:
|
|
167
|
-
yaml?:
|
|
140
|
+
javascript?: FlatConfigItem['rules'];
|
|
141
|
+
typescript?: FlatConfigItem['rules'];
|
|
142
|
+
test?: FlatConfigItem['rules'];
|
|
143
|
+
vue?: FlatConfigItem['rules'];
|
|
144
|
+
jsonc?: FlatConfigItem['rules'];
|
|
145
|
+
markdown?: FlatConfigItem['rules'];
|
|
146
|
+
yaml?: FlatConfigItem['rules'];
|
|
168
147
|
};
|
|
169
148
|
}
|
|
170
149
|
|
|
171
150
|
/**
|
|
172
151
|
* Construct an array of ESLint flat config items.
|
|
173
152
|
*/
|
|
174
|
-
declare function antfu(options?: OptionsConfig &
|
|
153
|
+
declare function antfu(options?: OptionsConfig & FlatConfigItem, ...userConfigs: Awaitable<UserConfigItem | UserConfigItem[]>[]): Promise<UserConfigItem[]>;
|
|
175
154
|
|
|
176
|
-
declare function comments():
|
|
155
|
+
declare function comments(): Promise<FlatConfigItem[]>;
|
|
177
156
|
|
|
178
|
-
declare function ignores():
|
|
157
|
+
declare function ignores(): Promise<FlatConfigItem[]>;
|
|
179
158
|
|
|
180
|
-
declare function imports(options?: OptionsStylistic):
|
|
159
|
+
declare function imports(options?: OptionsStylistic): Promise<FlatConfigItem[]>;
|
|
181
160
|
|
|
182
|
-
declare function javascript(options?: OptionsIsInEditor & OptionsOverrides):
|
|
161
|
+
declare function javascript(options?: OptionsIsInEditor & OptionsOverrides): Promise<FlatConfigItem[]>;
|
|
183
162
|
|
|
184
|
-
declare function jsdoc(options?: OptionsStylistic):
|
|
163
|
+
declare function jsdoc(options?: OptionsStylistic): Promise<FlatConfigItem[]>;
|
|
185
164
|
|
|
186
|
-
declare function jsonc(options?: OptionsStylistic & OptionsOverrides):
|
|
165
|
+
declare function jsonc(options?: OptionsStylistic & OptionsOverrides): Promise<FlatConfigItem[]>;
|
|
187
166
|
|
|
188
|
-
declare function markdown(options?: OptionsComponentExts & OptionsOverrides):
|
|
167
|
+
declare function markdown(options?: OptionsComponentExts & OptionsOverrides): Promise<FlatConfigItem[]>;
|
|
189
168
|
|
|
190
|
-
declare function node():
|
|
169
|
+
declare function node(): Promise<FlatConfigItem[]>;
|
|
191
170
|
|
|
192
171
|
/**
|
|
193
172
|
* Sort package.json
|
|
194
173
|
*
|
|
195
174
|
* Requires `jsonc` config
|
|
196
175
|
*/
|
|
197
|
-
declare function sortPackageJson():
|
|
176
|
+
declare function sortPackageJson(): Promise<FlatConfigItem[]>;
|
|
198
177
|
/**
|
|
199
178
|
* Sort tsconfig.json
|
|
200
179
|
*
|
|
201
180
|
* Requires `jsonc` config
|
|
202
181
|
*/
|
|
203
|
-
declare function sortTsconfig():
|
|
182
|
+
declare function sortTsconfig(): FlatConfigItem[];
|
|
204
183
|
|
|
205
|
-
declare function stylistic(options?: StylisticConfig):
|
|
184
|
+
declare function stylistic(options?: StylisticConfig): Promise<FlatConfigItem[]>;
|
|
206
185
|
|
|
207
|
-
declare function typescript(options?: OptionsComponentExts & OptionsOverrides & OptionsTypeScriptWithTypes & OptionsTypeScriptParserOptions):
|
|
186
|
+
declare function typescript(options?: OptionsComponentExts & OptionsOverrides & OptionsTypeScriptWithTypes & OptionsTypeScriptParserOptions): Promise<FlatConfigItem[]>;
|
|
208
187
|
|
|
209
|
-
declare function unicorn():
|
|
188
|
+
declare function unicorn(): Promise<FlatConfigItem[]>;
|
|
210
189
|
|
|
211
|
-
declare function vue(options?: OptionsHasTypeScript & OptionsOverrides & OptionsStylistic):
|
|
190
|
+
declare function vue(options?: OptionsHasTypeScript & OptionsOverrides & OptionsStylistic): Promise<FlatConfigItem[]>;
|
|
212
191
|
|
|
213
|
-
declare function yaml(options?: OptionsOverrides & OptionsStylistic):
|
|
192
|
+
declare function yaml(options?: OptionsOverrides & OptionsStylistic): Promise<FlatConfigItem[]>;
|
|
214
193
|
|
|
215
|
-
declare function test(options?: OptionsIsInEditor & OptionsOverrides):
|
|
194
|
+
declare function test(options?: OptionsIsInEditor & OptionsOverrides): Promise<FlatConfigItem[]>;
|
|
216
195
|
|
|
217
196
|
/**
|
|
218
197
|
* Optional perfectionist plugin for props and items sorting.
|
|
219
198
|
*
|
|
220
199
|
* @see https://github.com/azat-io/eslint-plugin-perfectionist
|
|
221
200
|
*/
|
|
222
|
-
declare function perfectionist():
|
|
201
|
+
declare function perfectionist(): Promise<FlatConfigItem[]>;
|
|
223
202
|
|
|
224
203
|
declare const GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
225
204
|
declare const GLOB_SRC = "**/*.?([cm])[jt]s?(x)";
|
|
@@ -246,10 +225,13 @@ declare const GLOB_EXCLUDE: string[];
|
|
|
246
225
|
/**
|
|
247
226
|
* Combine array and non-array configs into a single array.
|
|
248
227
|
*/
|
|
249
|
-
declare function combine(...configs:
|
|
228
|
+
declare function combine(...configs: Awaitable<UserConfigItem | UserConfigItem[]>[]): Promise<UserConfigItem[]>;
|
|
250
229
|
declare function renameRules(rules: Record<string, any>, from: string, to: string): {
|
|
251
230
|
[k: string]: any;
|
|
252
231
|
};
|
|
253
232
|
declare function toArray<T>(value: T | T[]): T[];
|
|
233
|
+
declare function interopDefault<T>(m: Awaitable<T>): Promise<T extends {
|
|
234
|
+
default: infer U;
|
|
235
|
+
} ? U : T>;
|
|
254
236
|
|
|
255
|
-
export { type
|
|
237
|
+
export { type Awaitable, type FlatConfigItem, GLOB_ALL_SRC, GLOB_CSS, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TESTS, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML, type OptionsComponentExts, type OptionsConfig, type OptionsHasTypeScript, type OptionsIsInEditor, type OptionsOverrides, type OptionsStylistic, type OptionsTypeScriptParserOptions, type OptionsTypeScriptWithTypes, type Rules, type StylisticConfig, type UserConfigItem, type WrapRuleConfig, antfu, combine, comments, antfu as default, ignores, imports, interopDefault, javascript, jsdoc, jsonc, markdown, node, perfectionist, renameRules, sortPackageJson, sortTsconfig, stylistic, test, toArray, typescript, unicorn, vue, yaml };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,45 +1,23 @@
|
|
|
1
1
|
import { FlatGitignoreOptions } from 'eslint-config-flat-gitignore';
|
|
2
2
|
import { ParserOptions } from '@typescript-eslint/parser';
|
|
3
|
-
import
|
|
4
|
-
export { parser as parserTs };
|
|
3
|
+
import { Linter } from 'eslint';
|
|
5
4
|
import { RuleConfig, MergeIntersection, RenamePrefix, VitestRules, YmlRules, NRules, Prefix, ImportRules, EslintRules, JsoncRules, VueRules, EslintCommentsRules, FlatESLintConfigItem } from '@antfu/eslint-define-config';
|
|
6
5
|
import { RuleOptions as RuleOptions$1 } from '@eslint-types/jsdoc/types';
|
|
7
6
|
import { RuleOptions } from '@eslint-types/typescript-eslint/types';
|
|
8
7
|
import { RuleOptions as RuleOptions$2 } from '@eslint-types/unicorn/types';
|
|
9
8
|
import { Rules as Rules$1 } from 'eslint-plugin-antfu';
|
|
10
|
-
export { default as pluginAntfu } from 'eslint-plugin-antfu';
|
|
11
9
|
import { UnprefixedRuleOptions, StylisticCustomizeOptions } from '@stylistic/eslint-plugin';
|
|
12
|
-
export { default as pluginStylistic } from '@stylistic/eslint-plugin';
|
|
13
|
-
export { default as pluginComments } from 'eslint-plugin-eslint-comments';
|
|
14
|
-
import * as eslintPluginI from 'eslint-plugin-i';
|
|
15
|
-
export { eslintPluginI as pluginImport };
|
|
16
|
-
export { default as pluginJsdoc } from 'eslint-plugin-jsdoc';
|
|
17
|
-
import * as eslintPluginJsonc from 'eslint-plugin-jsonc';
|
|
18
|
-
export { eslintPluginJsonc as pluginJsonc };
|
|
19
|
-
export { default as pluginMarkdown } from 'eslint-plugin-markdown';
|
|
20
|
-
export { default as pluginNode } from 'eslint-plugin-n';
|
|
21
|
-
export { default as pluginTs } from '@typescript-eslint/eslint-plugin';
|
|
22
|
-
export { default as pluginUnicorn } from 'eslint-plugin-unicorn';
|
|
23
|
-
export { default as pluginUnusedImports } from 'eslint-plugin-unused-imports';
|
|
24
|
-
export { default as pluginVue } from 'eslint-plugin-vue';
|
|
25
|
-
import * as eslintPluginYml from 'eslint-plugin-yml';
|
|
26
|
-
export { eslintPluginYml as pluginYaml };
|
|
27
|
-
export { default as pluginNoOnlyTests } from 'eslint-plugin-no-only-tests';
|
|
28
|
-
export { default as pluginVitest } from 'eslint-plugin-vitest';
|
|
29
|
-
export { default as pluginPerfectionist } from 'eslint-plugin-perfectionist';
|
|
30
|
-
export { default as parserVue } from 'vue-eslint-parser';
|
|
31
|
-
export { default as parserYaml } from 'yaml-eslint-parser';
|
|
32
|
-
export { default as parserJsonc } from 'jsonc-eslint-parser';
|
|
33
10
|
|
|
34
11
|
type WrapRuleConfig<T extends {
|
|
35
12
|
[key: string]: any;
|
|
36
13
|
}> = {
|
|
37
14
|
[K in keyof T]: T[K] extends RuleConfig ? T[K] : RuleConfig<T[K]>;
|
|
38
15
|
};
|
|
16
|
+
type Awaitable<T> = T | Promise<T>;
|
|
39
17
|
type Rules = WrapRuleConfig<MergeIntersection<RenamePrefix<RuleOptions, '@typescript-eslint/', 'ts/'> & RenamePrefix<VitestRules, 'vitest/', 'test/'> & RenamePrefix<YmlRules, 'yml/', 'yaml/'> & RenamePrefix<NRules, 'n/', 'node/'> & Prefix<UnprefixedRuleOptions, 'style/'> & Prefix<Rules$1, 'antfu/'> & RuleOptions$1 & ImportRules & EslintRules & JsoncRules & VueRules & RuleOptions$2 & EslintCommentsRules & {
|
|
40
18
|
'test/no-only-tests': RuleConfig<[]>;
|
|
41
19
|
}>>;
|
|
42
|
-
type
|
|
20
|
+
type FlatConfigItem = Omit<FlatESLintConfigItem<Rules, false>, 'plugins'> & {
|
|
43
21
|
/**
|
|
44
22
|
* Custom name of each config item
|
|
45
23
|
*/
|
|
@@ -51,6 +29,7 @@ type ConfigItem = Omit<FlatESLintConfigItem<Rules, false>, 'plugins'> & {
|
|
|
51
29
|
*/
|
|
52
30
|
plugins?: Record<string, any>;
|
|
53
31
|
};
|
|
32
|
+
type UserConfigItem = FlatConfigItem | Linter.FlatConfig;
|
|
54
33
|
interface OptionsComponentExts {
|
|
55
34
|
/**
|
|
56
35
|
* Additional extensions for components.
|
|
@@ -82,7 +61,7 @@ interface OptionsStylistic {
|
|
|
82
61
|
interface StylisticConfig extends Pick<StylisticCustomizeOptions, 'indent' | 'quotes' | 'jsx' | 'semi'> {
|
|
83
62
|
}
|
|
84
63
|
interface OptionsOverrides {
|
|
85
|
-
overrides?:
|
|
64
|
+
overrides?: FlatConfigItem['rules'];
|
|
86
65
|
}
|
|
87
66
|
interface OptionsIsInEditor {
|
|
88
67
|
isInEditor?: boolean;
|
|
@@ -158,68 +137,68 @@ interface OptionsConfig extends OptionsComponentExts {
|
|
|
158
137
|
* Provide overrides for rules for each integration.
|
|
159
138
|
*/
|
|
160
139
|
overrides?: {
|
|
161
|
-
javascript?:
|
|
162
|
-
typescript?:
|
|
163
|
-
test?:
|
|
164
|
-
vue?:
|
|
165
|
-
jsonc?:
|
|
166
|
-
markdown?:
|
|
167
|
-
yaml?:
|
|
140
|
+
javascript?: FlatConfigItem['rules'];
|
|
141
|
+
typescript?: FlatConfigItem['rules'];
|
|
142
|
+
test?: FlatConfigItem['rules'];
|
|
143
|
+
vue?: FlatConfigItem['rules'];
|
|
144
|
+
jsonc?: FlatConfigItem['rules'];
|
|
145
|
+
markdown?: FlatConfigItem['rules'];
|
|
146
|
+
yaml?: FlatConfigItem['rules'];
|
|
168
147
|
};
|
|
169
148
|
}
|
|
170
149
|
|
|
171
150
|
/**
|
|
172
151
|
* Construct an array of ESLint flat config items.
|
|
173
152
|
*/
|
|
174
|
-
declare function antfu(options?: OptionsConfig &
|
|
153
|
+
declare function antfu(options?: OptionsConfig & FlatConfigItem, ...userConfigs: Awaitable<UserConfigItem | UserConfigItem[]>[]): Promise<UserConfigItem[]>;
|
|
175
154
|
|
|
176
|
-
declare function comments():
|
|
155
|
+
declare function comments(): Promise<FlatConfigItem[]>;
|
|
177
156
|
|
|
178
|
-
declare function ignores():
|
|
157
|
+
declare function ignores(): Promise<FlatConfigItem[]>;
|
|
179
158
|
|
|
180
|
-
declare function imports(options?: OptionsStylistic):
|
|
159
|
+
declare function imports(options?: OptionsStylistic): Promise<FlatConfigItem[]>;
|
|
181
160
|
|
|
182
|
-
declare function javascript(options?: OptionsIsInEditor & OptionsOverrides):
|
|
161
|
+
declare function javascript(options?: OptionsIsInEditor & OptionsOverrides): Promise<FlatConfigItem[]>;
|
|
183
162
|
|
|
184
|
-
declare function jsdoc(options?: OptionsStylistic):
|
|
163
|
+
declare function jsdoc(options?: OptionsStylistic): Promise<FlatConfigItem[]>;
|
|
185
164
|
|
|
186
|
-
declare function jsonc(options?: OptionsStylistic & OptionsOverrides):
|
|
165
|
+
declare function jsonc(options?: OptionsStylistic & OptionsOverrides): Promise<FlatConfigItem[]>;
|
|
187
166
|
|
|
188
|
-
declare function markdown(options?: OptionsComponentExts & OptionsOverrides):
|
|
167
|
+
declare function markdown(options?: OptionsComponentExts & OptionsOverrides): Promise<FlatConfigItem[]>;
|
|
189
168
|
|
|
190
|
-
declare function node():
|
|
169
|
+
declare function node(): Promise<FlatConfigItem[]>;
|
|
191
170
|
|
|
192
171
|
/**
|
|
193
172
|
* Sort package.json
|
|
194
173
|
*
|
|
195
174
|
* Requires `jsonc` config
|
|
196
175
|
*/
|
|
197
|
-
declare function sortPackageJson():
|
|
176
|
+
declare function sortPackageJson(): Promise<FlatConfigItem[]>;
|
|
198
177
|
/**
|
|
199
178
|
* Sort tsconfig.json
|
|
200
179
|
*
|
|
201
180
|
* Requires `jsonc` config
|
|
202
181
|
*/
|
|
203
|
-
declare function sortTsconfig():
|
|
182
|
+
declare function sortTsconfig(): FlatConfigItem[];
|
|
204
183
|
|
|
205
|
-
declare function stylistic(options?: StylisticConfig):
|
|
184
|
+
declare function stylistic(options?: StylisticConfig): Promise<FlatConfigItem[]>;
|
|
206
185
|
|
|
207
|
-
declare function typescript(options?: OptionsComponentExts & OptionsOverrides & OptionsTypeScriptWithTypes & OptionsTypeScriptParserOptions):
|
|
186
|
+
declare function typescript(options?: OptionsComponentExts & OptionsOverrides & OptionsTypeScriptWithTypes & OptionsTypeScriptParserOptions): Promise<FlatConfigItem[]>;
|
|
208
187
|
|
|
209
|
-
declare function unicorn():
|
|
188
|
+
declare function unicorn(): Promise<FlatConfigItem[]>;
|
|
210
189
|
|
|
211
|
-
declare function vue(options?: OptionsHasTypeScript & OptionsOverrides & OptionsStylistic):
|
|
190
|
+
declare function vue(options?: OptionsHasTypeScript & OptionsOverrides & OptionsStylistic): Promise<FlatConfigItem[]>;
|
|
212
191
|
|
|
213
|
-
declare function yaml(options?: OptionsOverrides & OptionsStylistic):
|
|
192
|
+
declare function yaml(options?: OptionsOverrides & OptionsStylistic): Promise<FlatConfigItem[]>;
|
|
214
193
|
|
|
215
|
-
declare function test(options?: OptionsIsInEditor & OptionsOverrides):
|
|
194
|
+
declare function test(options?: OptionsIsInEditor & OptionsOverrides): Promise<FlatConfigItem[]>;
|
|
216
195
|
|
|
217
196
|
/**
|
|
218
197
|
* Optional perfectionist plugin for props and items sorting.
|
|
219
198
|
*
|
|
220
199
|
* @see https://github.com/azat-io/eslint-plugin-perfectionist
|
|
221
200
|
*/
|
|
222
|
-
declare function perfectionist():
|
|
201
|
+
declare function perfectionist(): Promise<FlatConfigItem[]>;
|
|
223
202
|
|
|
224
203
|
declare const GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
225
204
|
declare const GLOB_SRC = "**/*.?([cm])[jt]s?(x)";
|
|
@@ -246,10 +225,13 @@ declare const GLOB_EXCLUDE: string[];
|
|
|
246
225
|
/**
|
|
247
226
|
* Combine array and non-array configs into a single array.
|
|
248
227
|
*/
|
|
249
|
-
declare function combine(...configs:
|
|
228
|
+
declare function combine(...configs: Awaitable<UserConfigItem | UserConfigItem[]>[]): Promise<UserConfigItem[]>;
|
|
250
229
|
declare function renameRules(rules: Record<string, any>, from: string, to: string): {
|
|
251
230
|
[k: string]: any;
|
|
252
231
|
};
|
|
253
232
|
declare function toArray<T>(value: T | T[]): T[];
|
|
233
|
+
declare function interopDefault<T>(m: Awaitable<T>): Promise<T extends {
|
|
234
|
+
default: infer U;
|
|
235
|
+
} ? U : T>;
|
|
254
236
|
|
|
255
|
-
export { type
|
|
237
|
+
export { type Awaitable, type FlatConfigItem, GLOB_ALL_SRC, GLOB_CSS, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TESTS, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML, type OptionsComponentExts, type OptionsConfig, type OptionsHasTypeScript, type OptionsIsInEditor, type OptionsOverrides, type OptionsStylistic, type OptionsTypeScriptParserOptions, type OptionsTypeScriptWithTypes, type Rules, type StylisticConfig, type UserConfigItem, type WrapRuleConfig, antfu, combine, comments, antfu as default, ignores, imports, interopDefault, javascript, jsdoc, jsonc, markdown, node, perfectionist, renameRules, sortPackageJson, sortTsconfig, stylistic, test, toArray, typescript, unicorn, vue, yaml };
|