diff --git a/eslint.config.mjs b/eslint.config.mjs index c85fb67..ff59af2 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -9,8 +9,8 @@ const compat = new FlatCompat({ baseDirectory: __dirname, }); -const eslintConfig = [ - ...compat.extends("next/core-web-vitals", "next/typescript"), -]; +const eslintConfig = [{ + ignores: ["node_modules/**", ".next/**", "out/**", "build/**", "next-env.d.ts"] +}, ...compat.extends("next/core-web-vitals", "next/typescript")]; export default eslintConfig; diff --git a/jest.setup.ts b/jest.setup.ts index a2dccf7..b183d72 100644 --- a/jest.setup.ts +++ b/jest.setup.ts @@ -9,20 +9,26 @@ jest.mock("react-responsive-masonry", () => ({ default: ({ children }: { children: React.ReactNode }) => React.createElement("div", null, children), get ResponsiveMasonry() { - return ({ children }: { children: React.ReactNode }) => + const ResponsiveMasonryComponent = ({ children }: { children: React.ReactNode }) => React.createElement("div", null, children); + ResponsiveMasonryComponent.displayName = 'ResponsiveMasonry'; + return ResponsiveMasonryComponent; }, })); // Mock next/link jest.mock('next/link', () => { - return ({ children }: { children: React.ReactNode }) => children; + const LinkComponent = ({ children }: { children: React.ReactNode }) => children; + LinkComponent.displayName = 'Link'; + return LinkComponent; }); // Mock next/image jest.mock('next/image', () => { - return ({ src, alt, ...props }: any) => + const ImageComponent = ({ src, alt, ...props }: Record) => React.createElement('img', { src, alt, ...props }); + ImageComponent.displayName = 'Image'; + return ImageComponent; }); // Custom render function with ToastProvider diff --git a/lib/prisma.ts b/lib/prisma.ts index daeebe7..cbc5ab5 100644 --- a/lib/prisma.ts +++ b/lib/prisma.ts @@ -73,7 +73,7 @@ export const projectService = { ...data, performance: data.performance || { lighthouse: 90, bundleSize: '50KB', loadTime: '1.5s' }, analytics: data.analytics || { views: 0, likes: 0, shares: 0 } - } as Record + } as any }); }, diff --git a/next.config.ts b/next.config.ts index f523eea..46b54f4 100644 --- a/next.config.ts +++ b/next.config.ts @@ -43,7 +43,9 @@ const nextConfig: NextConfig = { }, }; -const withBundleAnalyzer = require("@next/bundle-analyzer")({ +import bundleAnalyzer from "@next/bundle-analyzer"; + +const withBundleAnalyzer = bundleAnalyzer({ enabled: process.env.ANALYZE === "true", }); diff --git a/package.json b/package.json index 2332aae..f6c9267 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "dev": "next dev", "build": "next build", "start": "next start", - "lint": "next lint", + "lint": "eslint .", "buildAnalyze": "cross-env ANALYZE=true next build", "test": "jest", "test:watch": "jest --watch", diff --git a/prisma/seed.ts b/prisma/seed.ts index 2e58979..b8253ce 100644 --- a/prisma/seed.ts +++ b/prisma/seed.ts @@ -282,7 +282,7 @@ Built with a focus on user experience and visual appeal. Implemented proper erro await prisma.project.create({ data: { ...project, - difficulty: project.difficulty as any, + difficulty: project.difficulty as 'BEGINNER' | 'INTERMEDIATE' | 'ADVANCED' | 'EXPERT', } }); }