Skip to content

Instantly share code, notes, and snippets.

@BoringOwlCompany
Created March 5, 2021 10:37
Show Gist options
  • Save BoringOwlCompany/91afacdfbff2dcd0a04f63a2fd9f7b3a to your computer and use it in GitHub Desktop.
Save BoringOwlCompany/91afacdfbff2dcd0a04f63a2fd9f7b3a to your computer and use it in GitHub Desktop.
Simple but powerfull eslint config for React
{
"parser": "babel-eslint",
"settings": {
"react": {
"version": "detect" // detect react version
}
},
"env": {
"browser": true,
"es6": true,
"jest": true,
"node": true // defines things like process.env when generating through node
},
"extends": ["eslint:recommended", "plugin:react/recommended", "prettier"],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2020,
"sourceType": "module"
},
"plugins": ["react", "prettier"],
"rules": {
"prettier/prettier": ["error", { "endOfLine": "auto" }],
"react/prop-types": 1,
"max-lines": ["error", 175],
"no-console": ["error"]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment