Created
March 5, 2021 10:37
-
-
Save BoringOwlCompany/91afacdfbff2dcd0a04f63a2fd9f7b3a to your computer and use it in GitHub Desktop.
Simple but powerfull eslint config for React
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
| { | |
| "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