@icebreakers/eslint-config 4.0.11 → 4.0.12
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/{dist-3Yuo5ZWh.js → dist-BLNr96Ot.js} +64756 -46931
- package/dist/{dist-D2WUqnUR.cjs → dist-vhsLpsZM.cjs} +65328 -47503
- package/dist/index.cjs +22 -20
- package/dist/index.d.cts +262 -147
- package/dist/index.d.ts +262 -147
- package/dist/index.js +21 -20
- package/dist/{lib-VdWhDy2o.cjs → lib-nIW0bwj9.cjs} +17786 -17777
- package/dist/{lib-Du7EF351.js → lib-wc9RjYLN.js} +17758 -17749
- package/dist/{lib-ivfmw_L0.cjs → minimatch-1bbaDA5a.cjs} +774 -0
- package/dist/{lib-COpZ8-nd.js → minimatch-Ba4IycII.js} +770 -2
- package/dist/{modern-D06QebMM.cjs → modern-BlDFWU8k.cjs} +2 -2
- package/dist/{modern-DE63O_Ru.js → modern-DnYnDvqZ.js} +2 -2
- package/package.json +15 -10
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_chunk = require("./chunk-BrWF7lJc.cjs");
|
|
3
|
+
let _e18e_eslint_plugin = require("@e18e/eslint-plugin");
|
|
4
|
+
_e18e_eslint_plugin = require_chunk.__toESM(_e18e_eslint_plugin, 1);
|
|
3
5
|
let node_path = require("node:path");
|
|
4
6
|
node_path = require_chunk.__toESM(node_path, 1);
|
|
5
7
|
let node_process = require("node:process");
|
|
@@ -263,10 +265,10 @@ function resolveMdxPresets(isEnabled) {
|
|
|
263
265
|
function resolveAccessibilityPresets(isEnabled, vueOption, reactOption) {
|
|
264
266
|
if (!isEnabled) return [];
|
|
265
267
|
const presets = [];
|
|
266
|
-
if (vueOption && hasAllPackages(VUE_A11Y_PACKAGES)) presets.push((0, antfu_exports.interopDefault)(Promise.resolve().then(() => /* @__PURE__ */ require_chunk.__toESM(require("./dist-
|
|
268
|
+
if (vueOption && hasAllPackages(VUE_A11Y_PACKAGES)) presets.push((0, antfu_exports.interopDefault)(Promise.resolve().then(() => /* @__PURE__ */ require_chunk.__toESM(require("./dist-vhsLpsZM.cjs").default, 1))).then((pluginVueA11y) => {
|
|
267
269
|
return pluginVueA11y.configs["flat/recommended"];
|
|
268
270
|
}));
|
|
269
|
-
if (reactOption && hasAllPackages(REACT_A11Y_PACKAGES)) presets.push((0, antfu_exports.interopDefault)(Promise.resolve().then(() => /* @__PURE__ */ require_chunk.__toESM(require("./lib-
|
|
271
|
+
if (reactOption && hasAllPackages(REACT_A11Y_PACKAGES)) presets.push((0, antfu_exports.interopDefault)(Promise.resolve().then(() => /* @__PURE__ */ require_chunk.__toESM(require("./lib-nIW0bwj9.cjs").default, 1))).then((jsxA11y) => {
|
|
270
272
|
return jsxA11y.flatConfigs.recommended;
|
|
271
273
|
}));
|
|
272
274
|
return presets;
|
|
@@ -281,7 +283,7 @@ function resolveNestPresets(isEnabled) {
|
|
|
281
283
|
function resolveQueryPresets(isEnabled) {
|
|
282
284
|
if (!isEnabled) return [];
|
|
283
285
|
if (!hasAllPackages(QUERY_PACKAGES)) return [];
|
|
284
|
-
return [(0, antfu_exports.interopDefault)(Promise.resolve().then(() => require("./modern-
|
|
286
|
+
return [(0, antfu_exports.interopDefault)(Promise.resolve().then(() => require("./modern-BlDFWU8k.cjs"))).then((pluginQuery) => pluginQuery.configs["flat/recommended"])];
|
|
285
287
|
}
|
|
286
288
|
//#endregion
|
|
287
289
|
//#region ../../node_modules/.pnpm/defu@6.1.7/node_modules/defu/dist/defu.mjs
|
|
@@ -311,23 +313,12 @@ function createDefu(merger) {
|
|
|
311
313
|
return (...arguments_) => arguments_.reduce((p, c) => _defu(p, c, "", merger), {});
|
|
312
314
|
}
|
|
313
315
|
const defu = createDefu();
|
|
314
|
-
createDefu((object, key, currentValue) => {
|
|
315
|
-
if (object[key] !== void 0 && typeof currentValue === "function") {
|
|
316
|
-
object[key] = currentValue(object[key]);
|
|
317
|
-
return true;
|
|
318
|
-
}
|
|
319
|
-
});
|
|
320
|
-
createDefu((object, key, currentValue) => {
|
|
321
|
-
if (Array.isArray(object[key]) && typeof currentValue === "function") {
|
|
322
|
-
object[key] = currentValue(object[key]);
|
|
323
|
-
return true;
|
|
324
|
-
}
|
|
325
|
-
});
|
|
326
316
|
//#endregion
|
|
327
317
|
//#region src/options.ts
|
|
328
318
|
const BASE_DEFAULTS = {
|
|
329
319
|
formatters: true,
|
|
330
320
|
pnpm: false,
|
|
321
|
+
react: false,
|
|
331
322
|
javascript: { overrides: {
|
|
332
323
|
"curly": ["error", "all"],
|
|
333
324
|
"no-console": ["warn"]
|
|
@@ -336,7 +327,7 @@ const BASE_DEFAULTS = {
|
|
|
336
327
|
};
|
|
337
328
|
const BASE_RULES = {
|
|
338
329
|
"dot-notation": "off",
|
|
339
|
-
"e18e/ban-dependencies":
|
|
330
|
+
"e18e/ban-dependencies": "off",
|
|
340
331
|
"e18e/prefer-array-to-sorted": "off",
|
|
341
332
|
"pnpm/json-enforce-catalog": "off",
|
|
342
333
|
"pnpm/json-prefer-workspace-settings": "off",
|
|
@@ -676,9 +667,10 @@ function isComposer(value) {
|
|
|
676
667
|
return !!value && typeof value === "object" && "toConfigs" in value && typeof value.toConfigs === "function";
|
|
677
668
|
}
|
|
678
669
|
function normalizeUserConfig(userConfig) {
|
|
679
|
-
if (typeof userConfig?.then === "function") return
|
|
670
|
+
if (typeof userConfig?.then === "function") return (async () => {
|
|
671
|
+
const resolved = await userConfig;
|
|
680
672
|
return isComposer(resolved) ? resolved : normalizeResolvedUserConfig(resolved);
|
|
681
|
-
});
|
|
673
|
+
})();
|
|
682
674
|
const resolvedUserConfig = userConfig;
|
|
683
675
|
return isComposer(resolvedUserConfig) ? resolvedUserConfig : normalizeResolvedUserConfig(resolvedUserConfig);
|
|
684
676
|
}
|
|
@@ -737,15 +729,25 @@ function applyOxfmtFormatterOverrides(composer, formatters) {
|
|
|
737
729
|
} });
|
|
738
730
|
return nextComposer;
|
|
739
731
|
}
|
|
732
|
+
function applyAntfuV7PluginCompatibility(composer) {
|
|
733
|
+
if (typeof composer.prepend !== "function") return composer;
|
|
734
|
+
return composer.prepend({
|
|
735
|
+
name: "icebreaker/antfu-v7-plugin-compat",
|
|
736
|
+
plugins: { e18e: _e18e_eslint_plugin.default }
|
|
737
|
+
}).append({
|
|
738
|
+
name: "icebreaker/react-type-info-compat",
|
|
739
|
+
rules: { "react/no-implicit-key": "off" }
|
|
740
|
+
});
|
|
741
|
+
}
|
|
740
742
|
function icebreaker(options = {}, ...userConfigs) {
|
|
741
743
|
const [resolved, ...presets] = getPresets(options);
|
|
742
744
|
const normalized = normalizeUnoCssOptions(normalizeOptionalAntfuFeatures(resolved));
|
|
743
|
-
return applyOxfmtFormatterOverrides((0, antfu_exports.antfu)(toAntfuOptions(normalized), ...presets, ...userConfigs.map(normalizeUserConfig)), normalized.formatters);
|
|
745
|
+
return applyOxfmtFormatterOverrides(applyAntfuV7PluginCompatibility((0, antfu_exports.antfu)(toAntfuOptions(normalized), ...presets, ...userConfigs.map(normalizeUserConfig))), normalized.formatters);
|
|
744
746
|
}
|
|
745
747
|
function icebreakerLegacy(options = {}, ...userConfigs) {
|
|
746
748
|
const [resolved, ...presets] = getPresets(options, "legacy");
|
|
747
749
|
const normalized = normalizeUnoCssOptions(normalizeOptionalAntfuFeatures(resolved));
|
|
748
|
-
return applyOxfmtFormatterOverrides((0, antfu_exports.antfu)(toAntfuOptions(normalized), ...presets, ...userConfigs.map(normalizeUserConfig)), normalized.formatters);
|
|
750
|
+
return applyOxfmtFormatterOverrides(applyAntfuV7PluginCompatibility((0, antfu_exports.antfu)(toAntfuOptions(normalized), ...presets, ...userConfigs.map(normalizeUserConfig))), normalized.formatters);
|
|
749
751
|
}
|
|
750
752
|
//#endregion
|
|
751
753
|
exports.getPresets = getPresets;
|