Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upEnable rule "promise/catch-or-return"? #1322
Comments
This comment has been minimized.
This comment has been minimized.
|
I think this sounds very good, we should run a test and see how many packages it would break |
This comment has been minimized.
This comment has been minimized.
|
@LinusU: Agree, that would be nice. How does one run such a test? Someone who has a setup for that? |
This comment has been minimized.
This comment has been minimized.
|
We should really write this down somewhere
|
This comment has been minimized.
This comment has been minimized.
|
Result:
Most with a single or two failing lines. Of the two that I looked closer at it seems to be that the final Two examples: |
This comment has been minimized.
This comment has been minimized.
|
Could you post the entire list of failing repos, then we can start sending PRs |
This comment has been minimized.
This comment has been minimized.
|
Here's all the errors:
|
This comment has been minimized.
This comment has been minimized.
|
Thank you! Cleaned it up a bit here:
|
LinusU
referenced
this issue
in LinusU/node-fs-extra
Aug 27, 2018
LinusU
referenced
this issue
in LinusU/karma-browserstack-launcher
Aug 27, 2018
LinusU
referenced
this issue
in LinusU/parse-torrent
Aug 27, 2018
This comment has been minimized.
This comment has been minimized.
This seems like something that belongs in CONTRIBUTING.md :) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Here's an up to date run 11 failing projects, 6.7% of total
|
voxpelli
referenced
this issue
in voxpelli/eslint-config-standard
Jul 6, 2019
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@voxpelli That test run doesn't look too bad. If you have time, one thing that would help is sending PRs to the failing repos to fix the issues. That makes it less work for me to add the rule when the time comes (less code for me to change while working on the release; and fewer repos to mark as "disabled" in order to keep the tests passing) |
This comment has been minimized.
This comment has been minimized.
|
I'm definitely down to try enabling this with Regarding the |
feross
transferred this issue from standard/eslint-config-standard
Jul 11, 2019
feross
added
the
accepted
label
Jul 11, 2019
feross
added this to the standard v14 milestone
Jul 11, 2019
This comment has been minimized.
This comment has been minimized.
If the functions |
voxpelli commentedAug 22, 2018
In
12.0.0(#123) it could be useful to add the promise/catch-or-return to help people catch the cases where one might have missed acatch()orreturn?Especially as
unhandledRejectionis deprecated and will start throwing.Thoughts?