import { FlatCompat } from '@eslint/eslintrc'; import path from 'path'; import { fileURLToPath } from 'url'; const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); const compat = new FlatCompat({ baseDirectory: __dirname, }); const config = [ ...compat.extends('next/core-web-vitals'), { files: ['**/*.{js,jsx,ts,tsx}'], ignores: [ '.next/**/*', 'node_modules/**/*', 'dist/**/*', 'build/**/*', 'coverage/**/*', '*.config.js', '*.config.mjs', 'jest.setup.js', 'scripts/**/*.js', 'next-env.d.ts', '.next/types/**/*', '.next/build/**/*', '.next/server/**/*', '.next/static/**/*', '.next/edge/**/*', 'coverage/**/*' ], rules: { 'no-unused-vars': ['warn', { argsIgnorePattern: '^_', varsIgnorePattern: '^_', caughtErrorsIgnorePattern: '^_' }], 'react/no-unescaped-entities': 'warn', 'react-hooks/exhaustive-deps': 'warn' } } ]; export default config;