Skip to content

Commit 8698c6a

Browse files
committed
chore: 🤖 add prettier
1 parent dac6244 commit 8698c6a

13 files changed

+690
-108
lines changed

‎.prettierignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules
2+
pnpm-lock.yaml
3+
.next
4+
.turbo
5+
dist

‎apps/web/app/layout.tsx

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
import type { Metadata } from 'next'
2-
import { Inter } from 'next/font/google'
3-
import './globals.css'
1+
import type { Metadata } from "next"
2+
import { Inter } from "next/font/google"
43

5-
const inter = Inter({ subsets: ['latin'] })
4+
import "./globals.css"
5+
6+
const inter = Inter({ subsets: ["latin"] })
67

78
export const metadata: Metadata = {
8-
title: 'Create Turborepo',
9-
description: 'Generated by create turbo',
9+
title: "Create Turborepo",
10+
description: "Generated by create turbo",
1011
}
1112

1213
export default function RootLayout({

‎apps/web/app/page.tsx

+15-12
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,28 @@
1-
import { Button } from '@/components/ui/button'
2-
import { cn } from '@/lib/utils'
3-
import { SMART_TOKEN_LIST } from '@repo/smart-token-list'
4-
import Image from 'next/image'
1+
import { Button } from "@/components/ui/button"
2+
import { cn } from "@/lib/utils"
3+
import { SMART_TOKEN_LIST } from "@repo/smart-token-list"
4+
import Image from "next/image"
55

66
export default function Page(): JSX.Element {
77
return (
8-
<main className={cn("flex flex-col items-center justify-between min-h-screen p-24")}>
9-
<div className="z-10 items-center justify-between w-full max-w-5xl font-mono text-sm lg:flex">
10-
<p className="fixed top-0 left-0 flex justify-center w-full px-4 pt-8 pb-6 border-b bg-gradient-to-b backdrop-blur-2xl border-neutral-800 bg-zinc-800/30 from-inherit lg:static lg:w-auto lg:rounded-xl lg:border lg:bg-gray-200 lg:p-4 lg:bg-zinc-800/30">
8+
<main
9+
className={cn(
10+
"flex min-h-screen flex-col items-center justify-between p-24"
11+
)}
12+
>
13+
<div className="z-10 w-full max-w-5xl items-center justify-between font-mono text-sm lg:flex">
14+
<p className="">
1115
examples/with-tailwind -&nbsp;
1216
<code className="font-mono font-bold">web</code>
1317
</p>
14-
<div className="fixed bottom-0 left-0 flex items-end justify-center w-full h-48 bg-gradient-to-t from-black via-black lg:static lg:h-auto lg:w-auto lg:bg-none">
18+
<div className="fixed bottom-0 left-0 flex h-48 w-full items-end justify-center bg-gradient-to-t from-black via-black lg:static lg:size-auto lg:bg-none">
1519
<a
16-
className="flex gap-2 p-8 pointer-events-none place-items-center lg:pointer-events-auto lg:p-0"
20+
className="pointer-events-none flex place-items-center gap-2 p-8 lg:pointer-events-auto lg:p-0"
1721
href="https://vercel.com?utm_source=create-turbo&utm_medium=basic&utm_campaign=create-turbo"
1822
rel="noopener noreferrer"
1923
target="_blank"
2024
>
21-
By{' '}
25+
By{" "}
2226
<Image
2327
alt="Vercel Logo"
2428
className="invert"
@@ -32,8 +36,7 @@ export default function Page(): JSX.Element {
3236
</div>
3337

3438
<h1>{JSON.stringify(SMART_TOKEN_LIST)}</h1>
35-
<Button variant='outline'>hello shadcn/ui</Button>
36-
39+
<Button variant="outline">hello shadcn/ui</Button>
3740
</main>
3841
)
3942
}

‎apps/web/lib/utils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { type ClassValue, clsx } from "clsx"
1+
import { clsx, type ClassValue } from "clsx"
22
import { twMerge } from "tailwind-merge"
33

44
export function cn(...inputs: ClassValue[]) {

‎apps/web/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"@types/react-dom": "^18.2.19",
3131
"autoprefixer": "^10.4.18",
3232
"postcss": "^8.4.35",
33+
"@ianvs/prettier-plugin-sort-imports": "4.3.0",
3334
"tailwindcss": "^3.4.1",
3435
"typescript": "^5.3.3"
3536
}

‎apps/web/tailwind.config.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ import type { Config } from "tailwindcss"
33
const config = {
44
darkMode: ["class"],
55
content: [
6-
'./pages/**/*.{ts,tsx}',
7-
'./components/**/*.{ts,tsx}',
8-
'./app/**/*.{ts,tsx}',
9-
'./src/**/*.{ts,tsx}',
10-
],
6+
"./pages/**/*.{ts,tsx}",
7+
"./components/**/*.{ts,tsx}",
8+
"./app/**/*.{ts,tsx}",
9+
"./src/**/*.{ts,tsx}",
10+
],
1111
prefix: "",
1212
theme: {
1313
container: {
@@ -77,4 +77,4 @@ const config = {
7777
plugins: [require("tailwindcss-animate")],
7878
} satisfies Config
7979

80-
export default config
80+
export default config

‎package.json

+5-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,11 @@
1010
},
1111
"devDependencies": {
1212
"prettier": "^3.2.5",
13-
"prettier-plugin-tailwindcss": "^0.5.11",
14-
"turbo": "^2.0.6"
13+
"turbo": "^2.0.6",
14+
"eslint-config-prettier": "^8.8.0",
15+
"eslint-plugin-tailwindcss": "^3.12.0",
16+
"prettier-plugin-organize-imports": "^3.2.4",
17+
"prettier-plugin-tailwindcss": "^0.6.0"
1518
},
1619
"packageManager": "[email protected]",
1720
"engines": {

‎packages/config-eslint/library.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
const { resolve } = require("node:path");
1+
const { resolve } = require("node:path")
22

3-
const project = resolve(process.cwd(), "tsconfig.json");
3+
const project = resolve(process.cwd(), "tsconfig.json")
44

55
/*
66
* This is a custom ESLint configuration for use with
@@ -34,4 +34,4 @@ module.exports = {
3434
},
3535
},
3636
ignorePatterns: ["node_modules/", "dist/"],
37-
};
37+
}

‎packages/config-eslint/next.js

+6-11
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
const { resolve } = require("node:path");
1+
const { resolve } = require("node:path")
22

3-
const project = resolve(process.cwd(), "tsconfig.json");
3+
const project = resolve(process.cwd(), "tsconfig.json")
44

55
/*
66
* This is a custom ESLint configuration for use with
@@ -13,14 +13,9 @@ const project = resolve(process.cwd(), "tsconfig.json");
1313

1414
module.exports = {
1515
extends: [
16-
...[
17-
"@vercel/style-guide/eslint/node",
18-
"@vercel/style-guide/eslint/typescript",
19-
"@vercel/style-guide/eslint/browser",
20-
"@vercel/style-guide/eslint/react",
21-
"@vercel/style-guide/eslint/next",
22-
].map(require.resolve),
23-
"turbo",
16+
"next/core-web-vitals",
17+
"prettier",
18+
"plugin:tailwindcss/recommended",
2419
],
2520
parserOptions: {
2621
project,
@@ -44,4 +39,4 @@ module.exports = {
4439
rules: {
4540
"import/no-default-export": "off",
4641
},
47-
};
42+
}

‎packages/config-eslint/package.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
"private": true,
55
"devDependencies": {
66
"@vercel/style-guide": "^5.2.0",
7-
"eslint-config-turbo": "^2.0.0"
7+
"eslint-config-turbo": "^2.0.0",
8+
"eslint-config-prettier": "^9.1.0",
9+
"eslint-plugin-only-warn": "^1.1.0",
10+
"@typescript-eslint/parser": "7.16.0",
11+
"@typescript-eslint/eslint-plugin": "7.16.0",
12+
"typescript": "^5.3.3"
813
}
914
}

‎packages/config-eslint/react.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
const { resolve } = require("node:path");
1+
const { resolve } = require("node:path")
22

3-
const project = resolve(process.cwd(), "tsconfig.json");
3+
const project = resolve(process.cwd(), "tsconfig.json")
44

55
/*
66
* This is a custom ESLint configuration for use a library
@@ -46,4 +46,4 @@ module.exports = {
4646
},
4747
},
4848
],
49-
};
49+
}

0 commit comments

Comments
 (0)