From 320dab004aa7fb166b73329a11872f8935135e4e Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Thu, 13 Feb 2020 23:46:58 +0400 Subject: feat(eslint): Rule "no-unneeded-ternary" Signed-off-by: Valentin Popov --- ROADMAP.md | 2 +- src/rules/default.json | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ROADMAP.md b/ROADMAP.md index a484a05..e50f86b 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -199,7 +199,7 @@ - [X] "no-underscore-dangle" - [ ] "no-unexpected-multiline" - [ ] "no-unmodified-loop-condition" -- [ ] "no-unneeded-ternary" +- [X] "no-unneeded-ternary" - [ ] "no-unreachable" - [ ] "no-unsafe-finally" - [ ] "no-unsafe-negation" diff --git a/src/rules/default.json b/src/rules/default.json index dc3a90a..7a6f64b 100644 --- a/src/rules/default.json +++ b/src/rules/default.json @@ -254,6 +254,12 @@ "enforceInMethodNames": false } ], + "no-unneeded-ternary": [ + "error", + { + "defaultAssignment": true + } + ], "no-unused-vars": [ "error", { -- cgit v1.2.3