From 0b1811525f4ca2aa5c562de031b634cf90f5f0c1 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Fri, 14 Feb 2020 02:35:57 +0400 Subject: feat(eslint): Rule "yoda" Signed-off-by: Valentin Popov --- ROADMAP.md | 2 +- src/rules/default.json | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ROADMAP.md b/ROADMAP.md index 0441607..c8c4261 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -279,7 +279,7 @@ - [ ] "wrap-iife" - [ ] "wrap-regex" - [ ] "yield-star-spacing" -- [ ] "yoda" +- [X] "yoda" ## Import diff --git a/src/rules/default.json b/src/rules/default.json index 71e824c..79cb99b 100644 --- a/src/rules/default.json +++ b/src/rules/default.json @@ -549,5 +549,13 @@ { "requireStringLiterals": true } + ], + "yoda": [ + "error", + "never", + { + "exceptRange": false, + "onlyEquality": false + } ] } -- cgit v1.2.3