{
  "parser": "@typescript-eslint/parser",
  "parserOptions": {
    "ecmaFeatures": {
      "jsx": true
    },
    "project": "tsconfig.json"
  },
  "env": {
    "mocha": true
  },
  "settings": {
    "react": {
      "version": "detect" // React version. "detect" automatically picks the version you have installed.
    },
    "import/resolver": {
      "typescript": {} // this loads <rootdir>/tsconfig.json to eslint
      //      "typescript": {
      //        "project": "."
      //      }
    }
  },
  "globals": {
    "chrome": "readonly",
    "browser": "readonly",
    "fetch": "readonly",
    "XPathResult": "readonly"
  },
  "extends": [
    "plugin:@typescript-eslint/recommended",
    "prettier/@typescript-eslint",
    "plugin:import/typescript",
    "plugin:react/recommended",
    "plugin:jsx-a11y/recommended"
  ],
  "plugins": ["react"],
  "rules": {
    "no-console": "warn",
    // Use either @typescript-eslint/no-unused-vars or this one but not both
    "no-unused-vars": 0,
    "import/order": [
      "warning",
      {
        "groups": [
          "builtin",
          "external",
          "internal",
          "parent",
          "sibling",
          "index",
          "unknown"
        ]
      }
    ],
    // We don't actually set a display name for functional component
    "react/display-name": 0,

    /* TypeScript */
    // We don't actually set the return type of React functional component
    "@typescript-eslint/explicit-function-return-type": 0,
    // We don't actually always explicitly member accessility (componentDidMount ...)
    "@typescript-eslint/explicit-member-accessibility": 0,
    "@typescript-eslint/no-explicit-any": ["error", { "ignoreRestArgs": true }],
    "@typescript-eslint/no-empty-interface": 0,
    "@typescript-eslint/no-unused-vars": [
      "warn",
      { "ignoreRestSiblings": true }
    ],
    "@typescript-eslint/no-empty-function": 0,
    "@typescript-eslint/camelcase": "off"
  }
}
