Created
April 19, 2019 14:52
-
-
Save verdi327/5b272df8b07966bf1aafa894d291201a to your computer and use it in GitHub Desktop.
example .
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
{ | |
/** | |
* ESLint: http://eslint.org/docs/user-guide/configuring | |
*/ | |
"globals": { | |
"$": true | |
}, | |
// "env:" supplies predefined global variables | |
"env": { | |
"browser": true, | |
"es6": true, | |
"node": true, | |
"mocha": true, | |
"mongo": true | |
}, | |
// our configuration extends the recommended base configuration | |
"extends": ["eslint:recommended", "react-app"] | |
// define the type of file `script` or `module` for ES6 Modules | |
"parserOptions": { | |
"sourceType": "script", | |
"ecmaFeatures": { | |
"jsx": true | |
} | |
}, | |
//ESLint rules: Severity Levels: off = 0 | warn = 1 | error = 2 | |
"rules": { | |
"strict": ["error", "safe"], //prefer `'use-strict';` pragma | |
"eqeqeq":"error", //prefer strict equality `===` | |
"no-console": "warn", //allows but warn about console like `console.log()` | |
"no-unused-vars": "warn", //warns about unused variables | |
"no-eval": "error", //disallows `eval()` usage | |
"indent": ["error", 2], //enforce 2 space indents (not tabs) | |
"quotes": ["error", "single"], //prefer single quotes over double quotes | |
"semi": ["error", "always"], //enforce semi-colon usage | |
"react/jsx-uses-react": "error", | |
"react/jsx-uses-vars": "error" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment