eslint-config-hardcore-react
v0.3.0
Published
ESLint config for react apps
Downloads
21
Maintainers
Readme
eslint-config-hardcore-react
This package provides React+JS .eslintrc as an extensible shared config.
Usage
Our default export contains all of our ESLint rules, including ECMAScript 6+. It requires eslint
and eslint-plugin-import
.
npm install --save-dev eslint-plugin-fp eslint-config-hardcore-react eslint-plugin-import eslint-plugin-react eslint-plugin-jsx-a11y eslint
- add
"extends": "hardcore-react"
to your .eslintrc - If you want, you can override some rules, example
{
"extends": "hardcore-react",
"parser": "babel-eslint",
"rules": {
"linebreak-style": [0, "unix"],
},
"globals": {
"describe": true,
"it": true,
"path": true,
"ga": true
}
}
What are the main features of this lint config?
- no mutations, no let
- sorting of props, attributes, etc.
- check of imports(no import for not installed libraries)
- strict rules for everything(formats, spaces, names, callbacks, etc.)
- all airbnb recommended rules
- compatibility with eslint 4.x