From 3c56a13a33f47bd23e4439bc140b26f5ca28665b Mon Sep 17 00:00:00 2001 From: Elias Almqvist Date: Fri, 29 Mar 2024 12:04:12 +0100 Subject: [PATCH] Formatting + add format script --- components.json | 2 +- package.json | 3 ++- src/app/page.tsx | 4 +--- src/lib/utils.ts | 6 +++--- tailwind.config.ts | 20 ++++++++++++-------- tsconfig.json | 10 +++++----- 6 files changed, 24 insertions(+), 21 deletions(-) diff --git a/components.json b/components.json index 2bf7f55..413ad46 100644 --- a/components.json +++ b/components.json @@ -14,4 +14,4 @@ "components": "@/components", "utils": "@/lib/utils" } -} \ No newline at end of file +} diff --git a/package.json b/package.json index 60b3ee1..4eef838 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,8 @@ "dev": "next dev", "build": "next build", "start": "next start", - "lint": "next lint" + "lint": "next lint", + "format": "prettier --write \"**/*.{js,cjs,mjs,ts,tsx,md,json,mdx}\" --ignore-path .gitignore" }, "dependencies": { "class-variance-authority": "^0.7.0", diff --git a/src/app/page.tsx b/src/app/page.tsx index d1e61da..0f4b905 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,7 +1,5 @@ import Image from "next/image"; export default function Home() { - return ( - <> - ); + return <>; } diff --git a/src/lib/utils.ts b/src/lib/utils.ts index d084cca..365058c 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -1,6 +1,6 @@ -import { type ClassValue, clsx } from "clsx" -import { twMerge } from "tailwind-merge" +import { type ClassValue, clsx } from "clsx"; +import { twMerge } from "tailwind-merge"; export function cn(...inputs: ClassValue[]) { - return twMerge(clsx(inputs)) + return twMerge(clsx(inputs)); } diff --git a/tailwind.config.ts b/tailwind.config.ts index 84287e8..a47f61b 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -1,13 +1,14 @@ -import type { Config } from "tailwindcss" +import type { Config } from "tailwindcss"; +import { fontFamily } from "tailwindcss/defaultTheme"; const config = { darkMode: ["class"], content: [ - './pages/**/*.{ts,tsx}', - './components/**/*.{ts,tsx}', - './app/**/*.{ts,tsx}', - './src/**/*.{ts,tsx}', - ], + "./pages/**/*.{ts,tsx}", + "./components/**/*.{ts,tsx}", + "./app/**/*.{ts,tsx}", + "./src/**/*.{ts,tsx}", + ], prefix: "", theme: { container: { @@ -18,6 +19,9 @@ const config = { }, }, extend: { + fontFamily: { + sans: ["var(--font-sans)", ...fontFamily.sans], + }, colors: { border: "hsl(var(--border))", input: "hsl(var(--input))", @@ -75,6 +79,6 @@ const config = { }, }, plugins: [require("tailwindcss-animate")], -} satisfies Config +} satisfies Config; -export default config \ No newline at end of file +export default config; diff --git a/tsconfig.json b/tsconfig.json index 7b28589..35392a1 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -14,13 +14,13 @@ "incremental": true, "plugins": [ { - "name": "next" - } + "name": "next", + }, ], "paths": { - "@/*": ["./src/*"] - } + "@/*": ["./src/*"], + }, }, "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], - "exclude": ["node_modules"] + "exclude": ["node_modules"], }