@vp-tw/eslint-config 0.0.9 → 0.0.11

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 (58) hide show
  1. package/README.md +32 -1
  2. package/dist/configs/mdx.d.ts +22 -4
  3. package/dist/configs/mdx.js +72 -18
  4. package/dist/configs/prettier.d.ts +18 -1
  5. package/dist/configs/prettier.js +27 -4
  6. package/dist/configs/storybook.d.ts +24 -1
  7. package/dist/configs/storybook.js +68 -24
  8. package/dist/eslint-typegen.js +1 -1
  9. package/dist/esm/configs/mdx.d.ts +22 -4
  10. package/dist/esm/configs/mdx.mjs +82 -18
  11. package/dist/esm/configs/prettier.d.ts +18 -1
  12. package/dist/esm/configs/prettier.mjs +27 -3
  13. package/dist/esm/configs/storybook.d.ts +24 -1
  14. package/dist/esm/configs/storybook.mjs +72 -14
  15. package/dist/esm/eslint-typegen.mjs +1 -1
  16. package/dist/esm/extends/_utils.d.ts +2 -0
  17. package/dist/esm/extends/_utils.mjs +2 -0
  18. package/dist/esm/extends/imports.d.ts +25 -0
  19. package/dist/esm/extends/imports.mjs +87 -0
  20. package/dist/esm/extends/javascript.d.ts +21 -0
  21. package/dist/esm/extends/javascript.mjs +51 -0
  22. package/dist/esm/extends/jsonc.d.ts +30 -0
  23. package/dist/esm/extends/jsonc.mjs +149 -0
  24. package/dist/esm/extends/react.d.ts +21 -0
  25. package/dist/esm/extends/react.mjs +58 -0
  26. package/dist/esm/extends/typescript.d.ts +21 -0
  27. package/dist/esm/extends/typescript.mjs +52 -0
  28. package/dist/esm/extends/yaml.d.ts +25 -0
  29. package/dist/esm/extends/yaml.mjs +71 -0
  30. package/dist/esm/globs.d.ts +6 -0
  31. package/dist/esm/globs.mjs +12 -0
  32. package/dist/esm/types.d.ts +35 -1
  33. package/dist/esm/utils/extendsConfig.d.ts +4 -0
  34. package/dist/esm/utils/extendsConfig.mjs +56 -0
  35. package/dist/esm/vdustr.d.ts +21 -4
  36. package/dist/esm/vdustr.mjs +37 -141
  37. package/dist/extends/_utils.d.ts +2 -0
  38. package/dist/extends/_utils.js +7 -0
  39. package/dist/extends/imports.d.ts +25 -0
  40. package/dist/extends/imports.js +71 -0
  41. package/dist/extends/javascript.d.ts +21 -0
  42. package/dist/extends/javascript.js +53 -0
  43. package/dist/extends/jsonc.d.ts +30 -0
  44. package/dist/extends/jsonc.js +135 -0
  45. package/dist/extends/react.d.ts +21 -0
  46. package/dist/extends/react.js +60 -0
  47. package/dist/extends/typescript.d.ts +21 -0
  48. package/dist/extends/typescript.js +56 -0
  49. package/dist/extends/yaml.d.ts +25 -0
  50. package/dist/extends/yaml.js +66 -0
  51. package/dist/globs.d.ts +6 -0
  52. package/dist/globs.js +11 -0
  53. package/dist/types.d.ts +35 -1
  54. package/dist/utils/extendsConfig.d.ts +4 -0
  55. package/dist/utils/extendsConfig.js +53 -0
  56. package/dist/vdustr.d.ts +21 -4
  57. package/dist/vdustr.js +30 -132
  58. package/package.json +6 -3
@@ -0,0 +1,135 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.jsonc = void 0;
7
+ var _esToolkit = require("es-toolkit");
8
+ var _recommended = _interopRequireDefault(require("eslint-plugin-package-json/configs/recommended"));
9
+ var _globs = require("../globs");
10
+ var _extendsConfig = require("../utils/extendsConfig");
11
+ var _utils = require("./_utils");
12
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
+ const configNamesMapSource = {
14
+ rules: "vdustr/jsonc/rules",
15
+ sortArrayValues: "vdustr/jsonc/sortArrayValues",
16
+ packageJsonSetup: "vdustr/package-json/setup",
17
+ packageJsonRules: "vdustr/package-json/rules"
18
+ };
19
+ const jsoncInternal = (composer, options) => {
20
+ (0, _extendsConfig.extendsConfig)(composer, "antfu/jsonc/rules", config => {
21
+ config = {
22
+ ...config,
23
+ files: [
24
+ /**
25
+ * Inherited.
26
+ */
27
+ ...(config.files ?? []),
28
+ /**
29
+ * Default.
30
+ */
31
+ _globs.GLOB_CODE_WORKSPACE,
32
+ /**
33
+ * Overridable.
34
+ */
35
+ ...(options?.jsonc?.files ?? [])],
36
+ ignores: [
37
+ /**
38
+ * Inherited.
39
+ */
40
+ ...(config.ignores ?? []),
41
+ /**
42
+ * Default.
43
+ */
44
+ _globs.GLOB_PACKAGE_JSON,
45
+ /**
46
+ * Overridable.
47
+ */
48
+ ...(options?.jsonc?.ignores ?? [])]
49
+ };
50
+ return [config, {
51
+ /**
52
+ * Inherited.
53
+ */
54
+ ...(0, _esToolkit.omit)(config, _utils.ignoreKeys),
55
+ /**
56
+ * Default.
57
+ */
58
+ name: configNamesMapSource.rules,
59
+ files: [...(config.files ?? [])],
60
+ ignores: [...(config.ignores ?? [])],
61
+ /**
62
+ * Overridable.
63
+ */
64
+ ...(0, _esToolkit.omit)(options?.jsonc ?? {}, ["files", "ignores"]),
65
+ rules: {
66
+ /**
67
+ * Default.
68
+ */
69
+ "jsonc/sort-keys": "error",
70
+ /**
71
+ * Overridable.
72
+ */
73
+ ...options?.jsonc?.rules
74
+ }
75
+ }, {
76
+ plugins: _recommended.default.plugins,
77
+ name: configNamesMapSource.packageJsonSetup
78
+ }, {
79
+ /**
80
+ * Inherited.
81
+ */
82
+ ...(0, _esToolkit.omit)(_recommended.default, ["plugins"]),
83
+ /**
84
+ * Default.
85
+ */
86
+ name: configNamesMapSource.packageJsonRules,
87
+ /**
88
+ * Overridable.
89
+ */
90
+ ...options?.packageJson,
91
+ plugins: {
92
+ /**
93
+ * Inherited.
94
+ */
95
+ ..._recommended.default.plugins,
96
+ /**
97
+ * Overridable.
98
+ */
99
+ ...options?.packageJson?.plugins
100
+ },
101
+ rules: {
102
+ /**
103
+ * Inherited.
104
+ */
105
+ ..._recommended.default.rules,
106
+ /**
107
+ * Overridable.
108
+ */
109
+ ...options?.packageJson?.rules
110
+ }
111
+ }, {
112
+ /**
113
+ * Default.
114
+ */
115
+ name: configNamesMapSource.sortArrayValues,
116
+ /**
117
+ * Overridable.
118
+ */
119
+ ...options?.sortArrayValues,
120
+ files: [_globs.GLOB_CSPELL_JSON, ...(options?.sortArrayValues?.files ?? [])],
121
+ rules: {
122
+ "jsonc/sort-array-values": ["error", {
123
+ pathPattern: ".*",
124
+ order: {
125
+ type: "asc"
126
+ }
127
+ }],
128
+ ...options?.sortArrayValues?.rules
129
+ }
130
+ }];
131
+ }, ["antfu/sort/package-json", "antfu/sort/tsconfig-json"]);
132
+ };
133
+ const jsonc = exports.jsonc = Object.assign(jsoncInternal, {
134
+ configNamesMapSource
135
+ });
@@ -0,0 +1,21 @@
1
+ import type { ConfigNames, TypedFlatConfigItem } from "@antfu/eslint-config";
2
+ import type { FlatConfigComposer } from "eslint-flat-config-utils";
3
+ import type { ConfigOverrides, ResolveConfigNamesMap } from "../types";
4
+ declare const configNamesMapSource: {
5
+ readonly rules: "vdustr/react/rules";
6
+ };
7
+ declare module "../types" {
8
+ interface ConfigNamesMap extends ResolveConfigNamesMap<react.ConfigNamesMapSource> {
9
+ }
10
+ }
11
+ declare namespace react {
12
+ type ConfigNamesMapSource = typeof configNamesMapSource;
13
+ interface Options extends ConfigOverrides {
14
+ }
15
+ }
16
+ declare const react: ((composer: FlatConfigComposer<TypedFlatConfigItem, ConfigNames>, options?: react.Options) => void) & {
17
+ configNamesMapSource: {
18
+ readonly rules: "vdustr/react/rules";
19
+ };
20
+ };
21
+ export { react };
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.react = void 0;
7
+ var _esToolkit = require("es-toolkit");
8
+ var _eslintPluginReactCompiler = require("../lib/eslint-plugin-react-compiler");
9
+ var _extendsConfig = require("../utils/extendsConfig");
10
+ var _utils = require("./_utils");
11
+ const configNamesMapSource = {
12
+ rules: "vdustr/react/rules"
13
+ };
14
+ const reactInternal = (composer, options) => {
15
+ (0, _extendsConfig.extendsConfig)(composer, "antfu/react/rules", async config => [config, {
16
+ /**
17
+ * Inherited.
18
+ */
19
+ ...(0, _esToolkit.omit)(config, _utils.ignoreKeys),
20
+ /**
21
+ * Default.
22
+ */
23
+ name: configNamesMapSource.rules,
24
+ plugins: {
25
+ /**
26
+ * Inherited.
27
+ */
28
+ ...config.plugins,
29
+ /**
30
+ * Default.
31
+ */
32
+ "react-compiler": await (0, _eslintPluginReactCompiler.reactCompiler)(),
33
+ /**
34
+ * Overridable.
35
+ */
36
+ ...options?.plugins
37
+ },
38
+ /**
39
+ * Overridable.
40
+ */
41
+ ...options,
42
+ rules: {
43
+ /**
44
+ * Default.
45
+ */
46
+ "react-compiler/react-compiler": "error",
47
+ /**
48
+ * Not all destructuring assignments are more readable than their alternatives.
49
+ */
50
+ "react/prefer-destructuring-assignment": "off",
51
+ /**
52
+ * Overridable.
53
+ */
54
+ ...options?.rules
55
+ }
56
+ }]);
57
+ };
58
+ const react = exports.react = Object.assign(reactInternal, {
59
+ configNamesMapSource
60
+ });
@@ -0,0 +1,21 @@
1
+ import type { ConfigNames, TypedFlatConfigItem } from "@antfu/eslint-config";
2
+ import type { FlatConfigComposer } from "eslint-flat-config-utils";
3
+ import type { ConfigOverrides, ResolveConfigNamesMap } from "../types";
4
+ declare const configNamesMapSource: {
5
+ readonly rules: "vdustr/typescript/rules";
6
+ };
7
+ declare module "../types" {
8
+ interface ConfigNamesMap extends ResolveConfigNamesMap<typescript.ConfigNamesMapSource> {
9
+ }
10
+ }
11
+ declare namespace typescript {
12
+ type ConfigNamesMapSource = typeof configNamesMapSource;
13
+ interface Options extends ConfigOverrides {
14
+ }
15
+ }
16
+ declare const typescript: ((composer: FlatConfigComposer<TypedFlatConfigItem, ConfigNames>, options?: typescript.Options) => void) & {
17
+ configNamesMapSource: {
18
+ readonly rules: "vdustr/typescript/rules";
19
+ };
20
+ };
21
+ export { typescript };
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.typescript = void 0;
7
+ var _esToolkit = require("es-toolkit");
8
+ var _extendsConfig = require("../utils/extendsConfig");
9
+ var _utils = require("./_utils");
10
+ const configNamesMapSource = {
11
+ rules: "vdustr/typescript/rules"
12
+ };
13
+ const typescriptInternal = (composer, options) => {
14
+ (0, _extendsConfig.extendsConfig)(composer, "antfu/typescript/rules", config => [config, {
15
+ /**
16
+ * Inherited.
17
+ */
18
+ ...(0, _esToolkit.omit)(config, _utils.ignoreKeys),
19
+ /**
20
+ * Default.
21
+ */
22
+ name: configNamesMapSource.rules,
23
+ /**
24
+ * Overridable.
25
+ */
26
+ ...options,
27
+ rules: {
28
+ /**
29
+ * Default.
30
+ */
31
+ "ts/array-type": ["error", {
32
+ default: "generic"
33
+ }],
34
+ /**
35
+ * Namespaces are useful for centralizing the management of types. Just avoid
36
+ * overusing them with runtime code.
37
+ *
38
+ * - References:
39
+ * - <https://x.com/mattpocockuk/status/1805606072167940167>
40
+ */
41
+ "ts/no-namespace": "off",
42
+ "ts/no-redeclare": "off",
43
+ /**
44
+ * Check for unused variables in TypeScript.
45
+ */
46
+ "ts/no-unused-vars": "off",
47
+ /**
48
+ * Overridable.
49
+ */
50
+ ...options?.rules
51
+ }
52
+ }]);
53
+ };
54
+ const typescript = exports.typescript = Object.assign(typescriptInternal, {
55
+ configNamesMapSource
56
+ });
@@ -0,0 +1,25 @@
1
+ import type { ConfigNames, TypedFlatConfigItem } from "@antfu/eslint-config";
2
+ import type { FlatConfigComposer } from "eslint-flat-config-utils";
3
+ import type { ConfigOverrides, ResolveConfigNamesMap } from "../types";
4
+ declare const configNamesMapSource: {
5
+ readonly rules: "vdustr/yaml/rules";
6
+ readonly sortKeys: "vdustr/yaml/sortKeys";
7
+ };
8
+ declare module "../types" {
9
+ interface ConfigNamesMap extends ResolveConfigNamesMap<yaml.ConfigNamesMapSource> {
10
+ }
11
+ }
12
+ declare namespace yaml {
13
+ type ConfigNamesMapSource = typeof configNamesMapSource;
14
+ interface Options {
15
+ yaml?: ConfigOverrides;
16
+ sortKeys?: ConfigOverrides;
17
+ }
18
+ }
19
+ declare const yaml: ((composer: FlatConfigComposer<TypedFlatConfigItem, ConfigNames>, options?: yaml.Options) => void) & {
20
+ configNamesMapSource: {
21
+ readonly rules: "vdustr/yaml/rules";
22
+ readonly sortKeys: "vdustr/yaml/sortKeys";
23
+ };
24
+ };
25
+ export { yaml };
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.yaml = void 0;
7
+ var _esToolkit = require("es-toolkit");
8
+ var _eslintPluginYml = _interopRequireDefault(require("eslint-plugin-yml"));
9
+ var _globs = require("../globs");
10
+ var _extendsConfig = require("../utils/extendsConfig");
11
+ var _renameRules = require("../utils/renameRules");
12
+ var _utils = require("./_utils");
13
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
+ const configNamesMapSource = {
15
+ rules: "vdustr/yaml/rules",
16
+ sortKeys: "vdustr/yaml/sortKeys"
17
+ };
18
+ const yamlInternal = (composer, options) => {
19
+ (0, _extendsConfig.extendsConfig)(composer, "antfu/yaml/rules", config => [config, {
20
+ /**
21
+ * Inherited.
22
+ */
23
+ ...(0, _esToolkit.omit)(config, _utils.ignoreKeys),
24
+ /**
25
+ * Default.
26
+ */
27
+ name: configNamesMapSource.rules,
28
+ /**
29
+ * Overridable.
30
+ */
31
+ ...options,
32
+ rules: {
33
+ /**
34
+ * Inherited from `eslint-plugin-yml`.
35
+ */
36
+ ...(0, _renameRules.renameRules)({
37
+ ...Object.fromEntries([..._eslintPluginYml.default.configs["flat/recommended"].flatMap(config2 => Object.entries(config2.rules ?? {})), ..._eslintPluginYml.default.configs["flat/prettier"].flatMap(config2 => Object.entries(config2.rules ?? {}))])
38
+ }),
39
+ /**
40
+ * Overridable.
41
+ */
42
+ ...options?.yaml?.rules
43
+ }
44
+ }, {
45
+ /**
46
+ * Inherited.
47
+ */
48
+ ...config,
49
+ /**
50
+ * Default.
51
+ */
52
+ name: configNamesMapSource.sortKeys,
53
+ /**
54
+ * Overridable.
55
+ */
56
+ ...options?.sortKeys,
57
+ files: [_globs.GLOB_PNPM_WORKSPACE_YAML, ...(options?.sortKeys?.files ?? [])],
58
+ rules: {
59
+ "yaml/sort-keys": ["error", "asc"],
60
+ ...options?.sortKeys?.rules
61
+ }
62
+ }]);
63
+ };
64
+ const yaml = exports.yaml = Object.assign(yamlInternal, {
65
+ configNamesMapSource
66
+ });
@@ -0,0 +1,6 @@
1
+ declare const GLOB_CODE_WORKSPACE: string;
2
+ declare const GLOB_PACKAGE_JSON: string;
3
+ declare const GLOB_PNPM_WORKSPACE_YAML: string;
4
+ declare const GLOB_CSPELL_JSON: string;
5
+ declare const GLOB_CONFIG_JS: string;
6
+ export { GLOB_CODE_WORKSPACE, GLOB_CONFIG_JS, GLOB_CSPELL_JSON, GLOB_PACKAGE_JSON, GLOB_PNPM_WORKSPACE_YAML, };
package/dist/globs.js ADDED
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.GLOB_PNPM_WORKSPACE_YAML = exports.GLOB_PACKAGE_JSON = exports.GLOB_CSPELL_JSON = exports.GLOB_CONFIG_JS = exports.GLOB_CODE_WORKSPACE = void 0;
7
+ const GLOB_CODE_WORKSPACE = exports.GLOB_CODE_WORKSPACE = "**/*.code-workspace";
8
+ const GLOB_PACKAGE_JSON = exports.GLOB_PACKAGE_JSON = "**/package.json";
9
+ const GLOB_PNPM_WORKSPACE_YAML = exports.GLOB_PNPM_WORKSPACE_YAML = "**/pnpm-workspace.y?(a)ml";
10
+ const GLOB_CSPELL_JSON = exports.GLOB_CSPELL_JSON = "**/cspell.json";
11
+ const GLOB_CONFIG_JS = exports.GLOB_CONFIG_JS = "**/*.config.?([cm])([jt])s";
package/dist/types.d.ts CHANGED
@@ -1,3 +1,37 @@
1
+ import type { TypedFlatConfigItem } from "@antfu/eslint-config";
1
2
  import type antfu from "@antfu/eslint-config";
3
+ import type { DistributiveOmit } from "@mui/types";
2
4
  type Config = NonNullable<Parameters<typeof antfu>[1]>;
3
- export type { Config };
5
+ /**
6
+ * A map of config names.
7
+ *
8
+ * @example
9
+ *
10
+ * ```ts
11
+ *
12
+ * ```
13
+ */
14
+ interface ConfigNamesMap {
15
+ }
16
+ type BaseConfigNamesMapSource = Record<string, string>;
17
+ /**
18
+ * Transfroms a config names map source to a config names map.
19
+ *
20
+ * @example
21
+ *
22
+ * ```ts
23
+ * BaseConfigNamesMapSource<{
24
+ * setup: "my-config/setup",
25
+ * rules: "my-config/rules",
26
+ * }> => {
27
+ * "my-config/setup": true,
28
+ * "my-config/rules": true,
29
+ * }
30
+ * ```
31
+ */
32
+ type ResolveConfigNamesMap<TSource extends BaseConfigNamesMapSource> = {
33
+ [K in TSource[keyof TSource]]: true;
34
+ };
35
+ interface ConfigOverrides extends DistributiveOmit<TypedFlatConfigItem, "process"> {
36
+ }
37
+ export type { BaseConfigNamesMapSource, Config, ConfigNamesMap, ConfigOverrides, ResolveConfigNamesMap, };
@@ -0,0 +1,4 @@
1
+ import type { Linter } from "eslint";
2
+ import type { Arrayable, Awaitable, DefaultConfigNamesMap, FlatConfigComposer, StringLiteralUnion } from "eslint-flat-config-utils";
3
+ declare function extendsConfig<T extends object = Linter.Config, ConfigNames extends string = keyof DefaultConfigNamesMap>(composer: FlatConfigComposer<T, ConfigNames>, sourceOrIndex: StringLiteralUnion<ConfigNames, string | number>, config: Awaitable<Arrayable<T>> | ((config: T) => Awaitable<Arrayable<T>>), remove?: Arrayable<StringLiteralUnion<ConfigNames, string | number>>): void;
4
+ export { extendsConfig };
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.extendsConfig = extendsConfig;
7
+ function getConfigIndex(configs, nameOrIndex) {
8
+ if (typeof nameOrIndex === "number") {
9
+ if (nameOrIndex < 0 || nameOrIndex >= configs.length) throw new Error(`ESLintFlatConfigUtils: Failed to locate config at index ${nameOrIndex}
10
+ (${configs.length} configs in total)`);
11
+ return nameOrIndex;
12
+ } else {
13
+ const index = configs.findIndex(config => config.name === nameOrIndex);
14
+ if (index === -1) {
15
+ const named = configs.map(config => config.name).filter(Boolean);
16
+ const countUnnamed = configs.length - named.length;
17
+ const messages = [`Failed to locate config with name "${nameOrIndex}"`, `Available names are: ${named.join(", ")}`, countUnnamed ? `(${countUnnamed} unnamed configs)` : ""].filter(Boolean).join("\n");
18
+ throw new Error(`ESLintFlatConfigUtils: ${messages}`);
19
+ }
20
+ return index;
21
+ }
22
+ }
23
+ const tryGetConfigIndex = (configs, nameOrIndex) => {
24
+ try {
25
+ return getConfigIndex(configs, nameOrIndex);
26
+ } catch {
27
+ return -1;
28
+ }
29
+ };
30
+ function extendsConfig(composer, sourceOrIndex, config, remove) {
31
+ const operations =
32
+ // @ts-expect-error -- Hijacking the composer's operations.
33
+ composer._operations;
34
+ operations.push(async items => {
35
+ const removingTargets = (() => {
36
+ if (!remove) return [];
37
+ const removeSources = Array.isArray(remove) ? remove : [remove];
38
+ return removeSources.flatMap(removeSource => {
39
+ const index2 = tryGetConfigIndex(items, removeSource);
40
+ return index2 === -1 ? [] : [index2];
41
+ });
42
+ })();
43
+ items = removingTargets.length === 0 ? items : items.filter((_, index2) => !removingTargets.includes(index2));
44
+ const index = tryGetConfigIndex(items, sourceOrIndex);
45
+ const source = items[index];
46
+ if (!source) return items;
47
+ const newConfigs = await (async () => {
48
+ const awaited = typeof config === "function" ? await config(source) : await config;
49
+ return Array.isArray(awaited) ? awaited : [awaited];
50
+ })();
51
+ return [...items.slice(0, index), ...newConfigs, ...items.slice(index + 1)];
52
+ });
53
+ }
package/dist/vdustr.d.ts CHANGED
@@ -1,10 +1,27 @@
1
- import type { Config } from "./types";
1
+ import type { ConfigNames, TypedFlatConfigItem } from "@antfu/eslint-config";
2
+ import type { FlatConfigComposer } from "eslint-flat-config-utils";
3
+ import type { Config, ConfigNamesMap } from "./types";
2
4
  import antfu from "@antfu/eslint-config";
3
5
  import { mdx } from "./configs/mdx";
6
+ import { prettier } from "./configs/prettier";
7
+ import { storybook } from "./configs/storybook";
8
+ import { imports } from "./extends/imports";
9
+ import { javascript } from "./extends/javascript";
10
+ import { jsonc } from "./extends/jsonc";
11
+ import { react } from "./extends/react";
12
+ import { typescript } from "./extends/typescript";
13
+ import { yaml } from "./extends/yaml";
4
14
  import "./eslint-typegen";
5
- type Options = Omit<NonNullable<Parameters<typeof antfu>[0]>, "stylistic"> & {
15
+ type Options = NonNullable<Parameters<typeof antfu>[0]> & {
16
+ javascriptExtends?: javascript.Options;
17
+ importsExtends?: imports.Options;
18
+ typescriptExtends?: typescript.Options;
19
+ jsoncExtends?: jsonc.Options;
20
+ yamlExtends?: yaml.Options;
21
+ reactExtends?: react.Options;
6
22
  mdx?: boolean | mdx.Options;
7
- storybook?: boolean;
23
+ storybook?: boolean | storybook.Options;
24
+ prettier?: boolean | prettier.Options;
8
25
  };
9
- declare const vdustr: (options?: Options, ...userConfigs: Array<Config>) => import("eslint-flat-config-utils/index").FlatConfigComposer<import("@antfu/eslint-config").TypedFlatConfigItem, import("@antfu/eslint-config").ConfigNames>;
26
+ declare const vdustr: (options?: Options, ...userConfigs: Array<Config>) => FlatConfigComposer<TypedFlatConfigItem, ConfigNames | keyof ConfigNamesMap>;
10
27
  export { vdustr };