1.0.6 • Published 4 years ago

@santospatrick/eslint-config-react v1.0.6

Weekly downloads
2
License
MIT
Repository
-
Last release
4 years ago

@santospatrick/eslint-config-react

:barber: Simple eslint config for React.js

Usage

  1. Install
yarn add eslint-config-prettier \
  eslint-plugin-prettier \
  @santospatrick/eslint-config-react \
  @santospatrick/prettier-config --dev
  1. Create a file .eslintrc and add this:
{
    "extends": "@santospatrick/eslint-config-react"
}
  1. Add this line at package.json
...
+ "prettier": "@santospatrick/prettier-config"
...
  1. (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