import js from '@eslint/js' import eslintConfigPrettier from 'eslint-config-prettier' import reactHooks from 'eslint-plugin-react-hooks' import reactRefresh from 'eslint-plugin-react-refresh' import tseslint from 'typescript-eslint' export default tseslint.config( { ignores: ['coverage', 'dist'], }, { files: ['**/*.{js,mjs,cjs}'], ...js.configs.recommended, }, { files: ['**/*.{ts,tsx}'], extends: [...tseslint.configs.recommended], plugins: { 'react-hooks': reactHooks, 'react-refresh': reactRefresh, }, rules: { '@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/no-unused-vars': [ 'error', { argsIgnorePattern: '^_', caughtErrorsIgnorePattern: '^_', varsIgnorePattern: '^_', }, ], 'react-hooks/exhaustive-deps': 'error', 'react-hooks/rules-of-hooks': 'error', 'react-refresh/only-export-components': 'off', }, }, eslintConfigPrettier, )