npm i --dev eslint prettier @react-native-community/eslint-config
// in .eslintrc paste this
{
"extends": "@react-native-community",
"rules": {
"quotes": [
2,
"double",
{
"avoidEscape": true
}
]
}
}
// paste this in package.json scripts means check my whole directory for only js files
"lint": "eslint . --ext .js"
// run it like this
npm run lint
// to fix errors
npm run lint -- --fix
yarn add --dev eslint prettier @react-native-community/eslint-config