import { dirname } from "path"; import { fileURLToPath } from "url"; import { FlatCompat } from "@eslint/eslintrc"; const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename); const compat = new FlatCompat({ baseDirectory: __dirname, }); const eslintConfig = [ ...compat.config({ extends: ["next/core-web-vitals", "next/typescript"], rules: { "react/no-unescaped-entities": "off", "@next/next/no-page-custom-font": "off", "@typescript-eslint/ban-ts-comment": "error", "@typescript-eslint/no-require-imports": "off", "@typescript-eslint/no-unused-vars": "off", "@typescript-eslint/no-unused-expressions": "off", "@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/no-empty-object-type": "off", "@typescript-eslint/no-this-alias": "off", "@typescript-eslint/no-unsafe-function-types": "off", "@typescript-eslint/no-unnecessary-type-constraint": "off", "@typescript-eslint/no-wrapper-object-types": "off", }, ignorePatterns: ["src/generated/prisma/**/*.d.ts"], }), ]; export default eslintConfig;