lint using oxlint (#106)
This commit is contained in:
@@ -9,7 +9,7 @@ export function useAppVersion() {
|
||||
try {
|
||||
const version = await IpcClient.getInstance().getAppVersion();
|
||||
setAppVersion(version);
|
||||
} catch (error) {
|
||||
} catch {
|
||||
setAppVersion(null);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { useState, useEffect } from "react";
|
||||
import { IpcClient } from "@/ipc/ipc_client";
|
||||
import type { App } from "@/ipc/ipc_types";
|
||||
import { atom, useAtom } from "jotai";
|
||||
|
||||
import { useAtom } from "jotai";
|
||||
import { currentAppAtom } from "@/atoms/appAtoms";
|
||||
|
||||
export function useLoadApp(appId: number | null) {
|
||||
|
||||
@@ -5,7 +5,7 @@ import { IpcClient } from "@/ipc/ipc_client";
|
||||
|
||||
export function useLoadApps() {
|
||||
const [apps, setApps] = useAtom(appsListAtom);
|
||||
const [appBasePath, setAppBasePath] = useAtom(appBasePathAtom);
|
||||
const [, setAppBasePath] = useAtom(appBasePathAtom);
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [error, setError] = useState<Error | null>(null);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { useState, useEffect, useCallback } from "react";
|
||||
import { IpcClient } from "@/ipc/ipc_client";
|
||||
import type { CodeProposal, ProposalResult } from "@/lib/schemas"; // Import Proposal type
|
||||
import type { ProposalResult } from "@/lib/schemas"; // Import Proposal type
|
||||
import { proposalResultAtom } from "@/atoms/proposalAtoms";
|
||||
import { useAtom } from "jotai";
|
||||
export function useProposal(chatId?: number | undefined) {
|
||||
|
||||
@@ -9,7 +9,6 @@ import {
|
||||
selectedAppIdAtom,
|
||||
} from "@/atoms/appAtoms";
|
||||
import { useAtom, useAtomValue, useSetAtom } from "jotai";
|
||||
import { App } from "@/ipc/ipc_types";
|
||||
|
||||
export function useRunApp() {
|
||||
const [loading, setLoading] = useState(false);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useState, useEffect, useCallback } from "react";
|
||||
import { atom, useAtom } from "jotai";
|
||||
import { useAtom } from "jotai";
|
||||
import { userSettingsAtom, envVarsAtom } from "@/atoms/appAtoms";
|
||||
import { IpcClient } from "@/ipc/ipc_client";
|
||||
import { cloudProviders, type UserSettings } from "@/lib/schemas";
|
||||
@@ -11,9 +11,6 @@ const PROVIDER_TO_ENV_VAR: Record<string, string> = {
|
||||
google: "GEMINI_API_KEY",
|
||||
};
|
||||
|
||||
// Define a type for the environment variables we expect
|
||||
type EnvVars = Record<string, string | undefined>;
|
||||
|
||||
const TELEMETRY_CONSENT_KEY = "dyadTelemetryConsent";
|
||||
const TELEMETRY_USER_ID_KEY = "dyadTelemetryUserId";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { useCallback, useState } from "react";
|
||||
import { useCallback } from "react";
|
||||
import type { Message } from "@/ipc/ipc_types";
|
||||
import { useAtom, useSetAtom } from "jotai";
|
||||
import {
|
||||
@@ -14,7 +14,7 @@ import { useChats } from "./useChats";
|
||||
import { useLoadApp } from "./useLoadApp";
|
||||
import { selectedAppIdAtom } from "@/atoms/appAtoms";
|
||||
import { useVersions } from "./useVersions";
|
||||
import { showError, showUncommittedFilesWarning } from "@/lib/toast";
|
||||
import { showUncommittedFilesWarning } from "@/lib/toast";
|
||||
import { useProposal } from "./useProposal";
|
||||
import { useSearch } from "@tanstack/react-router";
|
||||
import { useRunApp } from "./useRunApp";
|
||||
@@ -27,7 +27,7 @@ export function getRandomNumberId() {
|
||||
export function useStreamChat({
|
||||
hasChatId = true,
|
||||
}: { hasChatId?: boolean } = {}) {
|
||||
const [messages, setMessages] = useAtom(chatMessagesAtom);
|
||||
const [, setMessages] = useAtom(chatMessagesAtom);
|
||||
const [isStreaming, setIsStreaming] = useAtom(isStreamingAtom);
|
||||
const [error, setError] = useAtom(chatErrorAtom);
|
||||
const setIsPreviewOpen = useSetAtom(isPreviewOpenAtom);
|
||||
|
||||
@@ -10,7 +10,7 @@ export function useVersions(appId: number | null) {
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [error, setError] = useState<Error | null>(null);
|
||||
const selectedChatId = useAtomValue(selectedChatIdAtom);
|
||||
const [messages, setMessages] = useAtom(chatMessagesAtom);
|
||||
const [, setMessages] = useAtom(chatMessagesAtom);
|
||||
useEffect(() => {
|
||||
const loadVersions = async () => {
|
||||
// If no app is selected, clear versions and return
|
||||
|
||||
Reference in New Issue
Block a user