mirror of
https://github.com/ant-design/ant-design.git
synced 2026-02-09 02:49:18 +08:00
chore: turn on ts/consistent-type-imports (#55166)
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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',
|
||||
|
||||
2
typings/custom-typings.d.ts
vendored
2
typings/custom-typings.d.ts
vendored
@@ -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<React.SVGProps<SVGSVGElement>>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user