import js from '@eslint/js'; import globals from 'globals'; import react from 'eslint-plugin-react'; import reactHooks from 'eslint-plugin-react-hooks'; import reactRefresh from 'eslint-plugin-react-refresh'; export default [ { ignores: ['dist', 'coverage'] }, js.configs.recommended, { files: ['src/**/*.{js,jsx}', 'tests/**/*.js'], languageOptions: { ecmaVersion: 2024, globals: { ...globals.browser, ...globals.node, }, parserOptions: { ecmaFeatures: { jsx: true }, }, }, plugins: { react, 'react-hooks': reactHooks, 'react-refresh': reactRefresh, }, rules: { 'react/jsx-uses-vars': 'error', 'react/react-in-jsx-scope': 'off', ...reactHooks.configs.recommended.rules, 'react-refresh/only-export-components': ['warn', { allowConstantExport: true }], 'react-hooks/set-state-in-effect': 'off', }, }, ];