import { FlatCompat } from '@eslint/eslintrc';
import tseslint from 'typescript-eslint';
import { baseConfig } from '../../eslint.config.base.js';

const compat = new FlatCompat({
  baseDirectory: import.meta.dirname,
});

export default tseslint.config(
  { ignores: ['.next'] },
  ...compat.extends('next/core-web-vitals'),
  baseConfig,
  {
    linterOptions: {
      reportUnusedDisableDirectives: true,
    },
    languageOptions: {
      parserOptions: {
        projectService: true,
      },
    },
  },
);

