Skip to content
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

Docs: Adds an example with try/catch. #9672

Merged
merged 2 commits into from Dec 1, 2017
Merged

Docs: Adds an example with try/catch. #9672

merged 2 commits into from Dec 1, 2017

Conversation

q42jaap
Copy link
Contributor

@q42jaap q42jaap commented Dec 1, 2017

What is the purpose of this pull request? (put an "X" next to item)

[x] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofixing to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:

What changes did you make? (Give an overview)
Clarifies with an example that return await inside an error handler is allowed by this rule.
The rule correctly implements this, but the docs didn't reflect that.

Is there anything you'd like reviewers to focus on?
The reason I added the example is because many developers will memorize return await is unnecessary. Having an error handler makes it necessary. Since this rule allows user to avoid unnecessary return await, it's probably a good thing to make them aware that sometimes it is required.

Clarifies with an example that `return await` inside an error handler is allowed by this rule.
@jsf-clabot
Copy link

jsf-clabot commented Dec 1, 2017

CLA assistant check
All committers have signed the CLA.

@aladdin-add aladdin-add added the documentation Relates to ESLint's documentation label Dec 1, 2017
Copy link
Member

@platinumazure platinumazure left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for contributing!

@ilyavolodin ilyavolodin merged commit cdb1488 into eslint:master Dec 1, 2017
@q42jaap q42jaap deleted the patch-1 branch December 1, 2017 16:20
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators May 31, 2018
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label May 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion documentation Relates to ESLint's documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants