Skip to content

Commit

Permalink
feat: add allowUnsafeAsWarn
Browse files Browse the repository at this point in the history
  • Loading branch information
christophehurpeau committed Dec 17, 2024
1 parent 2c09ab9 commit 66ee0e8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions @pob/eslint-config-typescript/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -80,6 +81,10 @@ export default () => {
configs: [allowUnsafeConfig],
}),

allowUnsafeAsWarn: applyTs({
configs: [allowUnsafeAsWarnConfig],
}),

app: applyTs({
configs: [appConfig],
}),
Expand Down
Original file line number Diff line number Diff line change
@@ -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",
},
};

0 comments on commit 66ee0e8

Please sign in to comment.