@dhzh/eslint-config 1.11.0 → 1.12.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.
@@ -28,7 +28,7 @@ var import_ansis5 = __toESM(require("ansis"), 1);
28
28
  var import_cac = require("cac");
29
29
 
30
30
  // package.json
31
- var version = "1.11.0";
31
+ var version = "1.12.1";
32
32
  var package_default = {
33
33
  name: "@dhzh/eslint-config",
34
34
  type: "module",
package/dist/cli/index.js CHANGED
@@ -4,7 +4,7 @@ import c4 from "ansis";
4
4
  import { cac } from "cac";
5
5
 
6
6
  // package.json
7
- var version = "1.11.0";
7
+ var version = "1.12.1";
8
8
  var package_default = {
9
9
  name: "@dhzh/eslint-config",
10
10
  type: "module",
package/dist/index.cjs CHANGED
@@ -660,6 +660,12 @@ function typescript(options = {}) {
660
660
  }
661
661
  ],
662
662
  "@typescript-eslint/prefer-nullish-coalescing": "off",
663
+ "@typescript-eslint/no-confusing-void-expression": [
664
+ "error",
665
+ {
666
+ ignoreArrowShorthand: true
667
+ }
668
+ ],
663
669
  ...typeSafe ? {} : {
664
670
  "@typescript-eslint/no-unsafe-assignment": "off",
665
671
  "@typescript-eslint/no-unsafe-member-access": "off",
@@ -1023,6 +1029,7 @@ var import_eslint_plugin_jsonc = __toESM(require("eslint-plugin-jsonc"), 1);
1023
1029
  var import_eslint_plugin_package_json = __toESM(require("eslint-plugin-package-json"), 1);
1024
1030
  var import_jsonc_eslint_parser = __toESM(require("jsonc-eslint-parser"), 1);
1025
1031
  var import_eslint_plugin_hyoban2 = __toESM(require("eslint-plugin-hyoban"), 1);
1032
+ var import_local_pkg2 = require("local-pkg");
1026
1033
  function json(options = {}) {
1027
1034
  const { overrides = { core: {}, packageJson: {} }, indent = 2 } = options;
1028
1035
  return [
@@ -1174,6 +1181,7 @@ function json(options = {}) {
1174
1181
  ]
1175
1182
  }
1176
1183
  ],
1184
+ "package-json/require-types": (0, import_local_pkg2.isPackageExists)("@nestjs/core") ? "off" : "error",
1177
1185
  ...overrides.packageJson
1178
1186
  }
1179
1187
  }
@@ -1500,10 +1508,10 @@ function format(options = {}) {
1500
1508
 
1501
1509
  // src/configs/tailwindcss.ts
1502
1510
  var import_eslint_plugin_tailwindcss = __toESM(require("eslint-plugin-tailwindcss"), 1);
1503
- var import_local_pkg2 = require("local-pkg");
1511
+ var import_local_pkg3 = require("local-pkg");
1504
1512
  function tailwindcss(options = {}) {
1505
1513
  const { overrides = {} } = options;
1506
- return (0, import_local_pkg2.isPackageExists)("tailwindcss") ? [
1514
+ return (0, import_local_pkg3.isPackageExists)("tailwindcss") ? [
1507
1515
  ...import_eslint_plugin_tailwindcss.default.configs["flat/recommended"].map((item) => ({
1508
1516
  ...item,
1509
1517
  name: `${RULE_PREFIX}/tailwindcss/shared/${item.name?.replace("tailwindcss:", "")}`,
@@ -1522,10 +1530,10 @@ function tailwindcss(options = {}) {
1522
1530
 
1523
1531
  // src/configs/unocss.ts
1524
1532
  var import_flat = __toESM(require("@unocss/eslint-config/flat"), 1);
1525
- var import_local_pkg3 = require("local-pkg");
1533
+ var import_local_pkg4 = require("local-pkg");
1526
1534
  function unocss(options = {}) {
1527
1535
  const { overrides = {} } = options;
1528
- const isUnocssEnabled = (0, import_local_pkg3.isPackageExists)("unocss");
1536
+ const isUnocssEnabled = (0, import_local_pkg4.isPackageExists)("unocss");
1529
1537
  if (!isUnocssEnabled) {
1530
1538
  return [];
1531
1539
  }
package/dist/index.js CHANGED
@@ -624,6 +624,12 @@ function typescript(options = {}) {
624
624
  }
625
625
  ],
626
626
  "@typescript-eslint/prefer-nullish-coalescing": "off",
627
+ "@typescript-eslint/no-confusing-void-expression": [
628
+ "error",
629
+ {
630
+ ignoreArrowShorthand: true
631
+ }
632
+ ],
627
633
  ...typeSafe ? {} : {
628
634
  "@typescript-eslint/no-unsafe-assignment": "off",
629
635
  "@typescript-eslint/no-unsafe-member-access": "off",
@@ -987,6 +993,7 @@ import pluginJsonc from "eslint-plugin-jsonc";
987
993
  import pluginPackageJson from "eslint-plugin-package-json";
988
994
  import parserJsonc from "jsonc-eslint-parser";
989
995
  import pluginHyoban2 from "eslint-plugin-hyoban";
996
+ import { isPackageExists as isPackageExists2 } from "local-pkg";
990
997
  function json(options = {}) {
991
998
  const { overrides = { core: {}, packageJson: {} }, indent = 2 } = options;
992
999
  return [
@@ -1138,6 +1145,7 @@ function json(options = {}) {
1138
1145
  ]
1139
1146
  }
1140
1147
  ],
1148
+ "package-json/require-types": isPackageExists2("@nestjs/core") ? "off" : "error",
1141
1149
  ...overrides.packageJson
1142
1150
  }
1143
1151
  }
@@ -1464,10 +1472,10 @@ function format(options = {}) {
1464
1472
 
1465
1473
  // src/configs/tailwindcss.ts
1466
1474
  import pluginTailwindcss from "eslint-plugin-tailwindcss";
1467
- import { isPackageExists as isPackageExists2 } from "local-pkg";
1475
+ import { isPackageExists as isPackageExists3 } from "local-pkg";
1468
1476
  function tailwindcss(options = {}) {
1469
1477
  const { overrides = {} } = options;
1470
- return isPackageExists2("tailwindcss") ? [
1478
+ return isPackageExists3("tailwindcss") ? [
1471
1479
  ...pluginTailwindcss.configs["flat/recommended"].map((item) => ({
1472
1480
  ...item,
1473
1481
  name: `${RULE_PREFIX}/tailwindcss/shared/${item.name?.replace("tailwindcss:", "")}`,
@@ -1486,10 +1494,10 @@ function tailwindcss(options = {}) {
1486
1494
 
1487
1495
  // src/configs/unocss.ts
1488
1496
  import configUnocss from "@unocss/eslint-config/flat";
1489
- import { isPackageExists as isPackageExists3 } from "local-pkg";
1497
+ import { isPackageExists as isPackageExists4 } from "local-pkg";
1490
1498
  function unocss(options = {}) {
1491
1499
  const { overrides = {} } = options;
1492
- const isUnocssEnabled = isPackageExists3("unocss");
1500
+ const isUnocssEnabled = isPackageExists4("unocss");
1493
1501
  if (!isUnocssEnabled) {
1494
1502
  return [];
1495
1503
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dhzh/eslint-config",
3
3
  "type": "module",
4
- "version": "1.11.0",
4
+ "version": "1.12.1",
5
5
  "description": "Lyle's ESLint config",
6
6
  "author": {
7
7
  "name": "Lyle Zheng",