Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
37 changes: 37 additions & 0 deletions .oxfmtrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"$schema": "./node_modules/oxfmt/configuration_schema.json",
"useTabs": false,
"tabWidth": 2,
"printWidth": 80,
"singleQuote": false,
"jsxSingleQuote": false,
"quoteProps": "as-needed",
"trailingComma": "all",
"semi": true,
"arrowParens": "always",
"bracketSameLine": false,
"bracketSpacing": true,
"sortPackageJson": false,
"sortImports": true,
"sortTailwindcss": false,
"ignorePatterns": [
"**/*.md",
"**/*.mdx",
"**/*.html",
"**/*.yaml",
"**/*.yml",
"**/dist",
"**/tmp",
"**/*.d.ts",
"**/build",
"**/coverage",
"packages/appkit-ui/src/react/ui",
"**/routeTree.gen.ts",
"docs/.docusaurus",
"**/*.gen.css",
"**/*.gen.ts",
"**/typedoc-sidebar.ts",
"**/template",
"**/appkit-types/metric-views.ts"
]
}
81 changes: 81 additions & 0 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": ["typescript", "react", "jsx-a11y", "unicorn", "oxc"],
"categories": {
"correctness": "error"
},
"rules": {
"typescript/no-explicit-any": "off",
"unicorn/no-static-only-class": "off",
"react/no-danger": "off",
"typescript/no-non-null-assertion": "error",
"typescript/no-empty-object-type": "error",
"no-control-regex": "error",
"jsx-a11y/click-events-have-key-events": "error",
"jsx-a11y/no-static-element-interactions": "error",
"no-unused-vars": [
"warn",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^_"
}
],
"no-restricted-imports": [
"error",
{
"patterns": [
{
"group": [
"@databricks/sdk-experimental",
"@databricks/sdk-experimental/**"
],
"message": "Import the Databricks SDK only through the wrapper in packages/shared/src/workspace-client. Add a re-export there if you need a new symbol."
}
]
}
],
// Stricter than Biome's former bar; the flagged sites are pre-existing,
// working code (Biome's CI was green over them). Disabled to keep the
// tooling swap behavior-preserving. Re-enable and fix in a follow-up to
// tighten the lint bar.
"react/no-array-index-key": "off",
"react/exhaustive-deps": "off",
"no-unsafe-optional-chaining": "off",
"typescript/no-this-alias": "off",
"oxc/only-used-in-recursion": "off",
"unicorn/no-useless-fallback-in-spread": "off",
"unicorn/no-useless-spread": "off",
"unicorn/no-new-array": "off",
"unicorn/no-empty-file": "off",
"unicorn/prefer-string-starts-ends-with": "off",
"jsx-a11y/prefer-tag-over-role": "off",
"jsx-a11y/control-has-associated-label": "off"
},
"overrides": [
{
"files": [
"packages/shared/src/workspace-client/**",
"packages/lakebase/**"
],
"rules": {
"no-restricted-imports": "off"
}
}
],
"ignorePatterns": [
"**/dist",
"**/tmp",
"**/*.d.ts",
"**/build",
"**/coverage",
"packages/appkit-ui/src/react/ui",
"**/routeTree.gen.ts",
"docs/.docusaurus",
"**/*.gen.css",
"**/*.gen.ts",
"**/typedoc-sidebar.ts",
"**/template",
"**/appkit-types/metric-views.ts"
]
}
16 changes: 9 additions & 7 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,12 @@ pnpm test:watch # Run tests in watch mode

### Code Quality
```bash
pnpm lint # Lint with Biome
pnpm lint # Lint with oxlint
pnpm lint:fix # Lint and auto-fix
pnpm format # Format with Biome
pnpm format # Format with oxfmt
pnpm format:check # Check formatting
pnpm check # Run Biome check (lint + format)
pnpm check:fix # Auto-fix with Biome
pnpm check # Run oxlint + oxfmt --check (lint + format)
pnpm check:fix # Auto-fix lint (oxlint --fix) and format (oxfmt)
pnpm typecheck # TypeScript type checking across all packages
```

Expand Down Expand Up @@ -305,11 +305,13 @@ The frontend uses `rolldown-vite@7.1.14`, a performance-optimized Vite fork.
- `@vitejs/plugin-react` - React Fast Refresh
- `@tanstack/router-plugin` - File-based routing with auto code-splitting

### Formatter/Linter: Biome
### Linter: oxlint / Formatter: oxfmt

Biome is used instead of ESLint/Prettier for faster performance:
The oxc (VoidZero) toolchain is used instead of ESLint/Prettier for faster performance:
- `oxlint` for linting (config in `.oxlintrc.json`)
- `oxfmt` for formatting + import sorting (config in `.oxfmtrc.json`)
- Lint-staged integration via husky
- Configured in `biome.json` (if present)
- Note: oxc does not lint/format CSS

## Working with the Monorepo

Expand Down
2 changes: 1 addition & 1 deletion apps/clean-app/eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import js from "@eslint/js";
import { defineConfig, globalIgnores } from "eslint/config";
import reactHooks from "eslint-plugin-react-hooks";
import reactRefresh from "eslint-plugin-react-refresh";
import { defineConfig, globalIgnores } from "eslint/config";
import globals from "globals";
import tseslint from "typescript-eslint";

Expand Down
4 changes: 3 additions & 1 deletion apps/clean-app/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { useState } from "react";
import viteLogo from "/vite.svg";
import { useState } from "react";

import reactLogo from "./assets/react.svg";

import "./App.css";

function App() {
Expand Down
1 change: 1 addition & 0 deletions apps/clean-app/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { StrictMode } from "react";
import { createRoot } from "react-dom/client";

import "./index.css";
import App from "./App.tsx";

Expand Down
2 changes: 1 addition & 1 deletion apps/dev-playground/client/eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import js from "@eslint/js";
import { defineConfig, globalIgnores } from "eslint/config";
import reactHooks from "eslint-plugin-react-hooks";
import reactRefresh from "eslint-plugin-react-refresh";
import { defineConfig, globalIgnores } from "eslint/config";
import globals from "globals";
import tseslint from "typescript-eslint";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { useEffect, useState } from "react";
import databricksLogo from "@/assets/databricks-logo.svg";

import databricksLogoWhite from "@/assets/databricks-logo-white.svg";
import databricksLogo from "@/assets/databricks-logo.svg";

function useDarkMode() {
const [isDark, setIsDark] = useState(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
SelectTrigger,
SelectValue,
} from "@databricks/appkit-ui/react";

import type { Aggregation, DashboardFilters } from "@/lib/types";

interface FilterBarProps {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
CardTitle,
Skeleton,
} from "@databricks/appkit-ui/react";

import type { Aggregation, DashboardFilters } from "@/lib/types";

interface SummaryCardsProps {
Expand Down Expand Up @@ -78,7 +79,8 @@ export function SummaryCards({
<p className="text-sm text-muted-foreground">
{metrics.forecasted > 0 && metrics.total > 0
? `+${(
((metrics.forecasted - metrics.total) / metrics.total) * 100
((metrics.forecasted - metrics.total) / metrics.total) *
100
).toFixed(0)}% vs current period`
: "Next period"}
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
CardHeader,
CardTitle,
} from "@databricks/appkit-ui/react";

import { AppsDataTable } from "@/components/apps-data-table";

interface UntaggedApp {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
} from "@databricks/appkit-ui/react";
import { Activity, Loader2 } from "lucide-react";
import { useId, useState } from "react";

import { useLakebaseData, useLakebasePost } from "@/hooks/use-lakebase-data";

interface ActivityLog {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
} from "@databricks/appkit-ui/react";
import { Loader2, Package, ShieldCheck } from "lucide-react";
import { useId, useState } from "react";

import { useLakebaseData, useLakebasePost } from "@/hooks/use-lakebase-data";

interface Product {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
Truck,
} from "lucide-react";
import { useId, useState } from "react";

import {
useLakebaseData,
useLakebasePatch,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
} from "@databricks/appkit-ui/react";
import { CheckCircle, Circle, ListTodo, Loader2 } from "lucide-react";
import { useId, useState } from "react";

import {
useLakebaseData,
useLakebasePatch,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
TooltipTrigger,
} from "@databricks/appkit-ui/react";
import { InfoIcon } from "lucide-react";

import { Timeline } from "./timeline";
import { getStatusBadgeStyle } from "./utils";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
MapPinIcon,
MessageSquareIcon,
} from "lucide-react";

import type { FeedAction } from "../lib/feed-actions";

type Variant = "insight" | "anomaly";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { FilterIcon, XIcon } from "lucide-react";

import type { DashboardFilters } from "../hooks/use-dashboard-data";

interface ActiveFiltersProps {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { BrainIcon, Loader2Icon, RefreshCwIcon } from "lucide-react";
import { useCallback, useEffect, useMemo, useRef, useState } from "react";

import type { Highlight } from "../hooks/use-action-dispatcher";
import { useAgentStream } from "../hooks/use-agent-stream";
import type { DashboardFilters, KPIData } from "../hooks/use-dashboard-data";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
ShieldAlertIcon,
} from "lucide-react";
import { useCallback, useState } from "react";

import type { Highlight } from "../hooks/use-action-dispatcher";
import type { DashboardFilters } from "../hooks/use-dashboard-data";
import { captureDashboardAsDataUrl } from "../lib/capture-dashboard";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
XIcon,
} from "lucide-react";
import { useCallback, useEffect, useRef, useState } from "react";

import type { PendingApproval } from "./approval-card";

export interface ChatMessage {
Expand Down Expand Up @@ -86,7 +87,6 @@ export function ChatDrawer({
if (pendingApprovals.length > 0) onOpenChange(true);
}, [pendingApprovals.length, onOpenChange]);

// biome-ignore lint/correctness/useExhaustiveDependencies: scroll on new messages
useEffect(() => {
bottomRef.current?.scrollIntoView({ behavior: "smooth" });
}, [messages.length, messages[messages.length - 1]?.content]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
XAxis,
YAxis,
} from "recharts";

import { useChartColors } from "../hooks/use-chart-colors";
import type { FareBucket } from "../hooks/use-dashboard-data";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { ReactNode } from "react";

import {
type FocusableChartId,
useFocusable,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { useMemo } from "react";

import type { HeatmapCell } from "../hooks/use-dashboard-data";

interface HourlyHeatmapProps {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ActivityIcon } from "lucide-react";

import {
toggleInspector,
useStreamInspector,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { CarIcon, DollarSignIcon, MapPinIcon, RulerIcon } from "lucide-react";
import { useId, useMemo } from "react";

import { useChartColors } from "../hooks/use-chart-colors";
import type { KPIData, SparklineRow } from "../hooks/use-dashboard-data";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,9 @@ export function SavedViewsPanel({
}, []);

// Load on mount + whenever the parent bumps refreshToken. The dep on
// refreshToken is intentional — biome flags it because it's an opaque
// number with no direct read inside the effect body, but the whole
// point is that changing it in the parent invalidates the cached list.
// biome-ignore lint/correctness/useExhaustiveDependencies: see above
// refreshToken is intentional — it's an opaque number with no direct
// read inside the effect body, but the whole point is that changing it
// in the parent invalidates the cached list.
useEffect(() => {
load();
}, [load, refreshToken]);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { ChevronDownIcon, ChevronRightIcon, XIcon } from "lucide-react";
import { useMemo, useState } from "react";

import {
clearInspectorHistory,
closeInspector,
Expand Down Expand Up @@ -178,8 +179,7 @@ export function StreamInspector() {

return (
<>
{/* biome-ignore lint/a11y/noStaticElementInteractions: backdrop dismiss */}
{/* biome-ignore lint/a11y/useKeyWithClickEvents: backdrop dismiss handled globally via Esc */}
{/* oxlint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions -- backdrop dismiss handled globally via Esc */}
<div
onClick={closeInspector}
className="fixed inset-0 bg-black/30 backdrop-blur-sm z-40"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { useMemo, useState } from "react";

import { useChartColors } from "../hooks/use-chart-colors";
import type { TopZoneRow } from "../hooks/use-dashboard-data";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
XAxis,
YAxis,
} from "recharts";

import type { Highlight } from "../hooks/use-action-dispatcher";
import { useChartColors } from "../hooks/use-chart-colors";
import type { TripOverTime } from "../hooks/use-dashboard-data";
Expand Down
Loading
Loading