Skip to content

Commit 7891e67

Browse files
committed
oxfmtrc
1 parent f4f71cc commit 7891e67

Some content is hidden

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

45 files changed

+855
-926
lines changed

.oxfmtrc.jsonc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"printWidth": 120
3+
}

apps/dashboard/src/App.tsx

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
import { lazy, Suspense } from 'react';
2-
import { Route, Routes } from 'react-router-dom';
3-
import Layout from './components/Layout';
1+
import { lazy, Suspense } from "react";
2+
import { Route, Routes } from "react-router-dom";
3+
import Layout from "./components/Layout";
44

55
// Lazy load all page components for code-splitting
6-
const HomePage = lazy(() => import('./pages/HomePage'));
7-
const MinificationBenchmarksPage = lazy(() => import('./pages/MinificationBenchmarksPage'));
8-
const NpmPackagesPage = lazy(() => import('./pages/NpmPackagesPage'));
9-
const RolldownStatsPage = lazy(() => import('./pages/RolldownStatsPage'));
10-
const DependentsPage = lazy(() => import('./pages/DependentsPage'));
6+
const HomePage = lazy(() => import("./pages/HomePage"));
7+
const MinificationBenchmarksPage = lazy(() => import("./pages/MinificationBenchmarksPage"));
8+
const NpmPackagesPage = lazy(() => import("./pages/NpmPackagesPage"));
9+
const RolldownStatsPage = lazy(() => import("./pages/RolldownStatsPage"));
10+
const DependentsPage = lazy(() => import("./pages/DependentsPage"));
1111

1212
// Loading component for Suspense fallback
1313
const PageLoader = () => (
14-
<div className='flex items-center justify-center min-h-[400px]'>
15-
<div className='text-gray-500 dark:text-gray-400'>Loading...</div>
14+
<div className="flex items-center justify-center min-h-[400px]">
15+
<div className="text-gray-500 dark:text-gray-400">Loading...</div>
1616
</div>
1717
);
1818

1919
function App() {
2020
return (
2121
<Routes>
22-
<Route path='/' element={<Layout />}>
22+
<Route path="/" element={<Layout />}>
2323
<Route
2424
index
2525
element={
@@ -29,31 +29,31 @@ function App() {
2929
}
3030
/>
3131
<Route
32-
path='rolldown-stats'
32+
path="rolldown-stats"
3333
element={
3434
<Suspense fallback={<PageLoader />}>
3535
<RolldownStatsPage />
3636
</Suspense>
3737
}
3838
/>
3939
<Route
40-
path='minification'
40+
path="minification"
4141
element={
4242
<Suspense fallback={<PageLoader />}>
4343
<MinificationBenchmarksPage />
4444
</Suspense>
4545
}
4646
/>
4747
<Route
48-
path='npm-packages'
48+
path="npm-packages"
4949
element={
5050
<Suspense fallback={<PageLoader />}>
5151
<NpmPackagesPage />
5252
</Suspense>
5353
}
5454
/>
5555
<Route
56-
path='dependents'
56+
path="dependents"
5757
element={
5858
<Suspense fallback={<PageLoader />}>
5959
<DependentsPage />

apps/dashboard/src/MinificationBenchmarks.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1-
import { libraries } from '@vibe/utils';
2-
import { LibraryBenchmarkCard } from './components/minification/LibraryBenchmarkCard';
3-
import { MinificationStats } from './components/minification/MinificationStats';
1+
import { libraries } from "@vibe/utils";
2+
import { LibraryBenchmarkCard } from "./components/minification/LibraryBenchmarkCard";
3+
import { MinificationStats } from "./components/minification/MinificationStats";
44

55
function MinificationBenchmarks() {
66
return (
77
<>
8-
<main className='max-w-6xl mx-auto px-8 py-8 flex flex-col gap-8'>
8+
<main className="max-w-6xl mx-auto px-8 py-8 flex flex-col gap-8">
99
{/* Combined Charts for Each Library - Time and Compression Side by Side */}
10-
<div className='flex flex-col gap-8'>
11-
{libraries.map(library => <LibraryBenchmarkCard key={library} library={library} />)}
10+
<div className="flex flex-col gap-8">
11+
{libraries.map((library) => (
12+
<LibraryBenchmarkCard key={library} library={library} />
13+
))}
1214
</div>
1315

1416
<MinificationStats />

apps/dashboard/src/NpmPackages.tsx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
import { PackageDownloadsList } from './components/npm/PackageDownloadsList';
1+
import { PackageDownloadsList } from "./components/npm/PackageDownloadsList";
22

33
// List of npm packages to display download counts for
44
const packages = [
5-
'vite',
6-
'vitest',
7-
'rolldown-vite',
8-
'rolldown',
9-
'tsdown',
10-
'oxlint',
11-
'oxc-parser',
12-
'oxc-transform',
13-
'oxc-minify',
14-
'oxc-resolver',
5+
"vite",
6+
"vitest",
7+
"rolldown-vite",
8+
"rolldown",
9+
"tsdown",
10+
"oxlint",
11+
"oxc-parser",
12+
"oxc-transform",
13+
"oxc-minify",
14+
"oxc-resolver",
1515
];
1616

1717
function NpmPackages() {
1818
return (
1919
<>
20-
<main className='max-w-7xl mx-auto px-8 py-8'>
21-
<h2 className='mb-6 text-slate-800 dark:text-slate-100 text-3xl font-bold tracking-tight'>
20+
<main className="max-w-7xl mx-auto px-8 py-8">
21+
<h2 className="mb-6 text-slate-800 dark:text-slate-100 text-3xl font-bold tracking-tight">
2222
NPM Package Statistics
2323
</h2>
2424

apps/dashboard/src/RolldownStats.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { BuildTimeChart } from './components/rolldown/BuildTimeChart';
2-
import { BundleSizeChart } from './components/rolldown/BundleSizeChart';
3-
import { MetricNavigation } from './components/rolldown/MetricNavigation';
4-
import { StatsCards } from './components/rolldown/StatsCards';
1+
import { BuildTimeChart } from "./components/rolldown/BuildTimeChart";
2+
import { BundleSizeChart } from "./components/rolldown/BundleSizeChart";
3+
import { MetricNavigation } from "./components/rolldown/MetricNavigation";
4+
import { StatsCards } from "./components/rolldown/StatsCards";
55

66
interface RolldownStatsProps {
77
selectedMetric: string;
@@ -13,12 +13,12 @@ function RolldownStats({ selectedMetric, setSelectedMetric }: RolldownStatsProps
1313
<>
1414
<MetricNavigation selectedMetric={selectedMetric} setSelectedMetric={setSelectedMetric} />
1515

16-
<main className='max-w-6xl mx-auto px-8 py-8 flex flex-col gap-8'>
17-
<div className='bg-white dark:bg-slate-800 border border-slate-200 dark:border-slate-700 px-8 py-8 rounded-xl shadow-sm'>
18-
<h2 className='mb-6 text-slate-800 dark:text-slate-100 text-3xl font-bold tracking-tight'>
19-
{selectedMetric === 'bundleSize' ? 'Bundle Size' : 'Build Time'}
16+
<main className="max-w-6xl mx-auto px-8 py-8 flex flex-col gap-8">
17+
<div className="bg-white dark:bg-slate-800 border border-slate-200 dark:border-slate-700 px-8 py-8 rounded-xl shadow-sm">
18+
<h2 className="mb-6 text-slate-800 dark:text-slate-100 text-3xl font-bold tracking-tight">
19+
{selectedMetric === "bundleSize" ? "Bundle Size" : "Build Time"}
2020
</h2>
21-
{selectedMetric === 'bundleSize' ? <BundleSizeChart /> : <BuildTimeChart />}
21+
{selectedMetric === "bundleSize" ? <BundleSizeChart /> : <BuildTimeChart />}
2222
</div>
2323

2424
<StatsCards />

apps/dashboard/src/__tests__/pages.test.tsx

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
import { render } from '@testing-library/react';
2-
import { MemoryRouter } from 'react-router-dom';
3-
import { describe, expect, it } from 'vitest';
4-
import App from '../App';
5-
import MinificationBenchmarksPage from '../pages/MinificationBenchmarksPage';
6-
import NpmPackagesPage from '../pages/NpmPackagesPage';
7-
import RolldownStatsPage from '../pages/RolldownStatsPage';
1+
import { render } from "@testing-library/react";
2+
import { MemoryRouter } from "react-router-dom";
3+
import { describe, expect, it } from "vitest";
4+
import App from "../App";
5+
import MinificationBenchmarksPage from "../pages/MinificationBenchmarksPage";
6+
import NpmPackagesPage from "../pages/NpmPackagesPage";
7+
import RolldownStatsPage from "../pages/RolldownStatsPage";
88

9-
describe('Pages rendering tests', () => {
10-
it('should render App component without errors', () => {
9+
describe("Pages rendering tests", () => {
10+
it("should render App component without errors", () => {
1111
const { container } = render(
12-
<MemoryRouter initialEntries={['/']}>
12+
<MemoryRouter initialEntries={["/"]}>
1313
<App />
1414
</MemoryRouter>,
1515
);
1616
expect(container).toBeTruthy();
1717
});
1818

19-
it('should render RolldownStatsPage without errors', () => {
19+
it("should render RolldownStatsPage without errors", () => {
2020
const { container } = render(
2121
<MemoryRouter>
2222
<RolldownStatsPage />
@@ -25,7 +25,7 @@ describe('Pages rendering tests', () => {
2525
expect(container).toBeTruthy();
2626
});
2727

28-
it('should render MinificationBenchmarksPage without errors', () => {
28+
it("should render MinificationBenchmarksPage without errors", () => {
2929
const { container } = render(
3030
<MemoryRouter>
3131
<MinificationBenchmarksPage />
@@ -34,7 +34,7 @@ describe('Pages rendering tests', () => {
3434
expect(container).toBeTruthy();
3535
});
3636

37-
it('should render NpmPackagesPage without errors', () => {
37+
it("should render NpmPackagesPage without errors", () => {
3838
const { container } = render(
3939
<MemoryRouter>
4040
<NpmPackagesPage />
@@ -43,10 +43,10 @@ describe('Pages rendering tests', () => {
4343
expect(container).toBeTruthy();
4444
});
4545

46-
it('should render all routes without errors', () => {
47-
const routes = ['/', '/minification', '/npm-packages'];
46+
it("should render all routes without errors", () => {
47+
const routes = ["/", "/minification", "/npm-packages"];
4848

49-
routes.forEach(route => {
49+
routes.forEach((route) => {
5050
const { container } = render(
5151
<MemoryRouter initialEntries={[route]}>
5252
<App />

apps/dashboard/src/components/Layout.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
import { Outlet } from 'react-router-dom';
2-
import { AppBar } from './layout/AppBar';
3-
import { Sidebar } from './layout/Sidebar';
1+
import { Outlet } from "react-router-dom";
2+
import { AppBar } from "./layout/AppBar";
3+
import { Sidebar } from "./layout/Sidebar";
44

55
function Layout() {
66
return (
7-
<div className='min-h-screen bg-slate-50 dark:bg-slate-950'>
7+
<div className="min-h-screen bg-slate-50 dark:bg-slate-950">
88
<Sidebar />
99

1010
{/* Main Content Area */}
11-
<div className='lg:pl-64 transition-all duration-300'>
12-
<div className='flex flex-col h-screen'>
11+
<div className="lg:pl-64 transition-all duration-300">
12+
<div className="flex flex-col h-screen">
1313
<AppBar />
1414

1515
{/* Page Content */}
16-
<main className='flex-1 overflow-auto'>
16+
<main className="flex-1 overflow-auto">
1717
<Outlet />
1818
</main>
1919
</div>

apps/dashboard/src/components/layout/AppBar.tsx

Lines changed: 23 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { Button } from '@vibe/ui';
2-
import { Bell, Search, User } from 'lucide-react';
1+
import { Button } from "@vibe/ui";
2+
import { Bell, Search, User } from "lucide-react";
33

44
interface AppBarProps {
55
title?: string;
@@ -8,60 +8,52 @@ interface AppBarProps {
88

99
export function AppBar({ title, subtitle }: AppBarProps) {
1010
return (
11-
<header className='h-16 bg-white dark:bg-slate-900 border-b border-slate-200 dark:border-slate-700 px-6'>
12-
<div className='h-full flex items-center justify-between'>
11+
<header className="h-16 bg-white dark:bg-slate-900 border-b border-slate-200 dark:border-slate-700 px-6">
12+
<div className="h-full flex items-center justify-between">
1313
{/* Left side - Page title */}
1414
<div>
15-
{title && (
16-
<h2 className='text-xl font-semibold text-slate-900 dark:text-white'>
17-
{title}
18-
</h2>
19-
)}
20-
{subtitle && (
21-
<p className='text-sm text-slate-500 dark:text-slate-300'>
22-
{subtitle}
23-
</p>
24-
)}
15+
{title && <h2 className="text-xl font-semibold text-slate-900 dark:text-white">{title}</h2>}
16+
{subtitle && <p className="text-sm text-slate-500 dark:text-slate-300">{subtitle}</p>}
2517
</div>
2618

2719
{/* Right side - Actions */}
28-
<div className='flex items-center gap-3'>
20+
<div className="flex items-center gap-3">
2921
{/* Search */}
30-
<div className='hidden md:flex items-center'>
31-
<div className='relative'>
22+
<div className="hidden md:flex items-center">
23+
<div className="relative">
3224
<Search
3325
size={18}
34-
className='absolute left-3 top-1/2 -translate-y-1/2 text-slate-400 dark:text-slate-500'
26+
className="absolute left-3 top-1/2 -translate-y-1/2 text-slate-400 dark:text-slate-500"
3527
/>
3628
<input
37-
type='text'
38-
placeholder='Search...'
39-
className='pl-10 pr-4 py-2 bg-slate-100 dark:bg-slate-800 border border-slate-200 dark:border-slate-700 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent'
29+
type="text"
30+
placeholder="Search..."
31+
className="pl-10 pr-4 py-2 bg-slate-100 dark:bg-slate-800 border border-slate-200 dark:border-slate-700 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"
4032
/>
4133
</div>
4234
</div>
4335

4436
{/* Notifications */}
4537
<Button
46-
variant='ghost'
47-
size='sm'
48-
className='relative'
38+
variant="ghost"
39+
size="sm"
40+
className="relative"
4941
icon={
5042
<>
5143
<Bell size={18} />
52-
<span className='absolute top-1 right-1 w-2 h-2 bg-red-500 rounded-full' />
44+
<span className="absolute top-1 right-1 w-2 h-2 bg-red-500 rounded-full" />
5345
</>
5446
}
5547
/>
5648

5749
{/* User Menu */}
58-
<div className='flex items-center gap-3 pl-3 border-l border-slate-200 dark:border-slate-700'>
59-
<div className='hidden sm:block text-right'>
60-
<p className='text-sm font-medium text-slate-900 dark:text-white'>Admin User</p>
61-
<p className='text-xs text-slate-500 dark:text-slate-300'>[email protected]</p>
50+
<div className="flex items-center gap-3 pl-3 border-l border-slate-200 dark:border-slate-700">
51+
<div className="hidden sm:block text-right">
52+
<p className="text-sm font-medium text-slate-900 dark:text-white">Admin User</p>
53+
<p className="text-xs text-slate-500 dark:text-slate-300">[email protected]</p>
6254
</div>
63-
<button className='w-10 h-10 bg-gradient-to-br from-blue-500 to-purple-600 rounded-full flex items-center justify-center'>
64-
<User size={18} className='text-white' />
55+
<button className="w-10 h-10 bg-gradient-to-br from-blue-500 to-purple-600 rounded-full flex items-center justify-center">
56+
<User size={18} className="text-white" />
6557
</button>
6658
</div>
6759
</div>
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
1-
import type { ReactNode } from 'react';
1+
import type { ReactNode } from "react";
22

33
interface PageContainerProps {
44
children: ReactNode;
55
className?: string;
66
}
77

8-
export function PageContainer({ children, className = '' }: PageContainerProps) {
8+
export function PageContainer({ children, className = "" }: PageContainerProps) {
99
return (
1010
<div className={`flex-1 p-6 ${className}`}>
11-
<div className='max-w-7xl mx-auto'>
12-
{children}
13-
</div>
11+
<div className="max-w-7xl mx-auto">{children}</div>
1412
</div>
1513
);
1614
}

0 commit comments

Comments
 (0)