create-web3-dapp
create-web3-dapp copied to clipboard
[DOCUMENTATION] Coding style guidelines for contributions
It would be great to have fixed guidelines for common patterns and syntax.
- Don't think we should create new guidelines, we can borrow the ones from Google or AirBnB.
- Linter needs to be setup to follow the guidelines
- It would be great to have linter on PR request/merge -> Issue about linter and testing on PRs
Think it might be a good first issue.
I propose the Airbnb one: widespread, plus 95% of the rules are justified imo, and they are not so hard to follow in the end.
These guidelines are for JS, but, even if there are not any for TS from Airbnb, I guess the plugin will do the job most of the time (for a separate issue)
It's easy to setup with ESlint and also has a powerful autolinter. Might be a great idea to implement precommit hooks with possible npm run lint:fix
, which won't allow you to commit if some rules aren't followed. I guess, this can work in sense of applying some style guidelines in practice lol (also for a separate issue)
why don't we use StandardJs to follow KISS principle and it will be more easier that way... i wanted to give a suggestion
Hey @Eversmile12, has someone already written the docs for this? I know some devs who'd be interested in working on this.
Thanks!