mably / lncli-web

Light-weight web client for the lnd daemon written in NodeJS / Angular.

Home Page:https://github.com/lightningnetwork/lnd

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add a style guide

PirosB3 opened this issue · comments

It would be great to define a specific style guide to enforce. This would make sure we all have the same expectation when writing code, and we can also take advantage of automated tooling for lint. It looks like Airbnb, GitHub, & Google all have some open source style guide that we can take advantage of, but I don't have experience with any of them.

Would you be interested in enforcing a style guide for the next contributions? if so, do you have a preference?

Yep definitely, Airbnb seems interesting to me.

Sounds great!

Sounds great! So I have made a branch containing the tooling and stile documentation using Airbnb JS (https://github.com/PirosB3/lncli-web/tree/lnd-manager-linting). In order to avoid confusion with #163, I will wait till that PR gets merged to master and then I will open a subsequent PR containing style fixes

FYI we are already using jscs for code validation (via `gulp'), let's try not to break everything and be as close as possible as what is already in place, unless it can be improved of course.

Thanks for pointing that out, I actually didn't know that! said this, It looks like JSCS has merged with ESLint (https://www.npmjs.com/package/jscs) and ESLint contains default for Airbnb guide. JSCS website is also gone lol.

I'm opening my PR now so you can take a look at the changes I did, and we can chat more about this on the PR