@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.
- package/dist/cli/index.cjs +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/index.cjs +7 -4
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +7 -4
- package/package.json +1 -1
package/dist/cli/index.cjs
CHANGED
package/dist/cli/index.js
CHANGED
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
|
}
|