Skip to content

Instantly share code, notes, and snippets.

@bacarybruno
Created March 11, 2019 10:41
Show Gist options
  • Save bacarybruno/a247fad65bc58b474b1e4200b0ef62c2 to your computer and use it in GitHub Desktop.
Save bacarybruno/a247fad65bc58b474b1e4200b0ef62c2 to your computer and use it in GitHub Desktop.
ESLint file for react, with best practices and extending airbnb config.
{
"root": true,
"parser": "babel-eslint",
"extends": "airbnb",
"env": {
"es6": true,
"node": true,
"jest": true
},
"plugins": [
"flowtype",
"react"
],
"globals": {
"__DEV__": true
},
"rules": {
"flowtype/define-flow-type": 1,
"flowtype/use-flow-type": 1,
"comma-dangle": 0,
"no-cond-assign": 1,
"no-console": 1,
"no-const-assign": 2,
"no-constant-condition": 0,
"no-control-regex": 1,
"no-debugger": 1,
"no-dupe-keys": 1,
"no-empty": 0,
"no-ex-assign": 1,
"no-extra-boolean-cast": 1,
"no-extra-parens": 0,
"no-extra-semi": 1,
"no-func-assign": 1,
"no-inner-declarations": 0,
"no-invalid-regexp": 1,
"no-negated-in-lhs": 1,
"no-obj-calls": 1,
"no-regex-spaces": 1,
"no-reserved-keys": 0,
"no-sparse-arrays": 1,
"no-unreachable": 1,
"use-isnan": 1,
"valid-jsdoc": 0,
"valid-typeof": 1,
"block-scoped-var": 0,
"complexity": 0,
"consistent-return": 0,
"curly": 1,
"default-case": 0,
"dot-notation": 1,
"eqeqeq": [
1,
"allow-null"
],
"guard-for-in": 0,
"no-alert": 1,
"no-caller": 1,
"no-div-regex": 1,
"no-else-return": 0,
"no-eq-null": 0,
"no-eval": 1,
"no-extend-native": 1,
"no-extra-bind": 1,
"no-fallthrough": 1,
"no-floating-decimal": 1,
"no-implied-eval": 1,
"no-labels": 1,
"no-iterator": 1,
"no-lone-blocks": 1,
"no-loop-func": 0,
"no-multi-str": 0,
"no-native-reassign": 0,
"no-new": 1,
"no-new-func": 1,
"no-new-wrappers": 1,
"no-octal": 1,
"no-octal-escape": 1,
"no-proto": 1,
"no-redeclare": 0,
"no-return-assign": 1,
"no-script-url": 1,
"no-self-compare": 1,
"no-sequences": 1,
"no-unused-expressions": 0,
"no-void": 1,
"no-warning-comments": 0,
"no-with": 1,
"radix": 1,
"semi-spacing": 1,
"vars-on-top": 0,
"wrap-iife": 0,
"yoda": 1,
"react/display-name": 0,
"react/jsx-boolean-value": 0,
"react/jsx-no-comment-textnodes": 1,
"react/jsx-no-duplicate-props": 2,
"react/jsx-no-undef": 1,
"react/jsx-sort-props": 0,
"react/jsx-uses-react": 1,
"react/jsx-uses-vars": 1,
"react/no-did-mount-set-state": 1,
"react/no-did-update-set-state": 1,
"react/no-multi-comp": 0,
"react/no-string-refs": 1,
"react/no-unknown-property": 0,
"react/prop-types": 0,
"react/react-in-jsx-scope": 1,
"react/self-closing-comp": 1,
"react/wrap-multilines": 0
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment