text: /**
   * @type {import("eslint").Linter.Config}
   */
  const config = {
    parserOptions: {
      ecmaVersion: 2021,
      sourceType: "module",
      ecmaFeatures: {
        impliedStrict: true,
        jsx: true,
      },
    },
    plugins: ["jest"],
    env: {
      es2021: true,
      browser: true,
      node: true,
      jest: true,
    },
    settings: {
      react: {
        version: "detect",
      },
      "import/resolver": {
        node: {
          extensions: [".js", ".jsx", ".ts", ".tsx"],
        },
      },
    },
    extends: [
      "eslint:recommended",
      "airbnb",
      "airbnb/hooks",
      "plugin:jest/recommended",
      "plugin:jest/style",
      "plugin:react/recommended",
      "prettier",
    ],
    overrides: [
      {
        files: ["*.ts", "*.tsx"],
        plugins: ["@typescript-eslint"],
        parser: "@typescript-eslint/parser",
        parserOptions: {
          project: "./tsconfig.json",
        },
        extends: ["plugin:@typescript-eslint/recommended", "prettier"],
        rules: {
          "no-use-before-define": "off",
          "@typescript-eslint/no-use-before-define": ["error"],
          "no-shadow": "off",
          "@typescript-eslint/no-shadow": ["error"],
          "react/require-default-props": "off",
          "@typescript-eslint/no-floating-promises": ["error"],
          "no-void": ["error", { allowAsStatement: true }],
        },
      },
    ],
    rules: {
      "no-console": "off",
      "import/extensions": [
        "error",
        "ignorePackages",
        {
          js: "never",
          jsx: "never",
          ts: "never",
          tsx: "never",
        },
      ],
      "react/jsx-filename-extension": [2, { extensions: [".jsx", ".tsx"] }],
      "@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
    },
  };
  
  module.exports = config;
  