import { dirname } from 'node:path'; import { fileURLToPath } from 'node:url'; import { FlatCompat } from '@eslint/eslintrc'; // eslint-config-next still ships a legacy config, so it needs the compat shim // to run under ESLint 9 flat config. const compat = new FlatCompat({ baseDirectory: dirname(fileURLToPath(import.meta.url)) }); const config = [ { ignores: ['.next/**', 'node_modules/**', 'next-env.d.ts'] }, ...compat.extends('next/core-web-vitals', 'next/typescript'), ]; export default config;