lint using oxlint (#106)

This commit is contained in:
Will Chen
2025-05-08 17:21:35 -07:00
committed by GitHub
parent 0e8cc26fb5
commit 2537fbb342
63 changed files with 251 additions and 292 deletions

View File

@@ -1,4 +1,3 @@
import { useState } from "react";
import { FileEditor } from "./FileEditor";
import { FileTree } from "./FileTree";
import { RefreshCw } from "lucide-react";

View File

@@ -90,7 +90,7 @@ export const FileEditor = ({ appId, filePath }: FileEditorProps) => {
const editorTheme = isDarkMode ? "dyad-dark" : "dyad-light";
// Handle editor mount
const handleEditorDidMount: OnMount = (editor, monaco) => {
const handleEditorDidMount: OnMount = (editor) => {
editorRef.current = editor;
// Listen for model content change events

View File

@@ -20,7 +20,7 @@ import {
} from "lucide-react";
import { selectedChatIdAtom } from "@/atoms/chatAtoms";
import { IpcClient } from "@/ipc/ipc_client";
import { useLoadApp } from "@/hooks/useLoadApp";
import { useLoadAppFile } from "@/hooks/useLoadAppFile";
import {
DropdownMenu,
@@ -28,8 +28,6 @@ import {
DropdownMenuItem,
DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu";
import { useSettings } from "@/hooks/useSettings";
import { useRunApp } from "@/hooks/useRunApp";
import { useStreamChat } from "@/hooks/useStreamChat";
interface ErrorBannerProps {
@@ -113,7 +111,7 @@ export const PreviewIframe = ({ loading }: { loading: boolean }) => {
// State to trigger iframe reload
const [reloadKey, setReloadKey] = useState(0);
const [errorMessage, setErrorMessage] = useAtom(previewErrorMessageAtom);
const [selectedChatId, setSelectedChatId] = useAtom(selectedChatIdAtom);
const selectedChatId = useAtomValue(selectedChatIdAtom);
const { streamMessage } = useStreamChat();
const [availableRoutes, setAvailableRoutes] = useState<
Array<{ path: string; label: string }>
@@ -168,7 +166,6 @@ export const PreviewIframe = ({ loading }: { loading: boolean }) => {
const [navigationHistory, setNavigationHistory] = useState<string[]>([]);
const [currentHistoryPosition, setCurrentHistoryPosition] = useState(0);
const iframeRef = useRef<HTMLIFrameElement>(null);
const { settings } = useSettings();
// Add message listener for iframe errors and navigation events
useEffect(() => {

View File

@@ -5,7 +5,7 @@ import {
previewPanelKeyAtom,
selectedAppIdAtom,
} from "../../atoms/appAtoms";
import { useLoadApp } from "@/hooks/useLoadApp";
import { CodeView } from "./CodeView";
import { PreviewIframe } from "./PreviewIframe";
import {
@@ -14,11 +14,8 @@ import {
ChevronDown,
ChevronUp,
Logs,
RefreshCw,
MoreVertical,
Trash2,
Cog,
CirclePower,
Power,
} from "lucide-react";
import { motion } from "framer-motion";