Skip to content

Instantly share code, notes, and snippets.

@olayemii
Created May 23, 2020 02:10
Show Gist options
  • Save olayemii/c149cfe93fa4a59b80ca33f6a30299ef to your computer and use it in GitHub Desktop.
Save olayemii/c149cfe93fa4a59b80ca33f6a30299ef to your computer and use it in GitHub Desktop.
EsLint Configuration for React
{
"env": {
"browser": true,
"es6": true
},
"extends": ["eslint:recommended", "react-app", "prettier"],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": ["react-hooks"],
"rules": {
"linebreak-style": ["error", "unix"],
"quotes": ["error", "double"],
"semi": ["error", "always"],
"no-console": 2,
"no-alert": 2,
"no-func-assign": 1,
"no-invalid-regexp": 1,
"no-unreachable": 1,
"default-case": 1,
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment