Skip to content

Commit 56a1464

Browse files
authored
Replace dprint with biome, move config to the root (#31)
Fixes: #30 ### Changes: - Remove `biome.jsonc` file from various workspaces - Remove `@biomejs/biome` dependency from various workspaces - Add `@biomejs/biome` dependency to the root workspace - Rename `format-check.yml` to `format-lint-check.yml` - Change to use Biome recommended setup - Remove `lint-check.yml` - Remove `eslint` deps from Next app workspaces - Change `lint` command in next app workspaces to `biome lint` - Change `format` and `format:check` commands from the root to use Biome - Run format from the root - Add the following config to the Next config files: ```js eslint: { ignoreDuringBuilds: true, }, ```
1 parent a0d5560 commit 56a1464

31 files changed

+237
-294
lines changed

.github/workflows/format-check.yml

-17
This file was deleted.
+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Format Checks
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v4
11+
- name: Setup Biome
12+
uses: biomejs/setup-biome@v2
13+
with:
14+
version: 1.8.3
15+
- name: Run Biome
16+
run: biome ci .

.github/workflows/lint-check.yml

-17
This file was deleted.

.knip.jsonc

+3-10
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,11 @@
22
"$schema": "https://unpkg.com/knip@5/schema.json",
33
"workspaces": {
44
".": {
5-
"ignoreDependencies": [
6-
"@turbo/gen"
7-
]
5+
"ignoreDependencies": ["@turbo/gen"]
86
},
97
"packages/*": {
10-
"ignore": [
11-
"**/*.test.(ts|tsx|mjs|js)"
12-
],
13-
"ignoreDependencies": [
14-
"@swc/cli",
15-
"@swc/core"
16-
]
8+
"ignore": ["**/*.test.(ts|tsx|mjs|js)"],
9+
"ignoreDependencies": ["@swc/cli", "@swc/core"]
1710
}
1811
}
1912
}

GUIDEBOOK.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ Since this is a `turborepo` monorepo, you can run some tasks across the repo wit
1313
- `build`
1414
- `type-check`
1515
- `lint`
16-
- `format`
1716
- `test`
1817

1918
### Root only tasks:
@@ -22,6 +21,10 @@ Since this is a `turborepo` monorepo, you can run some tasks across the repo wit
2221
- Check if all dependencies are using the same version
2322
- `knip`
2423
- Run [Knip](https://knip.dev/) across the repo
24+
- `format`
25+
- Run `Biome` formatter across the codebase
26+
- `format:check`
27+
- Check formatting across the codebase
2528

2629
## Creating new workspaces:
2730

@@ -44,6 +47,5 @@ This will create either:
4447
- [SWC](https://swc.rs/)
4548
- [TypeScript](https://www.typescriptlang.org/docs/)
4649
- [hohoro](https://hohoro.vercel.app/)
47-
- [dprint](https://www.typescriptlang.org/docs/)
4850
- [BiomeJS](https://biomejs.dev/)
4951
- [one-version](https://one-version.vercel.app/)

apps/docs/.eslintrc.json

-3
This file was deleted.

apps/docs/app/global-error.tsx

+5-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@ export default function GlobalError() {
55
return (
66
<main className="flex h-screen w-full flex-col items-center justify-center gap-6">
77
<div className="space-y-2 text-center">
8-
<h1 className="text-4xl font-bold tracking-tighter sm:text-5xl">Oops, something went wrong!</h1>
8+
<h1 className="text-4xl font-bold tracking-tighter sm:text-5xl">
9+
Oops, something went wrong!
10+
</h1>
911
<p className="text-gray-500 dark:text-gray-400">
10-
We apologize for the inconvenience. Please try again later or navigate back to the homepage.
12+
We apologize for the inconvenience. Please try again later or navigate
13+
back to the homepage.
1114
</p>
1215
</div>
1316
<Link

apps/docs/app/not-found.tsx

+6-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@ export default function NotFound() {
44
return (
55
<div className="flex h-screen w-full flex-col items-center justify-center gap-6">
66
<div className="space-y-2 text-center">
7-
<h1 className="text-4xl font-bold tracking-tighter sm:text-5xl">Oops! Page not found.</h1>
8-
<p className="text-gray-500 dark:text-gray-400">The page you&apos;re looking for doesn&apos;t exist.</p>
7+
<h1 className="text-4xl font-bold tracking-tighter sm:text-5xl">
8+
Oops! Page not found.
9+
</h1>
10+
<p className="text-gray-500 dark:text-gray-400">
11+
The page you&apos;re looking for doesn&apos;t exist.
12+
</p>
913
</div>
1014
<Link
1115
className="inline-flex h-9 items-center justify-center rounded-md bg-gray-900 px-4 py-2 text-sm font-medium text-gray-50 shadow transition-colors hover:bg-gray-900/90 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-gray-950 disabled:pointer-events-none disabled:opacity-50 dark:bg-gray-50 dark:text-gray-900 dark:hover:bg-gray-50/90 dark:focus-visible:ring-gray-300"

apps/docs/next.config.mjs

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
/** @type {import('next').NextConfig} */
2-
const nextConfig = {};
2+
const nextConfig = {
3+
eslint: {
4+
ignoreDuringBuilds: true,
5+
},
6+
};
37

48
export default nextConfig;

apps/docs/package.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"dev": "next dev --turbo",
77
"build": "next build",
88
"start": "next start",
9-
"lint": "next lint"
9+
"lint": "biome lint"
1010
},
1111
"dependencies": {
1212
"next": "14.3.0-canary.61"
@@ -16,8 +16,6 @@
1616
"@types/react": "latest",
1717
"@types/react-dom": "latest",
1818
"autoprefixer": "10.0.1",
19-
"eslint": "8.57.0",
20-
"eslint-config-next": "14.1.4",
2119
"postcss": "8.4.35",
2220
"tailwindcss": "3.3.0",
2321
"typescript": "5.4.5"

apps/docs/tailwind.config.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ const config: Config = {
1010
extend: {
1111
backgroundImage: {
1212
"gradient-radial": "radial-gradient(var(--tw-gradient-stops))",
13-
"gradient-conic": "conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))",
13+
"gradient-conic":
14+
"conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))",
1415
},
1516
},
1617
},

apps/docs/tsconfig.json

+4-17
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
{
22
"compilerOptions": {
3-
"lib": [
4-
"dom",
5-
"dom.iterable",
6-
"esnext"
7-
],
3+
"lib": ["dom", "dom.iterable", "esnext"],
84
"allowJs": true,
95
"skipLibCheck": true,
106
"strict": true,
@@ -22,19 +18,10 @@
2218
}
2319
],
2420
"paths": {
25-
"~/*": [
26-
"./*"
27-
]
21+
"~/*": ["./*"]
2822
},
2923
"target": "ES2017"
3024
},
31-
"include": [
32-
"next-env.d.ts",
33-
"**/*.ts",
34-
"**/*.tsx",
35-
".next/types/**/*.ts"
36-
],
37-
"exclude": [
38-
"node_modules"
39-
]
25+
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
26+
"exclude": ["node_modules"]
4027
}

apps/template-app/.eslintrc.json

-3
This file was deleted.

apps/template-app/app/global-error.tsx

+5-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@ export default function GlobalError() {
55
return (
66
<main className="flex h-screen w-full flex-col items-center justify-center gap-6">
77
<div className="space-y-2 text-center">
8-
<h1 className="text-4xl font-bold tracking-tighter sm:text-5xl">Oops, something went wrong!</h1>
8+
<h1 className="text-4xl font-bold tracking-tighter sm:text-5xl">
9+
Oops, something went wrong!
10+
</h1>
911
<p className="text-gray-500 dark:text-gray-400">
10-
We apologize for the inconvenience. Please try again later or navigate back to the homepage.
12+
We apologize for the inconvenience. Please try again later or navigate
13+
back to the homepage.
1114
</p>
1215
</div>
1316
<Link

apps/template-app/app/not-found.tsx

+6-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@ export default function NotFound() {
44
return (
55
<main className="flex h-screen w-full flex-col items-center justify-center gap-6">
66
<div className="space-y-2 text-center">
7-
<h1 className="text-4xl font-bold tracking-tighter sm:text-5xl">Oops! Page not found.</h1>
8-
<p className="text-gray-500 dark:text-gray-400">The page you&apos;re looking for doesn&apos;t exist.</p>
7+
<h1 className="text-4xl font-bold tracking-tighter sm:text-5xl">
8+
Oops! Page not found.
9+
</h1>
10+
<p className="text-gray-500 dark:text-gray-400">
11+
The page you&apos;re looking for doesn&apos;t exist.
12+
</p>
913
</div>
1014
<Link
1115
className="inline-flex h-9 items-center justify-center rounded-md bg-gray-900 px-4 py-2 text-sm font-medium text-gray-50 shadow transition-colors hover:bg-gray-900/90 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-gray-950 disabled:pointer-events-none disabled:opacity-50 dark:bg-gray-50 dark:text-gray-900 dark:hover:bg-gray-50/90 dark:focus-visible:ring-gray-300"

apps/template-app/next.config.mjs

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
/** @type {import('next').NextConfig} */
2-
const nextConfig = {};
2+
const nextConfig = {
3+
eslint: {
4+
ignoreDuringBuilds: true,
5+
},
6+
};
37

48
export default nextConfig;

apps/template-app/package.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"dev": "next dev --turbo",
77
"build": "next build",
88
"start": "next start",
9-
"lint": "next lint"
9+
"lint": "biome lint"
1010
},
1111
"dependencies": {
1212
"next": "14.3.0-canary.61"
@@ -16,8 +16,6 @@
1616
"@types/react": "latest",
1717
"@types/react-dom": "latest",
1818
"autoprefixer": "10.0.1",
19-
"eslint": "8.57.0",
20-
"eslint-config-next": "14.1.4",
2119
"postcss": "8.4.35",
2220
"tailwindcss": "3.3.0",
2321
"typescript": "5.4.5"

apps/template-app/tailwind.config.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ const config: Config = {
1010
extend: {
1111
backgroundImage: {
1212
"gradient-radial": "radial-gradient(var(--tw-gradient-stops))",
13-
"gradient-conic": "conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))",
13+
"gradient-conic":
14+
"conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))",
1415
},
1516
},
1617
},

apps/template-app/tsconfig.json

+4-17
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
{
22
"compilerOptions": {
3-
"lib": [
4-
"dom",
5-
"dom.iterable",
6-
"esnext"
7-
],
3+
"lib": ["dom", "dom.iterable", "esnext"],
84
"allowJs": true,
95
"skipLibCheck": true,
106
"strict": true,
@@ -22,19 +18,10 @@
2218
}
2319
],
2420
"paths": {
25-
"~/*": [
26-
"./*"
27-
]
21+
"~/*": ["./*"]
2822
},
2923
"target": "ES2017"
3024
},
31-
"include": [
32-
"next-env.d.ts",
33-
"**/*.ts",
34-
"**/*.tsx",
35-
".next/types/**/*.ts"
36-
],
37-
"exclude": [
38-
"node_modules"
39-
]
25+
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
26+
"exclude": ["node_modules"]
4027
}

biome.jsonc

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
3+
"vcs": {
4+
"enabled": true,
5+
"clientKind": "git",
6+
"useIgnoreFile": true,
7+
"defaultBranch": "origin/main"
8+
},
9+
"organizeImports": {
10+
"enabled": true
11+
},
12+
"formatter": {
13+
"enabled": true,
14+
"indentStyle": "space",
15+
"indentWidth": 2
16+
},
17+
"json": {
18+
"parser": {
19+
"allowComments": true
20+
}
21+
},
22+
"linter": {
23+
"enabled": true,
24+
"rules": {
25+
"recommended": true,
26+
"style": {
27+
"useConst": "off",
28+
"noUnusedTemplateLiteral": "off"
29+
}
30+
}
31+
},
32+
"overrides": [
33+
{
34+
"include": ["./packages/**"],
35+
"linter": {
36+
"enabled": true,
37+
"rules": {
38+
"recommended": true,
39+
"style": {
40+
"useConst": "off",
41+
"noUnusedTemplateLiteral": "off"
42+
}
43+
}
44+
}
45+
}
46+
]
47+
}

bun.lockb

-2.98 KB
Binary file not shown.

dprint.json

-25
This file was deleted.

0 commit comments

Comments
 (0)