Skip to content
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

Adopt JS Standard Style #157

Closed
mikeal opened this issue Sep 15, 2015 · 7 comments
Closed

Adopt JS Standard Style #157

mikeal opened this issue Sep 15, 2015 · 7 comments

Comments

@mikeal
Copy link
Contributor

mikeal commented Sep 15, 2015

I normally don't care about this kind of stuff but I got a few questions about this during the Code + Learn. We currently use some kind of 4 space indent that confused some people.

It might make sense to adopt standard, https://github.com/feross/standard . It's a sensible style and has tools that relieve us of having to enforce the style manually.

@fhemberger
Copy link
Contributor

I must say, I prefer either 4 spaces (or gosh! tabs), because they make nested code easier to read (we're all getting older!). And I have objections against dropping semicolons. Otherwise, our .eslintrc should cover the same rules as "standard".

But if everybody else prefers adapting that particular coding style, I will need to get used to it. ;)

@Fishrock123
Copy link
Member

because they make nested code easier to read (we're all getting older!).

Real talk: I find more than 2 spaces difficult to read, so both ways. :P

And I have objections against dropping semicolons

Meh. I gave up on this ages ago.

I don't care so much for "standard" per say, but here's a style guide I wrote for express that is quite similar: https://github.com/jshttp/style-guide/blob/master/javascript.md

@bogas04
Copy link
Contributor

bogas04 commented Sep 15, 2015

@fhemberger we can consider Sindre Sorhus's XO style. https://github.com/sindresorhus/xo

  • 2 spaces for indentation, but can be tweaked
  • USES semicolon

@therebelrobot
Copy link
Contributor

I'm a 2 space, no semicolons kinda guy, though whatever works for everyone is fine with me.

@phillipj
Copy link
Member

The important things for me are having rules in place and linting as part of Travis runs / $ npm run test.

Which set of rules doesnt really matter to me, as long as they're enforced automatically. Cleaning up others linting errors is truly a tedious task.

That said, standard is okey with me 👍

@mikeal
Copy link
Contributor Author

mikeal commented Sep 15, 2015

The nice thing about standard style is that we don't have to have this
debate 😊

On Tuesday, September 15, 2015, Phillip Johnsen notifications@github.com
wrote:

The important things for me are having rules in place and linting as part
of Travis runs / $ npm run test.

Which set of rules doesnt really matter to me, as long as they're enforced
automatically. Cleaning up others linting is truly a tedious task.

That said, standard is okey with me [image: 👍]


Reply to this email directly or view it on GitHub
#157 (comment)
.

@fhemberger
Copy link
Contributor

We should also make sure to have a styleguide, which encompasses JS, handlebars templates and stylus as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants