Skip to content

Commit bf1875a

Browse files
authored
perf: switch to biome for formatting (#94)
* Update index.ts * Update index.ts * reduce callbacks in instrumentation * Update fiber.ts * Add sierpinski test * Move sierpinski example * Update package.json * WIP: move to OffscreenCanvas * Revert "WIP: move to OffscreenCanvas" This reverts commit 5b4a9cf. * Fix instrumentation * Switch to biome * Fix example * Create settings.json * Update instrumentation.ts
1 parent ef84d60 commit bf1875a

File tree

16 files changed

+1775
-148
lines changed

16 files changed

+1775
-148
lines changed

.prettierrc.mjs

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

.vscode/settings.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
{
2+
"editor.formatOnSave": true,
3+
"editor.defaultFormatter": "biomejs.biome",
24
"typescript.tsdk": "node_modules/typescript/lib",
35
"typescript.enablePromptUseWorkspaceTsdk": true,
46
"typescript.preferences.importModuleSpecifier": "non-relative",
@@ -13,6 +15,6 @@
1315
"tailwindCSS.validate": true,
1416
"editor.colorDecorators": true,
1517
"[css]": {
16-
"editor.formatOnSave": false,
18+
"editor.formatOnSave": false
1719
}
1820
}

biome.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
3+
"vcs": {
4+
"enabled": false,
5+
"clientKind": "git",
6+
"useIgnoreFile": false
7+
},
8+
"files": {
9+
"ignoreUnknown": false,
10+
"ignore": []
11+
},
12+
"formatter": {
13+
"enabled": true,
14+
"indentStyle": "space",
15+
"indentWidth": 2,
16+
"lineWidth": 80,
17+
"lineEnding": "lf"
18+
},
19+
"organizeImports": {
20+
"enabled": true
21+
},
22+
"javascript": {
23+
"formatter": {
24+
"quoteStyle": "single",
25+
"indentStyle": "space",
26+
"indentWidth": 2,
27+
"lineWidth": 80,
28+
"lineEnding": "lf"
29+
}
30+
}
31+
}

examples/sierpinski/index.html

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
7+
<title>React Scan</title>
8+
<meta name="title" content="React Scan" />
9+
<meta
10+
name="description"
11+
content="React Scan automatically detects and highlights components that cause performance issues in your React app. Drop it in anywhere – script tag, npm, you name it!"
12+
/>
13+
14+
<meta property="og:type" content="website" />
15+
<meta property="og:url" content="https://react-scan.million.dev" />
16+
<meta property="og:title" content="React Scan" />
17+
<meta
18+
property="og:description"
19+
content="React Scan automatically detects and highlights components that cause performance issues in your React app. Drop it in anywhere – script tag, npm, you name it!"
20+
/>
21+
<meta
22+
property="og:image"
23+
content="https://react-scan.million.dev/banner.png"
24+
/>
25+
26+
<meta property="twitter:card" content="summary_large_image" />
27+
<meta property="twitter:url" content="https://react-scan.million.dev" />
28+
<meta property="twitter:title" content="React Scan" />
29+
<meta
30+
property="twitter:description"
31+
content="React Scan automatically detects and highlights components that cause performance issues in your React app. Drop it in anywhere – script tag, npm, you name it!"
32+
/>
33+
<meta
34+
property="twitter:image"
35+
content="https://react-scan.million.dev/banner.png"
36+
/>
37+
38+
<link rel="preconnect" href="https://fonts.googleapis.com" />
39+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
40+
<link
41+
href="https://fonts.googleapis.com/css2?family=Geist+Mono:[email protected]&family=Geist:[email protected]&display=swap"
42+
rel="stylesheet"
43+
/>
44+
45+
<link rel="icon" href="/logo.svg" type="image/svg+xml" />
46+
47+
<meta
48+
name="keywords"
49+
content="react, performance, debugging, developer tools, web development, javascript"
50+
/>
51+
<meta name="author" content="Aiden Bai" />
52+
<meta name="theme-color" content="#8b5cf6" />
53+
<link rel="canonical" href="https://react-scan.million.dev" />
54+
</head>
55+
<body>
56+
<div id="root"></div>
57+
<script type="module" src="/src/index.jsx"></script>
58+
</body>
59+
</html>

examples/sierpinski/package.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"private": "true",
3+
"scripts": {
4+
"dev": "vite",
5+
"build": "vite build",
6+
"preview": "vite preview"
7+
},
8+
"dependencies": {
9+
"@vercel/analytics": "^1.4.0",
10+
"babel-plugin-react-compiler": "19.0.0-beta-a7bf2bd-20241110",
11+
"react": "19.0.0-rc.1",
12+
"react-dom": "19.0.0-rc.1",
13+
"react-scan": "workspace:*",
14+
"sugar-high": "^0.7.5",
15+
"vite-plugin-inspect": "^0.8.7"
16+
},
17+
"devDependencies": {
18+
"@vitejs/plugin-react": "^4.3.1",
19+
"vite": "^5.4.3"
20+
}
21+
}

0 commit comments

Comments
 (0)