Skip to content

Commit

Permalink
New rule: No default assignment with ternary operator
Browse files Browse the repository at this point in the history
This is no longer allowed:

var a = x ? x : 1

In favor of:

var a = x || 1
  • Loading branch information
feross committed Sep 16, 2015
1 parent 6e5025e commit 0903c19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 0903c19

Please sign in to comment.