{ "parser": "babel-eslint", "root": true, "env": { "browser": true, "node": true, "jquery": true, "mocha": true, "es6": true }, "parserOptions": { "ecmaVersion": 6, "sourceType": "module", "ecmaFeatures": { "jsx": true } }, "globals": { "require": true, "mechanic": true, "yarify": true, "__DEV__": true }, "plugins": [ "import", "react", "jsx-a11y" ], "extends": [ "eslint:recommended", "plugin:react/recommended", "airbnb", "react-app" ], "settings": { "import/resolver": { "node": { "extensions": [ ".js", ".android.js", ".ios.js" ] } } }, "rules": { "import/no-unresolved": [ 2, { "ignore": [ "react", "react-native" ] } ], "import/extensions": 0, "prefer-destructuring": "off", "no-console": "off", "dot-notation": "off", "quote-props": "off", "comma-dangle": "off", "padded-blocks": "off", "no-trailing-spaces": "off", "max-len": [ "warn", 200 ], "no-template-curly-in-string": "error", "no-loop-func": "error", "indent": [ "error", 4 ], "no-multiple-empty-lines": [ "error", { "max": 2, "maxEOF": 2 } ], "semi": "error", "no-var": "error", // disallow unnecessary semicolons "brace-style": [ "error", "stroustrup" ], "curly": "error", "camelcase": [ "warn", { "properties": "never" } ], "quotes": [ "error", "double" ], "handle-callback-err": [ "error", "^(err|error|errors)$" ], "eqeqeq": "error", "no-underscore-dangle": "off", "no-multi-spaces": "error", "space-unary-ops": [ "error", { "words": true, "nonwords": false } ], "object-curly-spacing": [ "warn", "never" ], "keyword-spacing": [ "error", { "before": true, "after": true } ], "guard-for-in": "error", "no-return-assign": "error", "comma-style": [ "error", "last" ], "comma-spacing": [ 1, { "before": false, "after": true } ], "space-before-function-paren": [ "error", { "anonymous": "always", "named": "never" } ], "space-in-parens": [ "error", "never" ], "no-shadow": [ "error", { "allow": [ "resolve", "reject", "error", "err" ] } ], "no-use-before-define": [ "error", "nofunc" ], "arrow-body-style": [ "error", "always" ], "arrow-parens": [ "error", "always" ], "no-confusing-arrow": "error", "no-unreachable": "error", "no-path-concat": "error", "prefer-arrow-callback": [ "error", { "allowNamedFunctions": true } ], "no-await-in-loop": "error", "prefer-template": "error", "no-useless-concat": "error", "react/jsx-indent": [ "error", 4 ], "react/jsx-indent-props": [ "error", 4 ], "react/jsx-tag-spacing": [ "warn", { "closingSlash": "never", "beforeSelfClosing": "never", "afterOpening": "never", "beforeClosing": "never" } ], "react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }], /* Override jsx-a11y rules */ "jsx-a11y/href-no-hash": "off", "jsx-a11y/click-events-have-key-events": "off", /* Override airbnb javascript rules */ "no-restricted-syntax": [ "error", { "selector": "ForInStatement", "message": "for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array." }, { "selector": "LabeledStatement", "message": "Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand." }, { "selector": "WithStatement", "message": "`with` is disallowed in strict mode because it makes code impossible to predict and optimize." } ] } }