-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
prefer-reject does not warn on simple variable comparisons #104
Comments
I'm not sure, but maybe when you're comparing the iteratee with something using Good point about the docs for maximum path length in |
Hi, _.filter(users, function(user) {
return user.name !== 'Bob';
}); Can be shortened to _.reject(users, {name: 'Bob'}); But, unless you have a curried Do you see any reason for this rule to warn in that case? Also, I agree about the docs for this rule being vague. |
The docs say:
So I was expecting this to warn:
FWIW I do think it's clearer to write this in terms of |
Actually, if _.without(users, 'Bob') I'd suggest a |
This produces a warning:
This, however, does not:
I've also experimented with different values of maximum path length in my .estlintrc.json test:
None seem to change the behaviour (though I don't understand quite what this setting is for).
The text was updated successfully, but these errors were encountered: