fix: resolve all lint errors — exclude generated dirs, auto-fix source
Some checks failed
CI / ci (push) Failing after 20s
Some checks failed
CI / ci (push) Failing after 20s
Exclude drizzle/ and .planning/ from Biome (generated files with incompatible formatting). Auto-fix import ordering and formatting in existing source files. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -7,7 +7,7 @@
|
|||||||
},
|
},
|
||||||
"files": {
|
"files": {
|
||||||
"ignoreUnknown": false,
|
"ignoreUnknown": false,
|
||||||
"includes": ["**", "!src/client/routeTree.gen.ts"]
|
"includes": ["**", "!src/client/routeTree.gen.ts", "!drizzle", "!.planning"]
|
||||||
},
|
},
|
||||||
"formatter": {
|
"formatter": {
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
|
|||||||
98
package.json
98
package.json
@@ -1,51 +1,51 @@
|
|||||||
{
|
{
|
||||||
"name": "gearbox",
|
"name": "gearbox",
|
||||||
"module": "index.ts",
|
"module": "index.ts",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "concurrently -k -c \"blue,green\" -n \"server,client\" \"bun run dev:server\" \"bun run dev:client\"",
|
"dev": "concurrently -k -c \"blue,green\" -n \"server,client\" \"bun run dev:server\" \"bun run dev:client\"",
|
||||||
"dev:client": "vite",
|
"dev:client": "vite",
|
||||||
"dev:server": "bun --hot src/server/index.ts",
|
"dev:server": "bun --hot src/server/index.ts",
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
"db:generate": "bunx drizzle-kit generate",
|
"db:generate": "bunx drizzle-kit generate",
|
||||||
"db:push": "bunx drizzle-kit push",
|
"db:push": "bunx drizzle-kit push",
|
||||||
"test": "bun test",
|
"test": "bun test",
|
||||||
"lint": "bunx @biomejs/biome check ."
|
"lint": "bunx @biomejs/biome check ."
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@biomejs/biome": "^2.4.7",
|
"@biomejs/biome": "^2.4.7",
|
||||||
"@tanstack/react-query-devtools": "^5.91.3",
|
"@tanstack/react-query-devtools": "^5.91.3",
|
||||||
"@tanstack/react-router-devtools": "^1.166.7",
|
"@tanstack/react-router-devtools": "^1.166.7",
|
||||||
"@tanstack/router-plugin": "^1.166.9",
|
"@tanstack/router-plugin": "^1.166.9",
|
||||||
"@types/better-sqlite3": "^7.6.13",
|
"@types/better-sqlite3": "^7.6.13",
|
||||||
"@types/bun": "latest",
|
"@types/bun": "latest",
|
||||||
"@types/react": "^19.2.14",
|
"@types/react": "^19.2.14",
|
||||||
"@types/react-dom": "^19.2.3",
|
"@types/react-dom": "^19.2.3",
|
||||||
"@vitejs/plugin-react": "^6.0.1",
|
"@vitejs/plugin-react": "^6.0.1",
|
||||||
"better-sqlite3": "^12.8.0",
|
"better-sqlite3": "^12.8.0",
|
||||||
"concurrently": "^9.1.2",
|
"concurrently": "^9.1.2",
|
||||||
"drizzle-kit": "^0.31.9",
|
"drizzle-kit": "^0.31.9",
|
||||||
"vite": "^8.0.0"
|
"vite": "^8.0.0"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"typescript": "^5.9.3"
|
"typescript": "^5.9.3"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@hono/zod-validator": "^0.7.6",
|
"@hono/zod-validator": "^0.7.6",
|
||||||
"@modelcontextprotocol/sdk": "^1.29.0",
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
||||||
"@tailwindcss/vite": "^4.2.1",
|
"@tailwindcss/vite": "^4.2.1",
|
||||||
"@tanstack/react-query": "^5.90.21",
|
"@tanstack/react-query": "^5.90.21",
|
||||||
"@tanstack/react-router": "^1.167.0",
|
"@tanstack/react-router": "^1.167.0",
|
||||||
"clsx": "^2.1.1",
|
"clsx": "^2.1.1",
|
||||||
"drizzle-orm": "^0.45.1",
|
"drizzle-orm": "^0.45.1",
|
||||||
"hono": "^4.12.8",
|
"hono": "^4.12.8",
|
||||||
"lucide-react": "^0.577.0",
|
"lucide-react": "^0.577.0",
|
||||||
"react": "^19.2.4",
|
"react": "^19.2.4",
|
||||||
"react-dom": "^19.2.4",
|
"react-dom": "^19.2.4",
|
||||||
"recharts": "^3.8.0",
|
"recharts": "^3.8.0",
|
||||||
"tailwindcss": "^4.2.1",
|
"tailwindcss": "^4.2.1",
|
||||||
"zod": "^4.3.6",
|
"zod": "^4.3.6",
|
||||||
"zustand": "^5.0.11"
|
"zustand": "^5.0.11"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -264,12 +264,20 @@ export function WeightSummaryCard({ items }: WeightSummaryCardProps) {
|
|||||||
label="Consumable"
|
label="Consumable"
|
||||||
weight={consumableWeight}
|
weight={consumableWeight}
|
||||||
unit={unit}
|
unit={unit}
|
||||||
percent={totalWeight > 0 ? consumableWeight / totalWeight : undefined}
|
percent={
|
||||||
|
totalWeight > 0 ? consumableWeight / totalWeight : undefined
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<div className="border-t border-gray-200 mt-1.5 pt-1.5">
|
<div className="border-t border-gray-200 mt-1.5 pt-1.5">
|
||||||
<div className="flex items-center gap-3 py-1.5">
|
<div className="flex items-center gap-3 py-1.5">
|
||||||
<LucideIcon name="sigma" size={10} className="text-gray-400 shrink-0 ml-0.5" />
|
<LucideIcon
|
||||||
<span className="text-sm font-medium text-gray-700 flex-1">Total</span>
|
name="sigma"
|
||||||
|
size={10}
|
||||||
|
className="text-gray-400 shrink-0 ml-0.5"
|
||||||
|
/>
|
||||||
|
<span className="text-sm font-medium text-gray-700 flex-1">
|
||||||
|
Total
|
||||||
|
</span>
|
||||||
<span className="text-sm font-bold text-gray-900 tabular-nums">
|
<span className="text-sm font-bold text-gray-900 tabular-nums">
|
||||||
{formatWeight(totalWeight, unit)}
|
{formatWeight(totalWeight, unit)}
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@@ -113,7 +113,10 @@ export function useUpdateItemClassification(setupId: number) {
|
|||||||
mutationFn: ({
|
mutationFn: ({
|
||||||
itemId,
|
itemId,
|
||||||
classification,
|
classification,
|
||||||
}: { itemId: number; classification: string }) =>
|
}: {
|
||||||
|
itemId: number;
|
||||||
|
classification: string;
|
||||||
|
}) =>
|
||||||
apiPatch<{ success: boolean }>(
|
apiPatch<{ success: boolean }>(
|
||||||
`/api/setups/${setupId}/items/${itemId}/classification`,
|
`/api/setups/${setupId}/items/${itemId}/classification`,
|
||||||
{ classification },
|
{ classification },
|
||||||
|
|||||||
@@ -59,7 +59,10 @@ function RootLayout() {
|
|||||||
|
|
||||||
// Don't show onboarding wizard until user has created an account
|
// Don't show onboarding wizard until user has created an account
|
||||||
const showWizard =
|
const showWizard =
|
||||||
!onboardingLoading && onboardingComplete !== "true" && !wizardDismissed && isAuthenticated;
|
!onboardingLoading &&
|
||||||
|
onboardingComplete !== "true" &&
|
||||||
|
!wizardDismissed &&
|
||||||
|
isAuthenticated;
|
||||||
|
|
||||||
const isItemPanelOpen = panelMode !== "closed";
|
const isItemPanelOpen = panelMode !== "closed";
|
||||||
const isCandidatePanelOpen = candidatePanelMode !== "closed";
|
const isCandidatePanelOpen = candidatePanelMode !== "closed";
|
||||||
|
|||||||
@@ -9,11 +9,11 @@ import { ItemCard } from "../../components/ItemCard";
|
|||||||
import { SetupCard } from "../../components/SetupCard";
|
import { SetupCard } from "../../components/SetupCard";
|
||||||
import { ThreadCard } from "../../components/ThreadCard";
|
import { ThreadCard } from "../../components/ThreadCard";
|
||||||
import { useCategories } from "../../hooks/useCategories";
|
import { useCategories } from "../../hooks/useCategories";
|
||||||
|
import { useCurrency } from "../../hooks/useCurrency";
|
||||||
import { useItems } from "../../hooks/useItems";
|
import { useItems } from "../../hooks/useItems";
|
||||||
import { useCreateSetup, useSetups } from "../../hooks/useSetups";
|
import { useCreateSetup, useSetups } from "../../hooks/useSetups";
|
||||||
import { useThreads } from "../../hooks/useThreads";
|
import { useThreads } from "../../hooks/useThreads";
|
||||||
import { useTotals } from "../../hooks/useTotals";
|
import { useTotals } from "../../hooks/useTotals";
|
||||||
import { useCurrency } from "../../hooks/useCurrency";
|
|
||||||
import { useWeightUnit } from "../../hooks/useWeightUnit";
|
import { useWeightUnit } from "../../hooks/useWeightUnit";
|
||||||
import { formatPrice, formatWeight } from "../../lib/formatters";
|
import { formatPrice, formatWeight } from "../../lib/formatters";
|
||||||
import { LucideIcon } from "../../lib/iconData";
|
import { LucideIcon } from "../../lib/iconData";
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import { createFileRoute } from "@tanstack/react-router";
|
import { createFileRoute } from "@tanstack/react-router";
|
||||||
import { DashboardCard } from "../components/DashboardCard";
|
import { DashboardCard } from "../components/DashboardCard";
|
||||||
|
import { useCurrency } from "../hooks/useCurrency";
|
||||||
import { useSetups } from "../hooks/useSetups";
|
import { useSetups } from "../hooks/useSetups";
|
||||||
import { useThreads } from "../hooks/useThreads";
|
import { useThreads } from "../hooks/useThreads";
|
||||||
import { useTotals } from "../hooks/useTotals";
|
import { useTotals } from "../hooks/useTotals";
|
||||||
import { useWeightUnit } from "../hooks/useWeightUnit";
|
import { useWeightUnit } from "../hooks/useWeightUnit";
|
||||||
import { useCurrency } from "../hooks/useCurrency";
|
|
||||||
import { formatPrice, formatWeight } from "../lib/formatters";
|
import { formatPrice, formatWeight } from "../lib/formatters";
|
||||||
|
|
||||||
export const Route = createFileRoute("/")({
|
export const Route = createFileRoute("/")({
|
||||||
@@ -35,7 +35,10 @@ function DashboardPage() {
|
|||||||
label: "Weight",
|
label: "Weight",
|
||||||
value: formatWeight(global?.totalWeight ?? null, unit),
|
value: formatWeight(global?.totalWeight ?? null, unit),
|
||||||
},
|
},
|
||||||
{ label: "Cost", value: formatPrice(global?.totalCost ?? null, currency) },
|
{
|
||||||
|
label: "Cost",
|
||||||
|
value: formatPrice(global?.totalCost ?? null, currency),
|
||||||
|
},
|
||||||
]}
|
]}
|
||||||
emptyText="Get started"
|
emptyText="Get started"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -4,13 +4,13 @@ import { CategoryHeader } from "../../components/CategoryHeader";
|
|||||||
import { ItemCard } from "../../components/ItemCard";
|
import { ItemCard } from "../../components/ItemCard";
|
||||||
import { ItemPicker } from "../../components/ItemPicker";
|
import { ItemPicker } from "../../components/ItemPicker";
|
||||||
import { WeightSummaryCard } from "../../components/WeightSummaryCard";
|
import { WeightSummaryCard } from "../../components/WeightSummaryCard";
|
||||||
|
import { useCurrency } from "../../hooks/useCurrency";
|
||||||
import {
|
import {
|
||||||
useDeleteSetup,
|
useDeleteSetup,
|
||||||
useRemoveSetupItem,
|
useRemoveSetupItem,
|
||||||
useSetup,
|
useSetup,
|
||||||
useUpdateItemClassification,
|
useUpdateItemClassification,
|
||||||
} from "../../hooks/useSetups";
|
} from "../../hooks/useSetups";
|
||||||
import { useCurrency } from "../../hooks/useCurrency";
|
|
||||||
import { useWeightUnit } from "../../hooks/useWeightUnit";
|
import { useWeightUnit } from "../../hooks/useWeightUnit";
|
||||||
import { formatPrice, formatWeight } from "../../lib/formatters";
|
import { formatPrice, formatWeight } from "../../lib/formatters";
|
||||||
import { LucideIcon } from "../../lib/iconData";
|
import { LucideIcon } from "../../lib/iconData";
|
||||||
|
|||||||
@@ -434,7 +434,10 @@ describe("Thread Service", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("returns { success: false, error } when thread status is 'resolved'", () => {
|
it("returns { success: false, error } when thread status is 'resolved'", () => {
|
||||||
const thread = createThread(db, { name: "Resolved Thread", categoryId: 1 });
|
const thread = createThread(db, {
|
||||||
|
name: "Resolved Thread",
|
||||||
|
categoryId: 1,
|
||||||
|
});
|
||||||
const candidate = createCandidate(db, thread.id, {
|
const candidate = createCandidate(db, thread.id, {
|
||||||
name: "Winner",
|
name: "Winner",
|
||||||
categoryId: 1,
|
categoryId: 1,
|
||||||
|
|||||||
Reference in New Issue
Block a user