mirror of
https://github.com/ant-design/ant-design.git
synced 2026-02-09 02:49:18 +08:00
chore: bump @antfu/eslint-config 7.3.0 (#56895)
This commit is contained in:
@@ -26,7 +26,7 @@ import {
|
||||
import type { ZIndexConsumer, ZIndexContainer } from '../hooks/useZIndex';
|
||||
import { consumerBaseZIndexOffset, containerBaseZIndexOffset, useZIndex } from '../hooks/useZIndex';
|
||||
import { resetWarned } from '../warning';
|
||||
import zIndexContext from '../zindexContext';
|
||||
import ZIndexContext from '../zindexContext';
|
||||
|
||||
// TODO: Remove this. Mock for React 19
|
||||
jest.mock('react-dom', () => {
|
||||
@@ -45,7 +45,7 @@ const WrapWithProvider: React.FC<PropsWithChildren<{ container: ZIndexContainer
|
||||
container,
|
||||
}) => {
|
||||
const [, contextZIndex] = useZIndex(container);
|
||||
return <zIndexContext.Provider value={contextZIndex}>{children}</zIndexContext.Provider>;
|
||||
return <ZIndexContext.Provider value={contextZIndex}>{children}</ZIndexContext.Provider>;
|
||||
};
|
||||
|
||||
const containerComponent: Partial<
|
||||
|
||||
@@ -2,7 +2,7 @@ import React from 'react';
|
||||
|
||||
import useToken from '../../theme/useToken';
|
||||
import { devUseWarning } from '../warning';
|
||||
import zIndexContext from '../zindexContext';
|
||||
import ZIndexContext from '../zindexContext';
|
||||
|
||||
export type ZIndexContainer =
|
||||
| 'Modal'
|
||||
@@ -61,7 +61,7 @@ export const useZIndex = (
|
||||
customZIndex?: number,
|
||||
): ReturnResult => {
|
||||
const [, token] = useToken();
|
||||
const parentZIndex = React.useContext(zIndexContext);
|
||||
const parentZIndex = React.useContext(ZIndexContext);
|
||||
const isContainer = isContainerType(componentType);
|
||||
|
||||
let result: ReturnResult;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import React from 'react';
|
||||
|
||||
const zIndexContext = React.createContext<number | undefined>(undefined);
|
||||
const ZIndexContext = React.createContext<number | undefined>(undefined);
|
||||
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
zIndexContext.displayName = 'zIndexContext';
|
||||
ZIndexContext.displayName = 'ZIndexContext';
|
||||
}
|
||||
|
||||
export default zIndexContext;
|
||||
export default ZIndexContext;
|
||||
|
||||
@@ -16,7 +16,7 @@ import { getTransitionName } from '../_util/motion';
|
||||
import type { Breakpoint } from '../_util/responsiveObserver';
|
||||
import { canUseDocElement } from '../_util/styleChecker';
|
||||
import { devUseWarning } from '../_util/warning';
|
||||
import zIndexContext from '../_util/zindexContext';
|
||||
import ZIndexContext from '../_util/zindexContext';
|
||||
import { ConfigContext } from '../config-provider';
|
||||
import { useComponentConfig } from '../config-provider/context';
|
||||
import useCSSVarCls from '../config-provider/hooks/useCSSVarCls';
|
||||
@@ -241,7 +241,7 @@ const Modal: React.FC<ModalProps> = (props) => {
|
||||
// =========================== Render ===========================
|
||||
return (
|
||||
<ContextIsolator form space>
|
||||
<zIndexContext.Provider value={contextZIndex}>
|
||||
<ZIndexContext.Provider value={contextZIndex}>
|
||||
<Dialog
|
||||
width={numWidth}
|
||||
{...restProps}
|
||||
@@ -284,7 +284,7 @@ const Modal: React.FC<ModalProps> = (props) => {
|
||||
children
|
||||
)}
|
||||
</Dialog>
|
||||
</zIndexContext.Provider>
|
||||
</ZIndexContext.Provider>
|
||||
</ContextIsolator>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -20,7 +20,7 @@ import getPlacements from '../_util/placements';
|
||||
import { cloneElement, isFragment } from '../_util/reactNode';
|
||||
import type { LiteralUnion } from '../_util/type';
|
||||
import { devUseWarning } from '../_util/warning';
|
||||
import zIndexContext from '../_util/zindexContext';
|
||||
import ZIndexContext from '../_util/zindexContext';
|
||||
import { useComponentConfig } from '../config-provider/context';
|
||||
import useCSSVarCls from '../config-provider/hooks/useCSSVarCls';
|
||||
import { useToken } from '../theme/internal';
|
||||
@@ -399,7 +399,7 @@ const InternalTooltip = React.forwardRef<TooltipRef, InternalTooltipProps>((prop
|
||||
</RcTooltip>
|
||||
);
|
||||
|
||||
return <zIndexContext.Provider value={contextZIndex}>{content}</zIndexContext.Provider>;
|
||||
return <ZIndexContext.Provider value={contextZIndex}>{content}</ZIndexContext.Provider>;
|
||||
});
|
||||
|
||||
type CompoundedComponent = typeof InternalTooltip & {
|
||||
|
||||
@@ -5,7 +5,7 @@ import { clsx } from 'clsx';
|
||||
|
||||
import { useMergeSemantic, useZIndex } from '../_util/hooks';
|
||||
import getPlacements from '../_util/placements';
|
||||
import zIndexContext from '../_util/zindexContext';
|
||||
import ZIndexContext from '../_util/zindexContext';
|
||||
import { useComponentConfig } from '../config-provider/context';
|
||||
import { useToken } from '../theme/internal';
|
||||
import type {
|
||||
@@ -132,7 +132,7 @@ const Tour: React.FC<TourProps> & { _InternalPanelDoNotUseOrYouWillBeFired: type
|
||||
const [zIndex, contextZIndex] = useZIndex('Tour', restProps.zIndex);
|
||||
|
||||
return (
|
||||
<zIndexContext.Provider value={contextZIndex}>
|
||||
<ZIndexContext.Provider value={contextZIndex}>
|
||||
<RCTour
|
||||
{...restProps}
|
||||
styles={semanticStyles}
|
||||
@@ -147,7 +147,7 @@ const Tour: React.FC<TourProps> & { _InternalPanelDoNotUseOrYouWillBeFired: type
|
||||
builtinPlacements={builtinPlacements}
|
||||
steps={mergedSteps}
|
||||
/>
|
||||
</zIndexContext.Provider>
|
||||
</ZIndexContext.Provider>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -64,6 +64,8 @@ export default antfu(
|
||||
'react-hooks/set-state-in-effect': 'off',
|
||||
'react-hooks/refs': 'off',
|
||||
'react/no-implicit-key': 'off',
|
||||
'react-naming-convention/ref-name': 'off',
|
||||
'react-naming-convention/use-state': 'off',
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -163,7 +163,7 @@
|
||||
"@ant-design/tools": "^19.1.0",
|
||||
"@ant-design/x": "^2.2.0",
|
||||
"@ant-design/x-sdk": "^2.2.0",
|
||||
"@antfu/eslint-config": "^7.0.0",
|
||||
"@antfu/eslint-config": "^7.3.0",
|
||||
"@biomejs/biome": "^2.3.10",
|
||||
"@blazediff/core": "^1.7.0",
|
||||
"@codecov/webpack-plugin": "^1.9.1",
|
||||
@@ -175,7 +175,7 @@
|
||||
"@emotion/css": "^11.13.5",
|
||||
"@emotion/react": "^11.14.0",
|
||||
"@emotion/server": "^11.11.0",
|
||||
"@eslint-react/eslint-plugin": "2.11.0",
|
||||
"@eslint-react/eslint-plugin": "2.12.1",
|
||||
"@ianvs/prettier-plugin-sort-imports": "^4.7.0",
|
||||
"@inquirer/prompts": "^8.0.2",
|
||||
"@madccc/duplicate-package-checker-webpack-plugin": "^1.0.0",
|
||||
|
||||
Reference in New Issue
Block a user