import js from "@eslint/js"; import reactHooks from "eslint-plugin-react-hooks"; import reactRefresh from "eslint-plugin-react-refresh"; import globals from "globals"; import tseslint from "typescript-eslint"; export default tseslint.config( { ignores: ["dist", "node_modules", "coverage", "playwright-report", "test-results", "release"], }, js.configs.recommended, ...tseslint.configs.recommended, { files: ["src/**/*.{ts,tsx}"], languageOptions: { ecmaVersion: "latest", globals: globals.browser, }, plugins: { "react-hooks": reactHooks, "react-refresh": reactRefresh, }, rules: { ...reactHooks.configs.recommended.rules, "react-refresh/only-export-components": ["warn", { allowConstantExport: true }], }, }, { files: ["src/**/*.test.ts"], languageOptions: { globals: { ...globals.browser, ...globals.node } }, }, { files: ["e2e/**/*.ts", "*.config.ts"], languageOptions: { globals: globals.node }, }, { files: ["src/features/auth/session-context.tsx"], rules: { "react-refresh/only-export-components": "off" }, }, );