Closed luke-john closed 8 years ago
I like the idea of having a style guide in place, but sometimes enforcing it via a tool can be annoying and super painful. I'm keen to use one, but we'd need some documentation around this and be open to changes I think.
We'd need to do bootstrap script for this to install the git commit hook, assuming that is what would be used. I'm keen to look at getting buildkite up and running for this project so i'll most likely pick that up soon and we can definitely lint the code as part of that once we have a style picked.
A few considerations at the moment, based on what this project is aimed to do.
Most editors have packages that support it out of the box.
http://jscs.info/overview#friendly-packages
I'm uncertain as to the value of a commit hook. For 'enforcement', we should just add a test.
I like the last few lines of the Google JS Style Guide (if we don't want to commit to a particular code style yet):
BE CONSISTENT. If you're editing code, take a few minutes to look at the code around you and determine its style. If they use spaces around all their arithmetic operators, you should too. If their comments have little boxes of hash marks around them, make your comments have little boxes of hash marks around them too.
The airbnb style guide explicitly states some ES6 stuff like using arrow functions.
From a quick squiz at the airbnb style guide it looks pretty neat.
It's a lot nicer to read than google's, so i'm swapping my +1 to airbnb.
I like the google jscs preset, but would be happy for any.