{
  "parser": "@typescript-eslint/parser",
  "parserOptions": {
    "project": ["./tsconfig.json", "cypress/tsconfig.json"]
  },
  "plugins": [
    "@typescript-eslint",
    "header",
    "jest"
  ],
  "env": {
    "browser": true,
    "jest/globals": true,
    "node": true
  },
  "settings": {
    "react": {
      "version": "detect"
    },
    "linkComponents": [
      // Components used as alternatives to <a> for linking, eg. <Link to={ url } />
      "Hyperlink",
      {"name": "Link", "linkAttribute": "to"}
    ]
  },
  "extends": [
    "eslint:recommended",
    "plugin:@typescript-eslint/recommended",
    "plugin:react/recommended",
    "react-app",
    "airbnb"
  ],
  "rules": {
    "@typescript-eslint/ban-ts-ignore": "off", // Some @types files haven't updated yet, so props are missing sometimes
    "@typescript-eslint/camelcase": "off", // duplicates "camelcase" from airbnb
    "@typescript-eslint/explicit-function-return-type": "off",
    "@typescript-eslint/explicit-member-accessibility": ["error", {"accessibility": "no-public"}],
    "@typescript-eslint/indent": ["error", 2],
    "@typescript-eslint/no-empty-interface": "off",
    "@typescript-eslint/no-explicit-any": "off",
    "@typescript-eslint/no-object-literal-type-assertion": "off",
    "@typescript-eslint/no-use-before-define": "off",
    "header/header": [
      "error", "block", [
        "",
        {
          "pattern": " * Copyright \\d{4} Red Hat, Inc. and/or its affiliates.",
          "template": " * Copyright 2020 Red Hat, Inc. and/or its affiliates."
        },
        " *",
        " * Licensed under the Apache License, Version 2.0 (the \"License\");",
        " * you may not use this file except in compliance with the License.",
        " * You may obtain a copy of the License at",
        " *",
        " *     http://www.apache.org/licenses/LICENSE-2.0",
        " *",
        " * Unless required by applicable law or agreed to in writing, software",
        " * distributed under the License is distributed on an \"AS IS\" BASIS,",
        " * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.",
        " * See the License for the specific language governing permissions and",
        " * limitations under the License.",
        " "
      ]
    ],
    "import/extensions": ["error", "never", {"css":  "always"}],
    "import/no-extraneous-dependencies": [
      "error",
      {
        "devDependencies": [
          "**/*.test.ts",
          "**/*.test.tsx",
          "cypress/**",
          "src/store/mockStore.ts",
          "src/setupTests.ts"
        ]
      }
    ],
    "import/no-unresolved": "off",
    "import/prefer-default-export": "off",
    "max-len": ["error", {"code": 120}],
    "no-console": "warn",
    "no-use-before-define": "off",
    "object-curly-newline": [
      "error", {
        "ImportDeclaration": {"multiline": true},
        "ExportDeclaration": {"multiline": true}
      }
    ],
    "react/destructuring-assignment": "off",
    "react/jsx-filename-extension": ["error", {"extensions": [".tsx"]}],
    "react/prop-types": "off",
    "react/sort-comp": "off"
  }
}
