eslint-config-setup 0.3.1 → 0.3.2

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.
@@ -526,7 +526,6 @@ export default [
526
526
  "sonarjs/prefer-single-boolean-return": "error",
527
527
  "sonarjs/reduce-initial-value": "error",
528
528
  "symbol-description": "error",
529
- "unicorn/better-regex": "error",
530
529
  "unicorn/catch-error-name": [
531
530
  "error",
532
531
  {
package/dist/modules.js CHANGED
@@ -1798,9 +1798,11 @@ function unicornConfig() {
1798
1798
  // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-type-error.md
1799
1799
  "unicorn/prefer-type-error": "error",
1800
1800
  // ── Regex ─────────────────────────────────────────────────────
1801
- // Simplify regex patterns auto-fixable regex optimization
1802
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/better-regex.md
1803
- "unicorn/better-regex": "error",
1801
+ // Disabled conflicts with regexp/strict from eslint-plugin-regexp.
1802
+ // Both rules auto-fix regex escaping but disagree on whether characters
1803
+ // like { } ] should be escaped, causing circular fixes.
1804
+ // regexp/strict is the more thorough rule, so we defer to it.
1805
+ "unicorn/better-regex": "off",
1804
1806
  // ── Misc ──────────────────────────────────────────────────────
1805
1807
  // Enforce `error` name in catch blocks — consistent naming
1806
1808
  // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/catch-error-name.md
@@ -2286,40 +2288,26 @@ function standardComplexity() {
2286
2288
  import oxlintPlugin from "eslint-plugin-oxlint";
2287
2289
  function oxlintIntegration(opts) {
2288
2290
  const typedPlugin = oxlintPlugin;
2289
- const configs = [
2290
- {
2291
- name: "eslint-config-setup/oxlint",
2292
- ...typedPlugin.configs["flat/recommended"]
2291
+ const configs = [];
2292
+ const add = (configName, blockName) => {
2293
+ const raw = typedPlugin.configs[configName];
2294
+ const items = Array.isArray(raw) ? raw : [raw];
2295
+ for (const item of items) {
2296
+ configs.push({ name: `eslint-config-setup/${blockName}`, ...item });
2293
2297
  }
2294
- ];
2298
+ };
2299
+ add("flat/recommended", "oxlint");
2295
2300
  if (opts.react) {
2296
- configs.push({
2297
- name: "eslint-config-setup/oxlint-react",
2298
- ...typedPlugin.configs["flat/react"]
2299
- }, {
2300
- name: "eslint-config-setup/oxlint-jsx-a11y",
2301
- ...typedPlugin.configs["flat/jsx-a11y"]
2302
- });
2301
+ add("flat/react", "oxlint-react");
2302
+ add("flat/jsx-a11y", "oxlint-jsx-a11y");
2303
2303
  }
2304
2304
  if (opts.node) {
2305
- configs.push({
2306
- name: "eslint-config-setup/oxlint-node",
2307
- ...typedPlugin.configs["flat/node"]
2308
- });
2305
+ add("flat/node", "oxlint-node");
2309
2306
  }
2310
- configs.push({
2311
- name: "eslint-config-setup/oxlint-typescript",
2312
- ...typedPlugin.configs["flat/typescript"]
2313
- }, {
2314
- name: "eslint-config-setup/oxlint-unicorn",
2315
- ...typedPlugin.configs["flat/unicorn"]
2316
- }, {
2317
- name: "eslint-config-setup/oxlint-import",
2318
- ...typedPlugin.configs["flat/import"]
2319
- }, {
2320
- name: "eslint-config-setup/oxlint-jsdoc",
2321
- ...typedPlugin.configs["flat/jsdoc"]
2322
- });
2307
+ add("flat/typescript", "oxlint-typescript");
2308
+ add("flat/unicorn", "oxlint-unicorn");
2309
+ add("flat/import", "oxlint-import");
2310
+ add("flat/jsdoc", "oxlint-jsdoc");
2323
2311
  return configs;
2324
2312
  }
2325
2313