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

refacto: clean indentation of the smart contracts #9

Merged
merged 6 commits into from
Mar 24, 2022

Conversation

opixelum
Copy link
Contributor

I used Prettier for formatting all the contracts with 4 spaces for indentation, and I also used the option "preserve" for "explicitTypes" to respect the type used by the developers.

.prettierrc Outdated
@@ -0,0 +1,11 @@
{
"overrides": [
Copy link
Member

Choose a reason for hiding this comment

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

There is an indentation issue error.

Copy link
Member

Choose a reason for hiding this comment

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

And use the prettier from OZ: see https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/.prettierrc ; to follow the reference.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Indentation fixed. Then, do you prefer to always use explicit types, as OZ's Prettier config does, or I set this option to "preserve" ? Because before editing the contracts, I saw that you were not using explicit types.

Copy link
Member

@n1c01a5 n1c01a5 Mar 24, 2022

Choose a reason for hiding this comment

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

I prefer to use the same set up than OZ so with explicit types preserve.

In general, it's better to follow the reference.

@opixelum opixelum requested a review from n1c01a5 March 24, 2022 16:24
@n1c01a5
Copy link
Member

n1c01a5 commented Mar 24, 2022

@opixelum did you run the tests to see if everything works ?

@opixelum
Copy link
Contributor Author

@n1c01a5 Yes, all tests passed ✅.

However, we have some warnings about shadowing existing declarations and deprecated methods (those were already here before the formatting).

image
image

I can see how to remove those warnings if needed.

@n1c01a5
Copy link
Member

n1c01a5 commented Mar 24, 2022

@n1c01a5 Yes, all tests passed ✅.

However, we have some warnings about shadowing existing declarations and deprecated methods (those were already here before the formatting).

image image

I can see how to remove those warnings if needed.

Perfect ! These warnings are not really relevant 👌

@n1c01a5 n1c01a5 merged commit 763be64 into feature-sh:main Mar 24, 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.

None yet

2 participants