Skip to content

Commit bbaeb73

Browse files
authored
fix(react-components,react-charts): migrate to R19 compatible JSX.* namespace types (#34923)
1 parent 65dad49 commit bbaeb73

File tree

188 files changed

+708
-551
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

188 files changed

+708
-551
lines changed

apps/perf-test/.eslintrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": ["plugin:@fluentui/eslint-plugin/react"],
2+
"extends": ["plugin:@fluentui/eslint-plugin/react--legacy"],
33
"root": true,
44
"rules": {
55
"no-console": "off",

apps/public-docsite-v9/src/Concepts/Migration/FromV8/Components/Flex/utils.stories.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function mockMDXSourceCodeBlock(source: string) {
1313
},
1414
},
1515
},
16-
} as JSX.Element;
16+
} as React.ReactElement;
1717
}
1818

1919
test('renders children', () => {

apps/public-docsite-v9/src/DocsComponents/FluentDocsPage.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ const VideoPreviews: React.FC<{
131131
);
132132
};
133133

134-
const getNativeElementsList = (elements: SBEnumType['value']): JSX.Element => {
134+
const getNativeElementsList = (elements: SBEnumType['value']): React.ReactElement => {
135135
const elementsArr = elements?.map((el, idx) => [
136136
<code key={idx}>{`<${el}>`}</code>,
137137
idx !== elements.length - 1 ? ', ' : ' ',

apps/react-18-tests-v9/src/components/Dialog/Dialog.cy.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import * as React from 'react';
22
import { mount as mountBase } from '@cypress/react';
33
import { Dialog, DialogSurface, DialogTrigger, DialogBody, Button } from '@fluentui/react-components';
4+
import type { JSXElement } from '@fluentui/react-utilities';
45

56
import { Provider } from '../Provider/Provider';
67

7-
const mount = (element: React.JSX.Element) => {
8+
const mount = (element: JSXElement) => {
89
mountBase(<Provider>{element}</Provider>);
910
};
1011

apps/react-18-tests-v9/src/components/Menu/Menu.cy.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import * as React from 'react';
22
import { mount as mountBase } from '@cypress/react';
33
import { Menu, MenuTrigger, MenuPopover, MenuList, MenuItem } from '@fluentui/react-components';
4+
import type { JSXElement } from '@fluentui/react-utilities';
45

56
import { Provider } from '../Provider/Provider';
67

7-
const mount = (element: React.JSX.Element) => {
8+
const mount = (element: JSXElement) => {
89
mountBase(<Provider>{element}</Provider>);
910
};
1011

apps/react-18-tests-v9/src/components/Overflow/Overflow.cy.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import {
1717
useIsOverflowItemVisible,
1818
useOverflowMenu,
1919
} from '@fluentui/react-components';
20+
import type { JSXElement } from '@fluentui/react-utilities';
2021

2122
import { Provider } from '../Provider/Provider';
2223

@@ -89,7 +90,7 @@ const OverflowMenu: React.FC<{ itemIds: string[] }> = ({ itemIds }) => {
8990
);
9091
};
9192

92-
const mount = (element: React.JSX.Element) => {
93+
const mount = (element: JSXElement) => {
9394
mountBase(<Provider>{element}</Provider>);
9495
};
9596

apps/react-18-tests-v9/src/components/Popover/Popover.cy.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import * as React from 'react';
22
import { mount as mountBase } from '@cypress/react';
3+
import type { JSXElement } from '@fluentui/react-utilities';
34

45
import { CustomPopover as Popover } from './Popover';
56
import { Provider } from '../Provider/Provider';
67

7-
const mount = (element: React.JSX.Element) => {
8+
const mount = (element: JSXElement) => {
89
mountBase(<Provider>{element}</Provider>);
910
};
1011

apps/react-18-tests-v9/src/components/Portal/Portal.cy.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import * as React from 'react';
22
import { Portal } from '@fluentui/react-components';
33
import { mount as mountBase } from '@cypress/react';
4+
import type { JSXElement } from '@fluentui/react-utilities';
45

56
import { Provider } from '../../components/Provider/Provider';
67

7-
const mount = (element: React.JSX.Element) => {
8+
const mount = (element: JSXElement) => {
89
mountBase(<Provider>{element}</Provider>);
910
};
1011

apps/react-19-tests-v9/src/components/Dialog/Dialog.cy.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import * as React from 'react';
22
import { mount as mountBase } from '@cypress/react';
33
import { Dialog, DialogSurface, DialogTrigger, DialogBody, Button } from '@fluentui/react-components';
4+
import type { JSXElement } from '@fluentui/react-utilities';
45

56
import { Provider } from '../Provider/Provider';
67

7-
const mount = (element: React.JSX.Element) => {
8+
const mount = (element: JSXElement) => {
89
mountBase(<Provider>{element}</Provider>);
910
};
1011

apps/react-19-tests-v9/src/components/Menu/Menu.cy.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import * as React from 'react';
22
import { mount as mountBase } from '@cypress/react';
33
import { Menu, MenuTrigger, MenuPopover, MenuList, MenuItem } from '@fluentui/react-components';
4+
import type { JSXElement } from '@fluentui/react-utilities';
45

56
import { Provider } from '../Provider/Provider';
67

7-
const mount = (element: React.JSX.Element) => {
8+
const mount = (element: JSXElement) => {
89
mountBase(<Provider>{element}</Provider>);
910
};
1011

0 commit comments

Comments
 (0)