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', 'coverage', 'storybook-static', 'node_modules', '*.config.cjs', 'vite.config.js', 'vite.config.d.ts', 'tailwind-preset.cjs', ], }, js.configs.recommended, ...tseslint.configs.recommended, { files: ['**/*.{ts,tsx}'], languageOptions: { ecmaVersion: 'latest', sourceType: 'module', globals: { ...globals.browser, ...globals.node, }, }, rules: { 'no-empty': ['error', { allowEmptyCatch: true }], }, }, { files: ['src/**/*.{ts,tsx}'], ignores: ['src/**/*.stories.ts', 'src/**/*.stories.tsx'], plugins: { 'react-hooks': reactHooks, 'react-refresh': reactRefresh, }, rules: { ...reactHooks.configs.recommended.rules, 'react-refresh/only-export-components': ['warn', { allowConstantExport: true }], }, }, );