-
-
Notifications
You must be signed in to change notification settings - Fork 362
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
Rule proposal: Prefer array last
methods over reverse
#2417
Labels
Comments
Name: |
Accepted. |
array.toReversed().find(logic);
array.toReversed().findIndex(logic);
array.toReversed().indexOf(logic);
array.toReversed().reduce(logic); |
Before node 18.x is deprecated, the current solution is more suitable #2428 (comment) |
@fisker I now added them to the "fail" examples above |
fregante
changed the title
Rule proposal: Prefer array last methods over reverse
Rule proposal: Prefer array Sep 3, 2024
last
methods over reverse
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
It was mentioned in #1323 but it was closed in favor of
prefer-array-find
, which only coveredfilter
instead.Fail
Pass
Proposed rule name
avoid-array-reverse
Additional Info
No response
The text was updated successfully, but these errors were encountered: