import js from '@eslint/js'; import tseslint from '@typescript-eslint/eslint-plugin'; import tsparser from '@typescript-eslint/parser'; import reactPlugin from 'eslint-plugin-react'; import reactHooks from 'eslint-plugin-react-hooks'; export default [ { files: ['**/*.{js,jsx,ts,tsx}'], languageOptions: { parser: tsparser, ecmaVersion: 'latest', sourceType: 'module', parserOptions: { ecmaFeatures: { jsx: true } } }, plugins: { '@typescript-eslint': tseslint, 'react': reactPlugin, 'react-hooks': reactHooks }, rules: { ...js.configs.recommended.rules, ...tseslint.configs.recommended.rules, ...reactPlugin.configs.recommended.rules, ...reactHooks.configs.recommended.rules, 'react/react-in-jsx-scope': 'off', '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }], '@typescript-eslint/no-explicit-any': 'warn' }, settings: { react: { version: 'detect' } } } ];