-
Notifications
You must be signed in to change notification settings - Fork 155
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
feat: solhint + solhint-plugin-prettier for linting #19
Conversation
Wouldn’t this block using lint if the project violates a solhint rule? I think you need to use --fix in the solhint script to fix |
this reminded me that we should probably have a separate lint-check and lint-fix pair of scripts to allow both fixing in development and checking for conformity in CI |
Makes sense, I just added --fix to the solhint script I also added a yarn lint:check for just doing a check |
Nice! I think you can simplify the write/fix scripts by just having them do like |
ah nice sorry im used to npm not yarn |
can you simplify the prettier fix script too? otherwise lgtm |
Done! |
LGTM. Thank you @gg2001 for the contribution and @transmissions11 for the PR reviews. Really appreciate it. |
* feat: solhint * fix: add --fix to solhint script + add a lint check script * chore: simplify solhint script * chore: simplify prettier script
solhint
andsolhint-plugin-prettier
package.json
prettier
andsolhint
scripts inpackage.json
.solhint.json
config file (adapted from https://github.com/paulrberg/solidity-template/blob/main/.solhint.json)Im not sure if adding solhint is the best idea since it makes the node_modules folder more bloated, but I find it very useful. Would like to hear thoughts on adding this.