Skip to content

Commit 7cb9ca9

Browse files
authored
chore: bump @antfu/eslint-config 7.3.0 (ant-design#56895)
1 parent 72c0b2c commit 7cb9ca9

8 files changed

Lines changed: 19 additions & 17 deletions

File tree

components/_util/__tests__/useZIndex.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import {
2626
import type { ZIndexConsumer, ZIndexContainer } from '../hooks/useZIndex';
2727
import { consumerBaseZIndexOffset, containerBaseZIndexOffset, useZIndex } from '../hooks/useZIndex';
2828
import { resetWarned } from '../warning';
29-
import zIndexContext from '../zindexContext';
29+
import ZIndexContext from '../zindexContext';
3030

3131
// TODO: Remove this. Mock for React 19
3232
jest.mock('react-dom', () => {
@@ -45,7 +45,7 @@ const WrapWithProvider: React.FC<PropsWithChildren<{ container: ZIndexContainer
4545
container,
4646
}) => {
4747
const [, contextZIndex] = useZIndex(container);
48-
return <zIndexContext.Provider value={contextZIndex}>{children}</zIndexContext.Provider>;
48+
return <ZIndexContext.Provider value={contextZIndex}>{children}</ZIndexContext.Provider>;
4949
};
5050

5151
const containerComponent: Partial<

components/_util/hooks/useZIndex.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from 'react';
22

33
import useToken from '../../theme/useToken';
44
import { devUseWarning } from '../warning';
5-
import zIndexContext from '../zindexContext';
5+
import ZIndexContext from '../zindexContext';
66

77
export type ZIndexContainer =
88
| 'Modal'
@@ -61,7 +61,7 @@ export const useZIndex = (
6161
customZIndex?: number,
6262
): ReturnResult => {
6363
const [, token] = useToken();
64-
const parentZIndex = React.useContext(zIndexContext);
64+
const parentZIndex = React.useContext(ZIndexContext);
6565
const isContainer = isContainerType(componentType);
6666

6767
let result: ReturnResult;

components/_util/zindexContext.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import React from 'react';
22

3-
const zIndexContext = React.createContext<number | undefined>(undefined);
3+
const ZIndexContext = React.createContext<number | undefined>(undefined);
44

55
if (process.env.NODE_ENV !== 'production') {
6-
zIndexContext.displayName = 'zIndexContext';
6+
ZIndexContext.displayName = 'ZIndexContext';
77
}
88

9-
export default zIndexContext;
9+
export default ZIndexContext;

components/modal/Modal.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { getTransitionName } from '../_util/motion';
1616
import type { Breakpoint } from '../_util/responsiveObserver';
1717
import { canUseDocElement } from '../_util/styleChecker';
1818
import { devUseWarning } from '../_util/warning';
19-
import zIndexContext from '../_util/zindexContext';
19+
import ZIndexContext from '../_util/zindexContext';
2020
import { ConfigContext } from '../config-provider';
2121
import { useComponentConfig } from '../config-provider/context';
2222
import useCSSVarCls from '../config-provider/hooks/useCSSVarCls';
@@ -241,7 +241,7 @@ const Modal: React.FC<ModalProps> = (props) => {
241241
// =========================== Render ===========================
242242
return (
243243
<ContextIsolator form space>
244-
<zIndexContext.Provider value={contextZIndex}>
244+
<ZIndexContext.Provider value={contextZIndex}>
245245
<Dialog
246246
width={numWidth}
247247
{...restProps}
@@ -284,7 +284,7 @@ const Modal: React.FC<ModalProps> = (props) => {
284284
children
285285
)}
286286
</Dialog>
287-
</zIndexContext.Provider>
287+
</ZIndexContext.Provider>
288288
</ContextIsolator>
289289
);
290290
};

components/tooltip/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import getPlacements from '../_util/placements';
2020
import { cloneElement, isFragment } from '../_util/reactNode';
2121
import type { LiteralUnion } from '../_util/type';
2222
import { devUseWarning } from '../_util/warning';
23-
import zIndexContext from '../_util/zindexContext';
23+
import ZIndexContext from '../_util/zindexContext';
2424
import { useComponentConfig } from '../config-provider/context';
2525
import useCSSVarCls from '../config-provider/hooks/useCSSVarCls';
2626
import { useToken } from '../theme/internal';
@@ -399,7 +399,7 @@ const InternalTooltip = React.forwardRef<TooltipRef, InternalTooltipProps>((prop
399399
</RcTooltip>
400400
);
401401

402-
return <zIndexContext.Provider value={contextZIndex}>{content}</zIndexContext.Provider>;
402+
return <ZIndexContext.Provider value={contextZIndex}>{content}</ZIndexContext.Provider>;
403403
});
404404

405405
type CompoundedComponent = typeof InternalTooltip & {

components/tour/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { clsx } from 'clsx';
55

66
import { useMergeSemantic, useZIndex } from '../_util/hooks';
77
import getPlacements from '../_util/placements';
8-
import zIndexContext from '../_util/zindexContext';
8+
import ZIndexContext from '../_util/zindexContext';
99
import { useComponentConfig } from '../config-provider/context';
1010
import { useToken } from '../theme/internal';
1111
import type {
@@ -132,7 +132,7 @@ const Tour: React.FC<TourProps> & { _InternalPanelDoNotUseOrYouWillBeFired: type
132132
const [zIndex, contextZIndex] = useZIndex('Tour', restProps.zIndex);
133133

134134
return (
135-
<zIndexContext.Provider value={contextZIndex}>
135+
<ZIndexContext.Provider value={contextZIndex}>
136136
<RCTour
137137
{...restProps}
138138
styles={semanticStyles}
@@ -147,7 +147,7 @@ const Tour: React.FC<TourProps> & { _InternalPanelDoNotUseOrYouWillBeFired: type
147147
builtinPlacements={builtinPlacements}
148148
steps={mergedSteps}
149149
/>
150-
</zIndexContext.Provider>
150+
</ZIndexContext.Provider>
151151
);
152152
};
153153

eslint.config.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ export default antfu(
6464
'react-hooks/set-state-in-effect': 'off',
6565
'react-hooks/refs': 'off',
6666
'react/no-implicit-key': 'off',
67+
'react-naming-convention/ref-name': 'off',
68+
'react-naming-convention/use-state': 'off',
6769
},
6870
},
6971
{

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@
163163
"@ant-design/tools": "^19.1.0",
164164
"@ant-design/x": "^2.2.0",
165165
"@ant-design/x-sdk": "^2.2.0",
166-
"@antfu/eslint-config": "^7.0.0",
166+
"@antfu/eslint-config": "^7.3.0",
167167
"@biomejs/biome": "^2.3.10",
168168
"@blazediff/core": "^1.7.0",
169169
"@codecov/webpack-plugin": "^1.9.1",
@@ -175,7 +175,7 @@
175175
"@emotion/css": "^11.13.5",
176176
"@emotion/react": "^11.14.0",
177177
"@emotion/server": "^11.11.0",
178-
"@eslint-react/eslint-plugin": "2.11.0",
178+
"@eslint-react/eslint-plugin": "2.12.1",
179179
"@ianvs/prettier-plugin-sort-imports": "^4.7.0",
180180
"@inquirer/prompts": "^8.0.2",
181181
"@madccc/duplicate-package-checker-webpack-plugin": "^1.0.0",

0 commit comments

Comments
 (0)