-
Notifications
You must be signed in to change notification settings - Fork 24
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
Implement Pascal Case for Erc20Permit and Erc721Permit #40
Conversation
… naming conventions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You also should not change any other files.
@0x4007 The other modifications were made my running the linters. If you check the changes you'll see the linters just added spaces where it seemed necessary and all that. I can revert the changes if they will cause any issues though. |
There actually already is a rule for If we want to prevent this we can use |
That rule seems to only check for the first character being capitalized according to the docs. I think a regex that looks for three or more consecutive capitalized letters should be flagged as an error |
I think let's use strictpascalcase then! |
@0x4007 Shall this be applied to other elements too, like variables etc? There is the same version for camel case called |
Yes let's apply this across all identifiers. |
@0x4007, @gentlementlegen I've added StrictPascalCase to the eslint rules. They'll be a couple of errors in certain files due to the new eslint configuration which I haven't changed because of this comment. I'd love to clean up the files though!
I also suggest we create a pre-commit hook. By doing so we can ensure no errors go into the repository and enforce code style. The pre-commit hook will run only on staged files to avoid slow and irrelevant processes. |
We have lint-staged for this purpose but perhaps it's not configured correctly. |
Okay I'll take sometime to look into that too |
@gentlementlegen please can you review? Thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am fine with the changes per se, but the changes outside of .eslintrc
don't seem directly related to this PR but to your own IDE settings.
Hey @0x4007 I've undone all the changes not related to the issue. This should be ready to go now! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not make changes that would change the behavior of the configuration. We just need StrictPascalCase
and strictCamelCase
over the PascalCase
and camelCase
respectively.
I thought we were going full in on StrictPascalCase 😬 |
… naming conventions
Resolves #39