aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIsmail Cherri <ismail.cherri@sonarsource.com>2024-04-16 02:28:41 -0500
committersonartech <sonartech@sonarsource.com>2024-04-16 20:02:44 +0000
commit66742a26cfa62ce98aff58e0f04dbf1708c2d9e6 (patch)
tree983bab02658a70bf91b308e0b5db73f062b9691c
parent6055f0479310bd81bb548ba53a2ef111e1847a74 (diff)
downloadsonarqube-66742a26cfa62ce98aff58e0f04dbf1708c2d9e6.tar.gz
sonarqube-66742a26cfa62ce98aff58e0f04dbf1708c2d9e6.zip
SONAR-21970 implement prettier plugin organize imports
-rw-r--r--server/sonar-web/.prettierrc3
-rw-r--r--server/sonar-web/design-system/package.json1
-rw-r--r--server/sonar-web/design-system/src/components/__tests__/Link-test.tsx11
-rw-r--r--server/sonar-web/design-system/src/components/__tests__/NavLink-test.tsx11
-rw-r--r--server/sonar-web/package.json1
-rw-r--r--server/sonar-web/src/main/js/api/mocks/QualityProfilesServiceMock.ts2
-rw-r--r--server/sonar-web/src/main/js/app/components/GlobalFooter.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/sidebar/Sidebar.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/create/project/Azure/AzurePersonalAccessTokenForm.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/create/project/Github/GitHubProjectCreate.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/create/project/Gitlab/GItlabPersonalAccessTokenForm.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/create/project/Gitlab/GitlabProjectCreate.tsx12
-rw-r--r--server/sonar-web/src/main/js/apps/create/project/Gitlab/GitlabProjectCreateRenderer.tsx12
-rw-r--r--server/sonar-web/src/main/js/apps/create/project/Gitlab/GitlabProjectSelectionForm.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/create/project/__tests__/GitLab-it.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoConnectionSelector.tsx8
-rw-r--r--server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoProjectCreate.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/create/project/usePersonalAccessToken.ts2
-rw-r--r--server/sonar-web/src/main/js/apps/projects/components/__tests__/FavoriteFilter-test.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/sessions/components/__tests__/Login-it.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/settings/components/authentication/ConfigurationForm.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/settings/components/authentication/ConfirmProvisioningModal.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/settings/components/authentication/GitLabAuthenticationTab.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/settings/components/authentication/GithubAuthenticationTab.tsx2
-rw-r--r--server/sonar-web/src/main/js/components/issue/popups/IssueTagsPopup.tsx2
-rw-r--r--server/sonar-web/src/main/js/components/workspace/WorkspaceNavComponent.tsx2
-rw-r--r--server/sonar-web/yarn.lock19
27 files changed, 71 insertions, 43 deletions
diff --git a/server/sonar-web/.prettierrc b/server/sonar-web/.prettierrc
index 5ac85e271d5..910f0844a44 100644
--- a/server/sonar-web/.prettierrc
+++ b/server/sonar-web/.prettierrc
@@ -1,4 +1,5 @@
{
"printWidth": 100,
- "singleQuote": true
+ "singleQuote": true,
+ "plugins": ["prettier-plugin-organize-imports"]
}
diff --git a/server/sonar-web/design-system/package.json b/server/sonar-web/design-system/package.json
index 6579424e13e..e81329f12e0 100644
--- a/server/sonar-web/design-system/package.json
+++ b/server/sonar-web/design-system/package.json
@@ -49,6 +49,7 @@
"postcss-calc": "9.0.1",
"postcss-custom-properties": "12.1.11",
"prettier": "^3.1.0",
+ "prettier-plugin-organize-imports": "3.2.4",
"twin.macro": "3.4.1",
"typescript": "5.3.3",
"vite": "4.5.0",
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
<Routes>
<Route
element={
- <>
+ // 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
+ <React.Fragment>
{component}
<ShowPath />
- </>
+ </React.Fragment>
}
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
<Routes>
<Route
element={
- <>
+ // 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
+ <React.Fragment>
{component}
<ShowPath />
- </>
+ </React.Fragment>
}
path="/initial"
/>
diff --git a/server/sonar-web/package.json b/server/sonar-web/package.json
index ab14ba27caa..3261c94e24f 100644
--- a/server/sonar-web/package.json
+++ b/server/sonar-web/package.json
@@ -110,6 +110,7 @@
"postcss-calc": "9.0.1",
"postcss-custom-properties": "12.1.11",
"prettier": "3.2.5",
+ "prettier-plugin-organize-imports": "3.2.4",
"react-select-event": "5.5.1",
"tailwindcss": "3.3.5",
"turbo": "1.11.3",
diff --git a/server/sonar-web/src/main/js/api/mocks/QualityProfilesServiceMock.ts b/server/sonar-web/src/main/js/api/mocks/QualityProfilesServiceMock.ts
index 021f83755c1..e348ef7dd2a 100644
--- a/server/sonar-web/src/main/js/api/mocks/QualityProfilesServiceMock.ts
+++ b/server/sonar-web/src/main/js/api/mocks/QualityProfilesServiceMock.ts
@@ -72,7 +72,7 @@ import {
searchUsers,
setDefaultProfile,
} from '../quality-profiles';
-import { getRuleDetails, searchRules, listRules } from '../rules';
+import { getRuleDetails, listRules, searchRules } from '../rules';
jest.mock('../../api/rules');
diff --git a/server/sonar-web/src/main/js/app/components/GlobalFooter.tsx b/server/sonar-web/src/main/js/app/components/GlobalFooter.tsx
index 085e75a378d..098292751bf 100644
--- a/server/sonar-web/src/main/js/app/components/GlobalFooter.tsx
+++ b/server/sonar-web/src/main/js/app/components/GlobalFooter.tsx
@@ -33,8 +33,8 @@ import InstanceMessage from '../../components/common/InstanceMessage';
import AppVersionStatus from '../../components/shared/AppVersionStatus';
import { useDocUrl } from '../../helpers/docs';
import { getEdition } from '../../helpers/editions';
-import { useAppState } from './app-state/withAppStateContext';
import GlobalFooterBranding from './GlobalFooterBranding';
+import { useAppState } from './app-state/withAppStateContext';
interface GlobalFooterProps {
hideLoggedInInfo?: boolean;
diff --git a/server/sonar-web/src/main/js/apps/component-measures/sidebar/Sidebar.tsx b/server/sonar-web/src/main/js/apps/component-measures/sidebar/Sidebar.tsx
index d32cb1deea4..efe68a77584 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/sidebar/Sidebar.tsx
+++ b/server/sonar-web/src/main/js/apps/component-measures/sidebar/Sidebar.tsx
@@ -33,10 +33,10 @@ import * as React from 'react';
import A11ySkipTarget from '../../../components/a11y/A11ySkipTarget';
import { translate } from '../../../helpers/l10n';
import useFollowScroll from '../../../hooks/useFollowScroll';
+import { Domain } from '../../../types/measures';
import { MeasureEnhanced } from '../../../types/types';
import { PROJECT_OVERVEW, Query, isProjectOverview, populateDomainsFromMeasures } from '../utils';
import DomainSubnavigation from './DomainSubnavigation';
-import { Domain } from '../../../types/measures';
interface Props {
measures: MeasureEnhanced[];
diff --git a/server/sonar-web/src/main/js/apps/create/project/Azure/AzurePersonalAccessTokenForm.tsx b/server/sonar-web/src/main/js/apps/create/project/Azure/AzurePersonalAccessTokenForm.tsx
index 1c38f7cb3bc..fce1c4f4f2a 100644
--- a/server/sonar-web/src/main/js/apps/create/project/Azure/AzurePersonalAccessTokenForm.tsx
+++ b/server/sonar-web/src/main/js/apps/create/project/Azure/AzurePersonalAccessTokenForm.tsx
@@ -19,13 +19,13 @@
*/
import {
ButtonPrimary,
- Spinner,
FlagErrorIcon,
FlagMessage,
FormField,
InputField,
LightPrimary,
Link,
+ Spinner,
} from 'design-system';
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
diff --git a/server/sonar-web/src/main/js/apps/create/project/Github/GitHubProjectCreate.tsx b/server/sonar-web/src/main/js/apps/create/project/Github/GitHubProjectCreate.tsx
index a31c97af912..f812560a5df 100644
--- a/server/sonar-web/src/main/js/apps/create/project/Github/GitHubProjectCreate.tsx
+++ b/server/sonar-web/src/main/js/apps/create/project/Github/GitHubProjectCreate.tsx
@@ -17,6 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+import { LabelValueSelectOption } from 'design-system';
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
import { getGithubOrganizations, getGithubRepositories } from '../../../../api/alm-integrations';
import { useLocation, useRouter } from '../../../../components/hoc/withRouter';
@@ -29,7 +30,6 @@ import MonorepoProjectCreate from '../monorepo/MonorepoProjectCreate';
import { CreateProjectModes } from '../types';
import GitHubProjectCreateRenderer from './GitHubProjectCreateRenderer';
import { redirectToGithub } from './utils';
-import { LabelValueSelectOption } from 'design-system';
interface Props {
canAdmin: boolean;
diff --git a/server/sonar-web/src/main/js/apps/create/project/Gitlab/GItlabPersonalAccessTokenForm.tsx b/server/sonar-web/src/main/js/apps/create/project/Gitlab/GItlabPersonalAccessTokenForm.tsx
index 483de9465f5..cb2c8eeaaba 100644
--- a/server/sonar-web/src/main/js/apps/create/project/Gitlab/GItlabPersonalAccessTokenForm.tsx
+++ b/server/sonar-web/src/main/js/apps/create/project/Gitlab/GItlabPersonalAccessTokenForm.tsx
@@ -30,8 +30,8 @@ import {
import React from 'react';
import { FormattedMessage } from 'react-intl';
import { translate } from '../../../../helpers/l10n';
-import { usePersonalAccessToken } from '../usePersonalAccessToken';
import { AlmInstanceBase } from '../../../../types/alm-settings';
+import { usePersonalAccessToken } from '../usePersonalAccessToken';
interface Props {
almSetting: AlmInstanceBase;
diff --git a/server/sonar-web/src/main/js/apps/create/project/Gitlab/GitlabProjectCreate.tsx b/server/sonar-web/src/main/js/apps/create/project/Gitlab/GitlabProjectCreate.tsx
index 709200e9256..56af9258e91 100644
--- a/server/sonar-web/src/main/js/apps/create/project/Gitlab/GitlabProjectCreate.tsx
+++ b/server/sonar-web/src/main/js/apps/create/project/Gitlab/GitlabProjectCreate.tsx
@@ -17,20 +17,20 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+import { LabelValueSelectOption } from 'design-system';
+import { orderBy } from 'lodash';
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
import { getGitlabProjects } from '../../../../api/alm-integrations';
+import { useLocation, useRouter } from '../../../../components/hoc/withRouter';
import { GitlabProject } from '../../../../types/alm-integration';
import { AlmInstanceBase } from '../../../../types/alm-settings';
+import { DopSetting } from '../../../../types/dop-translation';
import { Paging } from '../../../../types/types';
import { ImportProjectParam } from '../CreateProjectPage';
-import { CreateProjectModes } from '../types';
-import GitlabProjectCreateRenderer from './GitlabProjectCreateRenderer';
-import { DopSetting } from '../../../../types/dop-translation';
-import { useLocation, useRouter } from '../../../../components/hoc/withRouter';
import MonorepoProjectCreate from '../monorepo/MonorepoProjectCreate';
+import { CreateProjectModes } from '../types';
import GitlabPersonalAccessTokenForm from './GItlabPersonalAccessTokenForm';
-import { orderBy } from 'lodash';
-import { LabelValueSelectOption } from 'design-system';
+import GitlabProjectCreateRenderer from './GitlabProjectCreateRenderer';
interface Props {
canAdmin: boolean;
diff --git a/server/sonar-web/src/main/js/apps/create/project/Gitlab/GitlabProjectCreateRenderer.tsx b/server/sonar-web/src/main/js/apps/create/project/Gitlab/GitlabProjectCreateRenderer.tsx
index 9d64c069572..d78465b79ff 100644
--- a/server/sonar-web/src/main/js/apps/create/project/Gitlab/GitlabProjectCreateRenderer.tsx
+++ b/server/sonar-web/src/main/js/apps/create/project/Gitlab/GitlabProjectCreateRenderer.tsx
@@ -17,22 +17,22 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+import { Link, Spinner } from '@sonarsource/echoes-react';
import { LightPrimary, Title } from 'design-system';
import * as React from 'react';
+import { FormattedMessage } from 'react-intl';
+import { AvailableFeaturesContext } from '../../../../app/components/available-features/AvailableFeaturesContext';
import { translate } from '../../../../helpers/l10n';
+import { queryToSearch } from '../../../../helpers/urls';
import { GitlabProject } from '../../../../types/alm-integration';
import { AlmInstanceBase, AlmKeys, AlmSettingsInstance } from '../../../../types/alm-settings';
+import { Feature } from '../../../../types/features';
import { Paging } from '../../../../types/types';
import AlmSettingsInstanceDropdown from '../components/AlmSettingsInstanceDropdown';
import WrongBindingCountAlert from '../components/WrongBindingCountAlert';
+import { CreateProjectModes } from '../types';
import GitlabPersonalAccessTokenForm from './GItlabPersonalAccessTokenForm';
import GitlabProjectSelectionForm from './GitlabProjectSelectionForm';
-import { FormattedMessage } from 'react-intl';
-import { Link, Spinner } from '@sonarsource/echoes-react';
-import { queryToSearch } from '../../../../helpers/urls';
-import { CreateProjectModes } from '../types';
-import { Feature } from '../../../../types/features';
-import { AvailableFeaturesContext } from '../../../../app/components/available-features/AvailableFeaturesContext';
export interface GitlabProjectCreateRendererProps {
canAdmin?: boolean;
diff --git a/server/sonar-web/src/main/js/apps/create/project/Gitlab/GitlabProjectSelectionForm.tsx b/server/sonar-web/src/main/js/apps/create/project/Gitlab/GitlabProjectSelectionForm.tsx
index 76dc41a54ef..2f42596321c 100644
--- a/server/sonar-web/src/main/js/apps/create/project/Gitlab/GitlabProjectSelectionForm.tsx
+++ b/server/sonar-web/src/main/js/apps/create/project/Gitlab/GitlabProjectSelectionForm.tsx
@@ -17,6 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+import { Link } from '@sonarsource/echoes-react';
import { FlagMessage, InputSearch, LightPrimary } from 'design-system';
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
@@ -29,7 +30,6 @@ import { GitlabProject } from '../../../../types/alm-integration';
import { Paging } from '../../../../types/types';
import AlmRepoItem from '../components/AlmRepoItem';
import { CreateProjectModes } from '../types';
-import { Link } from '@sonarsource/echoes-react';
export interface GitlabProjectSelectionFormProps {
loadingMore: boolean;
diff --git a/server/sonar-web/src/main/js/apps/create/project/__tests__/GitLab-it.tsx b/server/sonar-web/src/main/js/apps/create/project/__tests__/GitLab-it.tsx
index 356e373eb25..6de834ce94d 100644
--- a/server/sonar-web/src/main/js/apps/create/project/__tests__/GitLab-it.tsx
+++ b/server/sonar-web/src/main/js/apps/create/project/__tests__/GitLab-it.tsx
@@ -27,8 +27,8 @@ import DopTranslationServiceMock from '../../../../api/mocks/DopTranslationServi
import NewCodeDefinitionServiceMock from '../../../../api/mocks/NewCodeDefinitionServiceMock';
import { renderApp } from '../../../../helpers/testReactTestingUtils';
import { byLabelText, byRole, byText } from '../../../../helpers/testSelector';
-import CreateProjectPage from '../CreateProjectPage';
import { Feature } from '../../../../types/features';
+import CreateProjectPage from '../CreateProjectPage';
import { CreateProjectModes } from '../types';
jest.mock('../../../../api/alm-integrations');
diff --git a/server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoConnectionSelector.tsx b/server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoConnectionSelector.tsx
index fbfbcfde44b..9a9827fd19f 100644
--- a/server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoConnectionSelector.tsx
+++ b/server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoConnectionSelector.tsx
@@ -20,13 +20,13 @@
import { Title } from 'design-system/lib';
import React from 'react';
import { FormattedMessage } from 'react-intl';
-import DopSettingDropdown from '../components/DopSettingDropdown';
-import { MonorepoOrganisationSelector } from './MonorepoOrganisationSelector';
-import { MonorepoRepositorySelector } from './MonorepoRepositorySelector';
import { LabelValueSelectOption } from '../../../../helpers/search';
-import { DopSetting } from '../../../../types/dop-translation';
import { AlmKeys } from '../../../../types/alm-settings';
+import { DopSetting } from '../../../../types/dop-translation';
+import DopSettingDropdown from '../components/DopSettingDropdown';
import MonorepoNoOrganisations from './MonorepoNoOrganisations';
+import { MonorepoOrganisationSelector } from './MonorepoOrganisationSelector';
+import { MonorepoRepositorySelector } from './MonorepoRepositorySelector';
interface Props {
almKey: AlmKeys;
diff --git a/server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoProjectCreate.tsx b/server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoProjectCreate.tsx
index a3b1232dc4b..1db88977373 100644
--- a/server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoProjectCreate.tsx
+++ b/server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoProjectCreate.tsx
@@ -32,8 +32,8 @@ import { ImportProjectParam } from '../CreateProjectPage';
import { ProjectData } from '../components/ProjectValidation';
import { CreateProjectModes } from '../types';
import { getSanitizedProjectKey } from '../utils';
-import { MonorepoProjectHeader } from './MonorepoProjectHeader';
import { MonorepoConnectionSelector } from './MonorepoConnectionSelector';
+import { MonorepoProjectHeader } from './MonorepoProjectHeader';
import { MonorepoProjectsList } from './MonorepoProjectsList';
interface MonorepoProjectCreateProps {
diff --git a/server/sonar-web/src/main/js/apps/create/project/usePersonalAccessToken.ts b/server/sonar-web/src/main/js/apps/create/project/usePersonalAccessToken.ts
index b183a9b1060..f365bdfb863 100644
--- a/server/sonar-web/src/main/js/apps/create/project/usePersonalAccessToken.ts
+++ b/server/sonar-web/src/main/js/apps/create/project/usePersonalAccessToken.ts
@@ -23,8 +23,8 @@ import {
setAlmPersonalAccessToken,
} from '../../../api/alm-integrations';
import { translate } from '../../../helpers/l10n';
-import { tokenExistedBefore } from './utils';
import { AlmInstanceBase } from '../../../types/alm-settings';
+import { tokenExistedBefore } from './utils';
export interface PATType {
validationFailed: boolean;
diff --git a/server/sonar-web/src/main/js/apps/projects/components/__tests__/FavoriteFilter-test.tsx b/server/sonar-web/src/main/js/apps/projects/components/__tests__/FavoriteFilter-test.tsx
index 651c2651ebb..700c48cfcca 100644
--- a/server/sonar-web/src/main/js/apps/projects/components/__tests__/FavoriteFilter-test.tsx
+++ b/server/sonar-web/src/main/js/apps/projects/components/__tests__/FavoriteFilter-test.tsx
@@ -28,7 +28,7 @@ import {
mockRouter,
} from '../../../../helpers/testMocks';
import { renderComponent } from '../../../../helpers/testReactTestingUtils';
-import { ALL_PATHNAME, FavoriteFilter, FAVORITE_PATHNAME } from '../FavoriteFilter';
+import { ALL_PATHNAME, FAVORITE_PATHNAME, FavoriteFilter } from '../FavoriteFilter';
jest.mock('../../../../helpers/storage', () => ({
save: jest.fn(),
diff --git a/server/sonar-web/src/main/js/apps/sessions/components/__tests__/Login-it.tsx b/server/sonar-web/src/main/js/apps/sessions/components/__tests__/Login-it.tsx
index 47928aaf954..cf883832d32 100644
--- a/server/sonar-web/src/main/js/apps/sessions/components/__tests__/Login-it.tsx
+++ b/server/sonar-web/src/main/js/apps/sessions/components/__tests__/Login-it.tsx
@@ -24,11 +24,11 @@ import { addGlobalErrorMessage } from 'design-system';
import * as React from 'react';
import { getLoginMessage } from '../../../../api/settings';
import { getIdentityProviders } from '../../../../api/users';
+import { getBaseUrl } from '../../../../helpers/system';
import { mockLocation } from '../../../../helpers/testMocks';
import { renderComponent } from '../../../../helpers/testReactTestingUtils';
import { byLabelText, byRole, byText } from '../../../../helpers/testSelector';
import { LoginContainer } from '../LoginContainer';
-import { getBaseUrl } from '../../../../helpers/system';
jest.mock('../../../../helpers/system', () => ({
getBaseUrl: jest.fn().mockReturnValue(''),
diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/ConfigurationForm.tsx b/server/sonar-web/src/main/js/apps/settings/components/authentication/ConfigurationForm.tsx
index e52fdc491d1..6655ddaedb2 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/authentication/ConfigurationForm.tsx
+++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/ConfigurationForm.tsx
@@ -31,9 +31,9 @@ import { ProvisioningType } from '../../../../types/provisioning';
import { Dict, Provider } from '../../../../types/types';
import { AuthenticationTabs, DOCUMENTATION_LINK_SUFFIXES } from './Authentication';
import AuthenticationFormField from './AuthenticationFormField';
+import ConfirmProvisioningModal from './ConfirmProvisioningModal';
import { SettingValue } from './hook/useConfiguration';
import { isAllowToSignUpEnabled, isOrganizationListEmpty } from './hook/useGithubConfiguration';
-import ConfirmProvisioningModal from './ConfirmProvisioningModal';
interface Props {
canBeSave: boolean;
diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/ConfirmProvisioningModal.tsx b/server/sonar-web/src/main/js/apps/settings/components/authentication/ConfirmProvisioningModal.tsx
index 2968b425252..b6a8dc3e13c 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/authentication/ConfirmProvisioningModal.tsx
+++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/ConfirmProvisioningModal.tsx
@@ -19,10 +19,10 @@
*/
import { FlagMessage } from 'design-system';
import React from 'react';
+import { useIntl } from 'react-intl';
import ConfirmModal from '../../../../components/controls/ConfirmModal';
import { ProvisioningType } from '../../../../types/provisioning';
import { Provider } from '../../../../types/types';
-import { useIntl } from 'react-intl';
interface Props {
allowUsersToSignUp?: boolean;
diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/GitLabAuthenticationTab.tsx b/server/sonar-web/src/main/js/apps/settings/components/authentication/GitLabAuthenticationTab.tsx
index 189ec2d1ab8..829b9007e7e 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/authentication/GitLabAuthenticationTab.tsx
+++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/GitLabAuthenticationTab.tsx
@@ -40,11 +40,11 @@ import { Provider } from '../../../../types/types';
import { DOCUMENTATION_LINK_SUFFIXES } from './Authentication';
import AuthenticationFormField from './AuthenticationFormField';
import ConfigurationDetails from './ConfigurationDetails';
+import ConfirmProvisioningModal from './ConfirmProvisioningModal';
import GitLabConfigurationForm from './GitLabConfigurationForm';
import GitLabConfigurationValidity from './GitLabConfigurationValidity';
import ProvisioningSection from './ProvisioningSection';
import TabHeader from './TabHeader';
-import ConfirmProvisioningModal from './ConfirmProvisioningModal';
interface ChangesForm {
provisioningType?: GitLabConfigurationUpdateBody['provisioningType'];
diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/GithubAuthenticationTab.tsx b/server/sonar-web/src/main/js/apps/settings/components/authentication/GithubAuthenticationTab.tsx
index 2f4937eefba..e9da422d772 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/authentication/GithubAuthenticationTab.tsx
+++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/GithubAuthenticationTab.tsx
@@ -37,6 +37,7 @@ import AuthenticationFormField from './AuthenticationFormField';
import AutoProvisioningConsent from './AutoProvisionningConsent';
import ConfigurationDetails from './ConfigurationDetails';
import ConfigurationForm from './ConfigurationForm';
+import ConfirmProvisioningModal from './ConfirmProvisioningModal';
import GitHubConfigurationValidity from './GitHubConfigurationValidity';
import GitHubMappingModal from './GitHubMappingModal';
import ProvisioningSection from './ProvisioningSection';
@@ -48,7 +49,6 @@ import useGithubConfiguration, {
isAllowToSignUpEnabled,
isOrganizationListEmpty,
} from './hook/useGithubConfiguration';
-import ConfirmProvisioningModal from './ConfirmProvisioningModal';
interface GithubAuthenticationProps {
definitions: ExtendedSettingDefinition[];
diff --git a/server/sonar-web/src/main/js/components/issue/popups/IssueTagsPopup.tsx b/server/sonar-web/src/main/js/components/issue/popups/IssueTagsPopup.tsx
index 045b0d90995..0e91805feb2 100644
--- a/server/sonar-web/src/main/js/components/issue/popups/IssueTagsPopup.tsx
+++ b/server/sonar-web/src/main/js/components/issue/popups/IssueTagsPopup.tsx
@@ -17,10 +17,10 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { searchIssueTags } from '../../../api/issues';
import { MultiSelector } from 'design-system';
import { difference, noop, without } from 'lodash';
import * as React from 'react';
+import { searchIssueTags } from '../../../api/issues';
import { translate } from '../../../helpers/l10n';
interface IssueTagsPopupProps {
diff --git a/server/sonar-web/src/main/js/components/workspace/WorkspaceNavComponent.tsx b/server/sonar-web/src/main/js/components/workspace/WorkspaceNavComponent.tsx
index ef6501a0909..07424c8ff26 100644
--- a/server/sonar-web/src/main/js/components/workspace/WorkspaceNavComponent.tsx
+++ b/server/sonar-web/src/main/js/components/workspace/WorkspaceNavComponent.tsx
@@ -18,9 +18,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { ComponentDescriptor } from './context';
import WorkspaceComponentTitle from './WorkspaceComponentTitle';
import WorkspaceNavItem from './WorkspaceNavItem';
+import { ComponentDescriptor } from './context';
export interface Props {
component: ComponentDescriptor;
diff --git a/server/sonar-web/yarn.lock b/server/sonar-web/yarn.lock
index f21b0771947..146903e68e0 100644
--- a/server/sonar-web/yarn.lock
+++ b/server/sonar-web/yarn.lock
@@ -5828,6 +5828,7 @@ __metadata:
postcss-calc: "npm:9.0.1"
postcss-custom-properties: "npm:12.1.11"
prettier: "npm:3.2.5"
+ prettier-plugin-organize-imports: "npm:3.2.4"
react: "npm:18.2.0"
react-day-picker: "npm:8.10.0"
react-dom: "npm:18.2.0"
@@ -7705,6 +7706,7 @@ __metadata:
postcss-calc: "npm:9.0.1"
postcss-custom-properties: "npm:12.1.11"
prettier: "npm:^3.1.0"
+ prettier-plugin-organize-imports: "npm:3.2.4"
react-toastify: "npm:10.0.4"
twin.macro: "npm:3.4.1"
typescript: "npm:5.3.3"
@@ -12748,6 +12750,23 @@ __metadata:
languageName: node
linkType: hard
+"prettier-plugin-organize-imports@npm:3.2.4":
+ version: 3.2.4
+ resolution: "prettier-plugin-organize-imports@npm:3.2.4"
+ peerDependencies:
+ "@volar/vue-language-plugin-pug": ^1.0.4
+ "@volar/vue-typescript": ^1.0.4
+ prettier: ">=2.0"
+ typescript: ">=2.9"
+ peerDependenciesMeta:
+ "@volar/vue-language-plugin-pug":
+ optional: true
+ "@volar/vue-typescript":
+ optional: true
+ checksum: 10/93c98d365af500aa4c72f5330d82c20a20d0e7661a9692e6f26a76a2f4f88b99e0f85dcb8871e98b6d687d6e19ea5f1dcc937f9e29fd0778e888675ecafed233
+ languageName: node
+ linkType: hard
+
"prettier@npm:3.2.5":
version: 3.2.5
resolution: "prettier@npm:3.2.5"