-
-
Notifications
You must be signed in to change notification settings - Fork 12
Initialize Next.js app with TypeScript, Tailwind CSS, and ESLint #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| @import "tailwindcss"; | ||
|
|
||
| :root { | ||
| --background: #ffffff; | ||
| --foreground: #171717; | ||
| } | ||
|
|
||
| @theme inline { | ||
| --color-background: var(--background); | ||
| --color-foreground: var(--foreground); | ||
| --font-sans: var(--font-geist-sans); | ||
| --font-mono: var(--font-geist-mono); | ||
| } | ||
|
|
||
| @media (prefers-color-scheme: dark) { | ||
| :root { | ||
| --background: #0a0a0a; | ||
| --foreground: #ededed; | ||
| } | ||
| } | ||
|
|
||
| body { | ||
| background: var(--background); | ||
| color: var(--foreground); | ||
| font-family: Arial, Helvetica, sans-serif; | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| import type { Metadata } from "next"; | ||
| import { Geist, Geist_Mono } from "next/font/google"; | ||
| import "./globals.css"; | ||
|
|
||
| const geistSans = Geist({ | ||
| variable: "--font-geist-sans", | ||
| subsets: ["latin"], | ||
| }); | ||
|
|
||
| const geistMono = Geist_Mono({ | ||
| variable: "--font-geist-mono", | ||
| subsets: ["latin"], | ||
| }); | ||
|
|
||
| export const metadata: Metadata = { | ||
| title: "Create Next App", | ||
| description: "Generated by create next app", | ||
| }; | ||
|
Comment on lines
+15
to
+18
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Update placeholder metadata. The 🤖 Prompt for AI Agents |
||
|
|
||
| export default function RootLayout({ | ||
| children, | ||
| }: Readonly<{ | ||
| children: React.ReactNode; | ||
| }>) { | ||
| return ( | ||
| <html lang="en"> | ||
| <body | ||
| className={`${geistSans.variable} ${geistMono.variable} antialiased`} | ||
| > | ||
| {children} | ||
| </body> | ||
| </html> | ||
| ); | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| import Image from "next/image"; | ||
|
|
||
| export default function Home() { | ||
| return ( | ||
| <div className="flex min-h-screen items-center justify-center bg-zinc-50 font-sans dark:bg-black"> | ||
| <main className="flex min-h-screen w-full max-w-3xl flex-col items-center justify-between py-32 px-16 bg-white dark:bg-black sm:items-start"> | ||
| <Image | ||
| className="dark:invert" | ||
| src="/next.svg" | ||
| alt="Next.js logo" | ||
| width={100} | ||
| height={20} | ||
| priority | ||
| /> | ||
| <div className="flex flex-col items-center gap-6 text-center sm:items-start sm:text-left"> | ||
| <h1 className="max-w-xs text-3xl font-semibold leading-10 tracking-tight text-black dark:text-zinc-50"> | ||
| To get started, edit the page.tsx file. | ||
| </h1> | ||
| <p className="max-w-md text-lg leading-8 text-zinc-600 dark:text-zinc-400"> | ||
| Looking for a starting point or more instructions? Head over to{" "} | ||
| <a | ||
| href="https://vercel.com/templates?framework=next.js&utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app" | ||
| className="font-medium text-zinc-950 dark:text-zinc-50" | ||
| > | ||
| Templates | ||
| </a>{" "} | ||
| or the{" "} | ||
| <a | ||
| href="https://nextjs.org/learn?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app" | ||
| className="font-medium text-zinc-950 dark:text-zinc-50" | ||
| > | ||
| Learning | ||
| </a>{" "} | ||
| center. | ||
| </p> | ||
| </div> | ||
| <div className="flex flex-col gap-4 text-base font-medium sm:flex-row"> | ||
| <a | ||
| className="flex h-12 w-full items-center justify-center gap-2 rounded-full bg-foreground px-5 text-background transition-colors hover:bg-[#383838] dark:hover:bg-[#ccc] md:w-[158px]" | ||
| href="https://vercel.com/new?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app" | ||
| target="_blank" | ||
| rel="noopener noreferrer" | ||
| > | ||
| <Image | ||
| className="dark:invert" | ||
| src="/vercel.svg" | ||
| alt="Vercel logomark" | ||
| width={16} | ||
| height={16} | ||
| /> | ||
| Deploy Now | ||
| </a> | ||
| <a | ||
| className="flex h-12 w-full items-center justify-center rounded-full border border-solid border-black/[.08] px-5 transition-colors hover:border-transparent hover:bg-black/[.04] dark:border-white/[.145] dark:hover:bg-[#1a1a1a] md:w-[158px]" | ||
| href="https://nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app" | ||
| target="_blank" | ||
| rel="noopener noreferrer" | ||
| > | ||
| Documentation | ||
| </a> | ||
| </div> | ||
| </main> | ||
| </div> | ||
| ); | ||
| } |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| import { defineConfig, globalIgnores } from "eslint/config"; | ||
| import nextVitals from "eslint-config-next/core-web-vitals"; | ||
| import nextTs from "eslint-config-next/typescript"; | ||
|
|
||
| const eslintConfig = defineConfig([ | ||
| ...nextVitals, | ||
| ...nextTs, | ||
| // Override default ignores of eslint-config-next. | ||
| globalIgnores([ | ||
| // Default ignores of eslint-config-next: | ||
| ".next/**", | ||
| "out/**", | ||
| "build/**", | ||
| "next-env.d.ts", | ||
| ]), | ||
| ]); | ||
|
|
||
| export default eslintConfig; |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| /// <reference types="next" /> | ||
| /// <reference types="next/image-types/global" /> | ||
| import "./.next/dev/types/routes.d.ts"; | ||
|
|
||
| // NOTE: This file should not be edited | ||
| // see https://nextjs.org/docs/app/api-reference/config/typescript for more information. | ||
|
Comment on lines
+1
to
+6
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Check if .gitignore exists and whether next-env.d.ts is already listed
echo "=== Checking .gitignore ==="
if [ -f .gitignore ]; then
echo ".gitignore exists"
grep -n "next-env" .gitignore || echo "next-env.d.ts NOT found in .gitignore"
else
echo ".gitignore does not exist"
fi
echo ""
echo "=== Checking git status of next-env.d.ts ==="
git ls-files | grep -i "next-env.d.ts" && echo "next-env.d.ts IS tracked in git" || echo "next-env.d.ts is NOT tracked in git"
echo ""
echo "=== Checking if next-env.d.ts exists in repo ==="
[ -f next-env.d.ts ] && echo "next-env.d.ts exists" || echo "next-env.d.ts does NOT exist"
echo ""
echo "=== Checking for .next directory ==="
[ -d .next ] && echo ".next directory exists" || echo ".next directory does NOT exist"Repository: AOSSIE-Org/OrgExplorer Length of output: 381 🌐 Web query:
💡 Result:
Git strategy (what to do): Next.js’ current docs recommend adding Add this line to next-env.d.tsIf you need custom global types, put them in a separate Sources:
This file is regenerated on each Additionally, the Add to Then remove this file from version control. 🤖 Prompt for AI Agents |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| import type { NextConfig } from "next"; | ||
|
|
||
| const nextConfig: NextConfig = { | ||
| /* config options here */ | ||
| }; | ||
|
|
||
| export default nextConfig; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hardcoded
font-familyonbodyoverrides the Geist font setup.Line 25 sets
font-family: Arial, Helvetica, sans-serif, which will take precedence over the Geist fonts configured vianext/fontinlayout.tsxand mapped through@theme inlineon Line 11. The Geist CSS variables (--font-geist-sans) injected by the layout's className won't be used for body text.Consider removing the hardcoded
font-familyor using the Tailwind token instead:Proposed fix
body { background: var(--background); color: var(--foreground); - font-family: Arial, Helvetica, sans-serif; + font-family: var(--font-geist-sans), Arial, Helvetica, sans-serif; }📝 Committable suggestion
🤖 Prompt for AI Agents