Skip to content

Instantly share code, notes, and snippets.

@charliecalvert
Last active December 7, 2018 00:05
Show Gist options
  • Save charliecalvert/c5952541925c04479150bbd8c40feac6 to your computer and use it in GitHub Desktop.
Save charliecalvert/c5952541925c04479150bbd8c40feac6 to your computer and use it in GitHub Desktop.
ESLint JSON File
{
"extends": [
"eslint:recommended",
"plugin:react/recommended"
],
"rules": {
// enable additional rules
"indent": ["error", 4, {"SwitchCase": 1}],
"linebreak-style": ["error", "unix"],
"quotes": ["warn", "single"],
"semi": ["error", "always"],
// override default options for rules from base configurations
"comma-dangle": ["off", "always"],
"no-cond-assign": ["error", "always"],
// disable rules from base configurations
"no-console": "off",
"no-control-regex": "warn"
},
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 7,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"env": {
"browser": true,
"node": true,
"jest": true,
"es6": true
},
"settings": {
"react": {
"pragma": "React",
"version": "16.6.0"
}
}
}
@charliecalvert
Copy link
Author

You may need to run one or more of the following:

yarn global add eslint
yarn global add babel-eslint

npm -g install eslint
npm -g install babel-eslint

Test with

eslint .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment