@dhzh/eslint-config 1.2.0 → 1.3.0

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.2.0";
31
+ var version = "1.3.0";
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.2.0";
7
+ var version = "1.3.0";
8
8
  var package_default = {
9
9
  name: "@dhzh/eslint-config",
10
10
  type: "module",
package/dist/index.cjs CHANGED
@@ -524,7 +524,7 @@ function stylistic(options = {}) {
524
524
  var import_node_process = __toESM(require("process"), 1);
525
525
  var import_typescript_eslint = __toESM(require("typescript-eslint"), 1);
526
526
  function typescript(options = {}) {
527
- const { overrides = {} } = options;
527
+ const { overrides = {}, typeSafe = false } = options;
528
528
  return [
529
529
  ...import_typescript_eslint.default.config(
530
530
  import_typescript_eslint.default.configs.base,
@@ -573,9 +573,6 @@ function typescript(options = {}) {
573
573
  ],
574
574
  "@typescript-eslint/no-non-null-assertion": "off",
575
575
  "@typescript-eslint/ban-ts-comment": "off",
576
- "@typescript-eslint/no-unsafe-assignment": "off",
577
- "@typescript-eslint/no-unsafe-member-access": "off",
578
- "@typescript-eslint/no-unsafe-call": "off",
579
576
  "@typescript-eslint/no-explicit-any": "off",
580
577
  "@typescript-eslint/no-non-null-asserted-optional-chain": "warn",
581
578
  "@typescript-eslint/await-thenable": "error",
@@ -601,6 +598,12 @@ function typescript(options = {}) {
601
598
  }
602
599
  ],
603
600
  "@typescript-eslint/prefer-nullish-coalescing": "off",
601
+ ...typeSafe ? {} : {
602
+ "@typescript-eslint/no-unsafe-assignment": "off",
603
+ "@typescript-eslint/no-unsafe-member-access": "off",
604
+ "@typescript-eslint/no-unsafe-call": "off",
605
+ "@typescript-eslint/no-unsafe-return": "off"
606
+ },
604
607
  ...overrides
605
608
  }
606
609
  }
package/dist/index.d.cts CHANGED
@@ -132,6 +132,7 @@ interface IReactConfigsOptions {
132
132
  interface IStylisticConfigsOptions extends IConfigsOptions {
133
133
  }
134
134
  interface ITypescriptConfigsOptions extends IConfigsOptions {
135
+ typeSafe?: boolean;
135
136
  }
136
137
  interface IJavascriptConfigsOptions extends IConfigsOptions {
137
138
  }
package/dist/index.d.ts CHANGED
@@ -132,6 +132,7 @@ interface IReactConfigsOptions {
132
132
  interface IStylisticConfigsOptions extends IConfigsOptions {
133
133
  }
134
134
  interface ITypescriptConfigsOptions extends IConfigsOptions {
135
+ typeSafe?: boolean;
135
136
  }
136
137
  interface IJavascriptConfigsOptions extends IConfigsOptions {
137
138
  }
package/dist/index.js CHANGED
@@ -488,7 +488,7 @@ function stylistic(options = {}) {
488
488
  import process from "node:process";
489
489
  import tseslint from "typescript-eslint";
490
490
  function typescript(options = {}) {
491
- const { overrides = {} } = options;
491
+ const { overrides = {}, typeSafe = false } = options;
492
492
  return [
493
493
  ...tseslint.config(
494
494
  tseslint.configs.base,
@@ -537,9 +537,6 @@ function typescript(options = {}) {
537
537
  ],
538
538
  "@typescript-eslint/no-non-null-assertion": "off",
539
539
  "@typescript-eslint/ban-ts-comment": "off",
540
- "@typescript-eslint/no-unsafe-assignment": "off",
541
- "@typescript-eslint/no-unsafe-member-access": "off",
542
- "@typescript-eslint/no-unsafe-call": "off",
543
540
  "@typescript-eslint/no-explicit-any": "off",
544
541
  "@typescript-eslint/no-non-null-asserted-optional-chain": "warn",
545
542
  "@typescript-eslint/await-thenable": "error",
@@ -565,6 +562,12 @@ function typescript(options = {}) {
565
562
  }
566
563
  ],
567
564
  "@typescript-eslint/prefer-nullish-coalescing": "off",
565
+ ...typeSafe ? {} : {
566
+ "@typescript-eslint/no-unsafe-assignment": "off",
567
+ "@typescript-eslint/no-unsafe-member-access": "off",
568
+ "@typescript-eslint/no-unsafe-call": "off",
569
+ "@typescript-eslint/no-unsafe-return": "off"
570
+ },
568
571
  ...overrides
569
572
  }
570
573
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dhzh/eslint-config",
3
3
  "type": "module",
4
- "version": "1.2.0",
4
+ "version": "1.3.0",
5
5
  "description": "Lyle's ESLint config",
6
6
  "author": {
7
7
  "name": "Lyle Zheng",