1.0.6 • Published 4 years ago
@santospatrick/eslint-config-react v1.0.6
@santospatrick/eslint-config-react
:barber: Simple eslint config for React.js
Usage
- Install
yarn add eslint-config-prettier \
eslint-plugin-prettier \
@santospatrick/eslint-config-react \
@santospatrick/prettier-config --dev
- Create a file
.eslintrc
and add this:
{
"extends": "@santospatrick/eslint-config-react"
}
- Add this line at
package.json
...
+ "prettier": "@santospatrick/prettier-config"
...
- (Optional) Add script for linting
"scripts": {
"lint": "eslint --fix src --ext .js"
},
Create React App
If you are using create-react-app, remove the following lines at package.json
:
...
- "eslintConfig": {
- "extends": "react-app"
- },
...
Development
yarn link
cd /path/to/project
yarn link @santospatrick/eslint-config-react
# Deploy
# This command will also publish do Yarn
npm publish --access public