From 66742a26cfa62ce98aff58e0f04dbf1708c2d9e6 Mon Sep 17 00:00:00 2001 From: Ismail Cherri Date: Tue, 16 Apr 2024 02:28:41 -0500 Subject: SONAR-21970 implement prettier plugin organize imports --- .../design-system/src/components/__tests__/Link-test.tsx | 11 +++++++---- .../design-system/src/components/__tests__/NavLink-test.tsx | 11 +++++++---- 2 files changed, 14 insertions(+), 8 deletions(-) (limited to 'server/sonar-web/design-system/src/components') diff --git a/server/sonar-web/design-system/src/components/__tests__/Link-test.tsx b/server/sonar-web/design-system/src/components/__tests__/Link-test.tsx index ddfe30ed5ba..f9140e16dcd 100644 --- a/server/sonar-web/design-system/src/components/__tests__/Link-test.tsx +++ b/server/sonar-web/design-system/src/components/__tests__/Link-test.tsx @@ -18,8 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { screen } from '@testing-library/react'; -// @ts-expect-error React is needed for <> fragments -import React from 'react'; +import * as React from 'react'; import { MemoryRouter, Route, Routes, useLocation } from 'react-router-dom'; import { render } from '../../helpers/testUtils'; import { ContentLink, DiscreetLink, StandoutLink as Link } from '../Link'; @@ -117,10 +116,14 @@ const setupWithMemoryRouter = (component: JSX.Element, initialEntries = ['/initi + // Below: using <> won't work in extensions ('React' is not defined). This is because the + // name 'React' would already have been minified to something else when <> is resolved to + // React.Fragment + // eslint-disable-next-line react/jsx-fragments + {component} - + } path="/initial" /> diff --git a/server/sonar-web/design-system/src/components/__tests__/NavLink-test.tsx b/server/sonar-web/design-system/src/components/__tests__/NavLink-test.tsx index e4004765875..6aaa88a9c44 100644 --- a/server/sonar-web/design-system/src/components/__tests__/NavLink-test.tsx +++ b/server/sonar-web/design-system/src/components/__tests__/NavLink-test.tsx @@ -18,8 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import { screen } from '@testing-library/react'; -// @ts-expect-error React is needed for <> fragments -import React from 'react'; +import * as React from 'react'; import { MemoryRouter, Route, Routes, useLocation } from 'react-router-dom'; import { render } from '../../helpers/testUtils'; import NavLink from '../NavLink'; @@ -99,10 +98,14 @@ const setupWithMemoryRouter = (component: JSX.Element, initialEntries = ['/initi + // Below: using <> won't work in extensions ('React' is not defined). This is because the + // name 'React' would already have been minified to something else when <> is resolved to + // React.Fragment + // eslint-disable-next-line react/jsx-fragments + {component} - + } path="/initial" /> -- cgit v1.2.3