README
eslint-config-react
ESLint, Prettier and Airbnb style guide in React JS projects.
Quick start
1 Install
Use yarn or npm to install dependencies:
yarn add @ajsr/eslint-config-react --dev
npm i @ajsr/eslint-config-react --save-dev
2 Configure ESLint
In a new file .eslintrc.json
set this ESLint configuration:
{
"extends": [
"@ajsr/eslint-config-react"
]
}
Create a new file .eslintignore
and include this content:
build
dist
node_modules
lol
3 Needed VSCode extensions
- VS Code ESLint extension: https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint
- Prettier Formatter for Visual Studio Code: https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode
Interesting stuff to read
- Airbnb JavaScript Style Guide: https://github.com/airbnb/javascript
- Set up React JS with ESLint, Prettier and Airbnb: https://medium.com/javascript-in-plain-english/set-up-react-js-with-eslint-prettier-and-airbnb-cc015363a7c7
- VSCode ESLint, Prettier & Airbnb Style Guide Setup: https://www.youtube.com/watch?v=SydnKbGc7W8
- eslint-config-prettier: https://github.com/prettier/eslint-config-prettier
- Set up an ESLint config for your organization: https://bramanti.me/organization-eslint-config/