From 80f910bdb5e61d8face6538a37a8ee293404d7e1 Mon Sep 17 00:00:00 2001 From: Gao Sun Date: Thu, 18 Apr 2024 17:37:20 +0800 Subject: [PATCH] refactor: turn off `@typescript-eslint/no-unsafe-enum-comparison` (#160) --- .changeset/stupid-falcons-walk.md | 5 +++++ packages/eslint-config/index.js | 2 ++ 2 files changed, 7 insertions(+) create mode 100644 .changeset/stupid-falcons-walk.md diff --git a/.changeset/stupid-falcons-walk.md b/.changeset/stupid-falcons-walk.md new file mode 100644 index 0000000..c091c9d --- /dev/null +++ b/.changeset/stupid-falcons-walk.md @@ -0,0 +1,5 @@ +--- +"@silverhand/eslint-config": patch +--- + +turn off `@typescript-eslint/no-unsafe-enum-comparison` diff --git a/packages/eslint-config/index.js b/packages/eslint-config/index.js index dd74c43..42dab2a 100644 --- a/packages/eslint-config/index.js +++ b/packages/eslint-config/index.js @@ -327,6 +327,8 @@ module.exports = { }, ], '@typescript-eslint/no-explicit-any': 'error', + /** This brings more trouble than it solves. We have a lot of dynamic enum checks. */ + '@typescript-eslint/no-unsafe-enum-comparison': 'off', /** No need as we have exhaustiveness check */ 'default-case': 'off', },