mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-19 03:54:28 +08:00
chore: fix eslint warning and errors (#51920)
This commit is contained in:
parent
093c6c2d1f
commit
cc67ee2009
@ -102,7 +102,10 @@ const Group: React.FC<GroupProps> = (props) => {
|
||||
);
|
||||
|
||||
const childrenWithProps = toArray(children).map((child, index) =>
|
||||
cloneElement(child, { key: `avatar-key-${index}` }),
|
||||
cloneElement(child, {
|
||||
// eslint-disable-next-line react/no-array-index-key
|
||||
key: `avatar-key-${index}`,
|
||||
}),
|
||||
);
|
||||
|
||||
const mergeCount = max?.count || maxCount;
|
||||
|
@ -199,6 +199,7 @@ const Breadcrumb = <T extends AnyObject = AnyObject>(props: BreadcrumbProps<T>)
|
||||
const isLastItem = index === childrenLength - 1;
|
||||
return cloneElement(element, {
|
||||
separator: isLastItem ? '' : separator,
|
||||
// eslint-disable-next-line react/no-array-index-key
|
||||
key: index,
|
||||
});
|
||||
});
|
||||
|
@ -237,7 +237,7 @@
|
||||
"eslint-plugin-compat": "^6.0.1",
|
||||
"eslint-plugin-jest": "^28.8.3",
|
||||
"eslint-plugin-jsx-a11y": "^6.10.0",
|
||||
"eslint-plugin-react-hooks": "^5.0.0",
|
||||
"eslint-plugin-react-hooks": "5.0.0",
|
||||
"eslint-plugin-react-refresh": "^0.4.13",
|
||||
"fast-glob": "^3.3.2",
|
||||
"fetch-jsonp": "^1.3.0",
|
||||
|
@ -120,6 +120,7 @@ type Options = {
|
||||
export default function accessibilityDemoTest(component: string, options: Options = {}) {
|
||||
// If skip is true, return immediately without executing any tests
|
||||
if (options.skip === true) {
|
||||
// eslint-disable-next-line jest/no-disabled-tests
|
||||
describe.skip(`${component} demo a11y`, () => {
|
||||
it('skipped', () => {});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user