✅ ESLint CLI Migration: - Migrated from deprecated 'next lint' to modern 'eslint .' - Updated package.json script: 'lint': 'eslint .' - Updated eslint.config.mjs with Next.js ignores - No more deprecation warnings ✅ Fixed ESLint Errors: - Added displayName to React components in jest.setup.ts - Replaced 'any' types with proper TypeScript types - Fixed require() import in next.config.ts → ES6 import - Fixed Difficulty enum values (Beginner → BEGINNER, etc.) ✅ Build Status: - ESLint: 0 errors, 0 warnings ✅ - TypeScript: All type errors resolved ✅ - Build: Successful compilation ✅ - 22 routes generated successfully ✅ 🎯 Ready for Next.js 16: - No deprecated dependencies - Modern ESLint configuration - Future-proof codebase
17 lines
475 B
JavaScript
17 lines
475 B
JavaScript
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 = [{
|
|
ignores: ["node_modules/**", ".next/**", "out/**", "build/**", "next-env.d.ts"]
|
|
}, ...compat.extends("next/core-web-vitals", "next/typescript")];
|
|
|
|
export default eslintConfig;
|