diff options
author | Ismail Cherri <ismail.cherri@sonarsource.com> | 2024-04-16 02:28:41 -0500 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2024-04-16 20:02:44 +0000 |
commit | 66742a26cfa62ce98aff58e0f04dbf1708c2d9e6 (patch) | |
tree | 983bab02658a70bf91b308e0b5db73f062b9691c /server/sonar-web/src/main/js | |
parent | 6055f0479310bd81bb548ba53a2ef111e1847a74 (diff) | |
download | sonarqube-66742a26cfa62ce98aff58e0f04dbf1708c2d9e6.tar.gz sonarqube-66742a26cfa62ce98aff58e0f04dbf1708c2d9e6.zip |
SONAR-21970 implement prettier plugin organize imports
Diffstat (limited to 'server/sonar-web/src/main/js')
21 files changed, 34 insertions, 34 deletions
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; |