{
  "extends": [
    "@rocket.chat/eslint-config"
  ],
  "parser": "babel-eslint",
  "globals": {
    "__meteor_bootstrap__": false,
    "__meteor_runtime_config__": false,
    "Assets": false,
    "chrome": false,
    "jscolor": false
  },
  "plugins": [
    "react",
    "react-hooks"
  ],
  "rules": {
    "jsx-quotes": [
      "error",
      "prefer-single"
    ],
    "react/jsx-uses-react": "error",
    "react/jsx-uses-vars": "error",
    "react/jsx-no-undef": "error",
    "react/jsx-fragments": [
      "error",
      "syntax"
    ],
    "react-hooks/rules-of-hooks": "error",
    "react-hooks/exhaustive-deps": ["warn", {
      "additionalHooks": "(useComponentDidUpdate)"
    }]
  },
  "settings": {
    "import/resolver": {
      "node": {
        "extensions": [
          ".js",
          ".ts",
          ".tsx"
        ]
      }
    },
    "react": {
      "version": "detect"
    }
  },
  "overrides": [
    {
      "files": [
        "**/*.ts",
        "**/*.tsx"
      ],
      "extends": [
        "plugin:@typescript-eslint/recommended",
        "plugin:@typescript-eslint/eslint-recommended",
        "@rocket.chat/eslint-config"
      ],
      "globals": {
        "Atomics": "readonly",
        "SharedArrayBuffer": "readonly"
      },
      "parser": "@typescript-eslint/parser",
      "parserOptions": {
        "sourceType": "module",
        "ecmaVersion": 2018,
        "warnOnUnsupportedTypeScriptVersion": false,
        "ecmaFeatures": {
          "experimentalObjectRestSpread": true,
          "legacyDecorators": true
        }
      },
      "plugins": [
        "react",
        "@typescript-eslint"
      ],
      "rules": {
        "func-call-spacing": "off",
        "jsx-quotes": [
          "error",
          "prefer-single"
        ],
        "indent": "off",
        "no-extra-parens": "off",
        "no-spaced-func": "off",
        "no-useless-constructor": "off",
        "react/jsx-uses-react": "error",
        "react/jsx-uses-vars": "error",
        "react/jsx-no-undef": "error",
        "react/jsx-fragments": [
          "error",
          "syntax"
        ],
        "@typescript-eslint/ban-ts-ignore": "off",
        "@typescript-eslint/indent": [
          "error",
          "tab",
          {
            "SwitchCase": 1
          }
        ],
        "@typescript-eslint/no-extra-parens": [
          "error",
          "all",
          {
            "conditionalAssign": true,
            "nestedBinaryExpressions": false,
            "returnAssign": true,
            "ignoreJSX": "all",
            "enforceForArrowConditionals": false
          }
        ],
        "@typescript-eslint/no-explicit-any": "off",
        "@typescript-eslint/interface-name-prefix": [
          "error",
          "always"
        ]
      },
      "env": {
        "browser": true,
        "commonjs": true,
        "es6": true,
        "node": true
      },
      "settings": {
        "import/resolver": {
          "node": {
            "extensions": [
              ".js",
              ".ts",
              ".tsx"
            ]
          }
        },
        "react": {
          "version": "detect"
        }
      }
    }
  ]
}
