[eslint] Add comment above `max-len` rule with link to its docs
[eslint] Change tab width for `max-len` rule from 4 to 2
[eslint] Replace double quotes around `max-len` with single quotes
[eslint] Use object form of `max-len` and include all of the options
isMounted is an anti-pattern [0], is not available when using ES6
classes, and is on its way to being officially deprecated.
eslint-plugin-react recently added the react/no-is-mounted rule in
3.12.0 that prevents its use.
[0]: https://facebook.github.io/react/blog/2015/12/16/ismounted-antipattern.html
Finishes #633
All of the other rules in this file are in alphabetical order, but this
one was added by c98990c0f out of order at the end. Keeping these in
alphabetical order will help developers find the rules that they are
looking for.
Enable [arrow-spacing](http://eslint.org/docs/rules/arrow-spacing.html) rule, code with space before/after arrow function's arrow is easier to read.
```js
() => {};
(a) => {};
a => a;
() => {'\n'};
()=> {}; /*error Missing space before =>*/
() =>{}; /*error Missing space after =>*/
(a)=> {}; /*error Missing space before =>*/
(a) =>{}; /*error Missing space after =>*/
a =>a; /*error Missing space after =>*/
a=> a; /*error Missing space before =>*/
()=> {'\n'}; /*error Missing space before =>*/
() =>{'\n'}; /*error Missing space after =>*/
```
Rule 18.5 [1] states that files shall end with a single newline
character. Until now, this was not checked because there was no such
option in eslint.
Since version 1.8.0, eslint provides the ability to do that. See pull
request on eslint [2] for details on implementation and usage. Let's use
it in airbnb eslint plugin now!
[1]: https://github.com/airbnb/javascript#18.5
[2]: https://github.com/eslint/eslint/pull/4266
Currently the way the rule is defined, mixing spaces and tabulations in
indentation is allowed. However, the comments and documents seems to say
the opposite.
This patchs turns the rule on so mixing spaces and tabs is NOT allowed.
Fixes: #539