@debbl/eslint-config 1.1.1 → 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/dist/index.cjs +214 -190
- package/dist/index.d.cts +24 -50
- package/dist/index.d.ts +24 -50
- package/dist/index.js +216 -168
- package/package.json +26 -17
package/dist/index.d.cts
CHANGED
|
@@ -1,38 +1,9 @@
|
|
|
1
1
|
import { ParserOptions } from '@typescript-eslint/parser';
|
|
2
|
-
import * as parser from '@typescript-eslint/parser';
|
|
3
|
-
export { parser as parserTs };
|
|
4
2
|
import { RequiredOptions } from 'prettier';
|
|
5
3
|
import { FlatESLintConfigItem } from 'eslint-define-config';
|
|
6
|
-
export { default as pluginAntfu } from 'eslint-plugin-antfu';
|
|
7
|
-
export { default as pluginComments } from 'eslint-plugin-eslint-comments';
|
|
8
|
-
import * as eslintPluginI from 'eslint-plugin-i';
|
|
9
|
-
export { eslintPluginI as pluginImport };
|
|
10
|
-
export { default as pluginJsdoc } from 'eslint-plugin-jsdoc';
|
|
11
|
-
export { default as pluginMarkdown } from 'eslint-plugin-markdown';
|
|
12
|
-
export { default as pluginNode } from 'eslint-plugin-n';
|
|
13
|
-
export { default as pluginUnicorn } from 'eslint-plugin-unicorn';
|
|
14
|
-
export { default as pluginUnusedImports } from 'eslint-plugin-unused-imports';
|
|
15
|
-
export { default as pluginNoOnlyTests } from 'eslint-plugin-no-only-tests';
|
|
16
|
-
export { default as pluginVitest } from 'eslint-plugin-vitest';
|
|
17
|
-
export { default as pluginPerfectionist } from 'eslint-plugin-perfectionist';
|
|
18
|
-
export { default as pluginPrettier } from 'eslint-plugin-prettier';
|
|
19
|
-
export { default as configPrettier } from 'eslint-config-prettier';
|
|
20
|
-
export { default as pluginReact } from 'eslint-plugin-react';
|
|
21
|
-
export { default as pluginReactHooks } from 'eslint-plugin-react-hooks';
|
|
22
|
-
import * as eslintPluginNext from '@next/eslint-plugin-next';
|
|
23
|
-
export { eslintPluginNext as pluginNext };
|
|
24
|
-
export { default as pluginTs } from '@typescript-eslint/eslint-plugin';
|
|
25
|
-
export { default as pluginVue } from 'eslint-plugin-vue';
|
|
26
|
-
export { default as parserVue } from 'vue-eslint-parser';
|
|
27
|
-
import * as eslintPluginYml from 'eslint-plugin-yml';
|
|
28
|
-
export { eslintPluginYml as pluginYml };
|
|
29
|
-
export { default as parserYml } from 'yaml-eslint-parser';
|
|
30
|
-
import * as eslintPluginJsonc from 'eslint-plugin-jsonc';
|
|
31
|
-
export { eslintPluginJsonc as pluginJsonc };
|
|
32
|
-
export { default as parserJsonc } from 'jsonc-eslint-parser';
|
|
33
|
-
export { default as pluginTailwindcss } from 'eslint-plugin-tailwindcss';
|
|
34
4
|
|
|
35
5
|
type PrettierRequiredOptions = Partial<RequiredOptions>;
|
|
6
|
+
type Awaitable<T> = T | Promise<T>;
|
|
36
7
|
interface ConfigItem extends FlatESLintConfigItem {
|
|
37
8
|
/**
|
|
38
9
|
* Custom name of each config item
|
|
@@ -146,64 +117,67 @@ interface OptionsConfig extends OptionsComponentExts {
|
|
|
146
117
|
/**
|
|
147
118
|
* Construct an array of ESLint flat config items.
|
|
148
119
|
*/
|
|
149
|
-
declare function config(options?: OptionsConfig): ConfigItem[]
|
|
120
|
+
declare function config(options?: OptionsConfig): Promise<ConfigItem[]>;
|
|
150
121
|
|
|
151
|
-
declare function comments(): ConfigItem[]
|
|
122
|
+
declare function comments(): Promise<ConfigItem[]>;
|
|
152
123
|
|
|
153
124
|
declare function ignores(options: {
|
|
154
125
|
enableGitignore: boolean | {
|
|
155
126
|
ignorePath: string;
|
|
156
127
|
};
|
|
157
|
-
}): ConfigItem[]
|
|
128
|
+
}): Promise<ConfigItem[]>;
|
|
158
129
|
|
|
159
|
-
declare function imports(): ConfigItem[]
|
|
130
|
+
declare function imports(): Promise<ConfigItem[]>;
|
|
160
131
|
|
|
161
|
-
declare function javascript(): ConfigItem[]
|
|
132
|
+
declare function javascript(): Promise<ConfigItem[]>;
|
|
162
133
|
|
|
163
|
-
declare function jsdoc(): ConfigItem[]
|
|
134
|
+
declare function jsdoc(): Promise<ConfigItem[]>;
|
|
164
135
|
|
|
165
|
-
declare function jsonc(): ConfigItem[]
|
|
136
|
+
declare function jsonc(): Promise<ConfigItem[]>;
|
|
166
137
|
|
|
167
|
-
declare function markdown(options?: OptionsComponentExts): ConfigItem[]
|
|
138
|
+
declare function markdown(options?: OptionsComponentExts): Promise<ConfigItem[]>;
|
|
168
139
|
|
|
169
|
-
declare function node(): ConfigItem[]
|
|
140
|
+
declare function node(): Promise<ConfigItem[]>;
|
|
170
141
|
|
|
171
142
|
/**
|
|
172
143
|
* Sort package.json
|
|
173
144
|
*
|
|
174
145
|
* Requires `jsonc` config
|
|
175
146
|
*/
|
|
176
|
-
declare function sortPackageJson(): ConfigItem[]
|
|
147
|
+
declare function sortPackageJson(): Promise<ConfigItem[]>;
|
|
177
148
|
/**
|
|
178
149
|
* Sort tsconfig.json
|
|
179
150
|
*
|
|
180
151
|
* Requires `jsonc` config
|
|
181
152
|
*/
|
|
182
|
-
declare function sortTsconfig(): ConfigItem[]
|
|
153
|
+
declare function sortTsconfig(): Promise<ConfigItem[]>;
|
|
183
154
|
|
|
184
|
-
declare function typescript(options?: OptionsComponentExts & OptionsTypeScriptWithTypes & OptionsTypeScriptParserOptions): ConfigItem[]
|
|
155
|
+
declare function typescript(options?: OptionsComponentExts & OptionsTypeScriptWithTypes & OptionsTypeScriptParserOptions): Promise<ConfigItem[]>;
|
|
185
156
|
|
|
186
|
-
declare function unicorn(): ConfigItem[]
|
|
157
|
+
declare function unicorn(): Promise<ConfigItem[]>;
|
|
187
158
|
|
|
188
|
-
declare function vue(options?: OptionsHasTypeScript): ConfigItem[]
|
|
159
|
+
declare function vue(options?: OptionsHasTypeScript): Promise<ConfigItem[]>;
|
|
189
160
|
|
|
190
|
-
declare function yml(): ConfigItem[]
|
|
161
|
+
declare function yml(): Promise<ConfigItem[]>;
|
|
191
162
|
|
|
192
|
-
declare function test(): ConfigItem[]
|
|
163
|
+
declare function test(): Promise<ConfigItem[]>;
|
|
193
164
|
|
|
194
165
|
/**
|
|
195
166
|
* Optional sort-keys plugin
|
|
196
167
|
*
|
|
197
168
|
* @see https://github.com/azat-io/eslint-plugin-perfectionist/
|
|
198
169
|
*/
|
|
199
|
-
declare function perfectionist(): ConfigItem[]
|
|
170
|
+
declare function perfectionist(): Promise<ConfigItem[]>;
|
|
200
171
|
|
|
201
|
-
declare function prettier(options: PrettierRequiredOptions): ConfigItem[]
|
|
172
|
+
declare function prettier(options: PrettierRequiredOptions): Promise<ConfigItem[]>;
|
|
202
173
|
|
|
203
174
|
/**
|
|
204
175
|
* Combine array and non-array configs into a single array.
|
|
205
176
|
*/
|
|
206
|
-
declare function combine(...configs:
|
|
177
|
+
declare function combine(...configs: Awaitable<ConfigItem | ConfigItem[]>[]): Promise<ConfigItem[]>;
|
|
178
|
+
declare function interopDefault<T>(m: Awaitable<T>): Promise<T extends {
|
|
179
|
+
default: infer U;
|
|
180
|
+
} ? U : T>;
|
|
207
181
|
|
|
208
182
|
declare const GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
209
183
|
declare const GLOB_SRC = "**/*.?([cm])[jt]s?(x)";
|
|
@@ -227,4 +201,4 @@ declare const GLOB_TESTS: string[];
|
|
|
227
201
|
declare const GLOB_ALL_SRC: string[];
|
|
228
202
|
declare const GLOB_EXCLUDE: string[];
|
|
229
203
|
|
|
230
|
-
export { ConfigItem, 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, OptionsComponentExts, OptionsConfig, OptionsHasTypeScript, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, PrettierRequiredOptions, ReactOptions, combine, comments, config, config as default, ignores, imports, javascript, jsdoc, jsonc, markdown, node, perfectionist, prettier, sortPackageJson, sortTsconfig, test, typescript, unicorn, vue, yml };
|
|
204
|
+
export { type Awaitable, type ConfigItem, 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 OptionsTypeScriptParserOptions, type OptionsTypeScriptWithTypes, type PrettierRequiredOptions, type ReactOptions, combine, comments, config, config as default, ignores, imports, interopDefault, javascript, jsdoc, jsonc, markdown, node, perfectionist, prettier, sortPackageJson, sortTsconfig, test, typescript, unicorn, vue, yml };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,38 +1,9 @@
|
|
|
1
1
|
import { ParserOptions } from '@typescript-eslint/parser';
|
|
2
|
-
import * as parser from '@typescript-eslint/parser';
|
|
3
|
-
export { parser as parserTs };
|
|
4
2
|
import { RequiredOptions } from 'prettier';
|
|
5
3
|
import { FlatESLintConfigItem } from 'eslint-define-config';
|
|
6
|
-
export { default as pluginAntfu } from 'eslint-plugin-antfu';
|
|
7
|
-
export { default as pluginComments } from 'eslint-plugin-eslint-comments';
|
|
8
|
-
import * as eslintPluginI from 'eslint-plugin-i';
|
|
9
|
-
export { eslintPluginI as pluginImport };
|
|
10
|
-
export { default as pluginJsdoc } from 'eslint-plugin-jsdoc';
|
|
11
|
-
export { default as pluginMarkdown } from 'eslint-plugin-markdown';
|
|
12
|
-
export { default as pluginNode } from 'eslint-plugin-n';
|
|
13
|
-
export { default as pluginUnicorn } from 'eslint-plugin-unicorn';
|
|
14
|
-
export { default as pluginUnusedImports } from 'eslint-plugin-unused-imports';
|
|
15
|
-
export { default as pluginNoOnlyTests } from 'eslint-plugin-no-only-tests';
|
|
16
|
-
export { default as pluginVitest } from 'eslint-plugin-vitest';
|
|
17
|
-
export { default as pluginPerfectionist } from 'eslint-plugin-perfectionist';
|
|
18
|
-
export { default as pluginPrettier } from 'eslint-plugin-prettier';
|
|
19
|
-
export { default as configPrettier } from 'eslint-config-prettier';
|
|
20
|
-
export { default as pluginReact } from 'eslint-plugin-react';
|
|
21
|
-
export { default as pluginReactHooks } from 'eslint-plugin-react-hooks';
|
|
22
|
-
import * as eslintPluginNext from '@next/eslint-plugin-next';
|
|
23
|
-
export { eslintPluginNext as pluginNext };
|
|
24
|
-
export { default as pluginTs } from '@typescript-eslint/eslint-plugin';
|
|
25
|
-
export { default as pluginVue } from 'eslint-plugin-vue';
|
|
26
|
-
export { default as parserVue } from 'vue-eslint-parser';
|
|
27
|
-
import * as eslintPluginYml from 'eslint-plugin-yml';
|
|
28
|
-
export { eslintPluginYml as pluginYml };
|
|
29
|
-
export { default as parserYml } from 'yaml-eslint-parser';
|
|
30
|
-
import * as eslintPluginJsonc from 'eslint-plugin-jsonc';
|
|
31
|
-
export { eslintPluginJsonc as pluginJsonc };
|
|
32
|
-
export { default as parserJsonc } from 'jsonc-eslint-parser';
|
|
33
|
-
export { default as pluginTailwindcss } from 'eslint-plugin-tailwindcss';
|
|
34
4
|
|
|
35
5
|
type PrettierRequiredOptions = Partial<RequiredOptions>;
|
|
6
|
+
type Awaitable<T> = T | Promise<T>;
|
|
36
7
|
interface ConfigItem extends FlatESLintConfigItem {
|
|
37
8
|
/**
|
|
38
9
|
* Custom name of each config item
|
|
@@ -146,64 +117,67 @@ interface OptionsConfig extends OptionsComponentExts {
|
|
|
146
117
|
/**
|
|
147
118
|
* Construct an array of ESLint flat config items.
|
|
148
119
|
*/
|
|
149
|
-
declare function config(options?: OptionsConfig): ConfigItem[]
|
|
120
|
+
declare function config(options?: OptionsConfig): Promise<ConfigItem[]>;
|
|
150
121
|
|
|
151
|
-
declare function comments(): ConfigItem[]
|
|
122
|
+
declare function comments(): Promise<ConfigItem[]>;
|
|
152
123
|
|
|
153
124
|
declare function ignores(options: {
|
|
154
125
|
enableGitignore: boolean | {
|
|
155
126
|
ignorePath: string;
|
|
156
127
|
};
|
|
157
|
-
}): ConfigItem[]
|
|
128
|
+
}): Promise<ConfigItem[]>;
|
|
158
129
|
|
|
159
|
-
declare function imports(): ConfigItem[]
|
|
130
|
+
declare function imports(): Promise<ConfigItem[]>;
|
|
160
131
|
|
|
161
|
-
declare function javascript(): ConfigItem[]
|
|
132
|
+
declare function javascript(): Promise<ConfigItem[]>;
|
|
162
133
|
|
|
163
|
-
declare function jsdoc(): ConfigItem[]
|
|
134
|
+
declare function jsdoc(): Promise<ConfigItem[]>;
|
|
164
135
|
|
|
165
|
-
declare function jsonc(): ConfigItem[]
|
|
136
|
+
declare function jsonc(): Promise<ConfigItem[]>;
|
|
166
137
|
|
|
167
|
-
declare function markdown(options?: OptionsComponentExts): ConfigItem[]
|
|
138
|
+
declare function markdown(options?: OptionsComponentExts): Promise<ConfigItem[]>;
|
|
168
139
|
|
|
169
|
-
declare function node(): ConfigItem[]
|
|
140
|
+
declare function node(): Promise<ConfigItem[]>;
|
|
170
141
|
|
|
171
142
|
/**
|
|
172
143
|
* Sort package.json
|
|
173
144
|
*
|
|
174
145
|
* Requires `jsonc` config
|
|
175
146
|
*/
|
|
176
|
-
declare function sortPackageJson(): ConfigItem[]
|
|
147
|
+
declare function sortPackageJson(): Promise<ConfigItem[]>;
|
|
177
148
|
/**
|
|
178
149
|
* Sort tsconfig.json
|
|
179
150
|
*
|
|
180
151
|
* Requires `jsonc` config
|
|
181
152
|
*/
|
|
182
|
-
declare function sortTsconfig(): ConfigItem[]
|
|
153
|
+
declare function sortTsconfig(): Promise<ConfigItem[]>;
|
|
183
154
|
|
|
184
|
-
declare function typescript(options?: OptionsComponentExts & OptionsTypeScriptWithTypes & OptionsTypeScriptParserOptions): ConfigItem[]
|
|
155
|
+
declare function typescript(options?: OptionsComponentExts & OptionsTypeScriptWithTypes & OptionsTypeScriptParserOptions): Promise<ConfigItem[]>;
|
|
185
156
|
|
|
186
|
-
declare function unicorn(): ConfigItem[]
|
|
157
|
+
declare function unicorn(): Promise<ConfigItem[]>;
|
|
187
158
|
|
|
188
|
-
declare function vue(options?: OptionsHasTypeScript): ConfigItem[]
|
|
159
|
+
declare function vue(options?: OptionsHasTypeScript): Promise<ConfigItem[]>;
|
|
189
160
|
|
|
190
|
-
declare function yml(): ConfigItem[]
|
|
161
|
+
declare function yml(): Promise<ConfigItem[]>;
|
|
191
162
|
|
|
192
|
-
declare function test(): ConfigItem[]
|
|
163
|
+
declare function test(): Promise<ConfigItem[]>;
|
|
193
164
|
|
|
194
165
|
/**
|
|
195
166
|
* Optional sort-keys plugin
|
|
196
167
|
*
|
|
197
168
|
* @see https://github.com/azat-io/eslint-plugin-perfectionist/
|
|
198
169
|
*/
|
|
199
|
-
declare function perfectionist(): ConfigItem[]
|
|
170
|
+
declare function perfectionist(): Promise<ConfigItem[]>;
|
|
200
171
|
|
|
201
|
-
declare function prettier(options: PrettierRequiredOptions): ConfigItem[]
|
|
172
|
+
declare function prettier(options: PrettierRequiredOptions): Promise<ConfigItem[]>;
|
|
202
173
|
|
|
203
174
|
/**
|
|
204
175
|
* Combine array and non-array configs into a single array.
|
|
205
176
|
*/
|
|
206
|
-
declare function combine(...configs:
|
|
177
|
+
declare function combine(...configs: Awaitable<ConfigItem | ConfigItem[]>[]): Promise<ConfigItem[]>;
|
|
178
|
+
declare function interopDefault<T>(m: Awaitable<T>): Promise<T extends {
|
|
179
|
+
default: infer U;
|
|
180
|
+
} ? U : T>;
|
|
207
181
|
|
|
208
182
|
declare const GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
209
183
|
declare const GLOB_SRC = "**/*.?([cm])[jt]s?(x)";
|
|
@@ -227,4 +201,4 @@ declare const GLOB_TESTS: string[];
|
|
|
227
201
|
declare const GLOB_ALL_SRC: string[];
|
|
228
202
|
declare const GLOB_EXCLUDE: string[];
|
|
229
203
|
|
|
230
|
-
export { ConfigItem, 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, OptionsComponentExts, OptionsConfig, OptionsHasTypeScript, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, PrettierRequiredOptions, ReactOptions, combine, comments, config, config as default, ignores, imports, javascript, jsdoc, jsonc, markdown, node, perfectionist, prettier, sortPackageJson, sortTsconfig, test, typescript, unicorn, vue, yml };
|
|
204
|
+
export { type Awaitable, type ConfigItem, 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 OptionsTypeScriptParserOptions, type OptionsTypeScriptWithTypes, type PrettierRequiredOptions, type ReactOptions, combine, comments, config, config as default, ignores, imports, interopDefault, javascript, jsdoc, jsonc, markdown, node, perfectionist, prettier, sortPackageJson, sortTsconfig, test, typescript, unicorn, vue, yml };
|