diff --git a/@pob/eslint-config-typescript/lib/index.js b/@pob/eslint-config-typescript/lib/index.js index b1eabbd3..12892ee2 100644 --- a/@pob/eslint-config-typescript/lib/index.js +++ b/@pob/eslint-config-typescript/lib/index.js @@ -2,6 +2,7 @@ import pobConfig, { apply } from "@pob/eslint-config"; // eslint-disable-next-line import/no-unresolved -- missing exports support see https://gist.github.com/danielweck/cd63af8e9a8b3492abacc312af9f28fd for potential fix import tseslint from "typescript-eslint"; import allowImplicitReturnTypeConfig from "./overrides/allow-implicit-return-type.js"; +import allowUnsafeAsWarnConfig from "./overrides/allow-unsafe-as-warn.js"; import allowUnsafeConfig from "./overrides/allow-unsafe.js"; import appConfig from "./overrides/app.js"; import testConfig from "./overrides/test.js"; @@ -80,6 +81,10 @@ export default () => { configs: [allowUnsafeConfig], }), + allowUnsafeAsWarn: applyTs({ + configs: [allowUnsafeAsWarnConfig], + }), + app: applyTs({ configs: [appConfig], }), diff --git a/@pob/eslint-config-typescript/lib/overrides/allow-unsafe-as-warn.js b/@pob/eslint-config-typescript/lib/overrides/allow-unsafe-as-warn.js new file mode 100644 index 00000000..cd5b22a2 --- /dev/null +++ b/@pob/eslint-config-typescript/lib/overrides/allow-unsafe-as-warn.js @@ -0,0 +1,10 @@ +export default { + name: "@pob/eslint-config-typescript/allow-unsafe-as-warn", + rules: { + "@typescript-eslint/no-unsafe-argument": "warn", + "@typescript-eslint/no-unsafe-assignment": "warn", + "@typescript-eslint/no-unsafe-call": "warn", + "@typescript-eslint/no-unsafe-member-access": "warn", + "@typescript-eslint/no-unsafe-return": "warn", + }, +};