Closed facekapow closed 8 years ago
@facekapow There is an eslint config repository, style is very similar to semistandard but has more rules and a few minor differences. I think it's mostly the same as Node.js core style. https://github.com/runtimejs/eslint-config-runtime/blob/master/index.js. Tried semistandard, but it didn't include a few useful rules like consistent return etc, so I made a custom config instead. Not sure what's the current state of it.
Do you think it makes sense to switch to semistandard (maybe more familiar style) or just keep using custom config? We can add code examples somewhere to dev docs.
Personally, I'd prefer to use semistandard, mainly because it's rules are written in a more readable format and I can just look them up if I forget. But then again, I'm fine with the custom eslint config, everyone contributing would just run eslint before commiting. (Though would also be great to have some example code :smiley:)
What do you think about https://github.com/airbnb/javascript? This style looks very nice to me
I like it, it's very thorough, and it's pretty much the style I already use in my own code!
Of course, we'd have to leave out the part about not using require
, hopefully V8 gets native ES6 modules support soon.
Cool, let's go with it then. We should be able to override module rule https://github.com/airbnb/javascript/blob/master/linters/.eslintrc
I want to update all of the JS to ES6 (except, only the features that can be used without a transpiler), and I was also thinking about having a consistent code style. feross/standard or flet/semistandard? Or another different style? It'd make it easier for contributors to know how to code (e.g. currently I just use the style that the file I'm editing uses).
/cc @iefserge