@lincy/eslint-config 3.7.1 → 4.0.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.
- package/README.md +65 -96
- package/dist/index.cjs +200 -119
- package/dist/index.d.cts +51 -55
- package/dist/index.d.ts +51 -55
- package/dist/index.js +206 -107
- package/package.json +14 -12
package/dist/index.d.cts
CHANGED
|
@@ -1,45 +1,23 @@
|
|
|
1
|
+
import { Linter } from 'eslint';
|
|
1
2
|
import { FlatGitignoreOptions } from 'eslint-config-flat-gitignore';
|
|
2
3
|
import { ParserOptions } from '@typescript-eslint/parser';
|
|
3
|
-
import * as parser from '@typescript-eslint/parser';
|
|
4
|
-
export { parser as parserTs };
|
|
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 } 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.
|
|
@@ -85,10 +64,10 @@ interface StylisticConfig {
|
|
|
85
64
|
jsx?: boolean;
|
|
86
65
|
}
|
|
87
66
|
interface StylisticOverridesConfig extends OptionsStylistic {
|
|
88
|
-
overrides?:
|
|
67
|
+
overrides?: FlatConfigItem['rules'];
|
|
89
68
|
}
|
|
90
69
|
interface OptionsOverrides {
|
|
91
|
-
overrides?:
|
|
70
|
+
overrides?: FlatConfigItem['rules'];
|
|
92
71
|
}
|
|
93
72
|
interface OptionsIgnores {
|
|
94
73
|
ignores?: string[];
|
|
@@ -96,6 +75,11 @@ interface OptionsIgnores {
|
|
|
96
75
|
interface OptionsIsInEditor {
|
|
97
76
|
isInEditor?: boolean;
|
|
98
77
|
}
|
|
78
|
+
interface OptionsReact {
|
|
79
|
+
jsx?: boolean;
|
|
80
|
+
version?: string;
|
|
81
|
+
overrides?: FlatConfigItem['rules'];
|
|
82
|
+
}
|
|
99
83
|
interface OptionsConfig extends OptionsComponentExts {
|
|
100
84
|
/**
|
|
101
85
|
* Enable gitignore support.
|
|
@@ -134,6 +118,12 @@ interface OptionsConfig extends OptionsComponentExts {
|
|
|
134
118
|
* @default auto-detect based on the dependencies
|
|
135
119
|
*/
|
|
136
120
|
vue?: boolean;
|
|
121
|
+
/**
|
|
122
|
+
* Enable React support.
|
|
123
|
+
*
|
|
124
|
+
* @default auto-detect based on the dependencies
|
|
125
|
+
*/
|
|
126
|
+
react?: boolean;
|
|
137
127
|
/**
|
|
138
128
|
* Enable JSONC support.
|
|
139
129
|
*
|
|
@@ -167,14 +157,15 @@ interface OptionsConfig extends OptionsComponentExts {
|
|
|
167
157
|
* Provide overrides for rules for each integration.
|
|
168
158
|
*/
|
|
169
159
|
overrides?: {
|
|
170
|
-
javascript?:
|
|
171
|
-
typescript?:
|
|
172
|
-
stylistic?:
|
|
173
|
-
test?:
|
|
174
|
-
vue?:
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
160
|
+
javascript?: FlatConfigItem['rules'];
|
|
161
|
+
typescript?: FlatConfigItem['rules'];
|
|
162
|
+
stylistic?: FlatConfigItem['rules'];
|
|
163
|
+
test?: FlatConfigItem['rules'];
|
|
164
|
+
vue?: FlatConfigItem['rules'];
|
|
165
|
+
react?: FlatConfigItem['rules'];
|
|
166
|
+
jsonc?: FlatConfigItem['rules'];
|
|
167
|
+
markdown?: FlatConfigItem['rules'];
|
|
168
|
+
yaml?: FlatConfigItem['rules'];
|
|
178
169
|
ignores?: string[];
|
|
179
170
|
};
|
|
180
171
|
}
|
|
@@ -182,64 +173,69 @@ interface OptionsConfig extends OptionsComponentExts {
|
|
|
182
173
|
/**
|
|
183
174
|
* Construct an array of ESLint flat config items.
|
|
184
175
|
*/
|
|
185
|
-
declare function lincy(options?: OptionsConfig &
|
|
176
|
+
declare function lincy(options?: OptionsConfig & FlatConfigItem, ...userConfigs: Awaitable<UserConfigItem | UserConfigItem[]>[]): Promise<UserConfigItem[]>;
|
|
186
177
|
|
|
187
|
-
declare function comments():
|
|
178
|
+
declare function comments(): Promise<FlatConfigItem[]>;
|
|
188
179
|
|
|
189
|
-
declare function ignores(options?: OptionsIgnores):
|
|
180
|
+
declare function ignores(options?: OptionsIgnores): Promise<FlatConfigItem[]>;
|
|
190
181
|
|
|
191
|
-
declare function imports(options?: OptionsStylistic):
|
|
182
|
+
declare function imports(options?: OptionsStylistic): Promise<FlatConfigItem[]>;
|
|
192
183
|
|
|
193
|
-
declare function javascript(options?: OptionsIsInEditor & OptionsOverrides):
|
|
184
|
+
declare function javascript(options?: OptionsIsInEditor & OptionsOverrides): Promise<FlatConfigItem[]>;
|
|
194
185
|
|
|
195
|
-
declare function jsdoc(options?: OptionsStylistic):
|
|
186
|
+
declare function jsdoc(options?: OptionsStylistic): Promise<FlatConfigItem[]>;
|
|
196
187
|
|
|
197
|
-
declare function jsonc(options?: OptionsStylistic & OptionsOverrides):
|
|
188
|
+
declare function jsonc(options?: OptionsStylistic & OptionsOverrides): Promise<FlatConfigItem[]>;
|
|
198
189
|
|
|
199
|
-
declare function markdown(options?: OptionsComponentExts & OptionsOverrides):
|
|
190
|
+
declare function markdown(options?: OptionsComponentExts & OptionsOverrides): Promise<FlatConfigItem[]>;
|
|
200
191
|
|
|
201
|
-
declare function node():
|
|
192
|
+
declare function node(): Promise<FlatConfigItem[]>;
|
|
202
193
|
|
|
203
194
|
/**
|
|
204
195
|
* Sort package.json
|
|
205
196
|
*
|
|
206
197
|
* Requires `jsonc` config
|
|
207
198
|
*/
|
|
208
|
-
declare function sortPackageJson():
|
|
199
|
+
declare function sortPackageJson(): Promise<FlatConfigItem[]>;
|
|
209
200
|
/**
|
|
210
201
|
* Sort tsconfig.json
|
|
211
202
|
*
|
|
212
203
|
* Requires `jsonc` config
|
|
213
204
|
*/
|
|
214
|
-
declare function sortTsconfig():
|
|
205
|
+
declare function sortTsconfig(): FlatConfigItem[];
|
|
215
206
|
|
|
216
|
-
declare function stylistic(options?: StylisticOverridesConfig):
|
|
207
|
+
declare function stylistic(options?: StylisticOverridesConfig): Promise<FlatConfigItem[]>;
|
|
217
208
|
|
|
218
|
-
declare function typescript(options?: OptionsComponentExts & OptionsOverrides & OptionsTypeScriptWithTypes & OptionsTypeScriptParserOptions):
|
|
209
|
+
declare function typescript(options?: OptionsComponentExts & OptionsOverrides & OptionsTypeScriptWithTypes & OptionsTypeScriptParserOptions): Promise<FlatConfigItem[]>;
|
|
219
210
|
|
|
220
|
-
declare function unicorn():
|
|
211
|
+
declare function unicorn(): Promise<FlatConfigItem[]>;
|
|
221
212
|
|
|
222
|
-
declare function vue(options?: OptionsHasTypeScript & OptionsOverrides & OptionsStylistic):
|
|
213
|
+
declare function vue(options?: OptionsHasTypeScript & OptionsOverrides & OptionsStylistic): Promise<FlatConfigItem[]>;
|
|
223
214
|
|
|
224
|
-
declare function yaml(options?: OptionsOverrides & OptionsStylistic):
|
|
215
|
+
declare function yaml(options?: OptionsOverrides & OptionsStylistic): Promise<FlatConfigItem[]>;
|
|
225
216
|
|
|
226
|
-
declare function test(options?: OptionsIsInEditor & OptionsOverrides):
|
|
217
|
+
declare function test(options?: OptionsIsInEditor & OptionsOverrides): Promise<FlatConfigItem[]>;
|
|
227
218
|
|
|
228
219
|
/**
|
|
229
220
|
* Optional perfectionist plugin for props and items sorting.
|
|
230
221
|
*
|
|
231
222
|
* @see https://github.com/azat-io/eslint-plugin-perfectionist
|
|
232
223
|
*/
|
|
233
|
-
declare function perfectionist():
|
|
224
|
+
declare function perfectionist(): Promise<FlatConfigItem[]>;
|
|
225
|
+
|
|
226
|
+
declare function react(options?: OptionsReact): Promise<FlatConfigItem[]>;
|
|
234
227
|
|
|
235
228
|
/**
|
|
236
229
|
* Combine array and non-array configs into a single array.
|
|
237
230
|
*/
|
|
238
|
-
declare function combine(...configs:
|
|
231
|
+
declare function combine(...configs: Awaitable<UserConfigItem | UserConfigItem[]>[]): Promise<UserConfigItem[]>;
|
|
239
232
|
declare function renameRules(rules: Record<string, any>, from: string, to: string): {
|
|
240
233
|
[k: string]: any;
|
|
241
234
|
};
|
|
242
235
|
declare function toArray<T>(value: T | T[]): T[];
|
|
236
|
+
declare function interopDefault<T>(m: Awaitable<T>): Promise<T extends {
|
|
237
|
+
default: infer U;
|
|
238
|
+
} ? U : T>;
|
|
243
239
|
|
|
244
240
|
declare const GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
245
241
|
declare const GLOB_SRC = "**/*.?([cm])[jt]s?(x)";
|
|
@@ -263,4 +259,4 @@ declare const GLOB_TESTS: string[];
|
|
|
263
259
|
declare const GLOB_ALL_SRC: string[];
|
|
264
260
|
declare const GLOB_EXCLUDE: string[];
|
|
265
261
|
|
|
266
|
-
export {
|
|
262
|
+
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 OptionsIgnores, type OptionsIsInEditor, type OptionsOverrides, type OptionsReact, type OptionsStylistic, type OptionsTypeScriptParserOptions, type OptionsTypeScriptWithTypes, type Rules, type StylisticConfig, type StylisticOverridesConfig, type UserConfigItem, type WrapRuleConfig, combine, comments, lincy as default, ignores, imports, interopDefault, javascript, jsdoc, jsonc, lincy, markdown, node, perfectionist, react, renameRules, sortPackageJson, sortTsconfig, stylistic, test, toArray, typescript, unicorn, vue, yaml };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,45 +1,23 @@
|
|
|
1
|
+
import { Linter } from 'eslint';
|
|
1
2
|
import { FlatGitignoreOptions } from 'eslint-config-flat-gitignore';
|
|
2
3
|
import { ParserOptions } from '@typescript-eslint/parser';
|
|
3
|
-
import * as parser from '@typescript-eslint/parser';
|
|
4
|
-
export { parser as parserTs };
|
|
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 } 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.
|
|
@@ -85,10 +64,10 @@ interface StylisticConfig {
|
|
|
85
64
|
jsx?: boolean;
|
|
86
65
|
}
|
|
87
66
|
interface StylisticOverridesConfig extends OptionsStylistic {
|
|
88
|
-
overrides?:
|
|
67
|
+
overrides?: FlatConfigItem['rules'];
|
|
89
68
|
}
|
|
90
69
|
interface OptionsOverrides {
|
|
91
|
-
overrides?:
|
|
70
|
+
overrides?: FlatConfigItem['rules'];
|
|
92
71
|
}
|
|
93
72
|
interface OptionsIgnores {
|
|
94
73
|
ignores?: string[];
|
|
@@ -96,6 +75,11 @@ interface OptionsIgnores {
|
|
|
96
75
|
interface OptionsIsInEditor {
|
|
97
76
|
isInEditor?: boolean;
|
|
98
77
|
}
|
|
78
|
+
interface OptionsReact {
|
|
79
|
+
jsx?: boolean;
|
|
80
|
+
version?: string;
|
|
81
|
+
overrides?: FlatConfigItem['rules'];
|
|
82
|
+
}
|
|
99
83
|
interface OptionsConfig extends OptionsComponentExts {
|
|
100
84
|
/**
|
|
101
85
|
* Enable gitignore support.
|
|
@@ -134,6 +118,12 @@ interface OptionsConfig extends OptionsComponentExts {
|
|
|
134
118
|
* @default auto-detect based on the dependencies
|
|
135
119
|
*/
|
|
136
120
|
vue?: boolean;
|
|
121
|
+
/**
|
|
122
|
+
* Enable React support.
|
|
123
|
+
*
|
|
124
|
+
* @default auto-detect based on the dependencies
|
|
125
|
+
*/
|
|
126
|
+
react?: boolean;
|
|
137
127
|
/**
|
|
138
128
|
* Enable JSONC support.
|
|
139
129
|
*
|
|
@@ -167,14 +157,15 @@ interface OptionsConfig extends OptionsComponentExts {
|
|
|
167
157
|
* Provide overrides for rules for each integration.
|
|
168
158
|
*/
|
|
169
159
|
overrides?: {
|
|
170
|
-
javascript?:
|
|
171
|
-
typescript?:
|
|
172
|
-
stylistic?:
|
|
173
|
-
test?:
|
|
174
|
-
vue?:
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
160
|
+
javascript?: FlatConfigItem['rules'];
|
|
161
|
+
typescript?: FlatConfigItem['rules'];
|
|
162
|
+
stylistic?: FlatConfigItem['rules'];
|
|
163
|
+
test?: FlatConfigItem['rules'];
|
|
164
|
+
vue?: FlatConfigItem['rules'];
|
|
165
|
+
react?: FlatConfigItem['rules'];
|
|
166
|
+
jsonc?: FlatConfigItem['rules'];
|
|
167
|
+
markdown?: FlatConfigItem['rules'];
|
|
168
|
+
yaml?: FlatConfigItem['rules'];
|
|
178
169
|
ignores?: string[];
|
|
179
170
|
};
|
|
180
171
|
}
|
|
@@ -182,64 +173,69 @@ interface OptionsConfig extends OptionsComponentExts {
|
|
|
182
173
|
/**
|
|
183
174
|
* Construct an array of ESLint flat config items.
|
|
184
175
|
*/
|
|
185
|
-
declare function lincy(options?: OptionsConfig &
|
|
176
|
+
declare function lincy(options?: OptionsConfig & FlatConfigItem, ...userConfigs: Awaitable<UserConfigItem | UserConfigItem[]>[]): Promise<UserConfigItem[]>;
|
|
186
177
|
|
|
187
|
-
declare function comments():
|
|
178
|
+
declare function comments(): Promise<FlatConfigItem[]>;
|
|
188
179
|
|
|
189
|
-
declare function ignores(options?: OptionsIgnores):
|
|
180
|
+
declare function ignores(options?: OptionsIgnores): Promise<FlatConfigItem[]>;
|
|
190
181
|
|
|
191
|
-
declare function imports(options?: OptionsStylistic):
|
|
182
|
+
declare function imports(options?: OptionsStylistic): Promise<FlatConfigItem[]>;
|
|
192
183
|
|
|
193
|
-
declare function javascript(options?: OptionsIsInEditor & OptionsOverrides):
|
|
184
|
+
declare function javascript(options?: OptionsIsInEditor & OptionsOverrides): Promise<FlatConfigItem[]>;
|
|
194
185
|
|
|
195
|
-
declare function jsdoc(options?: OptionsStylistic):
|
|
186
|
+
declare function jsdoc(options?: OptionsStylistic): Promise<FlatConfigItem[]>;
|
|
196
187
|
|
|
197
|
-
declare function jsonc(options?: OptionsStylistic & OptionsOverrides):
|
|
188
|
+
declare function jsonc(options?: OptionsStylistic & OptionsOverrides): Promise<FlatConfigItem[]>;
|
|
198
189
|
|
|
199
|
-
declare function markdown(options?: OptionsComponentExts & OptionsOverrides):
|
|
190
|
+
declare function markdown(options?: OptionsComponentExts & OptionsOverrides): Promise<FlatConfigItem[]>;
|
|
200
191
|
|
|
201
|
-
declare function node():
|
|
192
|
+
declare function node(): Promise<FlatConfigItem[]>;
|
|
202
193
|
|
|
203
194
|
/**
|
|
204
195
|
* Sort package.json
|
|
205
196
|
*
|
|
206
197
|
* Requires `jsonc` config
|
|
207
198
|
*/
|
|
208
|
-
declare function sortPackageJson():
|
|
199
|
+
declare function sortPackageJson(): Promise<FlatConfigItem[]>;
|
|
209
200
|
/**
|
|
210
201
|
* Sort tsconfig.json
|
|
211
202
|
*
|
|
212
203
|
* Requires `jsonc` config
|
|
213
204
|
*/
|
|
214
|
-
declare function sortTsconfig():
|
|
205
|
+
declare function sortTsconfig(): FlatConfigItem[];
|
|
215
206
|
|
|
216
|
-
declare function stylistic(options?: StylisticOverridesConfig):
|
|
207
|
+
declare function stylistic(options?: StylisticOverridesConfig): Promise<FlatConfigItem[]>;
|
|
217
208
|
|
|
218
|
-
declare function typescript(options?: OptionsComponentExts & OptionsOverrides & OptionsTypeScriptWithTypes & OptionsTypeScriptParserOptions):
|
|
209
|
+
declare function typescript(options?: OptionsComponentExts & OptionsOverrides & OptionsTypeScriptWithTypes & OptionsTypeScriptParserOptions): Promise<FlatConfigItem[]>;
|
|
219
210
|
|
|
220
|
-
declare function unicorn():
|
|
211
|
+
declare function unicorn(): Promise<FlatConfigItem[]>;
|
|
221
212
|
|
|
222
|
-
declare function vue(options?: OptionsHasTypeScript & OptionsOverrides & OptionsStylistic):
|
|
213
|
+
declare function vue(options?: OptionsHasTypeScript & OptionsOverrides & OptionsStylistic): Promise<FlatConfigItem[]>;
|
|
223
214
|
|
|
224
|
-
declare function yaml(options?: OptionsOverrides & OptionsStylistic):
|
|
215
|
+
declare function yaml(options?: OptionsOverrides & OptionsStylistic): Promise<FlatConfigItem[]>;
|
|
225
216
|
|
|
226
|
-
declare function test(options?: OptionsIsInEditor & OptionsOverrides):
|
|
217
|
+
declare function test(options?: OptionsIsInEditor & OptionsOverrides): Promise<FlatConfigItem[]>;
|
|
227
218
|
|
|
228
219
|
/**
|
|
229
220
|
* Optional perfectionist plugin for props and items sorting.
|
|
230
221
|
*
|
|
231
222
|
* @see https://github.com/azat-io/eslint-plugin-perfectionist
|
|
232
223
|
*/
|
|
233
|
-
declare function perfectionist():
|
|
224
|
+
declare function perfectionist(): Promise<FlatConfigItem[]>;
|
|
225
|
+
|
|
226
|
+
declare function react(options?: OptionsReact): Promise<FlatConfigItem[]>;
|
|
234
227
|
|
|
235
228
|
/**
|
|
236
229
|
* Combine array and non-array configs into a single array.
|
|
237
230
|
*/
|
|
238
|
-
declare function combine(...configs:
|
|
231
|
+
declare function combine(...configs: Awaitable<UserConfigItem | UserConfigItem[]>[]): Promise<UserConfigItem[]>;
|
|
239
232
|
declare function renameRules(rules: Record<string, any>, from: string, to: string): {
|
|
240
233
|
[k: string]: any;
|
|
241
234
|
};
|
|
242
235
|
declare function toArray<T>(value: T | T[]): T[];
|
|
236
|
+
declare function interopDefault<T>(m: Awaitable<T>): Promise<T extends {
|
|
237
|
+
default: infer U;
|
|
238
|
+
} ? U : T>;
|
|
243
239
|
|
|
244
240
|
declare const GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
245
241
|
declare const GLOB_SRC = "**/*.?([cm])[jt]s?(x)";
|
|
@@ -263,4 +259,4 @@ declare const GLOB_TESTS: string[];
|
|
|
263
259
|
declare const GLOB_ALL_SRC: string[];
|
|
264
260
|
declare const GLOB_EXCLUDE: string[];
|
|
265
261
|
|
|
266
|
-
export {
|
|
262
|
+
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 OptionsIgnores, type OptionsIsInEditor, type OptionsOverrides, type OptionsReact, type OptionsStylistic, type OptionsTypeScriptParserOptions, type OptionsTypeScriptWithTypes, type Rules, type StylisticConfig, type StylisticOverridesConfig, type UserConfigItem, type WrapRuleConfig, combine, comments, lincy as default, ignores, imports, interopDefault, javascript, jsdoc, jsonc, lincy, markdown, node, perfectionist, react, renameRules, sortPackageJson, sortTsconfig, stylistic, test, toArray, typescript, unicorn, vue, yaml };
|