import js from "@eslint/js"; import globals from "globals"; import reactHooks from "eslint-plugin-react-hooks"; import reactRefresh from "eslint-plugin-react-refresh"; import unusedImports from "eslint-plugin-unused-imports"; import tseslint from "typescript-eslint"; import { globalIgnores } from "eslint/config"; export default tseslint.config([ globalIgnores(["dist", "release", "Mobile"]), { files: ["**/*.{ts,tsx}"], extends: [ js.configs.recommended, tseslint.configs.recommended, reactRefresh.configs.vite, ], plugins: { "react-hooks": reactHooks, "unused-imports": unusedImports, }, languageOptions: { ecmaVersion: 2020, globals: globals.browser, }, rules: { "unused-imports/no-unused-imports": "error", "unused-imports/no-unused-vars": [ "warn", { vars: "all", varsIgnorePattern: "^_", args: "after-used", argsIgnorePattern: "^_", }, ], "@typescript-eslint/no-unused-vars": "off", "@typescript-eslint/no-explicit-any": "warn", "@typescript-eslint/no-unused-expressions": "warn", "no-empty": "warn", "no-control-regex": "off", "no-useless-assignment": "off", "preserve-caught-error": "off", "react-hooks/exhaustive-deps": "warn", "react-hooks/rules-of-hooks": "error", "react-refresh/only-export-components": "warn", }, }, ]);