From 0903c19ca6a8bc0c8625c41ca844ee69968bf948 Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Wed, 16 Sep 2015 13:42:26 -0700 Subject: [PATCH] New rule: No default assignment with ternary operator This is no longer allowed: var a = x ? x : 1 In favor of: var a = x || 1 --- eslintrc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eslintrc.json b/eslintrc.json index 296efdb5..2c786131 100644 --- a/eslintrc.json +++ b/eslintrc.json @@ -99,7 +99,7 @@ "no-undef": 2, "no-undef-init": 2, "no-unexpected-multiline": 2, - "no-unneeded-ternary": 2, + "no-unneeded-ternary": [2, { "defaultAssignment": false }], "no-unreachable": 2, "no-unused-vars": [2, { "vars": "all", "args": "none" }], "no-useless-call": 2,