import js from '@eslint/js'; import tseslint from 'typescript-eslint'; import reactHooks from 'eslint-plugin-react-hooks'; import reactPlugin from 'eslint-plugin-react'; import globals from 'globals'; export default [ { ignores: [ 'dist', '.wxt', 'node_modules', 'eslint.config.ts', '**/*.test.tsx', '**/*.test.ts', '**/__tests__/**', ], }, js.configs.recommended, ...tseslint.configs.recommended, { files: [ 'hooks/**/*.{ts,tsx}', 'entrypoints/**/*.{ts,tsx}', 'pages/**/*.{ts,tsx}', 'utils/**/*.{ts,tsx}', 'components/**/*.{ts,tsx}', 'services/**/*.{ts,tsx}', ], languageOptions: { ecmaVersion: 2020, globals: { ...globals.browser, ...globals.node, }, parserOptions: { project: ['./tsconfig.json'], tsconfigRootDir: import.meta.dirname, }, }, plugins: { react: reactPlugin as any, 'react-hooks': reactHooks as any, }, rules: { ...reactHooks.configs.recommended.rules, 'no-unused-vars': 'off', '@typescript-eslint/no-unused-vars': [ 'warn', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }, ], 'react/react-in-jsx-scope': 'off', }, }, ];