Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace dprint with biome, move config to the root #31

Merged
merged 1 commit into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions .github/workflows/format-check.yml

This file was deleted.

16 changes: 16 additions & 0 deletions .github/workflows/format-lint-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Format Checks

on: [pull_request]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Setup Biome
uses: biomejs/setup-biome@v2
with:
version: 1.8.3
- name: Run Biome
run: biome ci .
17 changes: 0 additions & 17 deletions .github/workflows/lint-check.yml

This file was deleted.

13 changes: 3 additions & 10 deletions .knip.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,11 @@
"$schema": "https://unpkg.com/knip@5/schema.json",
"workspaces": {
".": {
"ignoreDependencies": [
"@turbo/gen"
]
"ignoreDependencies": ["@turbo/gen"]
},
"packages/*": {
"ignore": [
"**/*.test.(ts|tsx|mjs|js)"
],
"ignoreDependencies": [
"@swc/cli",
"@swc/core"
]
"ignore": ["**/*.test.(ts|tsx|mjs|js)"],
"ignoreDependencies": ["@swc/cli", "@swc/core"]
}
}
}
6 changes: 4 additions & 2 deletions GUIDEBOOK.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ Since this is a `turborepo` monorepo, you can run some tasks across the repo wit
- `build`
- `type-check`
- `lint`
- `format`
- `test`

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

## Creating new workspaces:

Expand All @@ -44,6 +47,5 @@ This will create either:
- [SWC](https://swc.rs/)
- [TypeScript](https://www.typescriptlang.org/docs/)
- [hohoro](https://hohoro.vercel.app/)
- [dprint](https://www.typescriptlang.org/docs/)
- [BiomeJS](https://biomejs.dev/)
- [one-version](https://one-version.vercel.app/)
3 changes: 0 additions & 3 deletions apps/docs/.eslintrc.json

This file was deleted.

7 changes: 5 additions & 2 deletions apps/docs/app/global-error.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ export default function GlobalError() {
return (
<main className="flex h-screen w-full flex-col items-center justify-center gap-6">
<div className="space-y-2 text-center">
<h1 className="text-4xl font-bold tracking-tighter sm:text-5xl">Oops, something went wrong!</h1>
<h1 className="text-4xl font-bold tracking-tighter sm:text-5xl">
Oops, something went wrong!
</h1>
<p className="text-gray-500 dark:text-gray-400">
We apologize for the inconvenience. Please try again later or navigate back to the homepage.
We apologize for the inconvenience. Please try again later or navigate
back to the homepage.
</p>
</div>
<Link
Expand Down
8 changes: 6 additions & 2 deletions apps/docs/app/not-found.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ export default function NotFound() {
return (
<div className="flex h-screen w-full flex-col items-center justify-center gap-6">
<div className="space-y-2 text-center">
<h1 className="text-4xl font-bold tracking-tighter sm:text-5xl">Oops! Page not found.</h1>
<p className="text-gray-500 dark:text-gray-400">The page you&apos;re looking for doesn&apos;t exist.</p>
<h1 className="text-4xl font-bold tracking-tighter sm:text-5xl">
Oops! Page not found.
</h1>
<p className="text-gray-500 dark:text-gray-400">
The page you&apos;re looking for doesn&apos;t exist.
</p>
</div>
<Link
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"
Expand Down
6 changes: 5 additions & 1 deletion apps/docs/next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
/** @type {import('next').NextConfig} */
const nextConfig = {};
const nextConfig = {
eslint: {
ignoreDuringBuilds: true,
},
};

export default nextConfig;
4 changes: 1 addition & 3 deletions apps/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"dev": "next dev --turbo",
"build": "next build",
"start": "next start",
"lint": "next lint"
"lint": "biome lint"
},
"dependencies": {
"next": "14.3.0-canary.61"
Expand All @@ -16,8 +16,6 @@
"@types/react": "latest",
"@types/react-dom": "latest",
"autoprefixer": "10.0.1",
"eslint": "8.57.0",
"eslint-config-next": "14.1.4",
"postcss": "8.4.35",
"tailwindcss": "3.3.0",
"typescript": "5.4.5"
Expand Down
3 changes: 2 additions & 1 deletion apps/docs/tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ const config: Config = {
extend: {
backgroundImage: {
"gradient-radial": "radial-gradient(var(--tw-gradient-stops))",
"gradient-conic": "conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))",
"gradient-conic":
"conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))",
},
},
},
Expand Down
21 changes: 4 additions & 17 deletions apps/docs/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
{
"compilerOptions": {
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
Expand All @@ -22,19 +18,10 @@
}
],
"paths": {
"~/*": [
"./*"
]
"~/*": ["./*"]
},
"target": "ES2017"
},
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts"
],
"exclude": [
"node_modules"
]
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
}
3 changes: 0 additions & 3 deletions apps/template-app/.eslintrc.json

This file was deleted.

7 changes: 5 additions & 2 deletions apps/template-app/app/global-error.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ export default function GlobalError() {
return (
<main className="flex h-screen w-full flex-col items-center justify-center gap-6">
<div className="space-y-2 text-center">
<h1 className="text-4xl font-bold tracking-tighter sm:text-5xl">Oops, something went wrong!</h1>
<h1 className="text-4xl font-bold tracking-tighter sm:text-5xl">
Oops, something went wrong!
</h1>
<p className="text-gray-500 dark:text-gray-400">
We apologize for the inconvenience. Please try again later or navigate back to the homepage.
We apologize for the inconvenience. Please try again later or navigate
back to the homepage.
</p>
</div>
<Link
Expand Down
8 changes: 6 additions & 2 deletions apps/template-app/app/not-found.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ export default function NotFound() {
return (
<main className="flex h-screen w-full flex-col items-center justify-center gap-6">
<div className="space-y-2 text-center">
<h1 className="text-4xl font-bold tracking-tighter sm:text-5xl">Oops! Page not found.</h1>
<p className="text-gray-500 dark:text-gray-400">The page you&apos;re looking for doesn&apos;t exist.</p>
<h1 className="text-4xl font-bold tracking-tighter sm:text-5xl">
Oops! Page not found.
</h1>
<p className="text-gray-500 dark:text-gray-400">
The page you&apos;re looking for doesn&apos;t exist.
</p>
</div>
<Link
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"
Expand Down
6 changes: 5 additions & 1 deletion apps/template-app/next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
/** @type {import('next').NextConfig} */
const nextConfig = {};
const nextConfig = {
eslint: {
ignoreDuringBuilds: true,
},
};

export default nextConfig;
4 changes: 1 addition & 3 deletions apps/template-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"dev": "next dev --turbo",
"build": "next build",
"start": "next start",
"lint": "next lint"
"lint": "biome lint"
},
"dependencies": {
"next": "14.3.0-canary.61"
Expand All @@ -16,8 +16,6 @@
"@types/react": "latest",
"@types/react-dom": "latest",
"autoprefixer": "10.0.1",
"eslint": "8.57.0",
"eslint-config-next": "14.1.4",
"postcss": "8.4.35",
"tailwindcss": "3.3.0",
"typescript": "5.4.5"
Expand Down
3 changes: 2 additions & 1 deletion apps/template-app/tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ const config: Config = {
extend: {
backgroundImage: {
"gradient-radial": "radial-gradient(var(--tw-gradient-stops))",
"gradient-conic": "conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))",
"gradient-conic":
"conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))",
},
},
},
Expand Down
21 changes: 4 additions & 17 deletions apps/template-app/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
{
"compilerOptions": {
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
Expand All @@ -22,19 +18,10 @@
}
],
"paths": {
"~/*": [
"./*"
]
"~/*": ["./*"]
},
"target": "ES2017"
},
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts"
],
"exclude": [
"node_modules"
]
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
}
47 changes: 47 additions & 0 deletions biome.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true,
"defaultBranch": "origin/main"
},
"organizeImports": {
"enabled": true
},
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2
},
"json": {
"parser": {
"allowComments": true
}
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"style": {
"useConst": "off",
"noUnusedTemplateLiteral": "off"
}
}
},
"overrides": [
{
"include": ["./packages/**"],
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"style": {
"useConst": "off",
"noUnusedTemplateLiteral": "off"
}
}
}
}
]
}
Binary file modified bun.lockb
Binary file not shown.
25 changes: 0 additions & 25 deletions dprint.json

This file was deleted.

Loading
Loading