ESLint Config Migration: Turn off consistent-return from linting rules#1049
ESLint Config Migration: Turn off consistent-return from linting rules#1049filmaj wants to merge 1 commit intotslint-to-eslintfrom
Conversation
…ise code, it can be a pain to adhere to the rule
cdd772e to
d45eed4
Compare
|
For other use cases described in the rule document, I still see some value in consistent-return. Thus, I would like to explore alternative ways to avoid disabling this rule to all the code in the repo. However, I'm also not sure about the ways to settle this lint error in the |
|
@seratch that sounds good. There are 9 occurrences of this rule failing, and from what I could tell, they are all in the various I think one possible solution would be to ensure that both the |
|
Sounds great! Thanks for your careful work here. |
|
Closing in favour of #1075 |
Summary
This is a PR that should be merged into #1024 and incrementally addresses #842.
This PR turns off the
consistent-returnrule.In mixed async + Promise code, it can be a pain to adhere to the rule. For an example, see the
stopmethod ofHTTPReceiver.ts. Both the outerPromiseas well as the innerserver.closemethods raise the following lint failure:What does everyone think? Is there a better way to implement the
stopmethod without violating this rule?Impact
Before
After
Requirements (place an
xin each[ ])