import js from "@eslint/js"; import globals from "globals"; import reactRefresh from "eslint-plugin-react-refresh"; import reactHooks from "eslint-plugin-react-hooks"; import tseslint from "typescript-eslint"; import eslintConfigPrettier from "eslint-config-prettier"; export default tseslint.config( { ignores: ["dist", "node_modules", "**/*.config.js", "**/*.config.ts"] }, { extends: [js.configs.recommended, ...tseslint.configs.strictTypeChecked], files: ["**/*.{ts,tsx}"], languageOptions: { ecmaVersion: 2022, globals: { ...globals.browser }, parserOptions: { projectService: true, tsconfigRootDir: import.meta.dirname, }, }, plugins: { "react-refresh": reactRefresh, "react-hooks": reactHooks, }, rules: { "@typescript-eslint/no-unused-vars": [ "error", { argsIgnorePattern: "^_", varsIgnorePattern: "^_" }, ], "@typescript-eslint/no-explicit-any": "error", "react-refresh/only-export-components": [ "warn", { allowConstantExport: true }, ], "react-hooks/rules-of-hooks": "error", "react-hooks/exhaustive-deps": "warn", }, }, eslintConfigPrettier );