diff --git a/components/color-picker/interface.ts b/components/color-picker/interface.ts index 20ed9e8629..07f93d4896 100644 --- a/components/color-picker/interface.ts +++ b/components/color-picker/interface.ts @@ -1,5 +1,4 @@ -import type { CSSProperties, FC, ReactNode } from 'react'; -import React from 'react'; +import type React from 'react'; import type { ColorGenInput, ColorPickerProps as RcColorPickerProps, @@ -24,7 +23,7 @@ export const FORMAT_HSB = 'hsb'; export type ColorFormatType = typeof FORMAT_HEX | typeof FORMAT_RGB | typeof FORMAT_HSB; export interface PresetsItem { - label: ReactNode; + label: React.ReactNode; colors: (string | AggregationColor)[]; /** * Whether the initial state is collapsed @@ -80,11 +79,11 @@ export type ColorPickerProps = Omit< arrow?: boolean | { pointAtCenter: boolean }; panelRender?: ( panel: React.ReactNode, - extra: { components: { Picker: FC; Presets: FC } }, + extra: { components: { Picker: React.FC; Presets: React.FC } }, ) => React.ReactNode; showText?: boolean | ((color: AggregationColor) => React.ReactNode); size?: SizeType; - styles?: { popup?: CSSProperties; popupOverlayInner?: CSSProperties }; + styles?: { popup?: React.CSSProperties; popupOverlayInner?: React.CSSProperties }; rootClassName?: string; disabledAlpha?: boolean; [key: `data-${string}`]: string; diff --git a/eslint.config.mjs b/eslint.config.mjs index b9b45f66ce..9b71a9a043 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -33,7 +33,6 @@ export default antfu( 'ts/explicit-function-return-type': 'off', 'ts/ban-ts-comment': 'off', // TODO: remove this 'ts/consistent-type-definitions': 'off', - 'ts/consistent-type-imports': 'off', // TODO: remove this 'ts/method-signature-style': 'off', // TODO: remove this 'ts/no-non-null-asserted-optional-chain': 'off', 'unicorn/prefer-number-properties': 'off', diff --git a/typings/custom-typings.d.ts b/typings/custom-typings.d.ts index 0a8c955599..6e11391b50 100644 --- a/typings/custom-typings.d.ts +++ b/typings/custom-typings.d.ts @@ -1,6 +1,6 @@ // https://github.com/facebook/create-react-app/blob/f09d3d3a52c1b938cecc977c2bbc0942ea0a7e70/packages/react-scripts/lib/react-app.d.ts#L42-L49 declare module '*.svg' { - import * as React from 'react'; + import type * as React from 'react'; export const ReactComponent: React.FC>;