Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/santospatrick/eslint-config-react
:barber: Simple eslint config for React.js. Also works with React Native.
https://github.com/santospatrick/eslint-config-react
Last synced: 3 months ago
JSON representation
:barber: Simple eslint config for React.js. Also works with React Native.
- Host: GitHub
- URL: https://github.com/santospatrick/eslint-config-react
- Owner: santospatrick
- License: mit
- Created: 2020-01-12T00:59:23.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-02-12T22:32:26.000Z (almost 3 years ago)
- Last Synced: 2023-03-06T12:52:29.728Z (almost 2 years ago)
- Language: JavaScript
- Homepage:
- Size: 148 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# `@santospatrick/eslint-config-react`
:barber: Simple eslint config for React.js## Usage
1. Install
```sh
yarn add eslint prettier eslint-config-prettier \
eslint-plugin-prettier \
eslint-plugin-react \
@santospatrick/eslint-config-react \
@santospatrick/prettier-config --dev
```2. Create a file `.eslintrc` and add this:
```
{
"extends": "@santospatrick/eslint-config-react"
}
```3. Add this line at `package.json`
```diff
...
+ "prettier": "@santospatrick/prettier-config"
...
```4. (Optional) Add script for linting
```json
"scripts": {
"lint": "eslint --fix src --ext .js"
},
```## Create React App
If you are using [create-react-app](https://create-react-app.dev/), remove the following lines at `package.json`:```diff
...
- "eslintConfig": {
- "extends": "react-app"
- },
...
```## Development
```sh
yarn link
cd /path/to/project
yarn link @santospatrick/eslint-config-react# Deploy
# This command will also publish do Yarn
npm publish --access public
```