From f5e791e70dc602621184f7f575f22adbda3b76d2 Mon Sep 17 00:00:00 2001 From: 07akioni <07akioni2@gmail.com> Date: Sat, 20 Jul 2024 22:32:02 +0800 Subject: [PATCH] fix: lint --- src/date-picker/src/interface.ts | 6 +++--- src/date-picker/src/panel/date.tsx | 8 ++++---- src/date-picker/src/panel/daterange.tsx | 2 +- src/date-picker/src/panel/datetime.tsx | 10 +++++----- src/date-picker/src/panel/datetimerange.tsx | 2 +- src/date-picker/src/panel/month.tsx | 2 +- src/date-picker/src/panel/monthrange.tsx | 2 +- src/upload/src/Upload.tsx | 3 +-- src/upload/src/interface.ts | 1 - 9 files changed, 17 insertions(+), 19 deletions(-) diff --git a/src/date-picker/src/interface.ts b/src/date-picker/src/interface.ts index 1a097d5f4..9fad58115 100644 --- a/src/date-picker/src/interface.ts +++ b/src/date-picker/src/interface.ts @@ -11,11 +11,11 @@ import type { TimePickerProps } from '../../time-picker/src/TimePicker' import type { MergedTheme } from '../../_mixins' import { createInjectionKey } from '../../_utils' import type { DatePickerTheme } from '../styles/light' +import type { ButtonProps } from '../../button' import type { dualCalendarValidation, uniCalendarValidation } from './validation-utils' -import { type ButtonProps } from '../../button' export type Value = number | [number, number] @@ -28,8 +28,8 @@ export type NowButtonProps = Pick export type ClearButtonProps = Pick export type ConfirmButtonProps = Pick< -ButtonProps, -'size' | 'onClick' | 'type' | 'disabled' + ButtonProps, + 'size' | 'onClick' | 'type' | 'disabled' > export type Shortcuts = diff --git a/src/date-picker/src/panel/date.tsx b/src/date-picker/src/panel/date.tsx index c045e4e61..98f8ef168 100644 --- a/src/date-picker/src/panel/date.tsx +++ b/src/date-picker/src/panel/date.tsx @@ -8,9 +8,9 @@ import { import { NButton, NxButton } from '../../../button' import { NBaseFocusDetector } from '../../../_internal' import { resolveSlot, warnOnce } from '../../../_utils' +import type { ClearButtonProps, NowButtonProps } from '../interface' import { useCalendar, useCalendarProps } from './use-calendar' import PanelHeader from './panelHeader' -import { type ClearButtonProps, type NowButtonProps } from '../interface' /** * Date Panel @@ -40,9 +40,9 @@ export default defineComponent({ } return useCalendar(props, props.type) }, - render () { - const { mergedClsPrefix, mergedTheme, shortcuts, onRender, $slots, type } = - this + render() { + const { mergedClsPrefix, mergedTheme, shortcuts, onRender, $slots, type } + = this const nowButtonProps: NowButtonProps = { size: 'tiny', onClick: this.handleNowClick diff --git a/src/date-picker/src/panel/daterange.tsx b/src/date-picker/src/panel/daterange.tsx index 74b9e3b97..b1d502746 100644 --- a/src/date-picker/src/panel/daterange.tsx +++ b/src/date-picker/src/panel/daterange.tsx @@ -8,9 +8,9 @@ import { } from '../../../_internal/icons' import { NBaseFocusDetector } from '../../../_internal' import { resolveSlot, warnOnce } from '../../../_utils' +import type { ClearButtonProps, ConfirmButtonProps } from '../interface' import PanelHeader from './panelHeader' import { useDualCalendar, useDualCalendarProps } from './use-dual-calendar' -import { type ClearButtonProps, type ConfirmButtonProps } from '../interface' export default defineComponent({ name: 'DateRangePanel', diff --git a/src/date-picker/src/panel/datetime.tsx b/src/date-picker/src/panel/datetime.tsx index 98353b1f4..f0f6cfde0 100644 --- a/src/date-picker/src/panel/datetime.tsx +++ b/src/date-picker/src/panel/datetime.tsx @@ -10,13 +10,13 @@ import { } from '../../../_internal/icons' import { NBaseFocusDetector } from '../../../_internal' import { resolveSlot } from '../../../_utils' +import type { + ClearButtonProps, + ConfirmButtonProps, + NowButtonProps +} from '../interface' import { useCalendar, useCalendarProps } from './use-calendar' import PanelHeader from './panelHeader' -import { - type ClearButtonProps, - type ConfirmButtonProps, - type NowButtonProps -} from '../interface' /** * DateTime Panel diff --git a/src/date-picker/src/panel/datetimerange.tsx b/src/date-picker/src/panel/datetimerange.tsx index 83179bfdd..272fa29f8 100644 --- a/src/date-picker/src/panel/datetimerange.tsx +++ b/src/date-picker/src/panel/datetimerange.tsx @@ -10,9 +10,9 @@ import { } from '../../../_internal/icons' import { NBaseFocusDetector } from '../../../_internal' import { resolveSlot, warnOnce } from '../../../_utils' +import type { ClearButtonProps, ConfirmButtonProps } from '../interface' import { useDualCalendar, useDualCalendarProps } from './use-dual-calendar' import PanelHeader from './panelHeader' -import { type ClearButtonProps, type ConfirmButtonProps } from '../interface' export default defineComponent({ name: 'DateTimeRangePanel', diff --git a/src/date-picker/src/panel/month.tsx b/src/date-picker/src/panel/month.tsx index ff813a682..93b82c132 100644 --- a/src/date-picker/src/panel/month.tsx +++ b/src/date-picker/src/panel/month.tsx @@ -12,13 +12,13 @@ import { getYearString } from '../utils' import { MONTH_ITEM_HEIGHT } from '../config' -import { useCalendar, useCalendarProps } from './use-calendar' import type { ClearButtonProps, ConfirmButtonProps, NowButtonProps, OnPanelUpdateValueImpl } from '../interface' +import { useCalendar, useCalendarProps } from './use-calendar' /** * Month Panel diff --git a/src/date-picker/src/panel/monthrange.tsx b/src/date-picker/src/panel/monthrange.tsx index 559bcc100..cda789b94 100644 --- a/src/date-picker/src/panel/monthrange.tsx +++ b/src/date-picker/src/panel/monthrange.tsx @@ -21,8 +21,8 @@ import { getYearString } from '../utils' import { MONTH_ITEM_HEIGHT } from '../config' +import type { ClearButtonProps, ConfirmButtonProps } from '../interface' import { useDualCalendar, useDualCalendarProps } from './use-dual-calendar' -import { type ClearButtonProps, type ConfirmButtonProps } from '../interface' export default defineComponent({ name: 'MonthRangePanel', diff --git a/src/upload/src/Upload.tsx b/src/upload/src/Upload.tsx index d2d7d8e66..1c73dfab7 100644 --- a/src/upload/src/Upload.tsx +++ b/src/upload/src/Upload.tsx @@ -31,11 +31,10 @@ import type { OnBeforeUpload, OnError, OnPreview, + OnRetry, OnUpdateFileList, RenderIcon, ShouldUseThumbnailUrl, - RenderIcon, - OnRetry, UploadInternalInst, XhrHandlers } from './interface' diff --git a/src/upload/src/interface.ts b/src/upload/src/interface.ts index 52e2348ca..6871322b4 100644 --- a/src/upload/src/interface.ts +++ b/src/upload/src/interface.ts @@ -125,7 +125,6 @@ export type OnRetry = ({ file }: { file: UploadSettledFileInfo - // eslint-disable-next-line @typescript-eslint/no-invalid-void-type }) => UploadFileInfo | undefined | void export interface FileAndEntry {