@icebreakers/eslint-config 7.0.0 → 7.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/dist/index.cjs +47 -13
- package/dist/index.d.cts +3 -2704
- package/dist/index.d.ts +3 -2704
- package/dist/index.js +11 -8
- package/dist/{rolldown-runtime-C8SNSOcs.js → rolldown-runtime-B4FMCO8f.js} +2 -18
- package/package.json +6 -3
- package/dist/dist-BL_Srtot.cjs +0 -103815
- package/dist/dist-CfNAWugK.js +0 -103808
- package/dist/jiti-BQvCzdOI.js +0 -5460
- package/dist/jiti-DmQZ8B-l.cjs +0 -5460
- package/dist/lib-ADc7sTOW.cjs +0 -130342
- package/dist/lib-BiNYUSxy.js +0 -130338
- package/dist/lib-ByHGIggZ.cjs +0 -6394
- package/dist/lib-CLPiq1xv.js +0 -6389
- package/dist/rolldown-runtime-DzWaZAza.cjs +0 -71
- package/dist/src-Ccb5vGgU.cjs +0 -1175
- package/dist/src-zsLgvLJM.js +0 -1173
package/dist/index.cjs
CHANGED
|
@@ -1,16 +1,47 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
|
|
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 __exportAll = (all, no_symbols) => {
|
|
10
|
+
let target = {};
|
|
11
|
+
for (var name in all) __defProp(target, name, {
|
|
12
|
+
get: all[name],
|
|
13
|
+
enumerable: true
|
|
14
|
+
});
|
|
15
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
16
|
+
return target;
|
|
17
|
+
};
|
|
18
|
+
var __copyProps = (to, from, except, desc) => {
|
|
19
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
20
|
+
key = keys[i];
|
|
21
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
22
|
+
get: ((k) => from[k]).bind(null, key),
|
|
23
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
return to;
|
|
27
|
+
};
|
|
28
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
29
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
30
|
+
value: mod,
|
|
31
|
+
enumerable: true
|
|
32
|
+
}) : target, mod));
|
|
33
|
+
//#endregion
|
|
3
34
|
let node_module = require("node:module");
|
|
4
35
|
let node_path = require("node:path");
|
|
5
|
-
node_path =
|
|
36
|
+
node_path = __toESM(node_path, 1);
|
|
6
37
|
let node_fs = require("node:fs");
|
|
7
|
-
node_fs =
|
|
38
|
+
node_fs = __toESM(node_fs, 1);
|
|
8
39
|
let node_process = require("node:process");
|
|
9
|
-
node_process =
|
|
40
|
+
node_process = __toESM(node_process, 1);
|
|
10
41
|
let node_url = require("node:url");
|
|
11
42
|
//#region src/antfu.ts
|
|
12
|
-
var antfu_exports = /* @__PURE__ */
|
|
13
|
-
|
|
43
|
+
var antfu_exports = /* @__PURE__ */ __exportAll({});
|
|
44
|
+
__reExport(antfu_exports, require("@antfu/eslint-config"));
|
|
14
45
|
//#endregion
|
|
15
46
|
//#region src/defaults.ts
|
|
16
47
|
const nestjsTypeScriptRules = {
|
|
@@ -158,6 +189,9 @@ const BETTER_TAILWIND_SYNTAX_RULES = {
|
|
|
158
189
|
"better-tailwindcss/no-unnecessary-whitespace": "warn"
|
|
159
190
|
};
|
|
160
191
|
const require$2 = (0, node_module.createRequire)(require("url").pathToFileURL(__filename).href);
|
|
192
|
+
function interopPluginDefault(modulePromise) {
|
|
193
|
+
return (0, antfu_exports.interopDefault)(modulePromise);
|
|
194
|
+
}
|
|
161
195
|
function resolveStylelintConfigLoader(moduleUrl = require("url").pathToFileURL(__filename).href) {
|
|
162
196
|
return moduleUrl.endsWith(".ts") ? new URL("./stylelint.ts", moduleUrl).href : new URL("./stylelint.js", moduleUrl).href;
|
|
163
197
|
}
|
|
@@ -186,7 +220,7 @@ function resolveBetterTailwindPresets(option) {
|
|
|
186
220
|
if (!option) return [];
|
|
187
221
|
if (!hasAllPackages(BETTER_TAILWIND_PACKAGES)) return [];
|
|
188
222
|
const betterTailwindcssOption = typeof option === "object" ? option : {};
|
|
189
|
-
return [(
|
|
223
|
+
return [interopPluginDefault(import("eslint-plugin-better-tailwindcss")).then((eslintPluginBetterTailwindcss) => {
|
|
190
224
|
const betterTailwindcssRules = resolveBetterTailwindRules(eslintPluginBetterTailwindcss, betterTailwindcssOption);
|
|
191
225
|
return {
|
|
192
226
|
name: "icebreaker/better-tailwindcss",
|
|
@@ -206,7 +240,7 @@ function resolveTailwindPresets(option) {
|
|
|
206
240
|
if (!option) return [];
|
|
207
241
|
if (!hasAllPackages(TAILWIND_PACKAGES)) return [];
|
|
208
242
|
const cssConfigPath = resolveDefaultTailwindCssConfigPath();
|
|
209
|
-
return [(
|
|
243
|
+
return [interopPluginDefault(import("eslint-plugin-tailwindcss")).then((tailwind) => {
|
|
210
244
|
const tailwindPlugin = tailwind;
|
|
211
245
|
return tailwindPlugin.configs["flat/recommended"] ?? tailwindPlugin.configs.recommended ?? [];
|
|
212
246
|
}), {
|
|
@@ -254,7 +288,7 @@ function resolveStylelintBridgePresets(option) {
|
|
|
254
288
|
function resolveMdxPresets(isEnabled) {
|
|
255
289
|
if (!isEnabled) return [];
|
|
256
290
|
if (!hasAllPackages(MDX_PACKAGES)) return [];
|
|
257
|
-
return [(
|
|
291
|
+
return [interopPluginDefault(import("eslint-plugin-mdx")).then((mdx) => {
|
|
258
292
|
return [{
|
|
259
293
|
...mdx.flat,
|
|
260
294
|
processor: mdx.createRemarkProcessor({
|
|
@@ -270,10 +304,10 @@ function resolveMdxPresets(isEnabled) {
|
|
|
270
304
|
function resolveAccessibilityPresets(isEnabled, vueOption, reactOption) {
|
|
271
305
|
if (!isEnabled) return [];
|
|
272
306
|
const presets = [];
|
|
273
|
-
if (vueOption && hasAllPackages(VUE_A11Y_PACKAGES)) presets.push((0, antfu_exports.interopDefault)(
|
|
307
|
+
if (vueOption && hasAllPackages(VUE_A11Y_PACKAGES)) presets.push((0, antfu_exports.interopDefault)(import("eslint-plugin-vuejs-accessibility")).then((pluginVueA11y) => {
|
|
274
308
|
return pluginVueA11y.configs["flat/recommended"];
|
|
275
309
|
}));
|
|
276
|
-
if (reactOption && hasAllPackages(REACT_A11Y_PACKAGES)) presets.push((0, antfu_exports.interopDefault)(
|
|
310
|
+
if (reactOption && hasAllPackages(REACT_A11Y_PACKAGES)) presets.push((0, antfu_exports.interopDefault)(import("eslint-plugin-jsx-a11y")).then((jsxA11y) => {
|
|
277
311
|
return jsxA11y.flatConfigs.recommended;
|
|
278
312
|
}));
|
|
279
313
|
return presets;
|
|
@@ -288,7 +322,7 @@ function resolveNestPresets(isEnabled) {
|
|
|
288
322
|
function resolveQueryPresets(isEnabled) {
|
|
289
323
|
if (!isEnabled) return [];
|
|
290
324
|
if (!hasAllPackages(QUERY_PACKAGES)) return [];
|
|
291
|
-
return [(
|
|
325
|
+
return [interopPluginDefault(Promise.resolve().then(() => require("./modern-Dnpu3mfI.cjs"))).then((pluginQuery) => pluginQuery.configs["flat/recommended"])];
|
|
292
326
|
}
|
|
293
327
|
//#endregion
|
|
294
328
|
//#region ../../node_modules/.pnpm/defu@6.1.7/node_modules/defu/dist/defu.mjs
|
|
@@ -680,7 +714,7 @@ function isComposer(value) {
|
|
|
680
714
|
return !!value && typeof value === "object" && "toConfigs" in value && typeof value.toConfigs === "function";
|
|
681
715
|
}
|
|
682
716
|
function normalizeUserConfig(userConfig) {
|
|
683
|
-
if (typeof userConfig?.then === "function") return
|
|
717
|
+
if (typeof userConfig?.then === "function") return userConfig.then((resolved) => {
|
|
684
718
|
return isComposer(resolved) ? resolved : normalizeResolvedUserConfig(resolved);
|
|
685
719
|
});
|
|
686
720
|
const resolvedUserConfig = userConfig;
|