import baseConfig from "@mintel/eslint-config";
import { nextConfig } from "@mintel/eslint-config/next";

export default [
    {
        ignores: [
            "**/node_modules/**",
            "node_modules/**",
            "**/.next/**",
            ".next/**",
            "**/dist/**",
            "dist/**",
            "**/out/**",
            "out/**",
            "**/.pnpm-store/**",
            "**/at-mintel/**",
            "at-mintel/**",
            "**/.git/**",
            "*.js",
            "*.mjs",
            "*.cjs",
            "scripts/**",
            "tests/**",
            "next-env.d.ts",
            "reference/**",
            "data/**"
        ],

    },
    ...baseConfig,
    ...nextConfig.map((config) => ({
        ...config,
        files: ["**/*.{ts,tsx}"],
        rules: {
            ...config.rules,
            "@typescript-eslint/no-explicit-any": "off",
            "@typescript-eslint/no-unused-vars": [
                "warn",
                {
                    "argsIgnorePattern": "^_"
                }
            ],
            "@typescript-eslint/no-require-imports": "off",
            "prefer-const": "warn",
            "react/no-unescaped-entities": "off",
            "@next/next/no-img-element": "warn",
            "react-hooks/set-state-in-effect": "warn"
        }

    })),
];
