Skip to content

Commit 0aeb5e0

Browse files
chore: migrate eslint/prettier to biome (#16)
* chore: migrate eslint/prettier to biome * chore: biome fix * fix: react-compiler stable version, rename import in next config * fix: a11y code component * fix: wrong variable referenced in setTimeLeft * chore: remove jsdoc annotation
1 parent 0cb59b7 commit 0aeb5e0

56 files changed

Lines changed: 1882 additions & 4607 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintrc.cjs

Lines changed: 0 additions & 42 deletions
This file was deleted.

biome.jsonc

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/2.3.10/schema.json",
3+
"vcs": {
4+
"enabled": true,
5+
"clientKind": "git",
6+
"useIgnoreFile": true
7+
},
8+
"files": {
9+
"ignoreUnknown": true,
10+
"includes": [
11+
"**",
12+
"!node_modules",
13+
"!.next",
14+
"!dist",
15+
"!build",
16+
"!src/app/globals.css", // modified by shadcn
17+
"!src/components/ui/*" // modified by shadcn
18+
]
19+
},
20+
"formatter": {
21+
"enabled": true,
22+
"formatWithErrors": false,
23+
"indentStyle": "space",
24+
"indentWidth": 2,
25+
"lineEnding": "lf",
26+
"lineWidth": 120,
27+
"attributePosition": "auto",
28+
"bracketSameLine": false,
29+
"bracketSpacing": true,
30+
"expand": "auto",
31+
"useEditorconfig": true
32+
},
33+
"linter": {
34+
"enabled": true,
35+
"rules": {
36+
"recommended": true,
37+
"suspicious": {
38+
"noVar": "error"
39+
// "noUnknownAtRules": "off" // until fix for tailwind rules is released
40+
},
41+
"nursery": {
42+
"noFloatingPromises": "error",
43+
"noMisusedPromises": "error",
44+
"noUnnecessaryConditions": "error",
45+
"noImportCycles": "warn",
46+
"useSortedClasses": {
47+
"options": {
48+
"attributes": ["classList"],
49+
"functions": ["cn"]
50+
}
51+
}
52+
},
53+
"correctness": {
54+
"useJsonImportAttributes": "warn",
55+
"noPrivateImports": "error"
56+
}
57+
},
58+
"domains": {
59+
"project": "recommended",
60+
"next": "recommended"
61+
}
62+
},
63+
"javascript": {
64+
"formatter": {
65+
"jsxQuoteStyle": "double",
66+
"quoteProperties": "asNeeded",
67+
"trailingCommas": "es5",
68+
"semicolons": "asNeeded",
69+
"arrowParentheses": "always",
70+
"bracketSameLine": false,
71+
"quoteStyle": "double",
72+
"attributePosition": "auto",
73+
"bracketSpacing": true
74+
}
75+
},
76+
"html": { "formatter": { "selfCloseVoidElements": "always" } },
77+
"css": {
78+
"parser": {
79+
"tailwindDirectives": true
80+
}
81+
},
82+
"assist": {
83+
"enabled": true,
84+
"actions": { "source": { "organizeImports": "on" } }
85+
}
86+
}
Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,19 @@
1+
import type { NextConfig } from "next"
12
/**
23
* Run `build` or `dev` with `SKIP_ENV_VALIDATION` to skip env validation. This is especially useful
34
* for Docker builds.
45
*/
5-
import "./src/env.js";
6+
import "./src/env.ts"
67

7-
/** @type {import("next").NextConfig} */
8-
const config = {
9-
eslint: {
10-
ignoreDuringBuilds: true,
11-
},
8+
const config: NextConfig = {
129
typescript: {
1310
ignoreBuildErrors: true,
1411
},
1512
output: "standalone",
13+
transpilePackages: ["@t3-oss/env-nextjs", "@t3-oss/env-core"],
1614
experimental: {
17-
reactCompiler: true
18-
}
19-
};
15+
reactCompiler: true,
16+
},
17+
}
2018

21-
export default config;
19+
export default config

package.json

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,9 @@
55
"type": "module",
66
"scripts": {
77
"build": "next build",
8-
"check": "next lint && tsc --noEmit",
98
"dev": "PORT=3001 next dev --turbo",
10-
"format:check": "prettier --check \"**/*.{ts,tsx,js,jsx,mdx}\" --cache",
11-
"format:write": "prettier --write \"**/*.{ts,tsx,js,jsx,mdx}\" --cache",
12-
"lint": "next lint",
13-
"lint:fix": "next lint --fix",
9+
"check": "biome check",
10+
"check:fix": "biome check --fix --unsafe",
1411
"preview": "next build && next start",
1512
"start": "next start",
1613
"typecheck": "tsc --noEmit"
@@ -37,14 +34,14 @@
3734
"@trpc/next": "11.1.1",
3835
"@trpc/react-query": "11.1.1",
3936
"@trpc/tanstack-react-query": "11.1.1",
40-
"babel-plugin-react-compiler": "19.1.0-rc.2",
37+
"babel-plugin-react-compiler": "1.0.0",
4138
"better-auth": "^1.2.7",
4239
"class-variance-authority": "^0.7.1",
4340
"clsx": "^2.1.1",
4441
"cmdk": "^1.1.1",
4542
"geist": "^1.3.0",
4643
"lucide-react": "^0.525.0",
47-
"next": "^15.4.8",
44+
"next": "^15.5.9",
4845
"next-themes": "^0.4.4",
4946
"postgres": "^3.4.4",
5047
"react": "^18.3.1",
@@ -59,19 +56,13 @@
5956
"zod": "^3.23.3"
6057
},
6158
"devDependencies": {
59+
"@biomejs/biome": "2.3.10",
6260
"@tailwindcss/postcss": "^4.1.4",
6361
"@trpc/server": "11.1.1",
64-
"@types/eslint": "^8.56.10",
6562
"@types/node": "^20.14.10",
6663
"@types/react": "^18.3.3",
6764
"@types/react-dom": "^18.3.0",
68-
"@typescript-eslint/eslint-plugin": "^8.1.0",
69-
"@typescript-eslint/parser": "^8.1.0",
70-
"eslint": "^8.57.0",
71-
"eslint-config-next": "^15.3.4",
7265
"postcss": "^8.4.39",
73-
"prettier": "^3.3.2",
74-
"prettier-plugin-tailwindcss": "^0.6.11",
7566
"tailwindcss": "^4.1.4",
7667
"typescript": "^5.5.3"
7768
},

0 commit comments

Comments
 (0)