@@ -80,6 +80,7 @@ const templateScaffolds: Record<TemplateKey, TemplateScaffold> = {
8080 { source : 'templates/repo-docs/README.md' , destination : 'docs/README.md' } ,
8181 { source : 'templates/repo-validate/validate.sh' , destination : 'scripts/validate.sh' } ,
8282 { destination : 'package.json' , content : nextPackageJsonTemplate ( ) } ,
83+ { destination : 'eslint.config.mjs' , content : nextEslintConfigTemplate ( ) } ,
8384 { destination : 'src/app/page.tsx' , content : "export default function Home() {\n return <main>{{PROJECT_NAME}}</main>;\n}\n" } ,
8485 { destination : 'src/app/layout.tsx' , content : "export default function RootLayout({ children }: { children: React.ReactNode }) {\n return (\n <html lang=\"en\">\n <body>{children}</body>\n </html>\n );\n}\n" }
8586 ]
@@ -518,7 +519,7 @@ function nextPackageJsonTemplate(): string {
518519 "dev": "next dev",
519520 "build": "next build",
520521 "start": "next start",
521- "lint": "next lint "
522+ "lint": "eslint . "
522523 },
523524 "dependencies": {
524525 "next": "latest",
@@ -528,12 +529,25 @@ function nextPackageJsonTemplate(): string {
528529 "devDependencies": {
529530 "@types/node": "latest",
530531 "@types/react": "latest",
532+ "eslint": "latest",
533+ "eslint-config-next": "latest",
531534 "typescript": "latest"
532535 }
533536}
534537` ;
535538}
536539
540+ function nextEslintConfigTemplate ( ) : string {
541+ return `import { defineConfig, globalIgnores } from "eslint/config";
542+ import nextVitals from "eslint-config-next/core-web-vitals";
543+
544+ export default defineConfig([
545+ ...nextVitals,
546+ globalIgnores([".next/**", "out/**", "build/**", "next-env.d.ts"])
547+ ]);
548+ ` ;
549+ }
550+
537551function pythonProjectTemplate ( ) : string {
538552 return `[project]
539553name = "{{PROJECT_NAME}}"
0 commit comments