import js from '@eslint/js' import nextPlugin from '@next/eslint-plugin-next' import { defineConfig, globalIgnores } from 'eslint/config' import reactHooks from 'eslint-plugin-react-hooks' import globals from 'globals' import tseslint from 'typescript-eslint' export default defineConfig([ globalIgnores([ '.next/**', 'out/**', 'build/**', 'coverage/**', 'next-env.d.ts', 'src/infra/simple-rest-api/generated/**' ]), js.configs.recommended, ...tseslint.configs.recommended, { files: ['**/*.{js,mjs,mts,ts,tsx}'], plugins: { '@next/next': nextPlugin, 'react-hooks': reactHooks }, languageOptions: { globals: { ...globals.browser, ...globals.node } }, rules: { ...nextPlugin.configs.recommended.rules, ...nextPlugin.configs['core-web-vitals'].rules, ...reactHooks.configs.flat.recommended.rules } } ])