Skip to content

Commit 0822bad

Browse files
committed
Update oxlint, oxfmt settings
1 parent 0dd5e5f commit 0822bad

12 files changed

Lines changed: 348 additions & 417 deletions

File tree

.github/workflows/check.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,3 @@ jobs:
1717
- uses: oven-sh/setup-bun@v2
1818
- run: bun install --frozen-lockfile
1919
- run: bun check
20-
- run: bun test
Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
{
22
"$schema": "./node_modules/oxfmt/configuration_schema.json",
3+
"embeddedLanguageFormatting": "auto",
34
"semi": false,
45
"singleQuote": false,
56
"trailingComma": "none",
67
"tabWidth": 2,
78
"printWidth": 80,
89
"proseWrap": "always",
9-
"sortImports": {},
10-
"sortPackageJson": true,
11-
"sortTsconfig": true,
12-
"sortTailwindConfig": true,
10+
"sortImports": true,
11+
"sortPackageJson": {
12+
"sortScripts": true
13+
},
14+
"sortTailwindcss": {
15+
"stylesheet": "./src/styles/app.css",
16+
"functions": ["clsx", "cn"]
17+
},
1318
"ignorePatterns": ["**/*.d.ts", "**/*.gen.ts"]
1419
}

.oxlintrc.json

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,55 @@
44
"eslint",
55
"import",
66
"jsdoc",
7+
"jsx-a11y",
78
"node",
89
"oxc",
910
"promise",
1011
"react",
1112
"react-perf",
1213
"typescript",
13-
"unicorn",
14-
"vitest"
14+
"unicorn"
1515
],
1616
"categories": {
1717
"correctness": "error",
18+
"nursery": "off",
19+
"pedantic": "off",
1820
"perf": "warn",
19-
"suspicious": "warn",
20-
"pedantic": "off"
21+
"restriction": "off",
22+
"style": "off",
23+
"suspicious": "warn"
2124
},
2225
"rules": {
26+
"eslint/curly": "warn",
27+
"eslint/eqeqeq": ["error", "smart"],
28+
"import/no-unassigned-import": [
29+
"error",
30+
{
31+
"allow": ["**/*.css"]
32+
}
33+
],
34+
"oxc/no-rest-spread-properties": "off",
35+
"react/jsx-props-no-spreading": "off",
2336
"react/react-in-jsx-scope": "off",
37+
"typescript/ban-ts-comment": "warn",
2438
"typescript/no-explicit-any": "error",
25-
"typescript/no-misused-promises": "warn"
39+
"typescript/no-misused-promises": "error",
40+
"typescript/no-unnecessary-type-arguments": "warn",
41+
"typescript/no-unnecessary-type-assertion": "error",
42+
"typescript/restrict-template-expressions": "warn"
2643
},
2744
"options": {
2845
"typeAware": true,
2946
"typeCheck": true
3047
},
48+
"ignorePatterns": ["**/worker-configuration.d.ts", "**/*.gen.ts"],
3149
"overrides": [
50+
{
51+
"files": ["**/*.tsx"],
52+
"rules": {
53+
"eslint/func-style": "off"
54+
}
55+
},
3256
{
3357
"files": ["**/*.test.ts"],
3458
"rules": {

bun.lock

Lines changed: 275 additions & 363 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bunfig.toml

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

drizzle.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { defineConfig } from "drizzle-kit"
22

33
export default defineConfig({
4-
out: "./drizzle/migrations",
5-
schema: "./src/db/schema.ts",
64
dialect: "sqlite",
75
driver: "d1-http",
6+
out: "./drizzle/migrations",
7+
schema: "./src/db/schema.ts",
88
verbose: true
99
})

package.json

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"type": "module",
55
"scripts": {
66
"build": "vite build",
7-
"check": "bun run format:check & bun run lint & wait",
8-
"clean": "git clean -xdf node_modules/.cache .tanstack .output .nitro dist .wrangler",
7+
"check": "bun run format:check && bun run lint && bun run test",
8+
"clean": "git clean -xdf node_modules/.cache .tanstack dist .wrangler",
99
"db:generate": "drizzle-kit generate",
1010
"db:migrate": "wrangler d1 migrations apply DB --local",
1111
"db:migrate:prod": "wrangler d1 migrations apply DB",
@@ -29,40 +29,40 @@
2929
"dependencies": {
3030
"@fontsource-variable/geist": "^5.2.8",
3131
"@fontsource-variable/geist-mono": "^5.2.7",
32-
"@tanstack/react-query": "^5.95.2",
33-
"@tanstack/react-query-devtools": "^5.95.2",
34-
"@tanstack/react-router": "^1.168.3",
35-
"@tanstack/react-router-devtools": "^1.166.11",
32+
"@tanstack/react-query": "^5.99.0",
33+
"@tanstack/react-query-devtools": "^5.99.0",
34+
"@tanstack/react-router": "^1.168.21",
35+
"@tanstack/react-router-devtools": "^1.166.13",
3636
"@tanstack/react-router-with-query": "^1.130.17",
37-
"@tanstack/react-start": "^1.167.5",
38-
"better-auth": "^1.5.6",
37+
"@tanstack/react-start": "^1.167.39",
38+
"better-auth": "^1.6.2",
3939
"class-variance-authority": "^0.7.1",
4040
"clsx": "^2.1.1",
41-
"drizzle-orm": "^0.44.5",
42-
"lucide-react": "^1.0.1",
41+
"drizzle-orm": "^0.45.2",
42+
"lucide-react": "^1.8.0",
4343
"radix-ui": "^1.4.3",
44-
"react": "^19.2.4",
45-
"react-dom": "^19.2.4",
44+
"react": "^19.2.5",
45+
"react-dom": "^19.2.5",
4646
"tailwind-merge": "^3.5.0",
4747
"valibot": "^1.3.1"
4848
},
4949
"devDependencies": {
50-
"@cloudflare/vite-plugin": "^1.30.0",
50+
"@cloudflare/vite-plugin": "^1.32.2",
5151
"@tailwindcss/vite": "^4.2.2",
5252
"@types/bun": "latest",
5353
"@types/node": "latest",
5454
"@types/react": "^19.2.14",
5555
"@types/react-dom": "^19.2.3",
5656
"@vitejs/plugin-react": "^6.0.1",
5757
"dotkit": "^1.5.0",
58-
"drizzle-kit": "^0.31.5",
58+
"drizzle-kit": "^0.31.10",
5959
"oxfmt": "latest",
6060
"oxlint": "latest",
6161
"oxlint-tsgolint": "latest",
6262
"tailwindcss": "^4.2.2",
6363
"tw-animate-css": "^1.4.0",
64-
"typescript": "^6",
65-
"vite": "^8.0.2",
66-
"wrangler": "^4.76.0"
64+
"typescript": "^6.0.2",
65+
"vite": "^8.0.8",
66+
"wrangler": "^4.82.2"
6767
}
6868
}

src/components/theme/theme-provider.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ export function ThemeProvider({
3636
storageKey?: string
3737
}) {
3838
const [theme, setThemeState] = useState<Theme>(() => {
39-
if (typeof window === "undefined") return defaultTheme
39+
if (typeof window === "undefined") {
40+
return defaultTheme
41+
}
4042
const stored = localStorage.getItem(storageKey)
4143
return isTheme(stored) ? stored : defaultTheme
4244
})
@@ -71,6 +73,7 @@ export function ThemeProvider({
7173
media.addEventListener("change", apply)
7274
return () => media.removeEventListener("change", apply)
7375
}
76+
return undefined
7477
}, [theme])
7578

7679
const contextValue = useMemo(() => ({ theme, setTheme }), [theme, setTheme])

src/lib/string-fns/get-initials.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { describe, expect, test } from "vitest"
1+
import { describe, expect, test } from "bun:test"
22

33
import { getInitials } from "./get-initials"
44

tsconfig.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
"target": "ES2022",
1313
"allowJs": true,
1414
"forceConsistentCasingInFileNames": true,
15+
"noEmit": true,
16+
"types": ["bun"],
1517
"paths": {
1618
"@/*": ["./src/*"]
17-
},
18-
"noEmit": true
19-
},
20-
"include": ["**/*.ts", "**/*.tsx", "**/*.config.js"]
19+
}
20+
}
2121
}

0 commit comments

Comments
 (0)