mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-08 01:53:34 +08:00
chore(deps): update dependency @typescript-eslint/parser to v8 (#50228)
* chore(deps): update dependency @typescript-eslint/parser to v8 * Update package.json Signed-off-by: afc163 <afc163@gmail.com> * fix eslint errors --------- Signed-off-by: afc163 <afc163@gmail.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: afc163 <afc163@gmail.com>
This commit is contained in:
parent
1ed1814483
commit
7fdfb299eb
@ -181,6 +181,7 @@ export function isLocalStorageNameSupported() {
|
|||||||
storage.removeItem(testKey);
|
storage.removeItem(testKey);
|
||||||
return true;
|
return true;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
console.error('Your web browser does not support storing settings locally.', error);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,7 @@ describe('type', () => {
|
|||||||
type Props = GetProps<typeof FC>;
|
type Props = GetProps<typeof FC>;
|
||||||
const props: Props = { bamboo: 123 };
|
const props: Props = { bamboo: 123 };
|
||||||
|
|
||||||
|
expect(FC).toBeTruthy();
|
||||||
expect(props).toBeTruthy();
|
expect(props).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -89,6 +90,7 @@ describe('type', () => {
|
|||||||
type ListItemType = GetProp<typeof Optional, 'list'>[number];
|
type ListItemType = GetProp<typeof Optional, 'list'>[number];
|
||||||
|
|
||||||
const item: ListItemType = { bamboo: '123' };
|
const item: ListItemType = { bamboo: '123' };
|
||||||
|
expect(Optional).toBeTruthy();
|
||||||
expect(item).toBeTruthy();
|
expect(item).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -27,6 +27,7 @@ const initCollapseMotion = (rootCls = defaultPrefixCls): CSSMotionProps => ({
|
|||||||
motionDeadline: 500,
|
motionDeadline: 500,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
const SelectPlacements = ['bottomLeft', 'bottomRight', 'topLeft', 'topRight'] as const;
|
const SelectPlacements = ['bottomLeft', 'bottomRight', 'topLeft', 'topRight'] as const;
|
||||||
|
|
||||||
export type SelectCommonPlacement = (typeof SelectPlacements)[number];
|
export type SelectCommonPlacement = (typeof SelectPlacements)[number];
|
||||||
|
@ -2,6 +2,7 @@ import classNames from 'classnames';
|
|||||||
|
|
||||||
import type { ValidateStatus } from '../form/FormItem';
|
import type { ValidateStatus } from '../form/FormItem';
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
const InputStatuses = ['warning', 'error', ''] as const;
|
const InputStatuses = ['warning', 'error', ''] as const;
|
||||||
|
|
||||||
export type InputStatus = (typeof InputStatuses)[number];
|
export type InputStatus = (typeof InputStatuses)[number];
|
||||||
|
@ -75,11 +75,14 @@ export function spaceChildren(children: React.ReactNode, needInserted: boolean)
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
const ButtonTypes = ['default', 'primary', 'dashed', 'link', 'text'] as const;
|
const ButtonTypes = ['default', 'primary', 'dashed', 'link', 'text'] as const;
|
||||||
export type ButtonType = (typeof ButtonTypes)[number];
|
export type ButtonType = (typeof ButtonTypes)[number];
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
const ButtonShapes = ['default', 'circle', 'round'] as const;
|
const ButtonShapes = ['default', 'circle', 'round'] as const;
|
||||||
export type ButtonShape = (typeof ButtonShapes)[number];
|
export type ButtonShape = (typeof ButtonShapes)[number];
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
const ButtonHTMLTypes = ['submit', 'button', 'reset'] as const;
|
const ButtonHTMLTypes = ['submit', 'button', 'reset'] as const;
|
||||||
export type ButtonHTMLType = (typeof ButtonHTMLTypes)[number];
|
export type ButtonHTMLType = (typeof ButtonHTMLTypes)[number];
|
||||||
|
@ -53,7 +53,7 @@ describe('ConfigProvider.Form', () => {
|
|||||||
await act(async () => {
|
await act(async () => {
|
||||||
try {
|
try {
|
||||||
await formRef.current?.validateFields();
|
await formRef.current?.validateFields();
|
||||||
} catch (e) {
|
} catch {
|
||||||
// Do nothing
|
// Do nothing
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -76,7 +76,7 @@ describe('ConfigProvider.Form', () => {
|
|||||||
await act(async () => {
|
await act(async () => {
|
||||||
try {
|
try {
|
||||||
await formRef.current?.validateFields();
|
await formRef.current?.validateFields();
|
||||||
} catch (e) {
|
} catch {
|
||||||
// Do nothing
|
// Do nothing
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -126,7 +126,7 @@ describe('ConfigProvider.Form', () => {
|
|||||||
await act(async () => {
|
await act(async () => {
|
||||||
try {
|
try {
|
||||||
await formRef.current?.validateFields();
|
await formRef.current?.validateFields();
|
||||||
} catch (e) {
|
} catch {
|
||||||
// Do nothing
|
// Do nothing
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -11,6 +11,7 @@ import type { SizeType } from '../../config-provider/SizeContext';
|
|||||||
import type { Variant } from '../../config-provider';
|
import type { Variant } from '../../config-provider';
|
||||||
import type { TimePickerLocale } from '../../time-picker';
|
import type { TimePickerLocale } from '../../time-picker';
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
const DataPickerPlacements = ['bottomLeft', 'bottomRight', 'topLeft', 'topRight'] as const;
|
const DataPickerPlacements = ['bottomLeft', 'bottomRight', 'topLeft', 'topRight'] as const;
|
||||||
|
|
||||||
type DataPickerPlacement = (typeof DataPickerPlacements)[number];
|
type DataPickerPlacement = (typeof DataPickerPlacements)[number];
|
||||||
|
@ -16,6 +16,7 @@ import type { DrawerClassNames, DrawerPanelProps, DrawerStyles } from './DrawerP
|
|||||||
import DrawerPanel from './DrawerPanel';
|
import DrawerPanel from './DrawerPanel';
|
||||||
import useStyle from './style';
|
import useStyle from './style';
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
const SizeTypes = ['default', 'large'] as const;
|
const SizeTypes = ['default', 'large'] as const;
|
||||||
type sizeType = (typeof SizeTypes)[number];
|
type sizeType = (typeof SizeTypes)[number];
|
||||||
|
|
||||||
|
@ -22,6 +22,7 @@ import { OverrideProvider } from '../menu/OverrideContext';
|
|||||||
import { useToken } from '../theme/internal';
|
import { useToken } from '../theme/internal';
|
||||||
import useStyle from './style';
|
import useStyle from './style';
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
const Placements = [
|
const Placements = [
|
||||||
'topLeft',
|
'topLeft',
|
||||||
'topCenter',
|
'topCenter',
|
||||||
|
@ -31,6 +31,7 @@ interface FieldError {
|
|||||||
warnings: string[];
|
warnings: string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
const ValidateStatuses = ['success', 'warning', 'error', 'validating', ''] as const;
|
const ValidateStatuses = ['success', 'warning', 'error', 'validating', ''] as const;
|
||||||
export type ValidateStatus = (typeof ValidateStatuses)[number];
|
export type ValidateStatus = (typeof ValidateStatuses)[number];
|
||||||
|
|
||||||
|
@ -8,7 +8,9 @@ import RowContext from './RowContext';
|
|||||||
import type { RowContextState } from './RowContext';
|
import type { RowContextState } from './RowContext';
|
||||||
import { useRowStyle } from './style';
|
import { useRowStyle } from './style';
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
const RowAligns = ['top', 'middle', 'bottom', 'stretch'] as const;
|
const RowAligns = ['top', 'middle', 'bottom', 'stretch'] as const;
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
const RowJustify = [
|
const RowJustify = [
|
||||||
'start',
|
'start',
|
||||||
'end',
|
'end',
|
||||||
|
@ -120,7 +120,7 @@ const Sider = React.forwardRef<HTMLDivElement, SiderProps>((props, ref) => {
|
|||||||
mql = matchMedia(`screen and (max-width: ${dimensionMaxMap[breakpoint]})`);
|
mql = matchMedia(`screen and (max-width: ${dimensionMaxMap[breakpoint]})`);
|
||||||
try {
|
try {
|
||||||
mql.addEventListener('change', responsiveHandler);
|
mql.addEventListener('change', responsiveHandler);
|
||||||
} catch (error) {
|
} catch {
|
||||||
mql.addListener(responsiveHandler);
|
mql.addListener(responsiveHandler);
|
||||||
}
|
}
|
||||||
responsiveHandler(mql);
|
responsiveHandler(mql);
|
||||||
@ -129,7 +129,7 @@ const Sider = React.forwardRef<HTMLDivElement, SiderProps>((props, ref) => {
|
|||||||
return () => {
|
return () => {
|
||||||
try {
|
try {
|
||||||
mql?.removeEventListener('change', responsiveHandler);
|
mql?.removeEventListener('change', responsiveHandler);
|
||||||
} catch (error) {
|
} catch {
|
||||||
mql?.removeListener(responsiveHandler);
|
mql?.removeListener(responsiveHandler);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -8,6 +8,7 @@ import Indicator from './Indicator';
|
|||||||
import useStyle from './style/index';
|
import useStyle from './style/index';
|
||||||
import usePercent from './usePercent';
|
import usePercent from './usePercent';
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
const SpinSizes = ['small', 'default', 'large'] as const;
|
const SpinSizes = ['small', 'default', 'large'] as const;
|
||||||
export type SpinSize = (typeof SpinSizes)[number];
|
export type SpinSize = (typeof SpinSizes)[number];
|
||||||
export type SpinIndicator = React.ReactElement<HTMLElement>;
|
export type SpinIndicator = React.ReactElement<HTMLElement>;
|
||||||
|
@ -64,6 +64,7 @@ export type SorterTooltipProps = TooltipProps & {
|
|||||||
target?: SorterTooltipTarget;
|
target?: SorterTooltipTarget;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
const TableActions = ['paginate', 'sort', 'filter'] as const;
|
const TableActions = ['paginate', 'sort', 'filter'] as const;
|
||||||
export type TableAction = (typeof TableActions)[number];
|
export type TableAction = (typeof TableActions)[number];
|
||||||
|
|
||||||
|
@ -220,7 +220,7 @@ const InternalUpload: React.ForwardRefRenderFunction<UploadRef, UploadProps> = (
|
|||||||
clone = new File([originFileObj], originFileObj.name, {
|
clone = new File([originFileObj], originFileObj.name, {
|
||||||
type: originFileObj.type,
|
type: originFileObj.type,
|
||||||
}) as any as UploadFile;
|
}) as any as UploadFile;
|
||||||
} catch (e) {
|
} catch {
|
||||||
clone = new Blob([originFileObj], {
|
clone = new Blob([originFileObj], {
|
||||||
type: originFileObj.type,
|
type: originFileObj.type,
|
||||||
}) as any as UploadFile;
|
}) as any as UploadFile;
|
||||||
@ -246,7 +246,7 @@ const InternalUpload: React.ForwardRefRenderFunction<UploadRef, UploadProps> = (
|
|||||||
// biome-ignore lint/style/noParameterAssign: we need to modify response
|
// biome-ignore lint/style/noParameterAssign: we need to modify response
|
||||||
response = JSON.parse(response);
|
response = JSON.parse(response);
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch {
|
||||||
/* do nothing */
|
/* do nothing */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -209,8 +209,8 @@
|
|||||||
"@types/tar": "^6.1.13",
|
"@types/tar": "^6.1.13",
|
||||||
"@types/throttle-debounce": "^5.0.2",
|
"@types/throttle-debounce": "^5.0.2",
|
||||||
"@types/warning": "^3.0.3",
|
"@types/warning": "^3.0.3",
|
||||||
"@typescript-eslint/eslint-plugin": "^7.16.1",
|
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
||||||
"@typescript-eslint/parser": "^7.16.1",
|
"@typescript-eslint/parser": "^8.0.0",
|
||||||
"adm-zip": "^0.5.14",
|
"adm-zip": "^0.5.14",
|
||||||
"ali-oss": "^6.20.0",
|
"ali-oss": "^6.20.0",
|
||||||
"antd-img-crop": "^4.22.0",
|
"antd-img-crop": "^4.22.0",
|
||||||
|
@ -258,7 +258,7 @@ const runPrePublish = async () => {
|
|||||||
firstArtifactFile = await Promise.any([downloadArtifactPromise, downloadOSSPromise]);
|
firstArtifactFile = await Promise.any([downloadArtifactPromise, downloadOSSPromise]);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
showMessage(
|
showMessage(
|
||||||
chalk.bgRedBright(`下载失败,请确认你当前 ${sha.slice(0, 6)} 位于 master 分支中`),
|
chalk.bgRedBright(`下载失败 ${error},请确认你当前 ${sha.slice(0, 6)} 位于 master 分支中`),
|
||||||
'fail',
|
'fail',
|
||||||
);
|
);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
|
Loading…
Reference in New Issue
Block a user