import js from '@eslint/js'; import reactHooksPlugin from 'eslint-plugin-react-hooks'; import tseslint from 'typescript-eslint'; export default tseslint.config( { ignores: ['dist', 'coverage'] }, js.configs.recommended, ...tseslint.configs.strictTypeChecked, ...tseslint.configs.stylisticTypeChecked, { plugins: { 'react-hooks': reactHooksPlugin, }, languageOptions: { parserOptions: { project: './tsconfig.json', tsconfigRootDir: import.meta.dirname, }, }, rules: { ...reactHooksPlugin.configs.recommended.rules, '@typescript-eslint/restrict-template-expressions': ['error', { allowNumber: true }], }, }, { files: ['*.js', '*.mjs', '*.cjs'], ...tseslint.configs.disableTypeChecked, }, );