{
  "plugins": [
    "react",
    "promise"
  ],
  "parser": "@babel/eslint-parser",
  "parserOptions": {
    "sourceType": "module",
    "ecmaFeatures": {
      "jsx": true
    }
  },
  "env": {
    "browser": true,
    "es6": true,
    "mocha": true
  },
  "extends": [
    "airbnb",
    "airbnb/hooks",
    "eslint:recommended",
    "plugin:promise/recommended",
    "plugin:react/recommended"
  ],
  "rules": {
    "arrow-parens": [2, "as-needed"],
    "curly": [2, "all"],
    "eqeqeq": [2, "smart"],
    "import/order": [2, { "groups": [["builtin", "external", "parent", "sibling", "index"]] }],
    "indent": 2,
    "no-console": [1, { "allow": ["warn", "error"] }], // minor offense
    "no-restricted-imports": [2, "lodash", "@material-ui/core", "@material-ui/icons"],
    "react/destructuring-assignment": [0],
    "react/jsx-closing-bracket-location": [2, { "nonEmpty": "after-props", "selfClosing": "after-props" }],
    "react/jsx-curly-spacing": [2, "never", {"allowMultiline": false}],
    "react/jsx-no-duplicate-props": [2, {"ignoreCase": false}],
    "react/jsx-wrap-multilines": [
      2,
      {
        "declaration": "parens-new-line",
        "assignment": "parens-new-line",
        "return": "parens-new-line",
        "arrow": "parens-new-line"
      }
    ],
    "react/prop-types": [2, {
      "ignore": ["classes"],
      "customValidators": [],
      "skipUndeclared": false
    }],
    "react/no-unstable-nested-components": [
      "error",
      {"allowAsProps": true}
    ],
    "semi": [2, "always"],
    "sort-imports": [0],
    "space-before-blocks": [2, "always"],
    "space-before-function-paren": [2, "never"],
    "strict": [2, "safe"],

    // The rest of this file disables airbnb defaults that don't work for our project

    // These rules are stylistic in nature, and don't work with the existing project style
    "arrow-body-style": 0,
    "import/extensions": 0,
    "import/prefer-default-export": 0,
    "max-len": 0,
    "no-confusing-arrow": 0,
    "no-else-return": 0,
    "no-nested-ternary": 0,
    "object-curly-newline": 0,
    "operator-linebreak": 0,
    "prefer-destructuring": 0,
    "react/display-name": 0,
    "react/jsx-curly-newline": 0,
    "react/jsx-filename-extension": 0,
    "react/jsx-fragments": 0,
    "react/jsx-one-expression-per-line": 0,
    "react/sort-comp": 0,

    // These rules are disabled to support specific features/conventions that we use
    "no-bitwise": 0,
    "no-tabs": 0,
    "no-throw-literal": 0,
    "no-underscore-dangle": 0,
    "func-names": ["error", "as-needed"],
    "prefer-promise-reject-errors": 0,
    "promise/always-return": 0,
    "react/jsx-props-no-spreading": 0,

    // These rules represent best practices that we're not adhering to, and should be enabled
    "no-param-reassign": ["error", { "props": false }]
  }
}
