set up eslint and prettier for react app code example
Example: eslint prettier reactjs
$ yarn add eslint prettier eslint-config-prettier eslint-plugin-prettier eslint-plugin-react eslint-plugin-react-hooks
{
"parser": "babel-eslint",
"extends": ["airbnb-base", "prettier"],
"plugins": ["import"],
"env": {
"browser": true,
"es6": true
},
"globals": {},
"rules": {
"import/no-cycle": "warn",
},
"parserOptions": {
"sourceType": "module"
}
}
{
"printWidth": 100,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": true,
"arrowParens": "avoid",
"trailingComma": "all"
}