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

WIP: Clean up Wallet code samples #1116

Merged
merged 4 commits into from
Feb 13, 2024
Merged

WIP: Clean up Wallet code samples #1116

merged 4 commits into from
Feb 13, 2024

Conversation

FaybianB
Copy link
Contributor

Resolves: #1099

This pull request attempts to ensure that the code samples in the docs follow some consistent style guideline. To accomplish this, the code samples were formatted using the Prettier formatter plugin and the following rules:

  • Double quotes preferred over single quotes
  • 4-space indentation preferred over 2-space
  • Trailing commas preferred over no trailing commas
  • No metadata preferred over metadata

@FaybianB FaybianB requested a review from a team as a code owner January 31, 2024 23:18
@alexandratran alexandratran self-assigned this Feb 1, 2024
@alexandratran
Copy link
Contributor

Thanks for this @FaybianB! One comment I have so far is that for all the code samples with metadata such as titles and highlighted line numbers, the formatter may have automatically removed them. Can you add those back?

@FaybianB
Copy link
Contributor Author

FaybianB commented Feb 2, 2024

Thanks for this @FaybianB! One comment I have so far is that for all the code samples with metadata such as titles and highlighted line numbers, the formatter may have automatically removed them. Can you add those back?

Hey @alexandratran, yes, I can do that.

Do you have any suggestions for some consistent guidelines that you would like the metadata to follow? I notice some code samples do not have metadata, while others have a title and others have titles and line numbers.

@alexandratran
Copy link
Contributor

@FaybianB I think it would be ideal for as many code samples as possible to have file names as titles, but that might be a more involved task for a future PR. For now, we can probably just keep the the current titles as they are.

Only a couple of the tutorials have code samples with line numbers, in order to highlight and describe certain parts of the code. It's also fine for only those samples to have line numbers for now.

Copy link
Contributor

@vandan vandan left a comment

Choose a reason for hiding this comment

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

lgtm

@alexandratran
Copy link
Contributor

@FaybianB Looks like there's a lot of merge conflicts on this PR since we've recently made some updates to the structure of the docs. Let me know if you want me to take over and clean up this PR!

@FaybianB
Copy link
Contributor Author

FaybianB commented Feb 9, 2024

@alexandratran Thanks for letting me know, I would like to resolve the conflicts and finish this PR.

wallet/how-to/use-3rd-party-integrations/web3-onboard.md Outdated Show resolved Hide resolved
wallet/how-to/use-sdk/javascript/other-web-frameworks.md Outdated Show resolved Hide resolved
wallet/how-to/use-sdk/javascript/other-web-frameworks.md Outdated Show resolved Hide resolved
wallet/how-to/use-sdk/javascript/pure-js.md Outdated Show resolved Hide resolved
wallet/how-to/use-sdk/javascript/pure-js.md Outdated Show resolved Hide resolved
wallet/tutorials/react-dapp-local-state.md Outdated Show resolved Hide resolved
wallet/tutorials/react-dapp-local-state.md Outdated Show resolved Hide resolved
wallet/tutorials/react-dapp-local-state.md Outdated Show resolved Hide resolved
wallet/tutorials/react-dapp-local-state.md Outdated Show resolved Hide resolved
wallet/tutorials/react-dapp-local-state.md Outdated Show resolved Hide resolved
@alexandratran alexandratran merged commit 998cf17 into MetaMask:main Feb 13, 2024
6 checks passed
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.

Clean up code samples
3 participants