Beautiful Javascript code at Deepstream.io
npm install eslint-config-deepstreameslint, eslint-plugin-import, eslint-plugin-react,
eslint-plugin-jsx-a11y.
bash
npm install --save-dev eslint-config-deepstream eslint-plugin-import
eslint-plugin-react eslint-plugin-jsx-a11y eslint
`
Create an .eslintrc.json with this content:
`javascript
{
"extends": "deepstream"
}
`
Deviations from Airbnb
We are adopting most of the rules from Airbnb. Please check out their
styleguide to get the full picture.
We do have different opinions on these topics:
$3
They are not needed and code
looks better without them. eslint: semi
$3
We use leading underscores to express that a function is private. eslint:
no-underscore-dangle
$3
When using generators, while (true) loops make sense. eslint:
no-constant-condition
$3
Classes read better if private methods are defined below their first usage.
Tests read better when all helper functions are defined at the bottom. eslint:
no-use-before-define`