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

feat(eslint-plugin): [prom-func-async] add automatic fix #2845

Merged
merged 7 commits into from Dec 21, 2020
Merged

feat(eslint-plugin): [prom-func-async] add automatic fix #2845

merged 7 commits into from Dec 21, 2020

Conversation

phaux
Copy link
Contributor

@phaux phaux commented Dec 3, 2020

I use this rule a lot so I added an automatic fix for it.

const getFoo = () => fetch("/foo").then(res => res.json())
// should fix to
const getFoo = async () => fetch("/foo").then(async res => res.json())

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @phaux!

typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community.

The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately.

Thanks again!


🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint. As a thank you, your profile/company logo will be added to our main README which receives thousands of unique visitors per day.

@codecov
Copy link

codecov bot commented Dec 3, 2020

Codecov Report

Merging #2845 (f568a9f) into master (84a77cc) will decrease coverage by 0.00%.
The diff coverage is 91.66%.

@@            Coverage Diff             @@
##           master    #2845      +/-   ##
==========================================
- Coverage   92.75%   92.75%   -0.01%     
==========================================
  Files         309      309              
  Lines       10335    10345      +10     
  Branches     2927     2931       +4     
==========================================
+ Hits         9586     9595       +9     
  Misses        346      346              
- Partials      403      404       +1     
Flag Coverage Δ
unittest 92.75% <91.66%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
.../eslint-plugin/src/rules/promise-function-async.ts 97.36% <91.66%> (-2.64%) ⬇️

@bradzacher bradzacher added the enhancement New feature or request label Dec 3, 2020
@phaux
Copy link
Contributor Author

phaux commented Dec 10, 2020

Changed some more code because I found some problems: (snip)

Nevermind. This PR only adds auto fix and ignores abstract methods.

Copy link
Member

@bradzacher bradzacher 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 your contribution!

@bradzacher bradzacher merged commit 717e718 into typescript-eslint:master Dec 21, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants