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

update no-throw to not allow Promise.reject() #116

Merged
merged 2 commits into from
Feb 13, 2019
Merged

update no-throw to not allow Promise.reject() #116

merged 2 commits into from
Feb 13, 2019

Conversation

sbdchd
Copy link
Contributor

@sbdchd sbdchd commented Feb 12, 2019

We currently ban throw inside async functions and Promise.reject()
is another form of async throw.

rel: #115

We currently ban `throw` inside async functions and `Promise.reject()`
is another form or async throw.
@codecov
Copy link

codecov bot commented Feb 12, 2019

Codecov Report

Merging #116 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #116   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          15     15           
  Lines         353    360    +7     
  Branches      148    152    +4     
=====================================
+ Hits          353    360    +7
Impacted Files Coverage Δ
src/noThrowRule.ts 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eedc324...72bf09d. Read the comment docs.

@jonaskello
Copy link
Owner

Nice work! :-)

I think we should include a description of this new feature in the readme under the no-throw rule section. Could you update the readme too in this PR?

also remove copy paste of old test
@jonaskello
Copy link
Owner

Thanks!

@jonaskello jonaskello merged commit 4efdf16 into jonaskello:master Feb 13, 2019
@jonaskello
Copy link
Owner

Released in 5.2.0.

jonaskello added a commit that referenced this pull request Feb 18, 2019
jonaskello added a commit that referenced this pull request Feb 19, 2019
* Add the no-reject rule

* Revert changes to the readme

* Revert "update `no-throw` to not allow Promise.reject() (#116)"

This reverts commit 4efdf16.

* Add docs

* Remove previously removed line from readme
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants