diff options
author | Valentin Popov <info@valentineus.link> | 2020-02-14 01:35:57 +0300 |
---|---|---|
committer | Valentin Popov <info@valentineus.link> | 2020-02-14 01:35:57 +0300 |
commit | 0b1811525f4ca2aa5c562de031b634cf90f5f0c1 (patch) | |
tree | af548570c9611ce0a8ded3137b43a4267212fbf3 | |
parent | 273e1d7ed18e90484d6d9a52e2533d1d90447c9e (diff) | |
download | eslint-config-0b1811525f4ca2aa5c562de031b634cf90f5f0c1.tar.xz eslint-config-0b1811525f4ca2aa5c562de031b634cf90f5f0c1.zip |
feat(eslint): Rule "yoda"
Signed-off-by: Valentin Popov <info@valentineus.link>
-rw-r--r-- | ROADMAP.md | 2 | ||||
-rw-r--r-- | src/rules/default.json | 8 |
2 files changed, 9 insertions, 1 deletions
@@ -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 + } ] } |