diff --git a/front/.prettierrc.yaml b/front/.prettierrc.yaml new file mode 100644 index 0000000..d892cff --- /dev/null +++ b/front/.prettierrc.yaml @@ -0,0 +1,6 @@ +printWidth: 120 # Specify the line length that the printer will wrap on +tabWidth: 2 # Specify the number of spaces per indentation-level +useTabs: true # Indent lines with tabs instead of spaces +semi: true # Print semicolons at the ends of statements +bracketSpacing: true # Print spaces between brackets in object literals +parser: typescript # Specify which parser to use diff --git a/front/package.json b/front/package.json index bc1188a..79416b4 100644 --- a/front/package.json +++ b/front/package.json @@ -6,7 +6,8 @@ "dev": "next dev", "build": "next build", "start": "next start", - "lint": "next lint" + "lint": "next lint", + "format": "prettier **/**/*.{ts,tsx} --write" }, "dependencies": { "next": "14.2.14", @@ -20,6 +21,7 @@ "eslint": "^8.57.1", "eslint-config-next": "14.2.14", "postcss": "^8.4.47", + "prettier": "^3.3.3", "tailwindcss": "^3.4.13", "typescript": "^5.6.2" }, diff --git a/front/src/app/layout.tsx b/front/src/app/layout.tsx index a36cde0..10da40f 100644 --- a/front/src/app/layout.tsx +++ b/front/src/app/layout.tsx @@ -3,33 +3,29 @@ import localFont from "next/font/local"; import "./globals.css"; const geistSans = localFont({ - src: "./fonts/GeistVF.woff", - variable: "--font-geist-sans", - weight: "100 900", + src: "./fonts/GeistVF.woff", + variable: "--font-geist-sans", + weight: "100 900", }); const geistMono = localFont({ - src: "./fonts/GeistMonoVF.woff", - variable: "--font-geist-mono", - weight: "100 900", + src: "./fonts/GeistMonoVF.woff", + variable: "--font-geist-mono", + weight: "100 900", }); export const metadata: Metadata = { - title: "Create Next App", - description: "Generated by create next app", + title: "Create Next App", + description: "Generated by create next app", }; export default function RootLayout({ - children, + children, }: Readonly<{ - children: React.ReactNode; + children: React.ReactNode; }>) { - return ( - - - {children} - - - ); + return ( + + {children} + + ); } diff --git a/front/src/app/page.tsx b/front/src/app/page.tsx index 6fe62d1..c7bd588 100644 --- a/front/src/app/page.tsx +++ b/front/src/app/page.tsx @@ -1,101 +1,83 @@ import Image from "next/image"; export default function Home() { - return ( -
-
- Next.js logo -
    -
  1. - Get started by editing{" "} - - src/app/page.tsx - - . -
  2. -
  3. Save and see your changes instantly.
  4. -
+ return ( +
+
+ Next.js logo +
    +
  1. + Get started by editing{" "} + + src/app/page.tsx + + . +
  2. +
  3. Save and see your changes instantly.
  4. +
-
- - Vercel logomark - Deploy now - - - Read our docs - -
-
- -
- ); +
+ + Vercel logomark + Deploy now + + + Read our docs + +
+
+ +
+ ); } diff --git a/front/tailwind.config.ts b/front/tailwind.config.ts index 021c393..45e6dc9 100644 --- a/front/tailwind.config.ts +++ b/front/tailwind.config.ts @@ -1,19 +1,19 @@ import type { Config } from "tailwindcss"; const config: Config = { - content: [ - "./src/pages/**/*.{js,ts,jsx,tsx,mdx}", - "./src/components/**/*.{js,ts,jsx,tsx,mdx}", - "./src/app/**/*.{js,ts,jsx,tsx,mdx}", - ], - theme: { - extend: { - colors: { - background: "var(--background)", - foreground: "var(--foreground)", - }, - }, - }, - plugins: [], + content: [ + "./src/pages/**/*.{js,ts,jsx,tsx,mdx}", + "./src/components/**/*.{js,ts,jsx,tsx,mdx}", + "./src/app/**/*.{js,ts,jsx,tsx,mdx}", + ], + theme: { + extend: { + colors: { + background: "var(--background)", + foreground: "var(--foreground)", + }, + }, + }, + plugins: [], }; export default config; diff --git a/front/yarn.lock b/front/yarn.lock index ba336d6..8ec2c76 100644 --- a/front/yarn.lock +++ b/front/yarn.lock @@ -752,6 +752,7 @@ __metadata: eslint-config-next: "npm:14.2.14" next: "npm:14.2.14" postcss: "npm:^8.4.47" + prettier: "npm:^3.3.3" react: "npm:^18.3.1" react-dom: "npm:^18.3.1" tailwindcss: "npm:^3.4.13" @@ -3194,6 +3195,15 @@ __metadata: languageName: node linkType: hard +"prettier@npm:^3.3.3": + version: 3.3.3 + resolution: "prettier@npm:3.3.3" + bin: + prettier: bin/prettier.cjs + checksum: 10c0/b85828b08e7505716324e4245549b9205c0cacb25342a030ba8885aba2039a115dbcf75a0b7ca3b37bc9d101ee61fab8113fc69ca3359f2a226f1ecc07ad2e26 + languageName: node + linkType: hard + "proc-log@npm:^4.1.0, proc-log@npm:^4.2.0": version: 4.2.0 resolution: "proc-log@npm:4.2.0"