import js from '@eslint/js' import globals from 'globals' import reactHooks from 'eslint-plugin-react-hooks' import reactRefresh from 'eslint-plugin-react-refresh' import react from 'eslint-plugin-react' import tseslint from '@typescript-eslint/eslint-plugin' import tsparser from '@typescript-eslint/parser' export default [ js.configs.recommended, { files: ['**/*.{js,jsx,ts,tsx}'], languageOptions: { globals: { ...globals.browser, ...globals.es2020, ...globals.node, React: 'readonly', }, parser: tsparser, parserOptions: { ecmaVersion: 'latest', sourceType: 'module', ecmaFeatures: { jsx: true, }, }, }, plugins: { 'react': react, 'react-hooks': reactHooks, 'react-refresh': reactRefresh, '@typescript-eslint': tseslint, }, settings: { react: { version: 'detect', }, }, rules: { ...react.configs.recommended.rules, ...reactHooks.configs.recommended.rules, 'react-refresh/only-export-components': [ 'warn', { allowConstantExport: true }, ], 'no-unused-vars': 'off', '@typescript-eslint/no-unused-vars': 'warn', 'react/prop-types': 'off', 'react/react-in-jsx-scope': 'off', }, }, ]