@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.js CHANGED
@@ -1,4 +1,4 @@
1
- import { i as __reExport, o as __toESM, r as __exportAll } from "./rolldown-runtime-C8SNSOcs.js";
1
+ import { n as __reExport, t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
2
2
  import { createRequire } from "node:module";
3
3
  import path from "node:path";
4
4
  import fs from "node:fs";
@@ -155,6 +155,9 @@ const BETTER_TAILWIND_SYNTAX_RULES = {
155
155
  "better-tailwindcss/no-unnecessary-whitespace": "warn"
156
156
  };
157
157
  const require$1 = createRequire(import.meta.url);
158
+ function interopPluginDefault(modulePromise) {
159
+ return (0, antfu_exports.interopDefault)(modulePromise);
160
+ }
158
161
  function resolveStylelintConfigLoader(moduleUrl = import.meta.url) {
159
162
  return moduleUrl.endsWith(".ts") ? new URL("./stylelint.ts", moduleUrl).href : new URL("./stylelint.js", moduleUrl).href;
160
163
  }
@@ -183,7 +186,7 @@ function resolveBetterTailwindPresets(option) {
183
186
  if (!option) return [];
184
187
  if (!hasAllPackages(BETTER_TAILWIND_PACKAGES)) return [];
185
188
  const betterTailwindcssOption = typeof option === "object" ? option : {};
186
- return [(0, antfu_exports.interopDefault)(import("eslint-plugin-better-tailwindcss")).then((eslintPluginBetterTailwindcss) => {
189
+ return [interopPluginDefault(import("eslint-plugin-better-tailwindcss")).then((eslintPluginBetterTailwindcss) => {
187
190
  const betterTailwindcssRules = resolveBetterTailwindRules(eslintPluginBetterTailwindcss, betterTailwindcssOption);
188
191
  return {
189
192
  name: "icebreaker/better-tailwindcss",
@@ -203,7 +206,7 @@ function resolveTailwindPresets(option) {
203
206
  if (!option) return [];
204
207
  if (!hasAllPackages(TAILWIND_PACKAGES)) return [];
205
208
  const cssConfigPath = resolveDefaultTailwindCssConfigPath();
206
- return [(0, antfu_exports.interopDefault)(import("eslint-plugin-tailwindcss")).then((tailwind) => {
209
+ return [interopPluginDefault(import("eslint-plugin-tailwindcss")).then((tailwind) => {
207
210
  const tailwindPlugin = tailwind;
208
211
  return tailwindPlugin.configs["flat/recommended"] ?? tailwindPlugin.configs.recommended ?? [];
209
212
  }), {
@@ -251,7 +254,7 @@ function resolveStylelintBridgePresets(option) {
251
254
  function resolveMdxPresets(isEnabled) {
252
255
  if (!isEnabled) return [];
253
256
  if (!hasAllPackages(MDX_PACKAGES)) return [];
254
- return [(0, antfu_exports.interopDefault)(import("eslint-plugin-mdx")).then((mdx) => {
257
+ return [interopPluginDefault(import("eslint-plugin-mdx")).then((mdx) => {
255
258
  return [{
256
259
  ...mdx.flat,
257
260
  processor: mdx.createRemarkProcessor({
@@ -267,10 +270,10 @@ function resolveMdxPresets(isEnabled) {
267
270
  function resolveAccessibilityPresets(isEnabled, vueOption, reactOption) {
268
271
  if (!isEnabled) return [];
269
272
  const presets = [];
270
- if (vueOption && hasAllPackages(VUE_A11Y_PACKAGES)) presets.push((0, antfu_exports.interopDefault)(import("./dist-CfNAWugK.js").then((m) => /* @__PURE__ */ __toESM(m.default, 1))).then((pluginVueA11y) => {
273
+ if (vueOption && hasAllPackages(VUE_A11Y_PACKAGES)) presets.push((0, antfu_exports.interopDefault)(import("eslint-plugin-vuejs-accessibility")).then((pluginVueA11y) => {
271
274
  return pluginVueA11y.configs["flat/recommended"];
272
275
  }));
273
- if (reactOption && hasAllPackages(REACT_A11Y_PACKAGES)) presets.push((0, antfu_exports.interopDefault)(import("./lib-BiNYUSxy.js").then((m) => /* @__PURE__ */ __toESM(m.default, 1))).then((jsxA11y) => {
276
+ if (reactOption && hasAllPackages(REACT_A11Y_PACKAGES)) presets.push((0, antfu_exports.interopDefault)(import("eslint-plugin-jsx-a11y")).then((jsxA11y) => {
274
277
  return jsxA11y.flatConfigs.recommended;
275
278
  }));
276
279
  return presets;
@@ -285,7 +288,7 @@ function resolveNestPresets(isEnabled) {
285
288
  function resolveQueryPresets(isEnabled) {
286
289
  if (!isEnabled) return [];
287
290
  if (!hasAllPackages(QUERY_PACKAGES)) return [];
288
- return [(0, antfu_exports.interopDefault)(import("./modern-RpY8mk7x.js")).then((pluginQuery) => pluginQuery.configs["flat/recommended"])];
291
+ return [interopPluginDefault(import("./modern-RpY8mk7x.js")).then((pluginQuery) => pluginQuery.configs["flat/recommended"])];
289
292
  }
290
293
  //#endregion
291
294
  //#region ../../node_modules/.pnpm/defu@6.1.7/node_modules/defu/dist/defu.mjs
@@ -677,7 +680,7 @@ function isComposer(value) {
677
680
  return !!value && typeof value === "object" && "toConfigs" in value && typeof value.toConfigs === "function";
678
681
  }
679
682
  function normalizeUserConfig(userConfig) {
680
- if (typeof userConfig?.then === "function") return Promise.resolve(userConfig).then((resolved) => {
683
+ if (typeof userConfig?.then === "function") return userConfig.then((resolved) => {
681
684
  return isComposer(resolved) ? resolved : normalizeResolvedUserConfig(resolved);
682
685
  });
683
686
  const resolvedUserConfig = userConfig;
@@ -1,20 +1,9 @@
1
- import { createRequire } from "node:module";
1
+ import "node:module";
2
2
  //#region \0rolldown/runtime.js
3
- var __create = Object.create;
4
3
  var __defProp = Object.defineProperty;
5
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __getProtoOf = Object.getPrototypeOf;
8
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
9
- var __esmMin = (fn, res, err) => () => {
10
- if (err) throw err[0];
11
- try {
12
- return fn && (res = fn(fn = 0)), res;
13
- } catch (e) {
14
- throw err = [e], e;
15
- }
16
- };
17
- var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
18
7
  var __exportAll = (all, no_symbols) => {
19
8
  let target = {};
20
9
  for (var name in all) __defProp(target, name, {
@@ -35,10 +24,5 @@ var __copyProps = (to, from, except, desc) => {
35
24
  return to;
36
25
  };
37
26
  var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
38
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
39
- value: mod,
40
- enumerable: true
41
- }) : target, mod));
42
- var __require = /* #__PURE__ */ (() => createRequire(import.meta.url))();
43
27
  //#endregion
44
- export { __require as a, __reExport as i, __esmMin as n, __toESM as o, __exportAll as r, __commonJSMin as t };
28
+ export { __reExport as n, __exportAll as t };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@icebreakers/eslint-config",
3
3
  "type": "module",
4
- "version": "7.0.0",
4
+ "version": "7.0.1",
5
5
  "description": "ESLint preset from Icebreaker's dev-configs",
6
6
  "author": "ice breaker <1324318532@qq.com>",
7
7
  "license": "MIT",
@@ -66,8 +66,8 @@
66
66
  "eslint-plugin-react-hooks": "^7.1.1",
67
67
  "eslint-plugin-react-refresh": "^0.5.3",
68
68
  "eslint-plugin-tailwindcss": "4.0.6",
69
- "eslint-plugin-better-stylelint": "2.0.0",
70
- "@icebreakers/stylelint-config": "5.0.1"
69
+ "@icebreakers/stylelint-config": "5.0.2",
70
+ "eslint-plugin-better-stylelint": "2.0.1"
71
71
  },
72
72
  "publishConfig": {
73
73
  "access": "public",
@@ -89,6 +89,9 @@
89
89
  "skipLibCheck": true
90
90
  }
91
91
  },
92
+ "devDependencies": {
93
+ "semver": "^7.8.5"
94
+ },
92
95
  "scripts": {
93
96
  "dev": "tsdown --watch --sourcemap",
94
97
  "build": "tsdown",