diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml index 41726ff..4b19eeb 100644 --- a/.github/workflows/preview.yaml +++ b/.github/workflows/preview.yaml @@ -7,6 +7,18 @@ on: branches-ignore: - main jobs: + Code Format: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Use Node.js + uses: actions/setup-node@v2 + with: + node-version: 18.12.1 + - name: Format + run: npm run format + Run Tests: runs-on: ubuntu-latest steps: diff --git a/.github/workflows/production.yaml b/.github/workflows/production.yaml index 9cb880a..1b04906 100644 --- a/.github/workflows/production.yaml +++ b/.github/workflows/production.yaml @@ -7,6 +7,18 @@ on: branches: - main jobs: + Code Format: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Use Node.js + uses: actions/setup-node@v2 + with: + node-version: 18.12.1 + - name: Format + run: npm run format + Run Tests: runs-on: ubuntu-latest steps: diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..190bea8 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,11 @@ +{ + "plugins": [ + "prettier-plugin-organize-imports", + "prettier-plugin-tailwindcss" + ], + "trailingComma": "all", + "semi": false, + "singleQuote": false, + "useTabs": false, + "tabWidth": 2 +} diff --git a/app/api/labs/[id]/route.ts b/app/api/labs/[id]/route.ts index 11e1621..d5085b3 100644 --- a/app/api/labs/[id]/route.ts +++ b/app/api/labs/[id]/route.ts @@ -1,6 +1,6 @@ -import { NextResponse } from "next/server" import Lab from "@/models/Lab" import { LabRequestType } from "@/types/Requests" +import { NextResponse } from "next/server" export async function PUT( req: Request, diff --git a/app/globals.css b/app/globals.css index 3c93daf..753a5fc 100644 --- a/app/globals.css +++ b/app/globals.css @@ -33,9 +33,9 @@ body { } h1 { - @apply text-2xl sm:text-4xl font-bold mt-4 mb-4 dark:text-white text-gray-500; + @apply mb-4 mt-4 text-2xl font-bold text-gray-500 sm:text-4xl dark:text-white; } h2 { - @apply sm:text-xl text-lg mt-2 mb-2; + @apply mb-2 mt-2 text-lg sm:text-xl; } diff --git a/app/home/page.tsx b/app/home/page.tsx index d97d3e5..5ecbd10 100644 --- a/app/home/page.tsx +++ b/app/home/page.tsx @@ -1,10 +1,10 @@ "use client" +import { UserLabs } from "@/components" +import { useUserLabsData } from "@/hooks" +import { ButtonStatusType } from "@/types/Common" import { signOut, useSession } from "next-auth/react" import { useState } from "react" -import { ButtonStatusType } from "@/types/Common" -import { useUserLabsData } from "@/hooks" -import { UserLabs } from "@/components" const HomePage = () => { const { data: userData } = useSession() @@ -32,7 +32,7 @@ const HomePage = () => { } return ( -