-
Notifications
You must be signed in to change notification settings - Fork 430
refactor: enable and fix fp/no-loops #2852
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
Conversation
5c26ce3 to
7f40631
Compare
|
All failing tests have been fixed. |
|
It seems that the @erezrokah What version of Also, I received a ESLint warning when using |
7f40631 to
9345c09
Compare
|
@erezrokah All tests are passing for the CI except on ubuntu-latest, bash, 10.x. The error seems to be in the |
The CLI supports Node.js >= 10.18.0, The optional chaining operator |
You can use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added a few more comments.
In general we should treat fp/no-loops as a guideline and not a strict rule, as sometimes it's better to have a for loop.
|
@erezrokah I've made all the requested changes and tested on Node.js 10 w/ |
1babb95 to
2a2daa1
Compare
…rEach loops with return
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
|
Thank you @erezrokah for merging my first PR in this repository. More PRs upcoming! |
|
Great work @tinfoil-knight, looking forward 👍 |
- Summary
See #1891
Enables the fp/no-loops for
eslint-plugin-fp.forEachor other array methods likemap,someoreverywherever appropriate.async/awaitdoesn't work with forEachPromise.allSettledis not supported below12.9.0(Can replace makingawait()requests in for loops)- Test plan
npx ava --serial --verboseran without any errors.