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:
renovate[bot] 2024-08-04 12:24:35 +08:00 committed by GitHub
parent 1ed1814483
commit 7fdfb299eb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
17 changed files with 26 additions and 10 deletions

View File

@ -181,6 +181,7 @@ export function isLocalStorageNameSupported() {
storage.removeItem(testKey);
return true;
} catch (error) {
console.error('Your web browser does not support storing settings locally.', error);
return false;
}
}

View File

@ -33,6 +33,7 @@ describe('type', () => {
type Props = GetProps<typeof FC>;
const props: Props = { bamboo: 123 };
expect(FC).toBeTruthy();
expect(props).toBeTruthy();
});
@ -89,6 +90,7 @@ describe('type', () => {
type ListItemType = GetProp<typeof Optional, 'list'>[number];
const item: ListItemType = { bamboo: '123' };
expect(Optional).toBeTruthy();
expect(item).toBeTruthy();
});

View File

@ -27,6 +27,7 @@ const initCollapseMotion = (rootCls = defaultPrefixCls): CSSMotionProps => ({
motionDeadline: 500,
});
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const SelectPlacements = ['bottomLeft', 'bottomRight', 'topLeft', 'topRight'] as const;
export type SelectCommonPlacement = (typeof SelectPlacements)[number];

View File

@ -2,6 +2,7 @@ import classNames from 'classnames';
import type { ValidateStatus } from '../form/FormItem';
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const InputStatuses = ['warning', 'error', ''] as const;
export type InputStatus = (typeof InputStatuses)[number];

View File

@ -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;
export type ButtonType = (typeof ButtonTypes)[number];
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const ButtonShapes = ['default', 'circle', 'round'] as const;
export type ButtonShape = (typeof ButtonShapes)[number];
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const ButtonHTMLTypes = ['submit', 'button', 'reset'] as const;
export type ButtonHTMLType = (typeof ButtonHTMLTypes)[number];

View File

@ -53,7 +53,7 @@ describe('ConfigProvider.Form', () => {
await act(async () => {
try {
await formRef.current?.validateFields();
} catch (e) {
} catch {
// Do nothing
}
});
@ -76,7 +76,7 @@ describe('ConfigProvider.Form', () => {
await act(async () => {
try {
await formRef.current?.validateFields();
} catch (e) {
} catch {
// Do nothing
}
});
@ -126,7 +126,7 @@ describe('ConfigProvider.Form', () => {
await act(async () => {
try {
await formRef.current?.validateFields();
} catch (e) {
} catch {
// Do nothing
}
});

View File

@ -11,6 +11,7 @@ import type { SizeType } from '../../config-provider/SizeContext';
import type { Variant } from '../../config-provider';
import type { TimePickerLocale } from '../../time-picker';
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const DataPickerPlacements = ['bottomLeft', 'bottomRight', 'topLeft', 'topRight'] as const;
type DataPickerPlacement = (typeof DataPickerPlacements)[number];

View File

@ -16,6 +16,7 @@ import type { DrawerClassNames, DrawerPanelProps, DrawerStyles } from './DrawerP
import DrawerPanel from './DrawerPanel';
import useStyle from './style';
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const SizeTypes = ['default', 'large'] as const;
type sizeType = (typeof SizeTypes)[number];

View File

@ -22,6 +22,7 @@ import { OverrideProvider } from '../menu/OverrideContext';
import { useToken } from '../theme/internal';
import useStyle from './style';
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const Placements = [
'topLeft',
'topCenter',

View File

@ -31,6 +31,7 @@ interface FieldError {
warnings: string[];
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const ValidateStatuses = ['success', 'warning', 'error', 'validating', ''] as const;
export type ValidateStatus = (typeof ValidateStatuses)[number];

View File

@ -8,7 +8,9 @@ import RowContext from './RowContext';
import type { RowContextState } from './RowContext';
import { useRowStyle } from './style';
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const RowAligns = ['top', 'middle', 'bottom', 'stretch'] as const;
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const RowJustify = [
'start',
'end',

View File

@ -120,7 +120,7 @@ const Sider = React.forwardRef<HTMLDivElement, SiderProps>((props, ref) => {
mql = matchMedia(`screen and (max-width: ${dimensionMaxMap[breakpoint]})`);
try {
mql.addEventListener('change', responsiveHandler);
} catch (error) {
} catch {
mql.addListener(responsiveHandler);
}
responsiveHandler(mql);
@ -129,7 +129,7 @@ const Sider = React.forwardRef<HTMLDivElement, SiderProps>((props, ref) => {
return () => {
try {
mql?.removeEventListener('change', responsiveHandler);
} catch (error) {
} catch {
mql?.removeListener(responsiveHandler);
}
};

View File

@ -8,6 +8,7 @@ import Indicator from './Indicator';
import useStyle from './style/index';
import usePercent from './usePercent';
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const SpinSizes = ['small', 'default', 'large'] as const;
export type SpinSize = (typeof SpinSizes)[number];
export type SpinIndicator = React.ReactElement<HTMLElement>;

View File

@ -64,6 +64,7 @@ export type SorterTooltipProps = TooltipProps & {
target?: SorterTooltipTarget;
};
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const TableActions = ['paginate', 'sort', 'filter'] as const;
export type TableAction = (typeof TableActions)[number];

View File

@ -220,7 +220,7 @@ const InternalUpload: React.ForwardRefRenderFunction<UploadRef, UploadProps> = (
clone = new File([originFileObj], originFileObj.name, {
type: originFileObj.type,
}) as any as UploadFile;
} catch (e) {
} catch {
clone = new Blob([originFileObj], {
type: originFileObj.type,
}) as any as UploadFile;
@ -246,7 +246,7 @@ const InternalUpload: React.ForwardRefRenderFunction<UploadRef, UploadProps> = (
// biome-ignore lint/style/noParameterAssign: we need to modify response
response = JSON.parse(response);
}
} catch (e) {
} catch {
/* do nothing */
}

View File

@ -209,8 +209,8 @@
"@types/tar": "^6.1.13",
"@types/throttle-debounce": "^5.0.2",
"@types/warning": "^3.0.3",
"@typescript-eslint/eslint-plugin": "^7.16.1",
"@typescript-eslint/parser": "^7.16.1",
"@typescript-eslint/eslint-plugin": "^8.0.0",
"@typescript-eslint/parser": "^8.0.0",
"adm-zip": "^0.5.14",
"ali-oss": "^6.20.0",
"antd-img-crop": "^4.22.0",

View File

@ -258,7 +258,7 @@ const runPrePublish = async () => {
firstArtifactFile = await Promise.any([downloadArtifactPromise, downloadOSSPromise]);
} catch (error) {
showMessage(
chalk.bgRedBright(`下载失败,请确认你当前 ${sha.slice(0, 6)} 位于 master 分支中`),
chalk.bgRedBright(`下载失败 ${error},请确认你当前 ${sha.slice(0, 6)} 位于 master 分支中`),
'fail',
);
process.exit(1);