{
  "env": {
    "browser": true,
    "node": true,
    "es6": true
  },
  "extends": [
    "eslint:recommended",
    "plugin:react/recommended",
    "plugin:react-hooks/recommended",
//    "plugin:jsx-a11y/recommended",
    "eslint-config-prettier",
    "plugin:@typescript-eslint/recommended",
  ],
  "parser": "@typescript-eslint/parser",
  "parserOptions": {
    "warnOnUnsupportedTypeScriptVersion": false
  },
  "settings": {
    "react": {
      "version": "detect"
    },
    "import/resolver": {
      "node": {
        "paths": [
          "src"
        ],
        "extensions": [
          ".js",
          ".jsx",
          ".ts",
          ".tsx"
        ]
      }
    }
  },
  "plugins": ["react-refresh"],
  "rules": {
    "no-console": "error",
//    "no-unused-vars": "off",
    "@typescript-eslint/no-unused-vars": "off",
    "react-refresh/only-export-components": [
      "warn",
      { "allowConstantExport": true }
    ],
    "react/jsx-uses-react": "off",
    "react/react-in-jsx-scope": "off",
    "react/prop-types": "off",
    "no-restricted-imports": [
      "error",
      {
        "patterns": [
          {
            "group": ["**/dataProvider"],
            "importNames": ["httpClient"],
            "message": "Do not call httpClient directly. Add a method to wrapperDataProvider and call it through useDirectDataProvider(), or add the Subsonic call to src/subsonic."
          },
          {
            "group": ["**/dataProvider/httpClient"],
            "message": "Do not call httpClient directly. Add a method to wrapperDataProvider and call it through useDirectDataProvider(), or add the Subsonic call to src/subsonic."
          }
        ]
      }
    ],
  },
  "overrides": [
    {
      "files": ["src/dataProvider/**", "src/subsonic/**"],
      "rules": { "no-restricted-imports": "off" }
    }
  ],
  // Fix Vitest
  "globals": {
    "describe": "readonly",
    "it": "readonly",
    "expect": "readonly",
    "vi": "readonly",
    "beforeAll": "readonly",
    "afterAll": "readonly",
    "beforeEach": "readonly",
    "afterEach": "readonly",
  }
}