This package provides React+JS .eslintrc as an extensible shared config.
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
}
}
- 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