From 62164f5c9e38fae7558f483a3667b51d1c252bf7 Mon Sep 17 00:00:00 2001 From: Leon Date: Thu, 28 Dec 2023 18:59:24 +0800 Subject: [PATCH] chore: fix lint --- .eslintignore | 6 +++++- main/main.ts | 2 +- src/components/Modal/index.tsx | 13 +++---------- src/hardware/index.ts | 2 +- 4 files changed, 10 insertions(+), 13 deletions(-) diff --git a/.eslintignore b/.eslintignore index d163863..a28c898 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1 +1,5 @@ -build/ \ No newline at end of file +build/ +asar/ +dist/ +build-electron/ +public/static/ \ No newline at end of file diff --git a/main/main.ts b/main/main.ts index fabd54c..130faed 100644 --- a/main/main.ts +++ b/main/main.ts @@ -4,7 +4,7 @@ import logger from 'electron-log'; import path from 'path'; import fs from 'fs'; import { format as formatUrl } from 'url'; -import initProcess, { restartBridge } from './process/index'; +import initProcess from './process/index'; let mainWindow: BrowserWindow | null; diff --git a/src/components/Modal/index.tsx b/src/components/Modal/index.tsx index e86116c..ed445e1 100644 --- a/src/components/Modal/index.tsx +++ b/src/components/Modal/index.tsx @@ -9,12 +9,12 @@ export type ConfirmDialogProps = { title?: ReactNode; /** 是否可见 */ visible?: boolean; - /** 点击确定回调,使用 any 来使 */ - onOk?: () => void; + // /** 点击确定回调,使用 any 来使 */ + // onOk?: () => void; /** 点击模态框右上角叉、取消按钮、Props.maskClosable 值为 true 时的遮罩层或键盘按下 Esc 时的回调 */ onCancel?: () => void; /** 确认按钮文字 */ - okText?: React.ReactNode; + // okText?: React.ReactNode; /** 取消按钮文字 */ cancelText?: React.ReactNode; /** 内容 */ @@ -37,10 +37,8 @@ export const iconColors = { const ConfirmDialog: FC = (props) => { const { - onOk, close, onCancel, - okText, okCancel, cancelText, visible, @@ -54,11 +52,6 @@ const ConfirmDialog: FC = (props) => { close?.({ triggerCancel: true }); }, [close, onCancel]); - const handleOkClick = useCallback(() => { - onOk?.(); - close?.({ triggerCancel: true }); - }, [close, onOk]); - const cancelActionNode = useMemo( () => okCancel && ( diff --git a/src/hardware/index.ts b/src/hardware/index.ts index 796167f..d3f0fcd 100644 --- a/src/hardware/index.ts +++ b/src/hardware/index.ts @@ -25,7 +25,7 @@ import { setProgress, } from '@/store/reducers/firmware'; import type { BridgeReleaseMap } from '@/types'; -import { arrayBufferToBuffer, wait, getFirmwareUpdateField } from '@/utils'; +import { arrayBufferToBuffer, wait } from '@/utils'; import { downloadLegacyTouchFirmware } from '@/utils/touchFirmware'; import { formatMessage } from '@/locales'; import { getHardwareSDKInstance } from './instance';