@storm-software/eslint 0.170.157 → 0.170.159
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 +1 -1
- package/dist/{plugins-CZWNS7l4.mjs → index.cjs} +4613 -205
- package/dist/{typegen.d.mts → index.d.cts} +1027 -1
- package/dist/index.d.mts +17942 -40
- package/dist/index.mjs +12628 -38
- package/package.json +14 -57
- package/dist/astro-CKzo6xci.d.mts +0 -5
- package/dist/banner-YnHf4ewf.d.mts +0 -5
- package/dist/bun-OJPLvfnX.d.mts +0 -5
- package/dist/cspell-CfGd6g7m.d.mts +0 -8
- package/dist/disables-Dx5b56Fi.d.mts +0 -5
- package/dist/find-workspace-root-D3UHWbgn.mjs +0 -211
- package/dist/formatters-VU6Zu_ju.d.mts +0 -5
- package/dist/graphql-ClFinA5J.d.mts +0 -5
- package/dist/helpers-mce_MNwt.mjs +0 -72
- package/dist/ignores-CPeru9Fz.d.mts +0 -5
- package/dist/imports-CQToT7JW.d.mts +0 -5
- package/dist/javascript-BR8uv0Wr.d.mts +0 -5
- package/dist/jsdoc-Dy8bHykP.d.mts +0 -5
- package/dist/jsonc-YqDXTIOi.d.mts +0 -5
- package/dist/jsx-DzqEJSYd.d.mts +0 -5
- package/dist/markdown-C5lFEI83.d.mts +0 -5
- package/dist/mdx-CDEhveb1.d.mts +0 -5
- package/dist/next-DGhspeMc.d.mts +0 -8
- package/dist/node-CQgsZ8nv.d.mts +0 -5
- package/dist/nx-CLRc6QRM.d.mts +0 -8
- package/dist/perfectionist-CgSgqAjV.d.mts +0 -10
- package/dist/plugins.d.mts +0 -616
- package/dist/plugins.mjs +0 -2
- package/dist/pnpm-Cp9VzsCv.d.mts +0 -5
- package/dist/preset-x6MId9-7.mjs +0 -265
- package/dist/preset.d.mts +0 -30
- package/dist/preset.mjs +0 -3
- package/dist/prettier-CboafVRp.d.mts +0 -8
- package/dist/react-C5HWHYPh.d.mts +0 -5
- package/dist/react-native-DjQo3PXB.d.mts +0 -8
- package/dist/regexp-D2Fm6vg7.d.mts +0 -5
- package/dist/rolldown-runtime-CMFfr-1z.mjs +0 -26
- package/dist/secrets-DfvPNLCF.d.mts +0 -10
- package/dist/sort-9_xeGmal.d.mts +0 -16
- package/dist/storybook-DqDJ5exI.d.mts +0 -5
- package/dist/stylistic-9jDGqsHH.d.mts +0 -9
- package/dist/test-Dw-h86ig.d.mts +0 -5
- package/dist/toml-ConAZLXy.d.mts +0 -5
- package/dist/tsdoc-DcYWMVl0.d.mts +0 -5
- package/dist/types-XIthLTox.d.mts +0 -852
- package/dist/types.d.mts +0 -3
- package/dist/types.mjs +0 -2
- package/dist/typescript-BFiiMXDt.d.mts +0 -5
- package/dist/unicorn-CQ3PTdfT.d.mts +0 -5
- package/dist/unocss-Uw-vEvNU.d.mts +0 -5
- package/dist/yaml-Ddbh49WY.d.mts +0 -5
- package/dist/zod-7F7dUsU5.d.mts +0 -8
package/dist/preset-x6MId9-7.mjs
DELETED
|
@@ -1,265 +0,0 @@
|
|
|
1
|
-
import { n as interopDefault, r as isInEditorEnv } from "./helpers-mce_MNwt.mjs";
|
|
2
|
-
import { astro } from "./configs/astro.mjs";
|
|
3
|
-
import { banner } from "./configs/banner.mjs";
|
|
4
|
-
import { i as relative, n as findWorkspaceRootSafe, r as joinPaths, t as findWorkspaceRoot } from "./find-workspace-root-D3UHWbgn.mjs";
|
|
5
|
-
import { bun } from "./configs/bun.mjs";
|
|
6
|
-
import { cspell } from "./configs/cspell.mjs";
|
|
7
|
-
import { disables } from "./configs/disables.mjs";
|
|
8
|
-
import { stylistic } from "./configs/stylistic.mjs";
|
|
9
|
-
import { formatters } from "./configs/formatters.mjs";
|
|
10
|
-
import { graphql } from "./configs/graphql.mjs";
|
|
11
|
-
import { ignores } from "./configs/ignores.mjs";
|
|
12
|
-
import { imports } from "./configs/imports.mjs";
|
|
13
|
-
import { javascript } from "./configs/javascript.mjs";
|
|
14
|
-
import { jsdoc } from "./configs/jsdoc.mjs";
|
|
15
|
-
import { jsonc } from "./configs/jsonc.mjs";
|
|
16
|
-
import { jsx } from "./configs/jsx.mjs";
|
|
17
|
-
import { markdown } from "./configs/markdown.mjs";
|
|
18
|
-
import { mdx } from "./configs/mdx.mjs";
|
|
19
|
-
import { next } from "./configs/next.mjs";
|
|
20
|
-
import { node } from "./configs/node.mjs";
|
|
21
|
-
import { nx } from "./configs/nx.mjs";
|
|
22
|
-
import { perfectionist } from "./configs/perfectionist.mjs";
|
|
23
|
-
import { pnpm } from "./configs/pnpm.mjs";
|
|
24
|
-
import { prettier } from "./configs/prettier.mjs";
|
|
25
|
-
import { react } from "./configs/react.mjs";
|
|
26
|
-
import { reactNative } from "./configs/react-native.mjs";
|
|
27
|
-
import { regexp } from "./configs/regexp.mjs";
|
|
28
|
-
import { secrets } from "./configs/secrets.mjs";
|
|
29
|
-
import { sortPackageJson, sortTsconfig } from "./configs/sort.mjs";
|
|
30
|
-
import { storybook } from "./configs/storybook.mjs";
|
|
31
|
-
import { test } from "./configs/test.mjs";
|
|
32
|
-
import { toml } from "./configs/toml.mjs";
|
|
33
|
-
import { tsdoc } from "./configs/tsdoc.mjs";
|
|
34
|
-
import { typescript } from "./configs/typescript.mjs";
|
|
35
|
-
import { unicorn } from "./configs/unicorn.mjs";
|
|
36
|
-
import { unocss } from "./configs/unocss.mjs";
|
|
37
|
-
import { yaml } from "./configs/yaml.mjs";
|
|
38
|
-
import { zod } from "./configs/zod.mjs";
|
|
39
|
-
import { FlatConfigComposer } from "eslint-flat-config-utils";
|
|
40
|
-
import { isPackageExists } from "local-pkg";
|
|
41
|
-
import { existsSync, statSync } from "node:fs";
|
|
42
|
-
import { join } from "node:path";
|
|
43
|
-
//#region src/utils/tsconfig.ts
|
|
44
|
-
/**
|
|
45
|
-
* Gets the path to the nearest tsconfig file by walking up from start path.
|
|
46
|
-
*
|
|
47
|
-
* The search order is as follows:
|
|
48
|
-
* 1. If `tsconfigPath` is provided and exists, it will be used.
|
|
49
|
-
* 2. If a tsconfig file is found in the current working directory, it will be used.
|
|
50
|
-
* 3. If a tsconfig file is found in the workspace root, it will be used.
|
|
51
|
-
* 4. If no tsconfig file is found, a warning will be logged and a default path will be returned based on the project type (app or lib).
|
|
52
|
-
*
|
|
53
|
-
* The function checks for the following tsconfig file names in order:
|
|
54
|
-
* - tsconfig.json
|
|
55
|
-
* - tsconfig.base.json
|
|
56
|
-
* - tsconfig.app.json
|
|
57
|
-
* - tsconfig.lib.json
|
|
58
|
-
* - tsconfig.eslint.json
|
|
59
|
-
* - tsconfig.lint.json
|
|
60
|
-
*
|
|
61
|
-
* @param tsconfigPath Optional path to a tsconfig file. If provided, it will be used if it exists.
|
|
62
|
-
* @param type The type of project (app or lib) to determine the default tsconfig file name if no tsconfig file is found. Default is "app".
|
|
63
|
-
* @returns The path to the nearest tsconfig file relative to the workspace root.
|
|
64
|
-
*/
|
|
65
|
-
function getTsConfigPath(tsconfigPath, type) {
|
|
66
|
-
const workspaceRoot = findWorkspaceRoot();
|
|
67
|
-
if (tsconfigPath && existsSync(tsconfigPath) && statSync(tsconfigPath).isFile()) return relative(workspaceRoot, tsconfigPath);
|
|
68
|
-
let result = checkTsConfigPath(process.cwd());
|
|
69
|
-
if (result) return relative(workspaceRoot, joinPaths(process.cwd(), result));
|
|
70
|
-
result = checkTsConfigPath(workspaceRoot);
|
|
71
|
-
if (result) return relative(workspaceRoot, joinPaths(workspaceRoot, result));
|
|
72
|
-
console.warn(`No tsconfig.json found${tsconfigPath ? ` provided: ${tsconfigPath}` : ""}. Consider adding a tsconfig.json file to your project's ESLint configuration.`);
|
|
73
|
-
return workspaceRoot?.replace(/\\/g, "/").replaceAll(/\/$/g, "") === process.cwd().replace(/\\/g, "/").replaceAll(/\/$/g, "") ? "tsconfig.base.json" : type ? `tsconfig.${type}.json` : "tsconfig.json";
|
|
74
|
-
}
|
|
75
|
-
function checkTsConfigPath(root) {
|
|
76
|
-
if (existsSync(joinPaths(root, "tsconfig.json"))) return "tsconfig.json";
|
|
77
|
-
else if (existsSync(joinPaths(root, "tsconfig.base.json"))) return "tsconfig.base.json";
|
|
78
|
-
else if (existsSync(joinPaths(root, "tsconfig.app.json"))) return "tsconfig.app.json";
|
|
79
|
-
else if (existsSync(joinPaths(root, "tsconfig.lib.json"))) return "tsconfig.lib.json";
|
|
80
|
-
else if (existsSync(joinPaths(root, "tsconfig.eslint.json"))) return "tsconfig.eslint.json";
|
|
81
|
-
else if (existsSync(joinPaths(root, "tsconfig.lint.json"))) return "tsconfig.lint.json";
|
|
82
|
-
}
|
|
83
|
-
//#endregion
|
|
84
|
-
//#region src/utils/package-manager.ts
|
|
85
|
-
/**
|
|
86
|
-
* Detect the package manager used in the workspace.
|
|
87
|
-
*
|
|
88
|
-
* @returns "pnpm" | "bun" | "npm"
|
|
89
|
-
*/
|
|
90
|
-
function detectPackageManager() {
|
|
91
|
-
const workspaceRoot = findWorkspaceRootSafe() ?? process.cwd();
|
|
92
|
-
if (existsSync(join(workspaceRoot, "bun.lockb")) || existsSync(join(workspaceRoot, "bun.lock")) || existsSync(join(workspaceRoot, "bunfig.toml")) || existsSync(join(workspaceRoot, "bunfig.yml"))) return "bun";
|
|
93
|
-
if (existsSync(join(workspaceRoot, "pnpm-lock.yaml")) || existsSync(join(workspaceRoot, "pnpm-lock.yml")) || existsSync(join(workspaceRoot, "pnpm-workpace.yaml"))) return "pnpm";
|
|
94
|
-
return "npm";
|
|
95
|
-
}
|
|
96
|
-
//#endregion
|
|
97
|
-
//#region src/preset.ts
|
|
98
|
-
const flatConfigProps = [
|
|
99
|
-
"name",
|
|
100
|
-
"languageOptions",
|
|
101
|
-
"linterOptions",
|
|
102
|
-
"processor",
|
|
103
|
-
"plugins",
|
|
104
|
-
"rules",
|
|
105
|
-
"settings"
|
|
106
|
-
];
|
|
107
|
-
const defaultPluginRenaming = {
|
|
108
|
-
"@eslint-react": "react",
|
|
109
|
-
"@eslint-react/dom": "react-dom",
|
|
110
|
-
"@eslint-react/hooks-extra": "react-hooks-extra",
|
|
111
|
-
"@eslint-react/naming-convention": "react-naming-convention",
|
|
112
|
-
"@stylistic": "style",
|
|
113
|
-
"@typescript-eslint": "ts",
|
|
114
|
-
"import-x": "import",
|
|
115
|
-
n: "node",
|
|
116
|
-
vitest: "test",
|
|
117
|
-
yml: "yaml"
|
|
118
|
-
};
|
|
119
|
-
function resolveSubOptions(options, key) {
|
|
120
|
-
return typeof options[key] === "boolean" ? {} : options[key] || {};
|
|
121
|
-
}
|
|
122
|
-
function getOverrides(options, key) {
|
|
123
|
-
const sub = resolveSubOptions(options, key);
|
|
124
|
-
return "overrides" in sub ? sub.overrides : {};
|
|
125
|
-
}
|
|
126
|
-
/**
|
|
127
|
-
* Get the ESLint configuration for a Storm workspace.
|
|
128
|
-
*
|
|
129
|
-
* @param options - The preset options.
|
|
130
|
-
* @param userConfigs - Additional ESLint configurations.
|
|
131
|
-
*/
|
|
132
|
-
function preset(options, ...userConfigs) {
|
|
133
|
-
const { name, globals = {}, banner: enableBanner = true, astro: enableAstro = false, autoRenamePlugins = true, componentExts = [], gitignore: enableGitignore = true, jsx: enableJsx = true, mdx: enableMdx = false, cspell: enableCSpell = true, react: enableReact = false, "react-native": enableReactNative = false, regexp: enableRegexp = true, next: enableNext = false, graphql: enableGraphQL = false, storybook: enableStorybook = false, typescript: enableTypeScript = isPackageExists("typescript"), unicorn: enableUnicorn = true, jsdoc: enableJSDoc = false, tsdoc: enableTSDoc = true, test: enableTest = true, unocss: enableUnoCSS = false, zod: enableZod = false, bun: enableBun, pnpm: enablePnpm } = options;
|
|
134
|
-
const packageManager = detectPackageManager();
|
|
135
|
-
let isInEditor = options.isInEditor;
|
|
136
|
-
if (!isInEditor) {
|
|
137
|
-
isInEditor = isInEditorEnv();
|
|
138
|
-
if (isInEditor) console.log("[@storm-software/eslint] Detected running in editor, some rules are disabled.");
|
|
139
|
-
}
|
|
140
|
-
const stylisticOptions = !options.stylistic ? false : typeof options.stylistic === "object" ? options.stylistic : {};
|
|
141
|
-
if (stylisticOptions && !("jsx" in stylisticOptions)) stylisticOptions.jsx = enableJsx;
|
|
142
|
-
const configs = [];
|
|
143
|
-
if (enableGitignore) {
|
|
144
|
-
if (typeof enableGitignore !== "boolean") configs.push(interopDefault(import("eslint-config-flat-gitignore")).then((r) => [r({
|
|
145
|
-
name: "storm/gitignore",
|
|
146
|
-
...enableGitignore
|
|
147
|
-
})]));
|
|
148
|
-
else configs.push(interopDefault(import("eslint-config-flat-gitignore")).then((r) => [r({
|
|
149
|
-
name: "storm/gitignore",
|
|
150
|
-
strict: false
|
|
151
|
-
})]));
|
|
152
|
-
}
|
|
153
|
-
configs.push(ignores(options.ignores), javascript({
|
|
154
|
-
globals,
|
|
155
|
-
isInEditor,
|
|
156
|
-
overrides: getOverrides(options, "javascript")
|
|
157
|
-
}), node(), imports({ stylistic: stylisticOptions }), nx(resolveSubOptions(options, "nx")), perfectionist(), secrets({ json: options.jsonc !== false }));
|
|
158
|
-
let typescriptOptions = {};
|
|
159
|
-
if (enableTypeScript) {
|
|
160
|
-
typescriptOptions = resolveSubOptions(options, "typescript");
|
|
161
|
-
if (typescriptOptions.tsconfigPath !== false) typescriptOptions.tsconfigPath = getTsConfigPath(typescriptOptions.tsconfigPath, options.type);
|
|
162
|
-
}
|
|
163
|
-
if (enableTypeScript) configs.push(typescript({
|
|
164
|
-
...typescriptOptions,
|
|
165
|
-
tsconfigPath: typescriptOptions.tsconfigPath === false ? void 0 : typescriptOptions.tsconfigPath,
|
|
166
|
-
componentExts,
|
|
167
|
-
overrides: getOverrides(options, "typescript"),
|
|
168
|
-
type: options.type
|
|
169
|
-
}));
|
|
170
|
-
if (enableBanner) configs.push(banner({
|
|
171
|
-
...resolveSubOptions(options, "banner"),
|
|
172
|
-
name,
|
|
173
|
-
overrides: getOverrides(options, "banner")
|
|
174
|
-
}));
|
|
175
|
-
if (!stylisticOptions) configs.push(prettier());
|
|
176
|
-
if (enableCSpell) configs.push(cspell(resolveSubOptions(options, "cspell")));
|
|
177
|
-
if (enableUnicorn) configs.push(unicorn(enableUnicorn === true ? {} : enableUnicorn));
|
|
178
|
-
if (enableJSDoc) configs.push(jsdoc({
|
|
179
|
-
...resolveSubOptions(options, "jsdoc"),
|
|
180
|
-
overrides: getOverrides(options, "jsdoc")
|
|
181
|
-
}));
|
|
182
|
-
if (enableTSDoc) configs.push(tsdoc({
|
|
183
|
-
...resolveSubOptions(options, "tsdoc"),
|
|
184
|
-
overrides: getOverrides(options, "tsdoc")
|
|
185
|
-
}));
|
|
186
|
-
if (enableJsx) configs.push(jsx());
|
|
187
|
-
if (enableZod) configs.push(zod({ overrides: getOverrides(options, "zod") }));
|
|
188
|
-
if (stylisticOptions) configs.push(stylistic({
|
|
189
|
-
...stylisticOptions,
|
|
190
|
-
lineEndings: stylisticOptions.lineEndings ?? "unix",
|
|
191
|
-
lessOpinionated: options.lessOpinionated,
|
|
192
|
-
overrides: getOverrides(options, "stylistic")
|
|
193
|
-
}));
|
|
194
|
-
if (enableRegexp) configs.push(regexp(typeof enableRegexp === "boolean" ? {} : enableRegexp));
|
|
195
|
-
if (enableTest) configs.push(test({
|
|
196
|
-
isInEditor,
|
|
197
|
-
overrides: getOverrides(options, "test")
|
|
198
|
-
}));
|
|
199
|
-
if (enableGraphQL) configs.push(graphql(resolveSubOptions(options, "graphql")));
|
|
200
|
-
if (enableReact) configs.push(react({
|
|
201
|
-
...typescriptOptions,
|
|
202
|
-
tsconfigPath: typescriptOptions.tsconfigPath === false ? void 0 : typescriptOptions.tsconfigPath,
|
|
203
|
-
...typeof enableReact === "boolean" ? { strict: false } : enableReact,
|
|
204
|
-
overrides: getOverrides(options, "react")
|
|
205
|
-
}));
|
|
206
|
-
if (enableReactNative) configs.push(reactNative({
|
|
207
|
-
...resolveSubOptions(options, "react-native"),
|
|
208
|
-
overrides: getOverrides(options, "react-native")
|
|
209
|
-
}));
|
|
210
|
-
if (enableNext) configs.push(next(resolveSubOptions(options, "next")));
|
|
211
|
-
if (enableStorybook) configs.push(storybook(resolveSubOptions(options, "storybook")));
|
|
212
|
-
if (enableUnoCSS) configs.push(unocss({
|
|
213
|
-
...resolveSubOptions(options, "unocss"),
|
|
214
|
-
overrides: getOverrides(options, "unocss")
|
|
215
|
-
}));
|
|
216
|
-
if (enableAstro) configs.push(astro({
|
|
217
|
-
overrides: getOverrides(options, "astro"),
|
|
218
|
-
stylistic: stylisticOptions
|
|
219
|
-
}));
|
|
220
|
-
if (enablePnpm ?? packageManager !== "bun") configs.push(pnpm({
|
|
221
|
-
overrides: getOverrides(options, "pnpm"),
|
|
222
|
-
ignore: typeof enablePnpm !== "boolean" ? enablePnpm?.ignore : void 0
|
|
223
|
-
}));
|
|
224
|
-
if (enableBun ?? packageManager === "bun") configs.push(bun({
|
|
225
|
-
overrides: getOverrides(options, "bun"),
|
|
226
|
-
ignore: typeof enableBun !== "boolean" ? enableBun?.ignore : void 0
|
|
227
|
-
}));
|
|
228
|
-
if (options.jsonc ?? true) {
|
|
229
|
-
configs.push(jsonc({
|
|
230
|
-
overrides: getOverrides(options, "jsonc"),
|
|
231
|
-
stylistic: stylisticOptions
|
|
232
|
-
}), sortTsconfig());
|
|
233
|
-
if (stylisticOptions) configs.push(sortPackageJson());
|
|
234
|
-
}
|
|
235
|
-
if (options.yaml ?? true) configs.push(yaml({
|
|
236
|
-
overrides: getOverrides(options, "yaml"),
|
|
237
|
-
stylistic: stylisticOptions
|
|
238
|
-
}));
|
|
239
|
-
if (options.toml ?? true) configs.push(toml({
|
|
240
|
-
overrides: getOverrides(options, "toml"),
|
|
241
|
-
stylistic: stylisticOptions
|
|
242
|
-
}));
|
|
243
|
-
if (options.markdown === true) configs.push(markdown({
|
|
244
|
-
componentExts,
|
|
245
|
-
overrides: getOverrides(options, "markdown")
|
|
246
|
-
}));
|
|
247
|
-
if (enableMdx) configs.push(mdx({ overrides: getOverrides(options, "mdx") }));
|
|
248
|
-
if (options.formatters) configs.push(formatters(options.formatters, typeof stylisticOptions === "boolean" ? {} : stylisticOptions));
|
|
249
|
-
configs.push(disables());
|
|
250
|
-
if ("files" in options) throw new Error("[@storm-software/eslint] The first argument should not contain the \"files\" property as the options are supposed to be global. Place it in the second or later config instead.");
|
|
251
|
-
const fusedConfig = flatConfigProps.reduce((acc, key) => {
|
|
252
|
-
if (key in options) acc[key] = options[key];
|
|
253
|
-
return acc;
|
|
254
|
-
}, {});
|
|
255
|
-
if (Object.keys(fusedConfig).length) configs.push([fusedConfig]);
|
|
256
|
-
let composer = new FlatConfigComposer();
|
|
257
|
-
composer = composer.append(...configs, ...userConfigs);
|
|
258
|
-
if (autoRenamePlugins) composer = composer.renamePlugins(defaultPluginRenaming);
|
|
259
|
-
if (isInEditor) composer = composer.disableRulesFix(["test/no-only-tests"], { builtinRules: () => import(["eslint", "use-at-your-own-risk"].join("/")).then((r) => r.builtinRules) });
|
|
260
|
-
return composer;
|
|
261
|
-
}
|
|
262
|
-
const getConfig = preset;
|
|
263
|
-
const defineConfig = preset;
|
|
264
|
-
//#endregion
|
|
265
|
-
export { preset as a, getOverrides as i, defineConfig as n, resolveSubOptions as o, getConfig as r, defaultPluginRenaming as t };
|
package/dist/preset.d.mts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { RuleOptions } from "./typegen.mjs";
|
|
2
|
-
import { L as UserConfig, M as PresetConfig, N as PresetResult, s as OptionsConfig } from "./types-XIthLTox.mjs";
|
|
3
|
-
import { Linter } from "eslint";
|
|
4
|
-
//#region src/preset.d.ts
|
|
5
|
-
declare const defaultPluginRenaming: {
|
|
6
|
-
"@eslint-react": string;
|
|
7
|
-
"@eslint-react/dom": string;
|
|
8
|
-
"@eslint-react/hooks-extra": string;
|
|
9
|
-
"@eslint-react/naming-convention": string;
|
|
10
|
-
"@stylistic": string;
|
|
11
|
-
"@typescript-eslint": string;
|
|
12
|
-
"import-x": string;
|
|
13
|
-
n: string;
|
|
14
|
-
vitest: string;
|
|
15
|
-
yml: string;
|
|
16
|
-
};
|
|
17
|
-
type ResolvedOptions<T> = T extends boolean ? never : NonNullable<T>;
|
|
18
|
-
declare function resolveSubOptions<K extends keyof OptionsConfig>(options: OptionsConfig, key: K): ResolvedOptions<OptionsConfig[K]>;
|
|
19
|
-
declare function getOverrides<K extends keyof OptionsConfig>(options: OptionsConfig, key: K): Partial<Linter.RulesRecord & RuleOptions>;
|
|
20
|
-
/**
|
|
21
|
-
* Get the ESLint configuration for a Storm workspace.
|
|
22
|
-
*
|
|
23
|
-
* @param options - The preset options.
|
|
24
|
-
* @param userConfigs - Additional ESLint configurations.
|
|
25
|
-
*/
|
|
26
|
-
declare function preset(options: PresetConfig<OptionsConfig>, ...userConfigs: UserConfig[]): PresetResult;
|
|
27
|
-
declare const getConfig: typeof preset;
|
|
28
|
-
declare const defineConfig: typeof preset;
|
|
29
|
-
//#endregion
|
|
30
|
-
export { ResolvedOptions, preset as default, preset, defaultPluginRenaming, defineConfig, getConfig, getOverrides, resolveSubOptions };
|
package/dist/preset.mjs
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import "./configs/index.mjs";
|
|
2
|
-
import { a as preset, i as getOverrides, n as defineConfig, o as resolveSubOptions, r as getConfig, t as defaultPluginRenaming } from "./preset-x6MId9-7.mjs";
|
|
3
|
-
export { preset as default, preset, defaultPluginRenaming, defineConfig, getConfig, getOverrides, resolveSubOptions };
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { D as OptionsTypeScriptParserOptions, I as TypedFlatConfigItem, O as OptionsTypeScriptWithTypes, S as OptionsReact, c as OptionsFiles, o as OptionsComponentExts } from "./types-XIthLTox.mjs";
|
|
2
|
-
//#region src/configs/react.d.ts
|
|
3
|
-
declare function react(options?: OptionsComponentExts & Omit<OptionsTypeScriptParserOptions, "tsconfigPath"> & OptionsTypeScriptWithTypes & OptionsReact & OptionsFiles): Promise<TypedFlatConfigItem[]>;
|
|
4
|
-
//#endregion
|
|
5
|
-
export { react as t };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { I as TypedFlatConfigItem, y as OptionsOverrides } from "./types-XIthLTox.mjs";
|
|
2
|
-
//#region src/configs/react-native.d.ts
|
|
3
|
-
/**
|
|
4
|
-
* Config for React Native projects.
|
|
5
|
-
*/
|
|
6
|
-
declare function reactNative(options?: OptionsOverrides): Promise<TypedFlatConfigItem[]>;
|
|
7
|
-
//#endregion
|
|
8
|
-
export { reactNative as t };
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { C as OptionsRegExp, I as TypedFlatConfigItem, y as OptionsOverrides } from "./types-XIthLTox.mjs";
|
|
2
|
-
//#region src/configs/regexp.d.ts
|
|
3
|
-
declare function regexp(options?: OptionsRegExp & OptionsOverrides): Promise<TypedFlatConfigItem[]>;
|
|
4
|
-
//#endregion
|
|
5
|
-
export { regexp as t };
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module";
|
|
2
|
-
//#region \0rolldown/runtime.js
|
|
3
|
-
var __create = Object.create;
|
|
4
|
-
var __defProp = Object.defineProperty;
|
|
5
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
12
|
-
key = keys[i];
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
-
get: ((k) => from[k]).bind(null, key),
|
|
15
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
|
21
|
-
value: mod,
|
|
22
|
-
enumerable: true
|
|
23
|
-
}) : target, mod));
|
|
24
|
-
var __require = /* #__PURE__ */ (() => createRequire(import.meta.url))();
|
|
25
|
-
//#endregion
|
|
26
|
-
export { __require as n, __toESM as r, __commonJSMin as t };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { I as TypedFlatConfigItem } from "./types-XIthLTox.mjs";
|
|
2
|
-
//#region src/configs/secrets.d.ts
|
|
3
|
-
/**
|
|
4
|
-
* Config for No-Secrets ESLint plugin
|
|
5
|
-
*/
|
|
6
|
-
declare function secrets(options: {
|
|
7
|
-
json: boolean;
|
|
8
|
-
}): Promise<TypedFlatConfigItem[]>;
|
|
9
|
-
//#endregion
|
|
10
|
-
export { secrets as t };
|
package/dist/sort-9_xeGmal.d.mts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { I as TypedFlatConfigItem } from "./types-XIthLTox.mjs";
|
|
2
|
-
//#region src/configs/sort.d.ts
|
|
3
|
-
/**
|
|
4
|
-
* Sort package.json
|
|
5
|
-
*
|
|
6
|
-
* Requires `jsonc` config
|
|
7
|
-
*/
|
|
8
|
-
declare function sortPackageJson(): Promise<TypedFlatConfigItem[]>;
|
|
9
|
-
/**
|
|
10
|
-
* Sort tsconfig.json
|
|
11
|
-
*
|
|
12
|
-
* Requires `jsonc` config
|
|
13
|
-
*/
|
|
14
|
-
declare function sortTsconfig(): TypedFlatConfigItem[];
|
|
15
|
-
//#endregion
|
|
16
|
-
export { sortTsconfig as n, sortPackageJson as t };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { F as StylisticConfig, I as TypedFlatConfigItem, y as OptionsOverrides } from "./types-XIthLTox.mjs";
|
|
2
|
-
//#region src/configs/stylistic.d.ts
|
|
3
|
-
declare const StylisticConfigDefaults: StylisticConfig;
|
|
4
|
-
interface StylisticOptions extends StylisticConfig, OptionsOverrides {
|
|
5
|
-
lessOpinionated?: boolean;
|
|
6
|
-
}
|
|
7
|
-
declare function stylistic(options?: StylisticOptions): Promise<TypedFlatConfigItem[]>;
|
|
8
|
-
//#endregion
|
|
9
|
-
export { StylisticOptions as n, stylistic as r, StylisticConfigDefaults as t };
|
package/dist/test-Dw-h86ig.d.mts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { I as TypedFlatConfigItem, c as OptionsFiles, f as OptionsIsInEditor, y as OptionsOverrides } from "./types-XIthLTox.mjs";
|
|
2
|
-
//#region src/configs/test.d.ts
|
|
3
|
-
declare function test(options?: OptionsFiles & OptionsIsInEditor & OptionsOverrides): Promise<TypedFlatConfigItem[]>;
|
|
4
|
-
//#endregion
|
|
5
|
-
export { test as t };
|
package/dist/toml-ConAZLXy.d.mts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { I as TypedFlatConfigItem, T as OptionsStylistic, c as OptionsFiles, y as OptionsOverrides } from "./types-XIthLTox.mjs";
|
|
2
|
-
//#region src/configs/toml.d.ts
|
|
3
|
-
declare function toml(options?: OptionsOverrides & OptionsStylistic & OptionsFiles): Promise<TypedFlatConfigItem[]>;
|
|
4
|
-
//#endregion
|
|
5
|
-
export { toml as t };
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { E as OptionsTSDoc, I as TypedFlatConfigItem, c as OptionsFiles } from "./types-XIthLTox.mjs";
|
|
2
|
-
//#region src/configs/tsdoc.d.ts
|
|
3
|
-
declare function tsdoc(options?: OptionsFiles & OptionsTSDoc): Promise<TypedFlatConfigItem[]>;
|
|
4
|
-
//#endregion
|
|
5
|
-
export { tsdoc as t };
|