import js from '@eslint/js'; import tseslint from 'typescript-eslint'; import reactPlugin from 'eslint-plugin-react'; import reactHooks from 'eslint-plugin-react-hooks'; export default [ { ignores: ['dist/**', 'coverage/**', 'node_modules/**', 'web/dist/**'], }, js.configs.recommended, ...tseslint.configs.recommended, { files: ['src/**/*.ts'], languageOptions: { ecmaVersion: 2022, sourceType: 'module', }, rules: { '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }], }, }, { files: ['web/**/*.{ts,tsx}'], plugins: { react: reactPlugin, 'react-hooks': reactHooks, }, languageOptions: { ecmaVersion: 2022, sourceType: 'module', parserOptions: { ecmaFeatures: { jsx: true }, }, }, settings: { react: { version: 'detect' }, }, rules: { ...reactPlugin.configs.recommended.rules, ...reactHooks.configs.recommended.rules, // The automatic JSX runtime (jsx: "react-jsx") makes the React import // unnecessary. 'react/react-in-jsx-scope': 'off', '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }], }, }, ];