import eslint from '@eslint/js'; import tseslint from 'typescript-eslint'; import react from 'eslint-plugin-react'; import reactHooks from 'eslint-plugin-react-hooks'; import fileLengthPlugin from '@lilith/eslint-plugin-file-length'; export default tseslint.config( eslint.configs.recommended, ...tseslint.configs.recommended, { files: ['**/*.{ts,tsx}'], plugins: { react, 'react-hooks': reactHooks, '@lilith/file-length': fileLengthPlugin, }, languageOptions: { parserOptions: { ecmaFeatures: { jsx: true }, }, }, settings: { react: { version: 'detect' }, }, rules: { ...react.configs.recommended.rules, ...reactHooks.configs.recommended.rules, '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }], '@typescript-eslint/no-explicit-any': 'warn', 'react/react-in-jsx-scope': 'off', 'react/prop-types': 'off', '@lilith/file-length/file-length': [ 'warn', { warnThreshold: 400, errorThreshold: 600, }, ], }, }, { ignores: ['**/*.test.ts', '**/*.test.tsx', '**/__tests__/**', 'dist/', 'node_modules/', '*.d.ts', '*.js'], } );