Closed coryhouse closed 8 years ago
What about standardjs? http://standardjs.com/
Good question. I'm not a fan myself, because they chose to actually require excluding semicolons. At least today, the majority utilize them. I personally agree with Crockford that we should require them, so I chose ESLint's standards, and augmented them with a variety of React rules.
I used to stick with semicolons, while I believe specific style is irrelevant compare to consistency, and I'm glad a style could expand the consistency across community rather than a single code base, I love that idea, and I push myself to get use to semicolon-less style, and now I use to it :sweat_smile:
Anyway, that's my personal thought, all these rules are fine to me.
PS: If the semicolon thing is the only thing that bother you, semistandard is an option too, we all love or loved semicolons ;-)
@coryhouse, since this is a starter kit for devs, I wonder what value there is to adding airbnb linting rules by default. The existing rules are already pretty decent. This feels more like an option a user would choose when getting setup with the yet to be implemented Yeoman generator (#20).
I'm interested in AirBnB's rules for two reasons:
The big potential downside I see is switching midway will likely mean a lot of warnings and errors for projects in flight. Are there other reasons to prefer the current setup over AirBnB's?
I agree that it's easier to remove it than add it, so let's keep it as a default as you suggested. I'll try and tackle this later this week.
The other note I want to point out is that once you are on a more standard version like this, using eslint --fix
has better effectiveness when attempting to switch. I also agree this would be great option in Yeoman.(#20)
Since it was noted that the current rules are "decent" I went left them untouched just cleaned up any that were set the same as airbnb to not shadow their rules.
I just tried enabling the AirBnB rules on Slingshot. Ouch. Over 600 issues. I didn't realize how many of their rules conflict. And honestly, there are quite a few I personally dislike:
That said, I'm fixing some linting issues it's found. :)
Still not sold on using this though.
I concur some of their rules seem ludicrous. If you need help going back through the errors, once you have them solidified, let me know.
I've found quite a few other issues with AirBnB's rules:
Bottom-line, to use their config I'd want to disable many rules which reduces the value of it.
I just enhanced our linting rules by carefully reviewing airbnb's rules. However, I've decided not to use airbnb directly for two reasons:
Just for my own notes, here are the airbnb rules I'd disable:
"comma-dangle": 0,
"max-len": 0,
"object-curly-spacing": 0,
"arrow-body-style": 0,
"react/jsx-space-before-closing": 0,
"react/jsx-indent": 0,
"no-unused-expressions": 0,
"react/jsx-closing-bracket-location" : 0
See https://github.com/airbnb/javascript and https://www.npmjs.com/package/eslint-config-airbnb