Skip to content

Commit d885ffb

Browse files
authored
Migrate from ESLint + Prettier to Biome (#238)
Replace eslint.config.mjs and .prettierrc with biome.json, swap lint/format scripts to Biome, and drop ESLint/Prettier dev dependencies. Reformat the codebase with Biome.
1 parent 2fecd26 commit d885ffb

148 files changed

Lines changed: 723 additions & 3146 deletions

File tree

Some content is hidden

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

.prettierrc

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

biome.json

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/2.5.2/schema.json",
3+
"root": true,
4+
"vcs": { "enabled": true, "clientKind": "git", "useIgnoreFile": true },
5+
"files": { "ignoreUnknown": false },
6+
"formatter": {
7+
"enabled": true,
8+
"formatWithErrors": true,
9+
"indentStyle": "space",
10+
"indentWidth": 2,
11+
"lineEnding": "lf",
12+
"lineWidth": 100,
13+
"bracketSameLine": false,
14+
"bracketSpacing": true,
15+
"useEditorconfig": true,
16+
"includes": [
17+
"**",
18+
"!**/node_modules",
19+
"!**/dist",
20+
"!**/build",
21+
"!src/components/ui/**",
22+
"!src/components/minimal-tiptap/**"
23+
]
24+
},
25+
"linter": {
26+
"enabled": true,
27+
"rules": {
28+
"recommended": true,
29+
"a11y": {
30+
"noAutofocus": "warn",
31+
"noLabelWithoutControl": "warn",
32+
"noStaticElementInteractions": "warn",
33+
"noSvgWithoutTitle": "warn",
34+
"useButtonType": "warn",
35+
"useKeyWithClickEvents": "warn",
36+
"useSemanticElements": "warn",
37+
"useValidAnchor": "warn"
38+
},
39+
"correctness": {
40+
"useExhaustiveDependencies": "warn",
41+
"useHookAtTopLevel": "error",
42+
"noUnusedImports": { "level": "error", "fix": "safe" }
43+
},
44+
"suspicious": {
45+
"noExplicitAny": "off",
46+
"noShadow": "error",
47+
"noArrayIndexKey": "warn",
48+
"noUnknownAtRules": "off"
49+
}
50+
},
51+
"includes": [
52+
"**",
53+
"!**/node_modules/**",
54+
"!**/dist/**",
55+
"!**/build/**",
56+
"!src/components/ui/**",
57+
"!src/components/minimal-tiptap/**"
58+
]
59+
},
60+
"javascript": {
61+
"formatter": {
62+
"quoteStyle": "single",
63+
"jsxQuoteStyle": "single",
64+
"quoteProperties": "asNeeded",
65+
"trailingCommas": "all",
66+
"semicolons": "asNeeded",
67+
"arrowParentheses": "always",
68+
"bracketSameLine": false,
69+
"bracketSpacing": true
70+
}
71+
},
72+
"css": {
73+
"formatter": { "quoteStyle": "single" },
74+
"parser": { "tailwindDirectives": true }
75+
},
76+
"assist": {
77+
"enabled": true,
78+
"actions": { "source": { "organizeImports": "on" } }
79+
}
80+
}

components.json

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
11
{
2-
"$schema": "https://ui.shadcn.com/schema.json",
3-
"style": "default",
4-
"rsc": false,
5-
"tsx": true,
6-
"tailwind": {
7-
"config": "tailwind/tailwind.config.js",
8-
"css": "@/index.css",
9-
"baseColor": "zinc",
10-
"cssVariables": true,
11-
"prefix": ""
12-
},
13-
"aliases": {
14-
"components": "@/components",
15-
"utils": "@/lib/utils",
16-
"ui": "@/components/ui",
17-
"lib": "@/lib",
18-
"hooks": "@/hooks"
19-
},
20-
"iconLibrary": "lucide"
2+
"$schema": "https://ui.shadcn.com/schema.json",
3+
"style": "default",
4+
"rsc": false,
5+
"tsx": true,
6+
"tailwind": {
7+
"config": "tailwind/tailwind.config.js",
8+
"css": "@/index.css",
9+
"baseColor": "zinc",
10+
"cssVariables": true,
11+
"prefix": ""
12+
},
13+
"aliases": {
14+
"components": "@/components",
15+
"utils": "@/lib/utils",
16+
"ui": "@/components/ui",
17+
"lib": "@/lib",
18+
"hooks": "@/hooks"
19+
},
20+
"iconLibrary": "lucide"
2121
}
22-

eslint.config.mjs

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

package.json

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,12 @@
2626
"build:esm": "tsc --project tsconfig.json && tsc-alias",
2727
"build:copy-css": "cp src/index.css dist/index.css && mkdir -p dist/components/minimal-tiptap/styles && cp src/components/minimal-tiptap/styles/index.css dist/components/minimal-tiptap/styles/index.css",
2828
"build": "yarn build:esm && yarn build:copy-css",
29-
"lint": "eslint \"**/*.{js,jsx,ts,tsx}\""
29+
"lint": "biome lint",
30+
"lint:fix": "biome lint --fix",
31+
"format": "biome format",
32+
"format:fix": "biome format --fix",
33+
"check": "biome check",
34+
"check:fix": "biome check --fix"
3035
},
3136
"packageManager": "yarn@4.14.1",
3237
"dependencies": {
@@ -99,21 +104,13 @@
99104
"react-router-dom": "^7.14.2"
100105
},
101106
"devDependencies": {
102-
"@eslint/compat": "^2.1.0",
107+
"@biomejs/biome": "2.5.2",
103108
"@tanstack/react-query": "^5.101.2",
104109
"@tumaet/prompt-shared-state": "1.1.1",
105110
"@types/file-saver": "^2.0.7",
106111
"@types/react": "^19.2.17",
107112
"@types/react-dom": "^19.2.3",
108-
"@typescript-eslint/eslint-plugin": "^8.63.0",
109-
"@typescript-eslint/parser": "^8.63.0",
110-
"eslint": "^9.39.4",
111-
"eslint-plugin-prettier": "^5.5.6",
112-
"eslint-plugin-react": "^7.37.5",
113-
"eslint-plugin-react-hooks": "^7.1.1",
114-
"globals": "^17.7.0",
115113
"postcss-cli": "^11.0.1",
116-
"prettier": "^3.8.4",
117114
"react": "^19.2.7",
118115
"react-dom": "^19.2.7",
119116
"react-router-dom": "^7.14.2"

src/components/DatePicker.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
import * as React from 'react'
21
import { format } from 'date-fns'
3-
import { CalendarIcon } from 'lucide-react'
42
import { enGB } from 'date-fns/locale'
5-
6-
import { cn } from '@/lib/utils'
3+
import { CalendarIcon } from 'lucide-react'
4+
import * as React from 'react'
75
import { Button } from '@/components/ui/button'
86
import { Calendar } from '@/components/ui/calendar'
97
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'
8+
import { cn } from '@/lib/utils'
109

1110
interface DatePickerProps {
1211
date: Date | undefined

src/components/DateRangePicker.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
import * as React from 'react'
2-
import { CalendarIcon } from 'lucide-react'
31
import { format } from 'date-fns'
4-
import { DateRange } from 'react-day-picker'
52
import { enGB } from 'date-fns/locale'
6-
7-
import { cn } from '@/lib/utils'
3+
import { CalendarIcon } from 'lucide-react'
4+
import type * as React from 'react'
5+
import type { DateRange } from 'react-day-picker'
86
import { Button } from '@/components/ui/button'
97
import { Calendar } from '@/components/ui/calendar'
108
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'
9+
import { cn } from '@/lib/utils'
1110

1211
interface DatePickerWithRangeProps extends React.HTMLAttributes<HTMLDivElement> {
1312
date: DateRange | undefined

src/components/DeleteConfirmationDialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { AlertTriangle } from 'lucide-react'
12
import {
23
AlertDialog,
34
AlertDialogAction,
@@ -8,7 +9,6 @@ import {
89
AlertDialogHeader,
910
AlertDialogTitle,
1011
} from '@/components/ui/alert-dialog'
11-
import { AlertTriangle } from 'lucide-react'
1212

1313
interface DeleteConfirmationProps {
1414
isOpen: boolean

src/components/DynamicIcon.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import React from 'react'
2-
import { LucideProps } from 'lucide-react'
1+
import type { LucideProps } from 'lucide-react'
32
import * as LucideIcons from 'lucide-react'
3+
import type React from 'react'
44

55
const fallback = <div style={{ width: 24, height: 24 }} />
66

src/components/ErrorPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import { AlertCircle, LogOut, RefreshCw } from 'lucide-react'
12
import { Button } from '@/components/ui/button'
23
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'
3-
import { AlertCircle, LogOut, RefreshCw } from 'lucide-react'
44

55
interface ErrorPageProps {
66
title?: string

0 commit comments

Comments
 (0)