import js from '@eslint/js'; import tsPlugin from '@typescript-eslint/eslint-plugin'; import tsParser from '@typescript-eslint/parser'; import prettierConfig from 'eslint-config-prettier'; import prettierPlugin from 'eslint-plugin-prettier'; import reactHooks from 'eslint-plugin-react-hooks'; import globals from 'globals'; export default [ { ignores: ['dist/**', 'node_modules/**', '.eslintrc.cjs', 'vite.config.ts'], }, { files: ['**/*.{ts,tsx}'], languageOptions: { parser: tsParser, parserOptions: { ecmaVersion: 'latest', sourceType: 'module', ecmaFeatures: { jsx: true, }, }, globals: { ...globals.browser, ...globals.node, ...globals.es2020, }, }, plugins: { '@typescript-eslint': tsPlugin, 'react-hooks': reactHooks, prettier: prettierPlugin, }, rules: { ...js.configs.recommended.rules, ...tsPlugin.configs.recommended.rules, ...reactHooks.configs.recommended.rules, ...prettierConfig.rules, 'prettier/prettier': 'warn', '@typescript-eslint/no-unused-vars': [ 'warn', { argsIgnorePattern: '^_', varsIgnorePattern: '^_', caughtErrorsIgnorePattern: '^_', }, ], }, }, ];