import js from '@eslint/js' import prettierConfig from 'eslint-config-prettier' import importPlugin from 'eslint-plugin-import' import prettierPlugin from 'eslint-plugin-prettier' import reactHooks from 'eslint-plugin-react-hooks' import reactRefresh from 'eslint-plugin-react-refresh' import globals from 'globals' import tseslint from 'typescript-eslint' export default [ { ignores: ['dist'], }, js.configs.recommended, ...tseslint.configs.recommended, { files: ['**/*.{ts,tsx,js,jsx}'], plugins: { '@typescript-eslint': tseslint.plugin, 'react-hooks': reactHooks, 'react-refresh': reactRefresh, prettier: prettierPlugin, import: importPlugin, }, languageOptions: { ecmaVersion: 2020, globals: { ...globals.browser, ...globals.node, }, }, rules: { ...reactHooks.configs.recommended.rules, 'prettier/prettier': ['error', { endOfLine: 'auto' }], 'import/order': [ 'error', { groups: [['builtin', 'external'], 'internal', ['parent', 'sibling', 'index']], 'newlines-between': 'always', alphabetize: { order: 'asc', caseInsensitive: true, }, }, ], }, }, prettierConfig, ]