From fbe6c373cf016654a9bbc17e454fe000d13b3e67 Mon Sep 17 00:00:00 2001 From: PapatMayuri <40386398+PapatMayuri@users.noreply.github.com> Date: Fri, 13 Sep 2024 02:15:54 +0530 Subject: [PATCH] Updated the example of with-eslint to utilize the App Router. (#70018) This PR updates the with-eslint example for using the App Router. Here are the changes that have been made: - Renamed the "pages" folder to the "app" folder. - Added the layout.tsx file as part of the App Router. - Updated the package.json file. - Updated tsconfig.json file CC: @samcx --------- Co-authored-by: samcx --- examples/with-eslint/app/layout.tsx | 18 ++++++++++++++++++ examples/with-eslint/app/page.tsx | 8 ++++++++ examples/with-eslint/package.json | 11 +++++++---- examples/with-eslint/pages/index.js | 8 -------- examples/with-eslint/tsconfig.json | 27 +++++++++++++++++++++++++++ 5 files changed, 60 insertions(+), 12 deletions(-) create mode 100644 examples/with-eslint/app/layout.tsx create mode 100644 examples/with-eslint/app/page.tsx delete mode 100644 examples/with-eslint/pages/index.js create mode 100644 examples/with-eslint/tsconfig.json diff --git a/examples/with-eslint/app/layout.tsx b/examples/with-eslint/app/layout.tsx new file mode 100644 index 0000000000000..112756e6bfcdc --- /dev/null +++ b/examples/with-eslint/app/layout.tsx @@ -0,0 +1,18 @@ +import type { Metadata } from "next"; + +export const metadata: Metadata = { + title: "Create Next App", + description: "Generated by create next app", +}; + +export default function RootLayout({ + children, +}: Readonly<{ + children: React.ReactNode; +}>) { + return ( + + {children} + + ); +} diff --git a/examples/with-eslint/app/page.tsx b/examples/with-eslint/app/page.tsx new file mode 100644 index 0000000000000..6fc749459d3f9 --- /dev/null +++ b/examples/with-eslint/app/page.tsx @@ -0,0 +1,8 @@ +export default function Home() { + return ( +
+