{
    "parser": "@typescript-eslint/parser",
    "parserOptions": {
      "project": "./tsconfig.json"
    },
    "plugins": [
      "css-modules",
      "jest",
      "jsx-a11y",
      "react",
      "react-hooks",
      "suggest-no-throw",
      "testing-library",
      "@typescript-eslint"
    ],
    "extends": [
      "plugin:css-modules/recommended",
      "plugin:jsx-a11y/recommended",
      "plugin:react-hooks/recommended"
    ],
    "rules": {
      "@typescript-eslint/no-floating-promises": "error",
      "@typescript-eslint/no-misused-promises": "error",
      "jsx-a11y/click-events-have-key-events": "off",
      "jsx-a11y/no-autofocus": "off",
      "jsx-a11y/no-noninteractive-element-interactions": "off",
      "no-restricted-globals": [
        "error",
        {
          "name": "isNaN",
          "message": "Use Number.isNaN() instead."
        },
      ],
      "no-restricted-syntax": [
        "error",
        {
          "selector": "CallExpression[callee.object.name='Array'][callee.property.name='isArray']",
          "message": "Use isArray() in lib/utils.ts instead of Array.isArray()."
        }
      ],
      "semi": [
        "error",
        "never"
      ],
      "react-hooks/exhaustive-deps": "off",
      "suggest-no-throw/suggest-no-throw": "warn",
    },
    "overrides": [
      {
        "files": ["e2e/**/*.ts"], // Update the pattern based on your file structure
        "extends": [
          "plugin:testing-library/react"
        ],
        "rules": {
          "suggest-no-throw/suggest-no-throw": "off",
          "testing-library/prefer-screen-queries": "off",
          "jest/valid-expect": "off"
        }
      },
      {
        "files": ["src/**/*.test.ts"],
        "extends": [
          "plugin:testing-library/react"
        ],
        "rules": {
          "suggest-no-throw/suggest-no-throw": "off",
        }
      }
    ]
}
