Skip to content

Commit

Permalink
chore: fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
originalix committed Dec 28, 2023
1 parent 204fbc2 commit 62164f5
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 13 deletions.
6 changes: 5 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
build/
build/
asar/
dist/
build-electron/
public/static/
2 changes: 1 addition & 1 deletion main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
13 changes: 3 additions & 10 deletions src/components/Modal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
/** 内容 */
Expand All @@ -37,10 +37,8 @@ export const iconColors = {

const ConfirmDialog: FC<ConfirmDialogProps> = (props) => {
const {
onOk,
close,
onCancel,
okText,
okCancel,
cancelText,
visible,
Expand All @@ -54,11 +52,6 @@ const ConfirmDialog: FC<ConfirmDialogProps> = (props) => {
close?.({ triggerCancel: true });
}, [close, onCancel]);

const handleOkClick = useCallback(() => {
onOk?.();
close?.({ triggerCancel: true });
}, [close, onOk]);

const cancelActionNode = useMemo(
() =>
okCancel && (
Expand Down
2 changes: 1 addition & 1 deletion src/hardware/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit 62164f5

Please sign in to comment.