aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValentin Popov <info@valentineus.link>2020-02-14 01:35:57 +0300
committerValentin Popov <info@valentineus.link>2020-02-14 01:35:57 +0300
commit0b1811525f4ca2aa5c562de031b634cf90f5f0c1 (patch)
treeaf548570c9611ce0a8ded3137b43a4267212fbf3
parent273e1d7ed18e90484d6d9a52e2533d1d90447c9e (diff)
downloadeslint-config-0b1811525f4ca2aa5c562de031b634cf90f5f0c1.tar.xz
eslint-config-0b1811525f4ca2aa5c562de031b634cf90f5f0c1.zip
feat(eslint): Rule "yoda"
Signed-off-by: Valentin Popov <info@valentineus.link>
-rw-r--r--ROADMAP.md2
-rw-r--r--src/rules/default.json8
2 files changed, 9 insertions, 1 deletions
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
+ }
]
}