-
-
Notifications
You must be signed in to change notification settings - Fork 30
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-tacit
: regression on method calls
#805
Comments
Looks like regex methods require a |
Note: if you do want to use the tacit version, you can with help from const regex = /a/;
[''].filter(regex.test.bind(regex)); |
When checking a member function, add a bind to any suggestions. fix #805
I added a new option |
Perfect, thanks! |
Bug Report
Regression introduced in #801:
prefer-tacit
reports on[''].filter(str => /a/.test(str))
.Expected behavior
No errors reported, since changing to
[''].filter(/a/.test)
causes a JavaScript error.Actual behavior
No reports by
prefer-tacit
.The text was updated successfully, but these errors were encountered: