Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
Open
Description
There are some function calls where the return value should not be ignored (like some, indexOf, concat, map, etc.) or the function call doesn't make sense. Would be nice to cover this with the no-unused-expressions lint. I did test the snippets below on current master, they both don't fail.
functionfoo(arr){if(arr){arr.some(el=='myval');// should be: return arr.some(el == 'myval');}returnundefined;}
functionfoo(arr){varmerged=arr.reduce(function(a,b){a.concat(b);// should be: return a.concat(b);});}