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

Add promise/prefer-await-to-then eslint rule #1675

Merged
merged 3 commits into from Dec 18, 2022

Conversation

Pierre-Gilles
Copy link
Contributor

@Pierre-Gilles Pierre-Gilles commented Dec 17, 2022

Pull Request check-list

To ensure your Pull Request can be accepted as fast as possible, make sure to review and check all of these items:

  • If your changes affects code, did your write the tests?
  • Are tests passing? (npm test on both front/server)
  • Is the linter passing? (npm run eslint on both front/server)
  • Did you run prettier? (npm run prettier on both front/server)

Description of change

The goal is to recommend using async/await, and stop doing chains of Promises like Promise.then().then().then(), expect in Cypress code.

https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/prefer-await-to-then.md

@cloudflare-pages
Copy link

cloudflare-pages bot commented Dec 17, 2022

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 96e533a
Status: ✅  Deploy successful!
Preview URL: https://4d0962d1.gladys-plus.pages.dev
Branch Preview URL: https://prefer-await-to-then-eslint.gladys-plus.pages.dev

View logs

@relativeci
Copy link

relativeci bot commented Dec 17, 2022

Job #908: Bundle Size — 6.97MiB (0%).

7eb0b2a(current) vs 5154c19 master#905(baseline)

Metrics (1 change)
                 Current
Job #908
     Baseline
Job #905
Initial JS 3.02MiB 3.02MiB
Initial CSS 293.9KiB 293.9KiB
Cache Invalidation 0% 47.26%
Chunks 52 52
Assets 148 148
Modules 1242 1242
Duplicate Modules 2 2
Duplicate Code 0.03% 0.03%
Packages 106 106
Duplicate Packages 8 8
Total size by type (no changes)
                 Current
Job #908
     Baseline
Job #905
CSS 311.09KiB 311.09KiB
Fonts 93.55KiB 93.55KiB
HTML 13.58KiB 13.58KiB
IMG 1.64MiB 1.64MiB
JS 4.92MiB 4.92MiB
Media 0B 0B
Other 4.95KiB 4.95KiB

View job #908 reportView master branch activity

@codecov
Copy link

codecov bot commented Dec 17, 2022

Codecov Report

Base: 97.26% // Head: 97.26% // No change to project coverage 👍

Coverage data is based on head (96e533a) compared to base (5154c19).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1675   +/-   ##
=======================================
  Coverage   97.26%   97.26%           
=======================================
  Files         643      643           
  Lines        9684     9684           
=======================================
  Hits         9419     9419           
  Misses        265      265           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@Pierre-Gilles Pierre-Gilles merged commit 7eb0b2a into master Dec 18, 2022
@Pierre-Gilles Pierre-Gilles deleted the prefer-await-to-then-eslint branch December 18, 2022 08:57
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.

None yet

1 participant