@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 CHANGED
@@ -1,16 +1,47 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_rolldown_runtime = require("./rolldown-runtime-DzWaZAza.cjs");
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 = require_rolldown_runtime.__toESM(node_path, 1);
36
+ node_path = __toESM(node_path, 1);
6
37
  let node_fs = require("node:fs");
7
- node_fs = require_rolldown_runtime.__toESM(node_fs, 1);
38
+ node_fs = __toESM(node_fs, 1);
8
39
  let node_process = require("node:process");
9
- node_process = require_rolldown_runtime.__toESM(node_process, 1);
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__ */ require_rolldown_runtime.__exportAll({});
13
- require_rolldown_runtime.__reExport(antfu_exports, require("@antfu/eslint-config"));
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 [(0, antfu_exports.interopDefault)(import("eslint-plugin-better-tailwindcss")).then((eslintPluginBetterTailwindcss) => {
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 [(0, antfu_exports.interopDefault)(import("eslint-plugin-tailwindcss")).then((tailwind) => {
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 [(0, antfu_exports.interopDefault)(import("eslint-plugin-mdx")).then((mdx) => {
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)(Promise.resolve().then(() => /* @__PURE__ */ require_rolldown_runtime.__toESM(require("./dist-BL_Srtot.cjs").default, 1))).then((pluginVueA11y) => {
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)(Promise.resolve().then(() => /* @__PURE__ */ require_rolldown_runtime.__toESM(require("./lib-ADc7sTOW.cjs").default, 1))).then((jsxA11y) => {
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 [(0, antfu_exports.interopDefault)(Promise.resolve().then(() => require("./modern-Dnpu3mfI.cjs"))).then((pluginQuery) => pluginQuery.configs["flat/recommended"])];
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 Promise.resolve(userConfig).then((resolved) => {
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;