A good eslint configuration
eslint-config-react-app
prettier
integration using
eslint-plugin-prettier
&
eslint-config-prettier
Install packages:
npm install --save-dev eslint eslint-config-zenflow
# optional
npm install --save-dev typescript
Add .eslintrc
file:
{
"extends": ["zenflow"],
"rules": { /* custom rule configs here */ }
}
Add package "scripts"
:
"lint": "eslint . --ext .js,.ts,.jsx,.tsx",
"lint-fix": "npm run lint -- --fix",
Optional Configure Prettier to your taste.
Optional Copy the companion .editorconfig file to the root of your project.
Recommended Enable eslint integration in your IDE of choice