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

Misc TypeScript Migrations #6500

Merged
merged 15 commits into from
Jun 1, 2022
Merged

Misc TypeScript Migrations #6500

merged 15 commits into from
Jun 1, 2022

Conversation

WilliamWelsh
Copy link
Contributor

@WilliamWelsh WilliamWelsh commented May 30, 2022

I wanted to help with the TypeScript rollout, so I've migrated the following so far:

src/data

  • src/data/addresses.js
  • src/data/eth-upgrade-articles.js

src/api

  • src/api/etherscanBlock.js
  • src/api/etherscan.js
  • src/api/l2beat.js
  • src/api/roadmap.js
  • src/api/translations.js
  • src/api/txs.js

src/lambda

  • src/lambda/etherscanBlock.js
  • src/lambda/etherscan.js
  • src/lambda/l2beat.js
  • src/lambda/roadmap.js
  • src/lambda/translation-build.js
  • src/lambda/translations.js
  • src/lambda/txs.js

src/utils

  • src/utils/calculateStakingRewards

Related Issue

#6392

@gatsby-cloud
Copy link

gatsby-cloud bot commented May 30, 2022

Gatsby Cloud Build Report

ethereum-org-website-dev

🎉 Your build was successful! See the Deploy preview here.

Build Details

View the build logs here.

🕐 Build time: 16m

Performance

Lighthouse report

Metric Score
Performance 🔶 20
Accessibility 💚 100
Best Practices 💚 100
SEO 💚 92

🔗 View full report

Copy link
Contributor

@minimalsm minimalsm left a comment

Choose a reason for hiding this comment

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

Hey @WilliamWelsh, thanks for the PR 😎

I'm a TypeScript noob so I'll leave it to @pettinarip to double-check this. I've left a few open questions that I'm unsure of (though I might be entirely wrong 🙂)

I can't comment directly on the file but for the eth-upgrade-articles I think we should be explicitly declaring types e.g.:

interface Article {
  title: string,
  description: string,
  link: string,
}

src/utils/calculateStakingRewards.ts Outdated Show resolved Hide resolved
src/lambda/txs.ts Outdated Show resolved Hide resolved
@WilliamWelsh
Copy link
Contributor Author

Hey @WilliamWelsh, thanks for the PR 😎

I'm a TypeScript noob so I'll leave it to @pettinarip to double-check this. I've left a few open questions that I'm unsure of (though I might be entirely wrong 🙂)

I can't comment directly on the file but for the eth-upgrade-articles I think we should be explicitly declaring types e.g.:

interface Article {
  title: string,
  description: string,
  link: string,
}

You're right, I went ahead and added the article type. I also noticed that benArticles's titles were numbered incorrectly so I fixed that as well. Thank you :)

Copy link
Member

@pettinarip pettinarip left a comment

Choose a reason for hiding this comment

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

This is looking amazing @WilliamWelsh thanks for tackling so many files. Left a couple of comments there. LMK if you have any question.

src/data/eth-upgrade-articles.ts Outdated Show resolved Hide resolved
src/data/eth-upgrade-articles.ts Outdated Show resolved Hide resolved
src/lambda/etherscan.ts Outdated Show resolved Hide resolved
src/lambda/txs.ts Outdated Show resolved Hide resolved
Copy link
Member

@pettinarip pettinarip left a comment

Choose a reason for hiding this comment

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

@WilliamWelsh a few small comments, the rest is looking great.

environment.d.ts Outdated Show resolved Hide resolved
src/lambda/translations.ts Outdated Show resolved Hide resolved
src/lambda/txs.ts Outdated Show resolved Hide resolved
WilliamWelsh and others added 2 commits May 30, 2022 21:01
Oops

Co-authored-by: Pablo Pettinari <[email protected]>
Oops

Co-authored-by: Pablo Pettinari <[email protected]>
Copy link
Member

@pettinarip pettinarip 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 the contribution @WilliamWelsh

@pettinarip pettinarip merged commit 4634445 into ethereum:dev Jun 1, 2022
@pettinarip
Copy link
Member

@all-contributors please add @WilliamWelsh for code

@allcontributors
Copy link
Contributor

@pettinarip

I've put up a pull request to add @WilliamWelsh! 🎉

@wackerow wackerow mentioned this pull request Jun 3, 2022
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.

3 participants