News for hackers. Stuff that matters.
Re:Khan Academy's React style guide by andreasklinger on Wednesday October 21, 2015 @10:15AM (#10425526)
Request for comment:

Linters are by far powerful enough by now.

Can we (as community) switch to documenting style guides as linter rulesets + custom linters. Eg for javascript: eslint and jscs

Written style guides are good for understanding why - but linters actually help others to adapt to it quicker

Re:Khan Academy's React style guide by prezjordan on Wednesday October 21, 2015 @11:11AM (#10425957)
For what it's worth our linter is also open source [0] :) I do like the idea of combining the two and have it self-document, though.

[0]: https://github.com/Khan/khan-linter

Re:Khan Academy's React style guide by exogen on Wednesday October 21, 2015 @12:01PM (#10426340)
Someone on my team has started such a project, encoding a few companies' style guides as eslint defaults: https://github.com/walmartlabs/eslint-config-defaults

You can then use eslint's `extends` feature to use them as a base for your own code.

Re:Khan Academy's React style guide by greg5green on Wednesday October 21, 2015 @10:44AM (#10425749)
AirBnB has a similar style guide for React and has a linter file for eslint with the React plugin. Works pretty well.

I'd like to see more style guides come with similar set ups.

Re:Khan Academy's React style guide by pbreit on Wednesday October 21, 2015 @11:26AM (#10426082)
Is it available?
Re:Khan Academy's React style guide by themichaellai on Wednesday October 21, 2015 @12:25PM (#10426516)
Re:Khan Academy's React style guide by bronson on Wednesday October 21, 2015 @02:09PM (#10427292)
or `npm install --save-dev eslint-config-airbnb`
Re:Khan Academy's React style guide by deanclatworthy on Wednesday October 21, 2015 @10:40AM (#10425718)
Couldn't agree more. And you should in theory be able to generate a style guide document from a linter. I know you can do it for CSS