From f8e62863503df650dbb9e969d94a1033be56a4e4 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Sun, 16 Feb 2020 14:36:06 +0400 Subject: feat(typescript): no-misused-promises Signed-off-by: Valentin Popov --- ROADMAP.md | 2 +- src/rules/typescript/default.json | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ROADMAP.md b/ROADMAP.md index 75dbe3f..49f21b1 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -421,7 +421,7 @@ - [X] "no-inferrable-types" - [X] "no-magic-numbers" - [ ] "no-misused-new" -- [ ] "no-misused-promises" +- [X] "no-misused-promises" - [X] "no-namespace" - [ ] "no-non-null-asserted-optional-chain" - [ ] "no-non-null-assertion" diff --git a/src/rules/typescript/default.json b/src/rules/typescript/default.json index c7cca94..98c55db 100644 --- a/src/rules/typescript/default.json +++ b/src/rules/typescript/default.json @@ -70,6 +70,13 @@ "ignoreReadonlyClassProperties": true } ], + "@typescript-eslint/no-misused-promises": [ + "error", + { + "checksConditionals": true, + "checksVoidReturn": false + } + ], "@typescript-eslint/no-namespace": [ "error", { -- cgit v1.2.3