Add automatic code styling
Closed this issue ยท 10 comments
As we're getting more people involved it'd be great to have some ESlint / TSlint / Prettier setup.
Bonus if run automatically with Github Actions on PR commits ๐
Great idea. For Solidity, @kevincharm (discord) suggested using SolHint. https://github.com/fvictorio/solhint-plugin-prettier
Any takers on this welcomed
I've been using solhint locally and also https://github.com/prettier-solidity/prettier-plugin-solidity plugin with very good results.
I've been using solhint locally and also https://github.com/prettier-solidity/prettier-plugin-solidity plugin with very good results.
Added Solidity code formatter on this PR #41
Added prettier setup on web preview directory on this PR #42
@rasmuscnielsen just cleaning up. Has this been incorporated and be closed now?
This one is still up for grabs ๐
It pretty much just need to be a GH action that runs npm run style
(webpreviewer
context) on every commit on open PR's and commit if any changes :-)
If no takers I'll probably give it a crack myself at some point ๐
I'll take a look. I'm just adding Github Actions in #58 to run the Solidity hardhat tests.
I'm assuming we just need to run Prettier in each of the major sections:
- contract
- web-client
- web-server - I don't see prettier currently configured for this one, but can add
I'm assuming we just need to run Prettier in each of the major sections:
Exactly
Web server - I don't see prettier currently configured for this one, but can add
Love it!
Hello, here's the PR for review: #59
"Pretty" was easy, but "push" took some trial and error getting through the edge cases.
Ok, the PR is ready for review. This goes with the simpler pre-commit hook approach instead of Github Action approach.