Skip to content

Commit c1fe97d

Browse files
committed
Remove ESLint configuration and add Biome configuration for linting and formatting
1 parent bf7ed54 commit c1fe97d

16 files changed

+72
-106
lines changed

.eslintrc.cjs

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

biome.json

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/1.7.1/schema.json",
3+
"organizeImports": {
4+
"enabled": true
5+
},
6+
"files": {
7+
"ignore": ["src/server/json-hash.ts"]
8+
},
9+
"linter": {
10+
"enabled": true,
11+
"rules": {
12+
"recommended": true,
13+
"correctness": {
14+
"useHookAtTopLevel": "error"
15+
},
16+
"performance": {
17+
"noBarrelFile": "error",
18+
"noReExportAll": "error"
19+
},
20+
"style": {
21+
"noNegationElse": "error",
22+
"useConst": "off",
23+
"useExportType": "off",
24+
"useImportType": "off"
25+
},
26+
"suspicious": {
27+
"noConsoleLog": "warn",
28+
"noEmptyBlockStatements": "warn",
29+
"noSkippedTests": "error"
30+
},
31+
"nursery": {
32+
"useSortedClasses": {
33+
"level": "error",
34+
"options": {
35+
"attributes": ["className", "class"],
36+
"functions": ["cn", "tv"]
37+
}
38+
}
39+
}
40+
}
41+
},
42+
"formatter": { "enabled": true },
43+
"vcs": {
44+
"enabled": true,
45+
"clientKind": "git",
46+
"defaultBranch": "main",
47+
"useIgnoreFile": true
48+
},
49+
"overrides": [
50+
{
51+
"include": ["**/*.md"],
52+
"formatter": { "indentStyle": "tab" }
53+
}
54+
]
55+
}

bun.lockb

-113 KB
Binary file not shown.

package.json

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,7 @@
6262
"sponsor": {
6363
"url": "https://github.com/sponsors/sergiodxa"
6464
},
65-
"files": [
66-
"src",
67-
"build",
68-
"package.json",
69-
"README.md"
70-
],
65+
"files": ["src", "build", "package.json", "README.md"],
7166
"scripts": {
7267
"build": "tsc",
7368
"typecheck": "tsc --noEmit",
@@ -102,28 +97,17 @@
10297
}
10398
},
10499
"devDependencies": {
100+
"@biomejs/biome": "^1.9.4",
105101
"@cloudflare/workers-types": "^4.20241112.0",
106102
"@react-router/cloudflare": "^7.0.1",
107103
"@total-typescript/tsconfig": "^1.0.4",
108104
"@types/bun": "^1.1.14",
109-
"@types/node": "^20.11.28",
110-
"@typescript-eslint/eslint-plugin": "^7.2.0",
111-
"@typescript-eslint/parser": "^7.2.0",
112-
"eslint": "^8.57.0",
113-
"eslint-config-prettier": "^9.1.0",
114-
"eslint-import-resolver-typescript": "^3.6.1",
115-
"eslint-plugin-import": "^2.29.1",
116-
"eslint-plugin-prefer-let": "^3.0.1",
117-
"eslint-plugin-prettier": "^5.1.3",
118-
"eslint-plugin-promise": "^6.1.1",
119-
"eslint-plugin-testing-library": "^6.2.0",
120-
"eslint-plugin-unicorn": "^53.0.0",
121105
"i18next": "^23.10.1",
122-
"prettier": "^3.2.4",
123106
"remix-i18next": "^7.0.0",
124107
"typescript": "^5.7.2",
125108
"vite": "^5.4.11",
126109
"vite-tsconfig-paths": "^5.1.3",
127110
"zod": "^3.22.4"
128-
}
111+
},
112+
"trustedDependencies": ["@biomejs/biome"]
129113
}

prettier.config.mjs

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

src/cloudflare.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
11
import type {
22
Fetcher,
3-
RequestInit,
43
KVNamespace,
4+
RequestInit,
55
} from "@cloudflare/workers-types";
6-
import type { Context } from "hono";
7-
86
import { createWorkersKVSessionStorage } from "@react-router/cloudflare";
7+
import type { Context } from "hono";
98
import { createMiddleware } from "hono/factory";
109
import { cacheHeader } from "pretty-cache-header";
1110
import {
1211
type CookieOptions,
1312
type SessionData,
1413
createCookieSessionStorage,
1514
} from "react-router";
16-
1715
import { session } from "./session.js";
1816

1917
interface StaticAssetsOptions {

src/handler.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import type { Context } from "hono";
2-
import type { AppLoadContext, ServerBuild } from "react-router";
3-
42
import { createMiddleware } from "hono/factory";
3+
import type { AppLoadContext, ServerBuild } from "react-router";
54
import { createRequestHandler } from "react-router";
65

76
export interface ReactRouterMiddlewareOptions {

src/i18next.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import type { Context } from "hono";
2+
import { createMiddleware } from "hono/factory";
23
import type { FlatNamespace, TFunction } from "i18next";
34
import type { RemixI18NextOption } from "remix-i18next/server";
4-
5-
import { createMiddleware } from "hono/factory";
65
import { RemixI18Next } from "remix-i18next/server";
76

87
const i18nSymbol = Symbol().toString();

src/session.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import type { Context } from "hono";
2-
import type { Session, SessionData, SessionStorage } from "react-router";
3-
42
import { createMiddleware } from "hono/factory";
3+
import type { Session, SessionData, SessionStorage } from "react-router";
54

65
type Env = {
76
Variables: Record<symbol, unknown>;

src/typed-env.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import type { Context } from "hono";
2-
import type { z } from "zod";
3-
42
import { env } from "hono/adapter";
3+
import type { z } from "zod";
54

65
export function typedEnv<Schema extends z.ZodTypeAny>(
76
c: Context,

0 commit comments

Comments
 (0)