Simple eslint config for React.js. Also works with React Native.
MIT License
@santospatrick/eslint-config-react
💈 Simple eslint config for React.js
yarn add eslint prettier eslint-config-prettier \
eslint-plugin-prettier \
eslint-plugin-react \
@santospatrick/eslint-config-react \
@santospatrick/prettier-config --dev
.eslintrc
and add this:{
"extends": "@santospatrick/eslint-config-react"
}
package.json
...
+ "prettier": "@santospatrick/prettier-config"
...
"scripts": {
"lint": "eslint --fix src --ext .js"
},
If you are using create-react-app, remove the following lines at package.json
:
...
- "eslintConfig": {
- "extends": "react-app"
- },
...
yarn link
cd /path/to/project
yarn link @santospatrick/eslint-config-react
# Deploy
# This command will also publish do Yarn
npm publish --access public