0.1.4 • Published 8 years ago
@gabehayes/eslint-config-react v0.1.4
eslint-config-react
Check out eslint-config-airbnb for a list of all the rules we are inheriting.
Table of Contents
Installation
Install the package.
yarn add @keenai/eslint-config-react
Then, extend @keenai/react
in your ESLint configuration file.
{
extends: [
'@keenai/react',
],
}
Rules
react/no-set-state
We use Redux for state management. This should probably be a warning, because there may be a situation where using state would be the correct solution. Anyway, it's an error.
react/sort-comp
Will warn if you do not sort your component properties in the expected order:
- Type annotations
- Static methods
- Lifecycle methods
- Handler methods (onThis, onThat)
- Getter methods
- Setter methods
- Everything else
- Render methods
- Render