]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-20327 Run new version of prettier on all files
authorAmbroise C <ambroise.christea@sonarsource.com>
Mon, 11 Sep 2023 17:25:35 +0000 (19:25 +0200)
committersonartech <sonartech@sonarsource.com>
Tue, 12 Sep 2023 20:02:41 +0000 (20:02 +0000)
863 files changed:
server/sonar-web/src/main/js/api/alm-integrations.ts
server/sonar-web/src/main/js/api/alm-settings.ts
server/sonar-web/src/main/js/api/application.ts
server/sonar-web/src/main/js/api/branches.ts
server/sonar-web/src/main/js/api/ce.ts
server/sonar-web/src/main/js/api/component-report.ts
server/sonar-web/src/main/js/api/components.ts
server/sonar-web/src/main/js/api/issues.ts
server/sonar-web/src/main/js/api/l10n.ts
server/sonar-web/src/main/js/api/measures.ts
server/sonar-web/src/main/js/api/metrics.ts
server/sonar-web/src/main/js/api/mocks/AlmSettingsServiceMock.ts
server/sonar-web/src/main/js/api/mocks/AuthenticationServiceMock.ts
server/sonar-web/src/main/js/api/mocks/BranchesServiceMock.ts
server/sonar-web/src/main/js/api/mocks/CodingRulesServiceMock.ts
server/sonar-web/src/main/js/api/mocks/ComponentsServiceMock.ts
server/sonar-web/src/main/js/api/mocks/ComputeEngineServiceMock.ts
server/sonar-web/src/main/js/api/mocks/GroupsServiceMock.ts
server/sonar-web/src/main/js/api/mocks/IssuesServiceMock.ts
server/sonar-web/src/main/js/api/mocks/MeasuresServiceMock.ts
server/sonar-web/src/main/js/api/mocks/NewCodeDefinitionServiceMock.ts
server/sonar-web/src/main/js/api/mocks/NotificationsMock.ts
server/sonar-web/src/main/js/api/mocks/PermissionsServiceMock.ts
server/sonar-web/src/main/js/api/mocks/PluginsServiceMock.ts
server/sonar-web/src/main/js/api/mocks/ProjectActivityServiceMock.ts
server/sonar-web/src/main/js/api/mocks/ProjectsManagementServiceMock.ts
server/sonar-web/src/main/js/api/mocks/QualityGatesServiceMock.ts
server/sonar-web/src/main/js/api/mocks/QualityProfilesServiceMock.ts
server/sonar-web/src/main/js/api/mocks/SecurityHotspotServiceMock.ts
server/sonar-web/src/main/js/api/mocks/SettingsServiceMock.ts
server/sonar-web/src/main/js/api/mocks/TimeMachineServiceMock.ts
server/sonar-web/src/main/js/api/mocks/UsersServiceMock.ts
server/sonar-web/src/main/js/api/mocks/WebhooksMock.ts
server/sonar-web/src/main/js/api/mocks/data/components.ts
server/sonar-web/src/main/js/api/mocks/data/issues.ts
server/sonar-web/src/main/js/api/mocks/data/measures.ts
server/sonar-web/src/main/js/api/mocks/data/webhooks.ts
server/sonar-web/src/main/js/api/navigation.ts
server/sonar-web/src/main/js/api/permissions.ts
server/sonar-web/src/main/js/api/plugins.ts
server/sonar-web/src/main/js/api/project-management.ts
server/sonar-web/src/main/js/api/projectActivity.ts
server/sonar-web/src/main/js/api/projectLinks.ts
server/sonar-web/src/main/js/api/quality-gates.ts
server/sonar-web/src/main/js/api/quality-profiles.ts
server/sonar-web/src/main/js/api/rules.ts
server/sonar-web/src/main/js/api/security-hotspots.ts
server/sonar-web/src/main/js/api/settings.ts
server/sonar-web/src/main/js/api/system.ts
server/sonar-web/src/main/js/api/time-machine.ts
server/sonar-web/src/main/js/api/web-api.ts
server/sonar-web/src/main/js/app/components/AdminContainer.tsx
server/sonar-web/src/main/js/app/components/ComponentContainer.tsx
server/sonar-web/src/main/js/app/components/GitHubSynchronisationWarning.tsx
server/sonar-web/src/main/js/app/components/GlobalContainer.tsx
server/sonar-web/src/main/js/app/components/KeyboardShortcutsModal.tsx
server/sonar-web/src/main/js/app/components/SonarLintConnection.tsx
server/sonar-web/src/main/js/app/components/__tests__/App-test.tsx
server/sonar-web/src/main/js/app/components/__tests__/ComponentContainer-test.tsx
server/sonar-web/src/main/js/app/components/__tests__/DocumentationRedirect-test.tsx
server/sonar-web/src/main/js/app/components/__tests__/GlobalFooter-test.tsx
server/sonar-web/src/main/js/app/components/__tests__/KeyboardShortcutsModal-test.tsx
server/sonar-web/src/main/js/app/components/__tests__/MigrationContainer-test.tsx
server/sonar-web/src/main/js/app/components/__tests__/NonAdminPagesContainer-test.tsx
server/sonar-web/src/main/js/app/components/__tests__/PluginRiskConsent-test.tsx
server/sonar-web/src/main/js/app/components/__tests__/RecentHistory-test.tsx
server/sonar-web/src/main/js/app/components/__tests__/SonarLintConnection-test.tsx
server/sonar-web/src/main/js/app/components/__tests__/StartupModal-test.tsx
server/sonar-web/src/main/js/app/components/__tests__/SystemAnnouncement-test.tsx
server/sonar-web/src/main/js/app/components/admin/withAdminPagesOutletContext.tsx
server/sonar-web/src/main/js/app/components/app-state/withAppStateContext.tsx
server/sonar-web/src/main/js/app/components/available-features/withAvailableFeatures.tsx
server/sonar-web/src/main/js/app/components/componentContext/withComponentContext.tsx
server/sonar-web/src/main/js/app/components/current-user/withCurrentUserContext.tsx
server/sonar-web/src/main/js/app/components/extensions/Extension.tsx
server/sonar-web/src/main/js/app/components/extensions/ProjectAdminPageExtension.tsx
server/sonar-web/src/main/js/app/components/extensions/__tests__/Extension-test.tsx
server/sonar-web/src/main/js/app/components/extensions/__tests__/GlobalPageExtension-test.tsx
server/sonar-web/src/main/js/app/components/extensions/__tests__/ProjectAdminPageExtension-test.tsx
server/sonar-web/src/main/js/app/components/extensions/__tests__/ProjectPageExtension-test.tsx
server/sonar-web/src/main/js/app/components/global-search/GlobalSearchResults.tsx
server/sonar-web/src/main/js/app/components/indexation/IndexationNotificationHelper.ts
server/sonar-web/src/main/js/app/components/indexation/IndexationNotificationRenderer.tsx
server/sonar-web/src/main/js/app/components/indexation/PageUnavailableDueToIndexation.tsx
server/sonar-web/src/main/js/app/components/indexation/__tests__/IndexationContextProvider-test.tsx
server/sonar-web/src/main/js/app/components/indexation/__tests__/IndexationNotification-test.tsx
server/sonar-web/src/main/js/app/components/indexation/__tests__/PageUnavailableDueToIndexation-test.tsx
server/sonar-web/src/main/js/app/components/languages/__tests__/LanguagesContextProvider-test.tsx
server/sonar-web/src/main/js/app/components/languages/withLanguagesContext.tsx
server/sonar-web/src/main/js/app/components/metrics/__tests__/MetricsContextProvider-test.tsx
server/sonar-web/src/main/js/app/components/metrics/withMetricsContext.tsx
server/sonar-web/src/main/js/app/components/nav/component/AnalysisLicenseError.tsx
server/sonar-web/src/main/js/app/components/nav/component/ComponentNavProjectBindingErrorNotif.tsx
server/sonar-web/src/main/js/app/components/nav/component/Menu.tsx
server/sonar-web/src/main/js/app/components/nav/component/__tests__/AnalysisErrorMessage-test.tsx
server/sonar-web/src/main/js/app/components/nav/component/__tests__/AnalysisLicenseError-test.tsx
server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNav-test.tsx
server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNavProjectBindingErrorNotif-test.tsx
server/sonar-web/src/main/js/app/components/nav/component/__tests__/Header-test.tsx
server/sonar-web/src/main/js/app/components/nav/component/__tests__/HeaderMeta-test.tsx
server/sonar-web/src/main/js/app/components/nav/component/__tests__/Menu-test.tsx
server/sonar-web/src/main/js/app/components/nav/component/__tests__/utils-test.ts
server/sonar-web/src/main/js/app/components/nav/component/branch-like/BranchHelpTooltip.tsx
server/sonar-web/src/main/js/app/components/nav/component/branch-like/CurrentBranchLikeMergeInformation.tsx
server/sonar-web/src/main/js/app/components/nav/component/branch-like/Menu.tsx
server/sonar-web/src/main/js/app/components/nav/global/GlobalNavMenu.tsx
server/sonar-web/src/main/js/app/components/nav/settings/SettingsNav.tsx
server/sonar-web/src/main/js/app/components/nav/settings/__tests__/PendingPluginsActionNotif-test.tsx
server/sonar-web/src/main/js/app/components/nav/settings/__tests__/SettingsNav-test.tsx
server/sonar-web/src/main/js/app/components/promotion-notification/__tests__/PromotionNotification-test.tsx
server/sonar-web/src/main/js/app/components/update-notification/UpdateNotification.tsx
server/sonar-web/src/main/js/app/components/update-notification/__tests__/UpdateNotification-test.tsx
server/sonar-web/src/main/js/app/styles/components/ui.css
server/sonar-web/src/main/js/app/styles/init/links.css
server/sonar-web/src/main/js/app/utils/__tests__/NavigateWithParams-test.tsx
server/sonar-web/src/main/js/app/utils/__tests__/handleRequiredAuthorization-test.ts
server/sonar-web/src/main/js/app/utils/startReactApp.tsx
server/sonar-web/src/main/js/apps/account/Account.tsx
server/sonar-web/src/main/js/apps/account/__tests__/Account-it.tsx
server/sonar-web/src/main/js/apps/account/notifications/NotificationsList.tsx
server/sonar-web/src/main/js/apps/account/notifications/ProjectModal.tsx
server/sonar-web/src/main/js/apps/account/notifications/Projects.tsx
server/sonar-web/src/main/js/apps/account/profile/Preferences.tsx
server/sonar-web/src/main/js/apps/account/profile/UserExternalIdentity.tsx
server/sonar-web/src/main/js/apps/account/projects/ProjectCard.tsx
server/sonar-web/src/main/js/apps/audit-logs/components/AuditApp.tsx
server/sonar-web/src/main/js/apps/audit-logs/components/__tests__/AuditApp-it.tsx
server/sonar-web/src/main/js/apps/background-tasks/__tests__/BackgroundTasks-it.tsx
server/sonar-web/src/main/js/apps/background-tasks/components/BackgroundTasksApp.tsx
server/sonar-web/src/main/js/apps/background-tasks/components/CurrentsFilter.tsx
server/sonar-web/src/main/js/apps/background-tasks/components/Stacktrace.tsx
server/sonar-web/src/main/js/apps/background-tasks/components/StatusFilter.tsx
server/sonar-web/src/main/js/apps/background-tasks/components/TaskActions.tsx
server/sonar-web/src/main/js/apps/background-tasks/components/Workers.tsx
server/sonar-web/src/main/js/apps/background-tasks/components/WorkersForm.tsx
server/sonar-web/src/main/js/apps/change-admin-password/ChangeAdminPasswordApp.tsx
server/sonar-web/src/main/js/apps/change-admin-password/__tests__/ChangeAdminPasswordApp-it.tsx
server/sonar-web/src/main/js/apps/code/__tests__/Code-it.ts
server/sonar-web/src/main/js/apps/code/__tests__/utils-test.tsx
server/sonar-web/src/main/js/apps/code/bucket.ts
server/sonar-web/src/main/js/apps/code/components/CodeApp.tsx
server/sonar-web/src/main/js/apps/code/components/CodeAppRenderer.tsx
server/sonar-web/src/main/js/apps/code/components/ComponentName.tsx
server/sonar-web/src/main/js/apps/code/components/Components.tsx
server/sonar-web/src/main/js/apps/code/components/ComponentsHeader.tsx
server/sonar-web/src/main/js/apps/code/components/__tests__/SourceViewerWrapper-test.tsx
server/sonar-web/src/main/js/apps/code/utils.ts
server/sonar-web/src/main/js/apps/coding-rules/__tests__/CodingRules-it.ts
server/sonar-web/src/main/js/apps/coding-rules/components/ActivationFormModal.tsx
server/sonar-web/src/main/js/apps/coding-rules/components/AttributeCategoryFacet.tsx
server/sonar-web/src/main/js/apps/coding-rules/components/BulkChange.tsx
server/sonar-web/src/main/js/apps/coding-rules/components/BulkChangeModal.tsx
server/sonar-web/src/main/js/apps/coding-rules/components/CodingRulesApp.tsx
server/sonar-web/src/main/js/apps/coding-rules/components/CustomRuleFormModal.tsx
server/sonar-web/src/main/js/apps/coding-rules/components/Facet.tsx
server/sonar-web/src/main/js/apps/coding-rules/components/LanguageFacet.tsx
server/sonar-web/src/main/js/apps/coding-rules/components/ProfileFacet.tsx
server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetails.tsx
server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsCustomRules.tsx
server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsDescription.tsx
server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsIssues.tsx
server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsProfiles.tsx
server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsTagsPopup.tsx
server/sonar-web/src/main/js/apps/coding-rules/components/RuleListItem.tsx
server/sonar-web/src/main/js/apps/coding-rules/components/SeverityFacet.tsx
server/sonar-web/src/main/js/apps/coding-rules/components/SoftwareQualityFacet.tsx
server/sonar-web/src/main/js/apps/coding-rules/components/StandardFacet.tsx
server/sonar-web/src/main/js/apps/coding-rules/query.ts
server/sonar-web/src/main/js/apps/coding-rules/routes.tsx
server/sonar-web/src/main/js/apps/component-measures/__tests__/ComponentMeasures-it.tsx
server/sonar-web/src/main/js/apps/component-measures/__tests__/utils-test.ts
server/sonar-web/src/main/js/apps/component-measures/components/ComponentMeasuresApp.tsx
server/sonar-web/src/main/js/apps/component-measures/components/LeakPeriodLegend.tsx
server/sonar-web/src/main/js/apps/component-measures/components/MeasureContent.tsx
server/sonar-web/src/main/js/apps/component-measures/components/MeasureHeader.tsx
server/sonar-web/src/main/js/apps/component-measures/components/MeasureOverview.tsx
server/sonar-web/src/main/js/apps/component-measures/components/MeasureOverviewContainer.tsx
server/sonar-web/src/main/js/apps/component-measures/components/MeasuresBreadcrumbs.tsx
server/sonar-web/src/main/js/apps/component-measures/components/__tests__/LeakPeriodLegend-test.tsx
server/sonar-web/src/main/js/apps/component-measures/drilldown/BubbleChartView.tsx
server/sonar-web/src/main/js/apps/component-measures/drilldown/ComponentCell.tsx
server/sonar-web/src/main/js/apps/component-measures/drilldown/FilesView.tsx
server/sonar-web/src/main/js/apps/component-measures/drilldown/MeasureCell.tsx
server/sonar-web/src/main/js/apps/component-measures/drilldown/TreeMapView.tsx
server/sonar-web/src/main/js/apps/component-measures/routes.tsx
server/sonar-web/src/main/js/apps/component-measures/sidebar/DomainSubnavigation.tsx
server/sonar-web/src/main/js/apps/component-measures/sidebar/Sidebar.tsx
server/sonar-web/src/main/js/apps/component-measures/utils.ts
server/sonar-web/src/main/js/apps/create/project/Azure/AzureProjectCreate.tsx
server/sonar-web/src/main/js/apps/create/project/Azure/AzureProjectsList.tsx
server/sonar-web/src/main/js/apps/create/project/BitbucketCloud/BitbucketCloudPersonalAccessTokenForm.tsx
server/sonar-web/src/main/js/apps/create/project/BitbucketCloud/BitbucketCloudProjectCreate.tsx
server/sonar-web/src/main/js/apps/create/project/BitbucketCloud/BitbucketCloudProjectCreateRender.tsx
server/sonar-web/src/main/js/apps/create/project/BitbucketServer/BitbucketProjectAccordion.tsx
server/sonar-web/src/main/js/apps/create/project/BitbucketServer/BitbucketProjectCreate.tsx
server/sonar-web/src/main/js/apps/create/project/BitbucketServer/BitbucketRepositories.tsx
server/sonar-web/src/main/js/apps/create/project/BitbucketServer/BitbucketSearchResults.tsx
server/sonar-web/src/main/js/apps/create/project/BitbucketServer/BitbucketServerPersonalAccessTokenForm.tsx
server/sonar-web/src/main/js/apps/create/project/CreateProjectModeSelection.tsx
server/sonar-web/src/main/js/apps/create/project/Github/GitHubProjectCreate.tsx
server/sonar-web/src/main/js/apps/create/project/Github/GitHubProjectCreateRenderer.tsx
server/sonar-web/src/main/js/apps/create/project/Gitlab/GitlabProjectCreate.tsx
server/sonar-web/src/main/js/apps/create/project/__tests__/Azure-it.tsx
server/sonar-web/src/main/js/apps/create/project/__tests__/Bitbucket-it.tsx
server/sonar-web/src/main/js/apps/create/project/__tests__/BitbucketCloud-it.tsx
server/sonar-web/src/main/js/apps/create/project/__tests__/CreateProjectPage-it.tsx
server/sonar-web/src/main/js/apps/create/project/__tests__/GitHub-it.tsx
server/sonar-web/src/main/js/apps/create/project/__tests__/GitLab-it.tsx
server/sonar-web/src/main/js/apps/create/project/__tests__/ManualProjectCreate-test.tsx
server/sonar-web/src/main/js/apps/create/project/components/NewCodeDefinitionSelection.tsx
server/sonar-web/src/main/js/apps/create/project/components/__tests__/AlmRepoItem-test.tsx
server/sonar-web/src/main/js/apps/create/project/manual/ManualProjectCreate.tsx
server/sonar-web/src/main/js/apps/create/project/types.ts
server/sonar-web/src/main/js/apps/create/project/usePersonalAccessToken.ts
server/sonar-web/src/main/js/apps/groups/__tests__/GroupsApp-it.tsx
server/sonar-web/src/main/js/apps/groups/components/Members.tsx
server/sonar-web/src/main/js/apps/issues/__tests__/IssueHeader-it.tsx
server/sonar-web/src/main/js/apps/issues/__tests__/IssuesApp-Filtering-it.tsx
server/sonar-web/src/main/js/apps/issues/__tests__/IssuesApp-it.tsx
server/sonar-web/src/main/js/apps/issues/__tests__/IssuesAppActivity-it.tsx
server/sonar-web/src/main/js/apps/issues/__tests__/IssuesAppGuide-it.tsx
server/sonar-web/src/main/js/apps/issues/__tests__/actions-test.ts
server/sonar-web/src/main/js/apps/issues/__tests__/utils-test.ts
server/sonar-web/src/main/js/apps/issues/actions.ts
server/sonar-web/src/main/js/apps/issues/components/AssigneeSelect.tsx
server/sonar-web/src/main/js/apps/issues/components/BulkChangeModal.tsx
server/sonar-web/src/main/js/apps/issues/components/ComponentBreadcrumbs.tsx
server/sonar-web/src/main/js/apps/issues/components/IssueGuide.tsx
server/sonar-web/src/main/js/apps/issues/components/IssueHeader.tsx
server/sonar-web/src/main/js/apps/issues/components/IssueReviewHistory.tsx
server/sonar-web/src/main/js/apps/issues/components/IssueReviewHistoryAndComments.tsx
server/sonar-web/src/main/js/apps/issues/components/IssuesApp.tsx
server/sonar-web/src/main/js/apps/issues/components/IssuesSourceViewer.tsx
server/sonar-web/src/main/js/apps/issues/components/TagsSelect.tsx
server/sonar-web/src/main/js/apps/issues/components/__tests__/AssigneeSelect-test.tsx
server/sonar-web/src/main/js/apps/issues/components/__tests__/BulkChangeModal-it.tsx
server/sonar-web/src/main/js/apps/issues/components/__tests__/ComponentBreadcrumbs-test.tsx
server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/ComponentSourceSnippetGroupViewer.tsx
server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/CrossComponentSourceViewer.tsx
server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/IssueSourceViewerHeader.tsx
server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/SnippetViewer.tsx
server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/IssueSourceViewerHeader-test.tsx
server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/SnippetViewer-test.tsx
server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/utils-test.ts
server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/utils.ts
server/sonar-web/src/main/js/apps/issues/issues-subnavigation/IssueLocation.tsx
server/sonar-web/src/main/js/apps/issues/issues-subnavigation/IssueLocations.tsx
server/sonar-web/src/main/js/apps/issues/issues-subnavigation/IssueLocationsCrossFile.tsx
server/sonar-web/src/main/js/apps/issues/issues-subnavigation/IssueLocationsNavigator.tsx
server/sonar-web/src/main/js/apps/issues/issues-subnavigation/__tests__/SubnavigationIssues-it.tsx
server/sonar-web/src/main/js/apps/issues/routes.tsx
server/sonar-web/src/main/js/apps/issues/sidebar/AssigneeFacet.tsx
server/sonar-web/src/main/js/apps/issues/sidebar/CreationDateFacet.tsx
server/sonar-web/src/main/js/apps/issues/sidebar/FileFacet.tsx
server/sonar-web/src/main/js/apps/issues/sidebar/LanguageFacet.tsx
server/sonar-web/src/main/js/apps/issues/sidebar/ListStyleFacet.tsx
server/sonar-web/src/main/js/apps/issues/sidebar/ProjectFacet.tsx
server/sonar-web/src/main/js/apps/issues/sidebar/ResolutionFacet.tsx
server/sonar-web/src/main/js/apps/issues/sidebar/StandardFacet.tsx
server/sonar-web/src/main/js/apps/issues/sidebar/StatusFacet.tsx
server/sonar-web/src/main/js/apps/issues/sidebar/TypeFacet.tsx
server/sonar-web/src/main/js/apps/issues/sidebar/VariantFacet.tsx
server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/ListStyleFacet-test.tsx
server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/ListStyleFacetFooter-test.tsx
server/sonar-web/src/main/js/apps/issues/sidebar/__tests__/Sidebar-it.tsx
server/sonar-web/src/main/js/apps/issues/test-utils.tsx
server/sonar-web/src/main/js/apps/issues/utils.ts
server/sonar-web/src/main/js/apps/maintenance/components/App.tsx
server/sonar-web/src/main/js/apps/maintenance/components/__tests__/App-test.tsx
server/sonar-web/src/main/js/apps/marketplace/App.tsx
server/sonar-web/src/main/js/apps/marketplace/EditionBoxes.tsx
server/sonar-web/src/main/js/apps/marketplace/__tests__/MarketplaceApp-it.tsx
server/sonar-web/src/main/js/apps/marketplace/components/PluginActions.tsx
server/sonar-web/src/main/js/apps/marketplace/components/PluginAvailable.tsx
server/sonar-web/src/main/js/apps/marketplace/components/PluginChangeLog.tsx
server/sonar-web/src/main/js/apps/marketplace/components/PluginChangeLogButton.tsx
server/sonar-web/src/main/js/apps/marketplace/components/PluginUpdates.tsx
server/sonar-web/src/main/js/apps/marketplace/utils.ts
server/sonar-web/src/main/js/apps/overview/branches/ActivityPanel.tsx
server/sonar-web/src/main/js/apps/overview/branches/Analysis.tsx
server/sonar-web/src/main/js/apps/overview/branches/ApplicationLeakPeriodInfo.tsx
server/sonar-web/src/main/js/apps/overview/branches/ApplicationNonCaycProjectWarning.tsx
server/sonar-web/src/main/js/apps/overview/branches/BranchOverview.tsx
server/sonar-web/src/main/js/apps/overview/branches/DebtValue.tsx
server/sonar-web/src/main/js/apps/overview/branches/DrilldownMeasureValue.tsx
server/sonar-web/src/main/js/apps/overview/branches/MeasuresPanel.tsx
server/sonar-web/src/main/js/apps/overview/branches/MeasuresPanelCard.tsx
server/sonar-web/src/main/js/apps/overview/branches/MeasuresPanelPercentMeasure.tsx
server/sonar-web/src/main/js/apps/overview/branches/NoCodeWarning.tsx
server/sonar-web/src/main/js/apps/overview/branches/ProjectLeakPeriodInfo.tsx
server/sonar-web/src/main/js/apps/overview/branches/QualityGatePanel.tsx
server/sonar-web/src/main/js/apps/overview/branches/QualityGatePanelSection.tsx
server/sonar-web/src/main/js/apps/overview/branches/__tests__/BranchOverview-it.tsx
server/sonar-web/src/main/js/apps/overview/branches/__tests__/DebtValue-test.tsx
server/sonar-web/src/main/js/apps/overview/branches/__tests__/ProjectLeakPeriodInfo-test.tsx
server/sonar-web/src/main/js/apps/overview/components/EmptyOverview.tsx
server/sonar-web/src/main/js/apps/overview/components/IssueLabel.tsx
server/sonar-web/src/main/js/apps/overview/components/LeakPeriodLegend.tsx
server/sonar-web/src/main/js/apps/overview/components/MeasurementLabel.tsx
server/sonar-web/src/main/js/apps/overview/components/QualityGateCondition.tsx
server/sonar-web/src/main/js/apps/overview/components/QualityGateConditions.tsx
server/sonar-web/src/main/js/apps/overview/components/SonarLintPromotion.tsx
server/sonar-web/src/main/js/apps/overview/components/__tests__/App-test.tsx
server/sonar-web/src/main/js/apps/overview/components/__tests__/IssueLabel-test.tsx
server/sonar-web/src/main/js/apps/overview/components/__tests__/IssueRating-test.tsx
server/sonar-web/src/main/js/apps/overview/components/__tests__/LeakPeriodLegend-test.tsx
server/sonar-web/src/main/js/apps/overview/components/__tests__/MeasurementLabel-test.tsx
server/sonar-web/src/main/js/apps/overview/components/__tests__/QualityGateCondition-test.tsx
server/sonar-web/src/main/js/apps/overview/components/__tests__/QualityGateConditions-test.tsx
server/sonar-web/src/main/js/apps/overview/components/__tests__/SonarLintPromotion-test.tsx
server/sonar-web/src/main/js/apps/overview/pullRequests/PullRequestOverview.tsx
server/sonar-web/src/main/js/apps/overview/pullRequests/__tests__/PullRequestOverview-it.tsx
server/sonar-web/src/main/js/apps/permission-templates/components/ActionsCell.tsx
server/sonar-web/src/main/js/apps/permission-templates/components/DeleteForm.tsx
server/sonar-web/src/main/js/apps/permission-templates/components/PermissionTemplatesApp.tsx
server/sonar-web/src/main/js/apps/permission-templates/components/Template.tsx
server/sonar-web/src/main/js/apps/permission-templates/components/__tests__/PermissionTemplatesApp-it.tsx
server/sonar-web/src/main/js/apps/permission-templates/utils.ts
server/sonar-web/src/main/js/apps/permissions/global/components/PermissionsGlobalApp.tsx
server/sonar-web/src/main/js/apps/permissions/global/components/__tests__/PermissionsGlobal-it.tsx
server/sonar-web/src/main/js/apps/permissions/project/components/ApplyTemplate.tsx
server/sonar-web/src/main/js/apps/permissions/project/components/PermissionsProjectApp.tsx
server/sonar-web/src/main/js/apps/permissions/project/components/__tests__/PermissionsProject-it.tsx
server/sonar-web/src/main/js/apps/permissions/test-utils.ts
server/sonar-web/src/main/js/apps/projectActivity/__tests__/actions-test.ts
server/sonar-web/src/main/js/apps/projectActivity/__tests__/utils-test.ts
server/sonar-web/src/main/js/apps/projectActivity/actions.ts
server/sonar-web/src/main/js/apps/projectActivity/components/Event.tsx
server/sonar-web/src/main/js/apps/projectActivity/components/Events.tsx
server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAnalysesList.tsx
server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAnalysis.tsx
server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityApp.tsx
server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityGraphs.tsx
server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityPageFilters.tsx
server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityApp-it.tsx
server/sonar-web/src/main/js/apps/projectActivity/utils.ts
server/sonar-web/src/main/js/apps/projectBranches/__tests__/ProjectBranchesApp-it.tsx
server/sonar-web/src/main/js/apps/projectBranches/components/BranchLikeRow.tsx
server/sonar-web/src/main/js/apps/projectBranches/components/BranchLikeTable.tsx
server/sonar-web/src/main/js/apps/projectBranches/components/BranchLikeTabs.tsx
server/sonar-web/src/main/js/apps/projectBranches/components/BranchPurgeSetting.tsx
server/sonar-web/src/main/js/apps/projectBranches/components/DeleteBranchModal.tsx
server/sonar-web/src/main/js/apps/projectBranches/components/LifetimeInformation.tsx
server/sonar-web/src/main/js/apps/projectBranches/components/SetAsMainBranchModal.tsx
server/sonar-web/src/main/js/apps/projectDeletion/Form.tsx
server/sonar-web/src/main/js/apps/projectDeletion/__tests__/ProjectDeletionApp-it.tsx
server/sonar-web/src/main/js/apps/projectDump/ProjectDumpApp.tsx
server/sonar-web/src/main/js/apps/projectDump/__tests__/ProjectDumpApp-it.tsx
server/sonar-web/src/main/js/apps/projectDump/components/Export.tsx
server/sonar-web/src/main/js/apps/projectDump/components/Import.tsx
server/sonar-web/src/main/js/apps/projectInformation/ProjectInformationApp.tsx
server/sonar-web/src/main/js/apps/projectInformation/__tests__/ProjectInformationApp-it.tsx
server/sonar-web/src/main/js/apps/projectInformation/about/AboutProject.tsx
server/sonar-web/src/main/js/apps/projectInformation/about/components/MetaQualityProfiles.tsx
server/sonar-web/src/main/js/apps/projectInformation/about/components/MetaSize.tsx
server/sonar-web/src/main/js/apps/projectInformation/about/components/MetaTags.tsx
server/sonar-web/src/main/js/apps/projectInformation/about/components/__tests__/MetaKey-test.tsx
server/sonar-web/src/main/js/apps/projectInformation/about/components/__tests__/MetaQualityProfiles-test.tsx
server/sonar-web/src/main/js/apps/projectInformation/about/components/__tests__/MetaTags-test.tsx
server/sonar-web/src/main/js/apps/projectInformation/badges/ProjectBadges.tsx
server/sonar-web/src/main/js/apps/projectInformation/badges/__tests__/ProjectBadges-test.tsx
server/sonar-web/src/main/js/apps/projectInformation/badges/__tests__/utils-test.ts
server/sonar-web/src/main/js/apps/projectInformation/badges/utils.ts
server/sonar-web/src/main/js/apps/projectInformation/notifications/ProjectNotifications.tsx
server/sonar-web/src/main/js/apps/projectInformation/notifications/__tests__/ProjectNotifications-test.tsx
server/sonar-web/src/main/js/apps/projectInformation/projectRegulatoryReport/RegulatoryReport.tsx
server/sonar-web/src/main/js/apps/projectInformation/projectRegulatoryReport/__tests__/RegulatoryReport-it.tsx
server/sonar-web/src/main/js/apps/projectKey/__tests__/ProjectKeyApp-it.tsx
server/sonar-web/src/main/js/apps/projectLinks/LinkRow.tsx
server/sonar-web/src/main/js/apps/projectLinks/ProjectLinksApp.tsx
server/sonar-web/src/main/js/apps/projectLinks/__tests__/ProjectLinksApp-it.tsx
server/sonar-web/src/main/js/apps/projectNewCode/components/BranchAnalysisList.tsx
server/sonar-web/src/main/js/apps/projectNewCode/components/BranchAnalysisListRenderer.tsx
server/sonar-web/src/main/js/apps/projectNewCode/components/BranchList.tsx
server/sonar-web/src/main/js/apps/projectNewCode/components/BranchListRow.tsx
server/sonar-web/src/main/js/apps/projectNewCode/components/BranchNewCodeDefinitionSettingModal.tsx
server/sonar-web/src/main/js/apps/projectNewCode/components/NewCodeDefinitionSettingReferenceBranch.tsx
server/sonar-web/src/main/js/apps/projectNewCode/components/ProjectNewCodeDefinitionApp.tsx
server/sonar-web/src/main/js/apps/projectNewCode/components/__tests__/ProjectNewCodeDefinitionApp-it.tsx
server/sonar-web/src/main/js/apps/projectNewCode/components/__tests__/utils-test.ts
server/sonar-web/src/main/js/apps/projectQualityGate/ProjectQualityGateApp.tsx
server/sonar-web/src/main/js/apps/projectQualityGate/__tests__/ProjectQualityGateApp-it.tsx
server/sonar-web/src/main/js/apps/projectQualityProfiles/ProjectQualityProfilesApp.tsx
server/sonar-web/src/main/js/apps/projectQualityProfiles/ProjectQualityProfilesAppRenderer.tsx
server/sonar-web/src/main/js/apps/projectQualityProfiles/__tests__/projectQualityProfilesApp-it.tsx
server/sonar-web/src/main/js/apps/projectQualityProfiles/components/AddLanguageModal.tsx
server/sonar-web/src/main/js/apps/projectQualityProfiles/components/LanguageProfileSelectOption.tsx
server/sonar-web/src/main/js/apps/projectQualityProfiles/components/SetQualityProfileModal.tsx
server/sonar-web/src/main/js/apps/projects/__tests__/utils-test.ts
server/sonar-web/src/main/js/apps/projects/components/AllProjects.tsx
server/sonar-web/src/main/js/apps/projects/components/DefaultPageSelector.tsx
server/sonar-web/src/main/js/apps/projects/components/ProjectsSortingSelect.tsx
server/sonar-web/src/main/js/apps/projects/components/__tests__/AllProjects-test.tsx
server/sonar-web/src/main/js/apps/projects/components/__tests__/CreateApplication-test.tsx
server/sonar-web/src/main/js/apps/projects/components/__tests__/DefaultPageSelector-test.tsx
server/sonar-web/src/main/js/apps/projects/components/__tests__/FavoriteFilter-test.tsx
server/sonar-web/src/main/js/apps/projects/components/__tests__/PageHeader-test.tsx
server/sonar-web/src/main/js/apps/projects/components/__tests__/PageSidebar-test.tsx
server/sonar-web/src/main/js/apps/projects/components/project-card/ProjectCard.tsx
server/sonar-web/src/main/js/apps/projects/components/project-card/ProjectCardLanguages.tsx
server/sonar-web/src/main/js/apps/projects/components/project-card/ProjectCardMeasure.tsx
server/sonar-web/src/main/js/apps/projects/components/project-card/__tests__/ProjectCard-test.tsx
server/sonar-web/src/main/js/apps/projects/components/project-card/__tests__/ProjectCardLanguages-test.tsx
server/sonar-web/src/main/js/apps/projects/components/project-card/__tests__/ProjectCardMeasures-test.tsx
server/sonar-web/src/main/js/apps/projects/filters/CoverageFilter.tsx
server/sonar-web/src/main/js/apps/projects/filters/DuplicationsFilter.tsx
server/sonar-web/src/main/js/apps/projects/filters/LanguagesFilter.tsx
server/sonar-web/src/main/js/apps/projects/filters/QualifierFilter.tsx
server/sonar-web/src/main/js/apps/projects/filters/QualityGateFilter.tsx
server/sonar-web/src/main/js/apps/projects/filters/RatingFacet.tsx
server/sonar-web/src/main/js/apps/projects/filters/SecurityReviewFilter.tsx
server/sonar-web/src/main/js/apps/projects/filters/__tests__/CoverageFilter-test.tsx
server/sonar-web/src/main/js/apps/projects/filters/__tests__/LanguagesFilter-test.tsx
server/sonar-web/src/main/js/apps/projects/filters/__tests__/QualityGateFilter-test.tsx
server/sonar-web/src/main/js/apps/projects/filters/__tests__/TagsFilter-test.tsx
server/sonar-web/src/main/js/apps/projects/query.ts
server/sonar-web/src/main/js/apps/projects/utils.ts
server/sonar-web/src/main/js/apps/projectsManagement/BulkApplyTemplateModal.tsx
server/sonar-web/src/main/js/apps/projectsManagement/ChangeDefaultVisibilityForm.tsx
server/sonar-web/src/main/js/apps/projectsManagement/CreateProjectForm.tsx
server/sonar-web/src/main/js/apps/projectsManagement/DeleteModal.tsx
server/sonar-web/src/main/js/apps/projectsManagement/ProjectManagementApp.tsx
server/sonar-web/src/main/js/apps/projectsManagement/RestoreAccessModal.tsx
server/sonar-web/src/main/js/apps/projectsManagement/__tests__/ProjectManagementApp-it.tsx
server/sonar-web/src/main/js/apps/quality-gates/__tests__/utils-test.ts
server/sonar-web/src/main/js/apps/quality-gates/components/App.tsx
server/sonar-web/src/main/js/apps/quality-gates/components/Condition.tsx
server/sonar-web/src/main/js/apps/quality-gates/components/ConditionModal.tsx
server/sonar-web/src/main/js/apps/quality-gates/components/ConditionReviewAndUpdateModal.tsx
server/sonar-web/src/main/js/apps/quality-gates/components/ConditionValueDescription.tsx
server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.tsx
server/sonar-web/src/main/js/apps/quality-gates/components/DeleteQualityGateForm.tsx
server/sonar-web/src/main/js/apps/quality-gates/components/Details.tsx
server/sonar-web/src/main/js/apps/quality-gates/components/DetailsHeader.tsx
server/sonar-web/src/main/js/apps/quality-gates/components/MetricSelect.tsx
server/sonar-web/src/main/js/apps/quality-gates/components/QualityGatePermissionsAddModalRenderer.tsx
server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/QualityGate-it.tsx
server/sonar-web/src/main/js/apps/quality-gates/utils.ts
server/sonar-web/src/main/js/apps/quality-profiles/__tests__/QualityProfileApp-it.tsx
server/sonar-web/src/main/js/apps/quality-profiles/__tests__/QualityProfilesApp-it.tsx
server/sonar-web/src/main/js/apps/quality-profiles/changelog/Changelog.tsx
server/sonar-web/src/main/js/apps/quality-profiles/changelog/ParameterChange.tsx
server/sonar-web/src/main/js/apps/quality-profiles/changelog/__tests__/ChangelogContainer-it.tsx
server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonContainer.tsx
server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonForm.tsx
server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResultActivation.tsx
server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResults.tsx
server/sonar-web/src/main/js/apps/quality-profiles/components/DeleteProfileForm.tsx
server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileActions.tsx
server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileContainer.tsx
server/sonar-web/src/main/js/apps/quality-profiles/components/QualityProfilesApp.tsx
server/sonar-web/src/main/js/apps/quality-profiles/components/__tests__/ProfileContainer-test.tsx
server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileHeader.tsx
server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileInheritance.tsx
server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileInheritanceBox.tsx
server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissions.tsx
server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissionsGroup.tsx
server/sonar-web/src/main/js/apps/quality-profiles/details/ProfilePermissionsUser.tsx
server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRules.tsx
server/sonar-web/src/main/js/apps/quality-profiles/home/CreateProfileForm.tsx
server/sonar-web/src/main/js/apps/quality-profiles/home/EvolutionDeprecated.tsx
server/sonar-web/src/main/js/apps/quality-profiles/home/EvolutionRules.tsx
server/sonar-web/src/main/js/apps/quality-profiles/home/EvolutionStagnant.tsx
server/sonar-web/src/main/js/apps/quality-profiles/home/PageHeader.tsx
server/sonar-web/src/main/js/apps/quality-profiles/home/ProfilesList.tsx
server/sonar-web/src/main/js/apps/quality-profiles/home/RestoreProfileForm.tsx
server/sonar-web/src/main/js/apps/quality-profiles/qualityProfilesContext.tsx
server/sonar-web/src/main/js/apps/quality-profiles/utils.ts
server/sonar-web/src/main/js/apps/security-hotspots/SecurityHotspotsApp.tsx
server/sonar-web/src/main/js/apps/security-hotspots/__tests__/SecurityHotspotsApp-it.tsx
server/sonar-web/src/main/js/apps/security-hotspots/__tests__/utils-test.ts
server/sonar-web/src/main/js/apps/security-hotspots/components/Assignee.tsx
server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotCommentModal.tsx
server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotHeader.tsx
server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotList.tsx
server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotListItem.tsx
server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotSnippetContainer.tsx
server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotSnippetContainerRenderer.tsx
server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotViewerTabs.tsx
server/sonar-web/src/main/js/apps/security-hotspots/components/status/StatusSelection.tsx
server/sonar-web/src/main/js/apps/security-hotspots/hooks/useScrollDownCompress.ts
server/sonar-web/src/main/js/apps/security-hotspots/utils.ts
server/sonar-web/src/main/js/apps/sessions/components/LoginContainer.tsx
server/sonar-web/src/main/js/apps/sessions/components/__tests__/Login-it.tsx
server/sonar-web/src/main/js/apps/settings/__tests__/utils-test.ts
server/sonar-web/src/main/js/apps/settings/components/AllCategoriesList.tsx
server/sonar-web/src/main/js/apps/settings/components/CategoryDefinitionsList.tsx
server/sonar-web/src/main/js/apps/settings/components/Definition.tsx
server/sonar-web/src/main/js/apps/settings/components/DefinitionActions.tsx
server/sonar-web/src/main/js/apps/settings/components/SettingsApp.tsx
server/sonar-web/src/main/js/apps/settings/components/SettingsAppRenderer.tsx
server/sonar-web/src/main/js/apps/settings/components/SettingsSearch.tsx
server/sonar-web/src/main/js/apps/settings/components/SubCategoryDefinitionsList.tsx
server/sonar-web/src/main/js/apps/settings/components/__tests__/AllCategoriesList-test.tsx
server/sonar-web/src/main/js/apps/settings/components/__tests__/Definition-it.tsx
server/sonar-web/src/main/js/apps/settings/components/__tests__/Languages-it.tsx
server/sonar-web/src/main/js/apps/settings/components/__tests__/SettingsApp-it.tsx
server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionBox.tsx
server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionForm.tsx
server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionFormField.tsx
server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionFormRenderer.tsx
server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmIntegration.tsx
server/sonar-web/src/main/js/apps/settings/components/almIntegration/AzureForm.tsx
server/sonar-web/src/main/js/apps/settings/components/almIntegration/BitbucketCloudForm.tsx
server/sonar-web/src/main/js/apps/settings/components/almIntegration/BitbucketForm.tsx
server/sonar-web/src/main/js/apps/settings/components/almIntegration/BitbucketServerForm.tsx
server/sonar-web/src/main/js/apps/settings/components/almIntegration/GitlabForm.tsx
server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmBindingDefinitionForm-test.tsx
server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/AlmIntegration-it.tsx
server/sonar-web/src/main/js/apps/settings/components/authentication/AuthenticationMultiValuesField.tsx
server/sonar-web/src/main/js/apps/settings/components/authentication/AuthenticationSecuredField.tsx
server/sonar-web/src/main/js/apps/settings/components/authentication/ConfigurationForm.tsx
server/sonar-web/src/main/js/apps/settings/components/authentication/GitHubConfigurationValidity.tsx
server/sonar-web/src/main/js/apps/settings/components/authentication/GithubAuthenticationTab.tsx
server/sonar-web/src/main/js/apps/settings/components/authentication/SamlAuthenticationTab.tsx
server/sonar-web/src/main/js/apps/settings/components/authentication/__tests__/Authentication-it.tsx
server/sonar-web/src/main/js/apps/settings/components/authentication/hook/useConfiguration.ts
server/sonar-web/src/main/js/apps/settings/components/authentication/hook/useGithubConfiguration.ts
server/sonar-web/src/main/js/apps/settings/components/inputs/MultiValueInput.tsx
server/sonar-web/src/main/js/apps/settings/components/inputs/PropertySetInput.tsx
server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/AlmSpecificForm.tsx
server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/PRDecorationBinding.tsx
server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/PRDecorationBindingRenderer.tsx
server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/__tests__/PRDecorationBinding-it.tsx
server/sonar-web/src/main/js/apps/settings/encryption/EncryptionApp.tsx
server/sonar-web/src/main/js/apps/settings/encryption/EncryptionForm.tsx
server/sonar-web/src/main/js/apps/settings/styles.css
server/sonar-web/src/main/js/apps/settings/utils.ts
server/sonar-web/src/main/js/apps/system/__tests__/utils-test.ts
server/sonar-web/src/main/js/apps/system/components/ChangeLogLevelForm.tsx
server/sonar-web/src/main/js/apps/system/components/PageActions.tsx
server/sonar-web/src/main/js/apps/system/components/SystemApp.tsx
server/sonar-web/src/main/js/apps/system/components/__tests__/SystemApp-it.tsx
server/sonar-web/src/main/js/apps/system/utils.ts
server/sonar-web/src/main/js/apps/users/UsersApp.tsx
server/sonar-web/src/main/js/apps/users/UsersList.tsx
server/sonar-web/src/main/js/apps/users/__tests__/UsersApp-it.tsx
server/sonar-web/src/main/js/apps/users/components/DeactivateForm.tsx
server/sonar-web/src/main/js/apps/users/components/PasswordForm.tsx
server/sonar-web/src/main/js/apps/users/components/TokensForm.tsx
server/sonar-web/src/main/js/apps/users/components/UserForm.tsx
server/sonar-web/src/main/js/apps/users/utils.ts
server/sonar-web/src/main/js/apps/web-api-v2/WebApiApp.tsx
server/sonar-web/src/main/js/apps/web-api-v2/__tests__/WebApiApp-it.tsx
server/sonar-web/src/main/js/apps/web-api-v2/__tests__/utils-test.ts
server/sonar-web/src/main/js/apps/web-api-v2/components/ApiSidebar.tsx
server/sonar-web/src/main/js/apps/web-api-v2/utils.ts
server/sonar-web/src/main/js/apps/web-api/components/Action.tsx
server/sonar-web/src/main/js/apps/web-api/components/Menu.tsx
server/sonar-web/src/main/js/apps/web-api/components/ResponseExample.tsx
server/sonar-web/src/main/js/apps/web-api/components/WebApiApp.tsx
server/sonar-web/src/main/js/apps/web-api/components/__tests__/Actions-test.tsx
server/sonar-web/src/main/js/apps/web-api/utils.ts
server/sonar-web/src/main/js/apps/webhooks/components/App.tsx
server/sonar-web/src/main/js/apps/webhooks/components/DeliveryItem.tsx
server/sonar-web/src/main/js/apps/webhooks/components/__tests__/App-it.tsx
server/sonar-web/src/main/js/components/SourceViewer/SourceViewer.tsx
server/sonar-web/src/main/js/components/SourceViewer/SourceViewerCode.tsx
server/sonar-web/src/main/js/components/SourceViewer/SourceViewerHeader.tsx
server/sonar-web/src/main/js/components/SourceViewer/__tests__/SourceViewer-it.tsx
server/sonar-web/src/main/js/components/SourceViewer/__tests__/SourceViewerCode-test.tsx
server/sonar-web/src/main/js/components/SourceViewer/components/DuplicationPopup.tsx
server/sonar-web/src/main/js/components/SourceViewer/components/Line.tsx
server/sonar-web/src/main/js/components/SourceViewer/components/LineCode.tsx
server/sonar-web/src/main/js/components/SourceViewer/components/LineIssuesIndicator.tsx
server/sonar-web/src/main/js/components/SourceViewer/components/LineSCM.tsx
server/sonar-web/src/main/js/components/SourceViewer/components/MeasuresOverlay.tsx
server/sonar-web/src/main/js/components/SourceViewer/components/MeasuresOverlayMeasure.tsx
server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/LineIssueList-test.tsx
server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/MeasuresOverlay-test.tsx
server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/MeasuresOverlayMeasure-test.tsx
server/sonar-web/src/main/js/components/SourceViewer/helpers/__tests__/duplications-test.ts
server/sonar-web/src/main/js/components/SourceViewer/helpers/__tests__/issueLocations-test.ts
server/sonar-web/src/main/js/components/SourceViewer/helpers/duplications.ts
server/sonar-web/src/main/js/components/SourceViewer/helpers/highlight.ts
server/sonar-web/src/main/js/components/SourceViewer/helpers/indexing.ts
server/sonar-web/src/main/js/components/SourceViewer/helpers/issueLocations.ts
server/sonar-web/src/main/js/components/SourceViewer/helpers/lines.ts
server/sonar-web/src/main/js/components/SourceViewer/helpers/loadIssues.ts
server/sonar-web/src/main/js/components/a11y/__tests__/A11yProvider-test.tsx
server/sonar-web/src/main/js/components/a11y/__tests__/A11ySkipTarget-test.tsx
server/sonar-web/src/main/js/components/activity-graph/AddGraphMetric.tsx
server/sonar-web/src/main/js/components/activity-graph/AddGraphMetricPopup.tsx
server/sonar-web/src/main/js/components/activity-graph/DataTableModal.tsx
server/sonar-web/src/main/js/components/activity-graph/GraphsHeader.tsx
server/sonar-web/src/main/js/components/activity-graph/GraphsHistory.tsx
server/sonar-web/src/main/js/components/activity-graph/GraphsTooltipsContentDuplication.tsx
server/sonar-web/src/main/js/components/activity-graph/__tests__/ActivityGraph-it.tsx
server/sonar-web/src/main/js/components/activity-graph/__tests__/DataTableModal-it.tsx
server/sonar-web/src/main/js/components/activity-graph/__tests__/EventInner-it.tsx
server/sonar-web/src/main/js/components/activity-graph/__tests__/GraphsTooltips-it.tsx
server/sonar-web/src/main/js/components/activity-graph/__tests__/utils-test.ts
server/sonar-web/src/main/js/components/activity-graph/utils.ts
server/sonar-web/src/main/js/components/charts/AdvancedTimeline.tsx
server/sonar-web/src/main/js/components/charts/LanguageDistribution.tsx
server/sonar-web/src/main/js/components/charts/ZoomTimeLine.tsx
server/sonar-web/src/main/js/components/charts/__tests__/AdvancedTimeline-test.tsx
server/sonar-web/src/main/js/components/charts/__tests__/BarChart-test.tsx
server/sonar-web/src/main/js/components/charts/__tests__/ColorGradientLegend-test.tsx
server/sonar-web/src/main/js/components/charts/__tests__/DonutChart-test.tsx
server/sonar-web/src/main/js/components/charts/__tests__/LanguageDistribution-test.tsx
server/sonar-web/src/main/js/components/common/FormattingTips.tsx
server/sonar-web/src/main/js/components/common/FormattingTipsWithLink.tsx
server/sonar-web/src/main/js/components/common/MultiSelect.tsx
server/sonar-web/src/main/js/components/common/SelectListItem.tsx
server/sonar-web/src/main/js/components/common/StatusIndicator.tsx
server/sonar-web/src/main/js/components/common/__tests__/ActivityLink-test.tsx
server/sonar-web/src/main/js/components/common/__tests__/AnalysisWarningsModal-test.tsx
server/sonar-web/src/main/js/components/common/__tests__/CodeSnippet-test.tsx
server/sonar-web/src/main/js/components/common/__tests__/DisableableSelectOption-test.tsx
server/sonar-web/src/main/js/components/common/__tests__/DocumentationTooltip-test.tsx
server/sonar-web/src/main/js/components/common/__tests__/InstanceMessage-test.tsx
server/sonar-web/src/main/js/components/common/__tests__/Link-test.tsx
server/sonar-web/src/main/js/components/common/__tests__/PageCounter-test.tsx
server/sonar-web/src/main/js/components/common/__tests__/PrivacyBadgeContainer-test.tsx
server/sonar-web/src/main/js/components/common/__tests__/ProjectKeyInput-test.tsx
server/sonar-web/src/main/js/components/common/__tests__/SelectList-test.tsx
server/sonar-web/src/main/js/components/common/__tests__/SelectListItem-test.tsx
server/sonar-web/src/main/js/components/controls/BackButton.tsx
server/sonar-web/src/main/js/components/controls/Checkbox.css
server/sonar-web/src/main/js/components/controls/ComponentReportActions.tsx
server/sonar-web/src/main/js/components/controls/ComponentReportActionsRenderer.tsx
server/sonar-web/src/main/js/components/controls/ConfirmModal.tsx
server/sonar-web/src/main/js/components/controls/Dropdown.tsx
server/sonar-web/src/main/js/components/controls/IdentityProviderLink.tsx
server/sonar-web/src/main/js/components/controls/ListFooter.tsx
server/sonar-web/src/main/js/components/controls/Radio.tsx
server/sonar-web/src/main/js/components/controls/RadioCard.tsx
server/sonar-web/src/main/js/components/controls/SearchBox.css
server/sonar-web/src/main/js/components/controls/Select.tsx
server/sonar-web/src/main/js/components/controls/SelectList.tsx
server/sonar-web/src/main/js/components/controls/Toggle.css
server/sonar-web/src/main/js/components/controls/Tooltip.tsx
server/sonar-web/src/main/js/components/controls/__tests__/ActionsDropdown-test.tsx
server/sonar-web/src/main/js/components/controls/__tests__/ButtonToggle-test.tsx
server/sonar-web/src/main/js/components/controls/__tests__/ClickEventBoundary-test.tsx
server/sonar-web/src/main/js/components/controls/__tests__/ComponentReportActions-test.tsx
server/sonar-web/src/main/js/components/controls/__tests__/ConfirmButton-test.tsx
server/sonar-web/src/main/js/components/controls/__tests__/ConfirmModal-test.tsx
server/sonar-web/src/main/js/components/controls/__tests__/DateInput-test.tsx
server/sonar-web/src/main/js/components/controls/__tests__/DateRangeInput-test.tsx
server/sonar-web/src/main/js/components/controls/__tests__/Dropdown-test.tsx
server/sonar-web/src/main/js/components/controls/__tests__/Favorite-test.tsx
server/sonar-web/src/main/js/components/controls/__tests__/HomePageSelect-test.tsx
server/sonar-web/src/main/js/components/controls/__tests__/IdentityProviderLink-test.tsx
server/sonar-web/src/main/js/components/controls/__tests__/InputValidationField-test.tsx
server/sonar-web/src/main/js/components/controls/__tests__/ListFooter-test.tsx
server/sonar-web/src/main/js/components/controls/__tests__/ModalButton-test.tsx
server/sonar-web/src/main/js/components/controls/__tests__/ModalValidationField-test.tsx
server/sonar-web/src/main/js/components/controls/__tests__/RadioCard-test.tsx
server/sonar-web/src/main/js/components/controls/__tests__/SearchBox-test.tsx
server/sonar-web/src/main/js/components/controls/__tests__/Select-test.tsx
server/sonar-web/src/main/js/components/controls/__tests__/SelectList-test.tsx
server/sonar-web/src/main/js/components/controls/__tests__/SelectListListContainer-test.tsx
server/sonar-web/src/main/js/components/controls/__tests__/SelectListListElement-test.tsx
server/sonar-web/src/main/js/components/controls/__tests__/SimpleModal-test.tsx
server/sonar-web/src/main/js/components/controls/__tests__/Toggler-test.tsx
server/sonar-web/src/main/js/components/controls/__tests__/Tooltip-test.tsx
server/sonar-web/src/main/js/components/controls/__tests__/ValidationForm-test.tsx
server/sonar-web/src/main/js/components/controls/__tests__/ValidationInput-test.tsx
server/sonar-web/src/main/js/components/controls/__tests__/ValidationModal-test.tsx
server/sonar-web/src/main/js/components/controls/__tests__/buttons-test.tsx
server/sonar-web/src/main/js/components/controls/__tests__/clipboard-test.tsx
server/sonar-web/src/main/js/components/controls/buttons.css
server/sonar-web/src/main/js/components/devops-platform/AlmSettingsInstanceSelector.tsx
server/sonar-web/src/main/js/components/facet/ListStyleFacet.tsx
server/sonar-web/src/main/js/components/facet/MultipleSelectionHint.tsx
server/sonar-web/src/main/js/components/facet/__tests__/Facet-it.tsx
server/sonar-web/src/main/js/components/facet/__tests__/ListStyleFacet-test.tsx
server/sonar-web/src/main/js/components/facet/__tests__/ListStyleFacetFooter-test.tsx
server/sonar-web/src/main/js/components/hoc/__tests__/whenLoggedIn-test.tsx
server/sonar-web/src/main/js/components/hoc/__tests__/withIndexationContext-test.tsx
server/sonar-web/src/main/js/components/hoc/__tests__/withIndexationGuard-test.tsx
server/sonar-web/src/main/js/components/hoc/__tests__/withKeyboardNavigation-test.tsx
server/sonar-web/src/main/js/components/hoc/__tests__/withNotifications-test.tsx
server/sonar-web/src/main/js/components/hoc/utils.ts
server/sonar-web/src/main/js/components/hoc/withCLanguageFeature.tsx
server/sonar-web/src/main/js/components/hoc/withIndexationContext.tsx
server/sonar-web/src/main/js/components/hoc/withKeyboardNavigation.tsx
server/sonar-web/src/main/js/components/hoc/withLocation.tsx
server/sonar-web/src/main/js/components/hoc/withNotifications.tsx
server/sonar-web/src/main/js/components/hoc/withRouter.tsx
server/sonar-web/src/main/js/components/icon-mappers/IssueTypeIcon.tsx
server/sonar-web/src/main/js/components/icons/__tests__/Icon-test.tsx
server/sonar-web/src/main/js/components/intl/__tests__/DateFormatter-test.tsx
server/sonar-web/src/main/js/components/intl/__tests__/DateFromNow-test.tsx
server/sonar-web/src/main/js/components/intl/__tests__/DateTimeFormatter-test.tsx
server/sonar-web/src/main/js/components/intl/__tests__/TimeFormatter-test.tsx
server/sonar-web/src/main/js/components/intl/dateUtils.ts
server/sonar-web/src/main/js/components/issue/Issue.tsx
server/sonar-web/src/main/js/components/issue/__tests__/Issue-it.tsx
server/sonar-web/src/main/js/components/issue/actions.ts
server/sonar-web/src/main/js/components/issue/components/IssueAssign.tsx
server/sonar-web/src/main/js/components/issue/components/IssueChangelog.tsx
server/sonar-web/src/main/js/components/issue/components/IssueChangelogDiff.tsx
server/sonar-web/src/main/js/components/issue/components/IssueTags.tsx
server/sonar-web/src/main/js/components/issue/components/IssueTransition.tsx
server/sonar-web/src/main/js/components/issue/components/IssueView.tsx
server/sonar-web/src/main/js/components/issue/components/__tests__/IssueChangelogDiff-test.tsx
server/sonar-web/src/main/js/components/issue/popups/ChangelogPopup.tsx
server/sonar-web/src/main/js/components/issue/popups/CommentList.tsx
server/sonar-web/src/main/js/components/locations/CrossFileLocationNavigator.tsx
server/sonar-web/src/main/js/components/locations/__tests__/CrossFileLocationsNavigator-test.tsx
server/sonar-web/src/main/js/components/locations/__tests__/LocationsList-test.tsx
server/sonar-web/src/main/js/components/measure/RatingTooltipContent.tsx
server/sonar-web/src/main/js/components/measure/__tests__/Measure-test.tsx
server/sonar-web/src/main/js/components/measure/__tests__/MeasureIndicator-test.tsx
server/sonar-web/src/main/js/components/measure/__tests__/RatingTooltipContent-test.tsx
server/sonar-web/src/main/js/components/new-code-definition/GlobalNewCodeDefinitionDescription.tsx
server/sonar-web/src/main/js/components/new-code-definition/NCDAutoUpdateMessage.tsx
server/sonar-web/src/main/js/components/new-code-definition/NewCodeDefinitionDaysOption.tsx
server/sonar-web/src/main/js/components/new-code-definition/NewCodeDefinitionSelector.tsx
server/sonar-web/src/main/js/components/new-code-definition/__tests__/NCDAutoUpdateMessage-test.tsx
server/sonar-web/src/main/js/components/new-code-definition/utils.ts
server/sonar-web/src/main/js/components/permissions/HoldersList.tsx
server/sonar-web/src/main/js/components/permissions/PermissionCell.tsx
server/sonar-web/src/main/js/components/permissions/PermissionHeader.tsx
server/sonar-web/src/main/js/components/permissions/usePermissionChange.tsx
server/sonar-web/src/main/js/components/rules/IssueTabViewer.tsx
server/sonar-web/src/main/js/components/rules/RuleDescription.tsx
server/sonar-web/src/main/js/components/rules/RuleTabViewer.tsx
server/sonar-web/src/main/js/components/shared/CleanCodeAttributePill.tsx
server/sonar-web/src/main/js/components/shared/__tests__/DrilldownLink-test.tsx
server/sonar-web/src/main/js/components/tutorials/TutorialSelectionRenderer.tsx
server/sonar-web/src/main/js/components/tutorials/__tests__/TutorialSelection-it.tsx
server/sonar-web/src/main/js/components/tutorials/__tests__/utils-test.ts
server/sonar-web/src/main/js/components/tutorials/azure-pipelines/AzurePipelinesTutorial.tsx
server/sonar-web/src/main/js/components/tutorials/azure-pipelines/ExtensionInstallationStepContent.tsx
server/sonar-web/src/main/js/components/tutorials/azure-pipelines/JavaToolInstallation.tsx
server/sonar-web/src/main/js/components/tutorials/azure-pipelines/ServiceEndpointStepContent.tsx
server/sonar-web/src/main/js/components/tutorials/azure-pipelines/__tests__/AzurePipelinesTutorial-it.tsx
server/sonar-web/src/main/js/components/tutorials/azure-pipelines/commands/JavaGradle.tsx
server/sonar-web/src/main/js/components/tutorials/azure-pipelines/commands/JavaMaven.tsx
server/sonar-web/src/main/js/components/tutorials/azure-pipelines/commands/PrepareAnalysisCommand.tsx
server/sonar-web/src/main/js/components/tutorials/azure-pipelines/commands/PublishSteps.tsx
server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/AnalysisCommand.tsx
server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/RepositoryVariables.tsx
server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/__tests__/BitbucketPipelinesTutorial-it.tsx
server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/commands/DotNet.ts
server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/commands/Maven.ts
server/sonar-web/src/main/js/components/tutorials/components/EditTokenModal.tsx
server/sonar-web/src/main/js/components/tutorials/components/GithubCFamilyExampleRepositories.tsx
server/sonar-web/src/main/js/components/tutorials/components/__tests__/EditTokenModal-test.tsx
server/sonar-web/src/main/js/components/tutorials/components/__tests__/GithubCFamilyExampleRepositories-test.tsx
server/sonar-web/src/main/js/components/tutorials/github-action/__tests__/GithubActionTutorial-it.tsx
server/sonar-web/src/main/js/components/tutorials/github-action/commands/CFamily.tsx
server/sonar-web/src/main/js/components/tutorials/github-action/commands/DotNet.tsx
server/sonar-web/src/main/js/components/tutorials/github-action/commands/Gradle.tsx
server/sonar-web/src/main/js/components/tutorials/github-action/commands/JavaMaven.tsx
server/sonar-web/src/main/js/components/tutorials/github-action/commands/Others.tsx
server/sonar-web/src/main/js/components/tutorials/github-action/utils.ts
server/sonar-web/src/main/js/components/tutorials/gitlabci/EnvironmentVariablesStep.tsx
server/sonar-web/src/main/js/components/tutorials/gitlabci/YmlFileStep.tsx
server/sonar-web/src/main/js/components/tutorials/gitlabci/__tests__/GitLabCITutorial-it.tsx
server/sonar-web/src/main/js/components/tutorials/jenkins/MultiBranchPipelineStep.tsx
server/sonar-web/src/main/js/components/tutorials/jenkins/WebhookStepBitbucket.tsx
server/sonar-web/src/main/js/components/tutorials/jenkins/__tests__/JenkinsTutorial-it.tsx
server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/Gradle.tsx
server/sonar-web/src/main/js/components/tutorials/other/BuildToolForm.tsx
server/sonar-web/src/main/js/components/tutorials/other/DoneNextSteps.tsx
server/sonar-web/src/main/js/components/tutorials/other/TokenStep.tsx
server/sonar-web/src/main/js/components/tutorials/other/__tests__/OtherTutorial-it.tsx
server/sonar-web/src/main/js/components/tutorials/other/commands/ExecBuildWrapper.tsx
server/sonar-web/src/main/js/components/tutorials/utils.ts
server/sonar-web/src/main/js/components/ui/AutoEllipsis.tsx
server/sonar-web/src/main/js/components/ui/PageShortcutsTooltip.tsx
server/sonar-web/src/main/js/components/ui/__tests__/Alert-test.tsx
server/sonar-web/src/main/js/components/ui/__tests__/AutoEllipsis-test.tsx
server/sonar-web/src/main/js/components/ui/__tests__/DismissableAlert-test.tsx
server/sonar-web/src/main/js/components/ui/__tests__/DismissableAlertComponent-test.tsx
server/sonar-web/src/main/js/components/ui/__tests__/LegacyAvatar-test.tsx
server/sonar-web/src/main/js/components/ui/__tests__/Level-test.tsx
server/sonar-web/src/main/js/components/ui/__tests__/NavBar-test.tsx
server/sonar-web/src/main/js/components/ui/__tests__/NewsBox-test.tsx
server/sonar-web/src/main/js/components/ui/__tests__/PageShortcutsTooltip-test.tsx
server/sonar-web/src/main/js/components/ui/__tests__/Rating-test.tsx
server/sonar-web/src/main/js/components/ui/__tests__/popups-test.tsx
server/sonar-web/src/main/js/components/ui/popups.tsx
server/sonar-web/src/main/js/components/ui/update-center/MetaDataVersion.tsx
server/sonar-web/src/main/js/components/ui/update-center/__tests__/MetaDataVersion-test.tsx
server/sonar-web/src/main/js/components/ui/update-center/__tests__/MetaDataVersions-test.tsx
server/sonar-web/src/main/js/components/ui/update-center/mocks/update-center-metadata.ts
server/sonar-web/src/main/js/components/upgrade/SystemUpgradeForm.tsx
server/sonar-web/src/main/js/components/upgrade/SystemUpgradeItem.tsx
server/sonar-web/src/main/js/components/upgrade/__tests__/SystemUpgradeButton-test.tsx
server/sonar-web/src/main/js/components/upgrade/__tests__/SystemUpgradeForm-test.tsx
server/sonar-web/src/main/js/components/upgrade/__tests__/SystemUpgradeItem-test.tsx
server/sonar-web/src/main/js/components/upgrade/__tests__/utils-test.ts
server/sonar-web/src/main/js/components/workspace/Workspace.tsx
server/sonar-web/src/main/js/components/workspace/WorkspaceComponentViewer.tsx
server/sonar-web/src/main/js/components/workspace/__tests__/Workspace-test.tsx
server/sonar-web/src/main/js/helpers/__tests__/branch-like-test.ts
server/sonar-web/src/main/js/helpers/__tests__/code-difference-test.tsx
server/sonar-web/src/main/js/helpers/__tests__/error-test.ts
server/sonar-web/src/main/js/helpers/__tests__/globalMessages-test.ts
server/sonar-web/src/main/js/helpers/__tests__/issues-test.ts
server/sonar-web/src/main/js/helpers/__tests__/l10n-test.ts
server/sonar-web/src/main/js/helpers/__tests__/l10nBundle-test.ts
server/sonar-web/src/main/js/helpers/__tests__/measures-test.ts
server/sonar-web/src/main/js/helpers/__tests__/new-code-definition-test.ts
server/sonar-web/src/main/js/helpers/__tests__/new-code-period-test.ts
server/sonar-web/src/main/js/helpers/__tests__/path-test.ts
server/sonar-web/src/main/js/helpers/__tests__/projects-test.ts
server/sonar-web/src/main/js/helpers/__tests__/qualityGates-test.ts
server/sonar-web/src/main/js/helpers/__tests__/request-test.ts
server/sonar-web/src/main/js/helpers/__tests__/sanitize-test.ts
server/sonar-web/src/main/js/helpers/__tests__/security-standard-test.ts
server/sonar-web/src/main/js/helpers/__tests__/stringify-queryparams-test.ts
server/sonar-web/src/main/js/helpers/__tests__/strings-test.ts
server/sonar-web/src/main/js/helpers/__tests__/tokens-test.ts
server/sonar-web/src/main/js/helpers/__tests__/urls-test.ts
server/sonar-web/src/main/js/helpers/__tests__/users-test.ts
server/sonar-web/src/main/js/helpers/branch-like.ts
server/sonar-web/src/main/js/helpers/code-difference.ts
server/sonar-web/src/main/js/helpers/component.ts
server/sonar-web/src/main/js/helpers/editions.ts
server/sonar-web/src/main/js/helpers/globalMessages.ts
server/sonar-web/src/main/js/helpers/issues.ts
server/sonar-web/src/main/js/helpers/keyboardEventHelpers.ts
server/sonar-web/src/main/js/helpers/l10n.ts
server/sonar-web/src/main/js/helpers/l10nBundle.ts
server/sonar-web/src/main/js/helpers/measures.ts
server/sonar-web/src/main/js/helpers/mocks/alm-integrations.ts
server/sonar-web/src/main/js/helpers/mocks/alm-settings.ts
server/sonar-web/src/main/js/helpers/mocks/application.ts
server/sonar-web/src/main/js/helpers/mocks/component-report.ts
server/sonar-web/src/main/js/helpers/mocks/component.ts
server/sonar-web/src/main/js/helpers/mocks/issues.ts
server/sonar-web/src/main/js/helpers/mocks/new-code-definition.ts
server/sonar-web/src/main/js/helpers/mocks/quality-gates.ts
server/sonar-web/src/main/js/helpers/mocks/react-select.ts
server/sonar-web/src/main/js/helpers/mocks/security-hotspots.ts
server/sonar-web/src/main/js/helpers/mocks/settings.ts
server/sonar-web/src/main/js/helpers/mocks/sources.ts
server/sonar-web/src/main/js/helpers/new-code-definition.ts
server/sonar-web/src/main/js/helpers/new-code-period.ts
server/sonar-web/src/main/js/helpers/permissions.ts
server/sonar-web/src/main/js/helpers/qualityGates.ts
server/sonar-web/src/main/js/helpers/query.ts
server/sonar-web/src/main/js/helpers/react-query.ts
server/sonar-web/src/main/js/helpers/request.ts
server/sonar-web/src/main/js/helpers/security-standard.ts
server/sonar-web/src/main/js/helpers/sonarlint.ts
server/sonar-web/src/main/js/helpers/strings.ts
server/sonar-web/src/main/js/helpers/system.ts
server/sonar-web/src/main/js/helpers/testMocks.ts
server/sonar-web/src/main/js/helpers/testReactTestingUtils.tsx
server/sonar-web/src/main/js/helpers/testSelector.ts
server/sonar-web/src/main/js/helpers/testUtils.ts
server/sonar-web/src/main/js/helpers/tokens.ts
server/sonar-web/src/main/js/helpers/urls.ts
server/sonar-web/src/main/js/hooks/useIntersectionObserver.ts
server/sonar-web/src/main/js/queries/badges.ts
server/sonar-web/src/main/js/queries/branch.tsx
server/sonar-web/src/main/js/queries/devops-integration.ts
server/sonar-web/src/main/js/queries/identity-provider.ts
server/sonar-web/src/main/js/queries/newCodeDefinition.ts
server/sonar-web/src/main/js/queries/settings.ts
server/sonar-web/src/main/js/queries/users.ts
server/sonar-web/src/main/js/queries/withQueryClientHoc.tsx
server/sonar-web/src/main/js/types/__tests__/component-test.ts
server/sonar-web/src/main/js/types/alm-settings.ts
server/sonar-web/src/main/js/types/component.ts

index 246da52cda2dc1b9f71e02c5125614ae64d89aac..9e25a3fdaa3ade46ec19a9a157cd0a6770c2fd1f 100644 (file)
@@ -35,15 +35,15 @@ import { ProjectBase } from './components';
 export function setAlmPersonalAccessToken(
   almSetting: string,
   pat: string,
-  username?: string
+  username?: string,
 ): Promise<void> {
   return post('/api/alm_integrations/set_pat', { almSetting, pat, username }).catch(
-    throwGlobalError
+    throwGlobalError,
   );
 }
 
 export function checkPersonalAccessTokenIsValid(
-  almSetting: string
+  almSetting: string,
 ): Promise<{ status: boolean; error?: string }> {
   return get('/api/alm_integrations/check_pat', { almSetting })
     .then(() => ({ status: true }))
@@ -58,25 +58,25 @@ export function checkPersonalAccessTokenIsValid(
 
 export function getAzureProjects(almSetting: string): Promise<{ projects: AzureProject[] }> {
   return getJSON('/api/alm_integrations/list_azure_projects', { almSetting }).catch(
-    throwGlobalError
+    throwGlobalError,
   );
 }
 
 export function getAzureRepositories(
   almSetting: string,
-  projectName: string
+  projectName: string,
 ): Promise<{ repositories: AzureRepository[] }> {
   return getJSON('/api/alm_integrations/search_azure_repos', { almSetting, projectName }).catch(
-    throwGlobalError
+    throwGlobalError,
   );
 }
 
 export function searchAzureRepositories(
   almSetting: string,
-  searchQuery: string
+  searchQuery: string,
 ): Promise<{ repositories: AzureRepository[] }> {
   return getJSON('/api/alm_integrations/search_azure_repos', { almSetting, searchQuery }).catch(
-    throwGlobalError
+    throwGlobalError,
   );
 }
 
@@ -100,14 +100,14 @@ export function importAzureRepository(data: {
 }
 
 export function getBitbucketServerProjects(
-  almSetting: string
+  almSetting: string,
 ): Promise<{ projects: BitbucketProject[] }> {
   return getJSON('/api/alm_integrations/list_bitbucketserver_projects', { almSetting });
 }
 
 export function getBitbucketServerRepositories(
   almSetting: string,
-  projectName: string
+  projectName: string,
 ): Promise<{
   isLastPage: boolean;
   repositories: BitbucketRepository[];
@@ -135,13 +135,13 @@ export function importBitbucketServerProject(data: {
   newCodeDefinitionValue?: string;
 }): Promise<{ project: ProjectBase }> {
   return postJSON('/api/alm_integrations/import_bitbucketserver_project', data).catch(
-    throwGlobalError
+    throwGlobalError,
   );
 }
 
 export function searchForBitbucketServerRepositories(
   almSetting: string,
-  repositoryName: string
+  repositoryName: string,
 ): Promise<{
   isLastPage: boolean;
   repositories: BitbucketRepository[];
@@ -156,7 +156,7 @@ export function searchForBitbucketCloudRepositories(
   almSetting: string,
   repositoryName: string,
   pageSize: number,
-  page?: number
+  page?: number,
 ): Promise<{
   isLastPage: boolean;
   repositories: BitbucketCloudRepository[];
@@ -211,7 +211,7 @@ export function importGithubRepository(data: {
 
 export function getGithubOrganizations(
   almSetting: string,
-  token: string
+  token: string,
 ): Promise<{ organizations: GithubOrganization[] }> {
   return getJSON('/api/alm_integrations/list_github_organizations', {
     almSetting,
index 1ab02a892c793655fb57310771eaa8a0ef53f0c9..32c4b9f378d40f4e1a03627bf5e86f211a9aed45 100644 (file)
@@ -83,7 +83,7 @@ export function createBitbucketServerConfiguration(data: BitbucketServerBindingD
 }
 
 export function updateBitbucketServerConfiguration(
-  data: BitbucketServerBindingDefinition & { newKey: string }
+  data: BitbucketServerBindingDefinition & { newKey: string },
 ) {
   return post('/api/alm_settings/update_bitbucket', data).catch(throwGlobalError);
 }
@@ -93,7 +93,7 @@ export function createBitbucketCloudConfiguration(data: BitbucketCloudBindingDef
 }
 
 export function updateBitbucketCloudConfiguration(
-  data: BitbucketCloudBindingDefinition & { newKey: string }
+  data: BitbucketCloudBindingDefinition & { newKey: string },
 ) {
   return post('/api/alm_settings/update_bitbucketcloud', data).catch(throwGlobalError);
 }
@@ -145,7 +145,7 @@ export function setProjectGitlabBinding(data: GitlabProjectAlmBindingParams) {
 }
 
 export function validateProjectAlmBinding(
-  projectKey: string
+  projectKey: string,
 ): Promise<ProjectAlmBindingConfigurationErrors | undefined> {
   return get('/api/alm_settings/validate_binding', { project: projectKey })
     .then(() => undefined)
index c04b79f6a96a218723df6e6b0020c212c907510b..09a2b7ce243a4832dafe10918e8b1b849066563d 100644 (file)
@@ -24,18 +24,18 @@ import { Visibility } from '../types/component';
 
 export function getApplicationLeak(
   application: string,
-  branch?: string
+  branch?: string,
 ): Promise<ApplicationPeriod[]> {
   return getJSON('/api/applications/show_leak', { application, branch }).then(
     (r) => r.leaks,
-    throwGlobalError
+    throwGlobalError,
   );
 }
 
 export function getApplicationDetails(application: string, branch?: string): Promise<Application> {
   return getJSON('/api/applications/show', { application, branch }).then(
     (r) => r.application,
-    throwGlobalError
+    throwGlobalError,
   );
 }
 
@@ -43,7 +43,7 @@ export function createApplication(
   name: string,
   description: string,
   key: string | undefined,
-  visibility: string
+  visibility: string,
 ): Promise<{
   application: {
     description?: string;
@@ -53,7 +53,7 @@ export function createApplication(
   };
 }> {
   return postJSON('/api/applications/create', { description, key, name, visibility }).catch(
-    throwGlobalError
+    throwGlobalError,
   );
 }
 
index 0ccba960aa24a10ae6e25f28c33fb91e98dc8649..fe0bc45803b4c59afa935ce42edccce0451f5b4b 100644 (file)
@@ -24,14 +24,14 @@ import { Branch, PullRequest } from '../types/branch-like';
 export function getBranches(project: string): Promise<Branch[]> {
   return getJSON('/api/project_branches/list', { project }).then(
     (r) => r.branches,
-    throwGlobalError
+    throwGlobalError,
   );
 }
 
 export function getPullRequests(project: string): Promise<PullRequest[]> {
   return getJSON('/api/project_pull_requests/list', { project }).then(
     (r) => r.pullRequests,
-    throwGlobalError
+    throwGlobalError,
   );
 }
 
index 8ca0c07377ed639c84d6ded0a22574db2e191366..9f21f5fd3cb36e305202b5be4f73f2062ec11db1 100644 (file)
@@ -40,13 +40,13 @@ export function getAnalysisStatus(data: {
 }
 
 export function getActivity(
-  data: ActivityRequestParameters
+  data: ActivityRequestParameters,
 ): Promise<{ tasks: Task[]; paging: Paging }> {
   return getJSON('/api/ce/activity', data);
 }
 
 export function getStatus(
-  component?: string
+  component?: string,
 ): Promise<{ failing: number; inProgress: number; pending: number; pendingTime?: number }> {
   return getJSON('/api/ce/activity_status', { component });
 }
@@ -58,7 +58,7 @@ export function getTask(id: string, additionalFields?: string[]): Promise<Task>
 export function cancelTask(id: string): Promise<any> {
   return post('/api/ce/cancel', { id }).then(
     () => getTask(id),
-    () => getTask(id)
+    () => getTask(id),
   );
 }
 
@@ -67,7 +67,7 @@ export function cancelAllTasks(): Promise<any> {
 }
 
 export function getTasksForComponent(
-  component: string
+  component: string,
 ): Promise<{ queue: Task[]; current?: Task }> {
   return getJSON('/api/ce/component', { component }).catch(throwGlobalError);
 }
index 1d1456dfcb1b77dc482b02517fc1de58626c10bb..df08e0b336bb9684f672a7b910a91e11973a0710 100644 (file)
@@ -24,16 +24,16 @@ import { ComponentReportStatus } from '../types/component-report';
 
 export function getReportStatus(
   componentKey: string,
-  branchKey?: string
+  branchKey?: string,
 ): Promise<ComponentReportStatus> {
   return getJSON('/api/governance_reports/status', { componentKey, branchKey }).catch(
-    throwGlobalError
+    throwGlobalError,
   );
 }
 
 export function getReportUrl(componentKey: string, branchKey?: string): string {
   let url = `${getBaseUrl()}/api/governance_reports/download?componentKey=${encodeURIComponent(
-    componentKey
+    componentKey,
   )}`;
 
   if (branchKey) {
@@ -45,18 +45,18 @@ export function getReportUrl(componentKey: string, branchKey?: string): string {
 
 export function subscribeToEmailReport(
   componentKey: string,
-  branchKey?: string
+  branchKey?: string,
 ): Promise<void | Response> {
   return post('/api/governance_reports/subscribe', { componentKey, branchKey }).catch(
-    throwGlobalError
+    throwGlobalError,
   );
 }
 
 export function unsubscribeFromEmailReport(
   componentKey: string,
-  branchKey?: string
+  branchKey?: string,
 ): Promise<void | Response> {
   return post('/api/governance_reports/unsubscribe', { componentKey, branchKey }).catch(
-    throwGlobalError
+    throwGlobalError,
   );
 }
index 50c26818095b36086fef856f627dac75b9d2c688..ed3a0d52514d54d537a7f004a7b5d0bd8acca793 100644 (file)
@@ -82,7 +82,7 @@ export function getComponentTree(
   strategy: string,
   component: string,
   metrics: string[] = [],
-  additional: RequestData = {}
+  additional: RequestData = {},
 ): Promise<{
   baseComponent: ComponentMeasure;
   components: ComponentMeasure[];
@@ -97,7 +97,7 @@ export function getComponentTree(
 export function getChildren(
   component: string,
   metrics: string[] = [],
-  additional: RequestData = {}
+  additional: RequestData = {},
 ) {
   return getComponentTree('children', component, metrics, additional);
 }
@@ -105,13 +105,13 @@ export function getChildren(
 export function getComponentLeaves(
   component: string,
   metrics: string[] = [],
-  additional: RequestData = {}
+  additional: RequestData = {},
 ) {
   return getComponentTree('leaves', component, metrics, additional);
 }
 
 export function getComponent(
-  data: { component: string; metricKeys: string } & BranchParameters
+  data: { component: string; metricKeys: string } & BranchParameters,
 ): Promise<{ component: ComponentMeasure }> {
   return getJSON('/api/measures/component', data);
 }
@@ -127,7 +127,7 @@ export type GetTreeParams = {
 } & BranchParameters;
 
 export function getTree<T = TreeComponent>(
-  data: GetTreeParams & { qualifiers?: string }
+  data: GetTreeParams & { qualifiers?: string },
 ): Promise<{ baseComponent: TreeComponent; components: T[]; paging: Paging }> {
   return getJSON('/api/components/tree', data).catch(throwGlobalError);
 }
@@ -148,11 +148,11 @@ export function getComponentData(data: { component: string } & BranchParameters)
 }
 
 export function doesComponentExists(
-  data: { component: string } & BranchParameters
+  data: { component: string } & BranchParameters,
 ): Promise<boolean> {
   return getComponentData(data).then(
     ({ component }) => component !== undefined,
-    () => false
+    () => false,
   );
 }
 
@@ -161,7 +161,7 @@ export function getComponentShow(data: { component: string } & BranchParameters)
 }
 
 export function getBreadcrumbs(
-  data: { component: string } & BranchParameters
+  data: { component: string } & BranchParameters,
 ): Promise<Array<Omit<ComponentRaw, 'tags'>>> {
   return getComponentShow(data).then((r) => {
     const reversedAncestors = [...r.ancestors].reverse();
@@ -222,7 +222,7 @@ export interface SuggestionsResponse {
 export function getSuggestions(
   query?: string,
   recentlyBrowsed?: string[],
-  more?: string
+  more?: string,
 ): Promise<SuggestionsResponse> {
   const data: RequestData = {};
   if (query) {
@@ -238,25 +238,25 @@ export function getSuggestions(
 }
 
 export function getComponentForSourceViewer(
-  data: { component: string } & BranchParameters
+  data: { component: string } & BranchParameters,
 ): Promise<SourceViewerFile> {
   return getJSON('/api/components/app', data);
 }
 
 export function getSources(
-  data: { key: string; from?: number; to?: number } & BranchParameters
+  data: { key: string; from?: number; to?: number } & BranchParameters,
 ): Promise<SourceLine[]> {
   return getJSON('/api/sources/lines', data).then((r) => r.sources);
 }
 
 export function getDuplications(
-  data: { key: string } & BranchParameters
+  data: { key: string } & BranchParameters,
 ): Promise<{ duplications: Duplication[]; files: Dict<DuplicatedFile> }> {
   return getJSON('/api/duplications/show', data).catch(throwGlobalError);
 }
 
 export function getTests(
-  data: { sourceFileKey: string; sourceFileLineNumber: number | string } & BranchParameters
+  data: { sourceFileKey: string; sourceFileLineNumber: number | string } & BranchParameters,
 ): Promise<any> {
   return getJSON('/api/tests/list', data).then((r) => r.tests);
 }
index 23e47c35d88ae1fb4a800f734e4ed9fc8d104c47..fccb2b112f6a4555098cd2d78c141b8f44313c0a 100644 (file)
@@ -61,7 +61,7 @@ export function listIssues(query: RequestData): Promise<ListIssuesResponse> {
 
 export function getFacets(
   query: RequestData,
-  facets: FacetName[]
+  facets: FacetName[],
 ): Promise<{
   facets: Array<{ property: string; values: FacetValue[] }>;
   response: RawIssuesResponse;
@@ -79,7 +79,7 @@ export function getFacets(
 
 export function getFacet(
   query: RequestData,
-  facet: FacetName
+  facet: FacetName,
 ): Promise<{ facet: { count: number; val: string }[]; response: RawIssuesResponse }> {
   return getFacets(query, [facet]).then((r) => {
     return { facet: r.facets[0].values, response: r.response };
@@ -173,7 +173,7 @@ export function getIssueFlowSnippets(issueKey: string): Promise<Dict<SnippetsByC
               lineMap[line.line] = line;
               return lineMap;
             },
-            {}
+            {},
           );
         }
       });
index 9ff4c8aa110ba1166c30deb6032f20d4d95b78f5..320518375968dbffd9cedbf1c81c85e86d2511a3 100644 (file)
@@ -21,7 +21,7 @@ import { getJSON } from '../helpers/request';
 import { L10nBundleRequestParams, L10nBundleRequestResponse } from '../types/l10nBundle';
 
 export function fetchL10nBundle(
-  params: L10nBundleRequestParams
+  params: L10nBundleRequestParams,
 ): Promise<L10nBundleRequestResponse> {
   return getJSON('/api/l10n/index', params);
 }
index 3a8fc78dc7877f2629a2f84327ffcd381b0af5b7..5aea415b5c1695a37dc750136aa5196270aa86cc 100644 (file)
@@ -30,7 +30,7 @@ import { Measure } from '../types/types';
 const COMPONENT_URL = '/api/measures/component';
 
 export function getMeasures(
-  data: { component: string; metricKeys: string } & BranchParameters
+  data: { component: string; metricKeys: string } & BranchParameters,
 ): Promise<Measure[]> {
   return getJSON(COMPONENT_URL, data).then((r) => r.component.measures, throwGlobalError);
 }
@@ -38,7 +38,7 @@ export function getMeasures(
 export function getMeasuresWithMetrics(
   component: string,
   metrics: string[],
-  branchParameters?: BranchParameters
+  branchParameters?: BranchParameters,
 ): Promise<MeasuresAndMetaWithMetrics> {
   return getJSON(COMPONENT_URL, {
     additionalFields: 'metrics',
@@ -51,7 +51,7 @@ export function getMeasuresWithMetrics(
 export function getMeasuresWithPeriod(
   component: string,
   metrics: string[],
-  branchParameters?: BranchParameters
+  branchParameters?: BranchParameters,
 ): Promise<MeasuresAndMetaWithPeriod> {
   return getJSON(COMPONENT_URL, {
     additionalFields: 'period',
@@ -64,7 +64,7 @@ export function getMeasuresWithPeriod(
 export function getMeasuresWithPeriodAndMetrics(
   component: string,
   metrics: string[],
-  branchParameters?: BranchParameters
+  branchParameters?: BranchParameters,
 ): Promise<MeasuresAndMetaWithPeriod & MeasuresAndMetaWithMetrics> {
   return getJSON(COMPONENT_URL, {
     additionalFields: 'period,metrics',
@@ -76,7 +76,7 @@ export function getMeasuresWithPeriodAndMetrics(
 
 export function getMeasuresForProjects(
   projectKeys: string[],
-  metricKeys: string[]
+  metricKeys: string[],
 ): Promise<MeasuresForProjects[]> {
   return getJSON('/api/measures/search', {
     projectKeys: projectKeys.join(),
index 8a5c75707984988228315621ba21eaf0afec41ac..dcd9e28febb18c425791e7706b1759f85b555a50 100644 (file)
@@ -45,7 +45,7 @@ export function getAllMetrics(data?: {
 
   function inner(
     data: { p?: number; ps?: number } = { ps: 500 },
-    prev?: MetricsResponse
+    prev?: MetricsResponse,
   ): Promise<Metric[]> {
     return getMetrics(data).then((r) => {
       const result = prev ? prev.metrics.concat(r.metrics) : r.metrics;
index 01c4735096e5520319722dcf75fd09c4738a81b3..5b06b132e61f230a9cc6aff820eb5b50a3813be2 100644 (file)
@@ -186,7 +186,7 @@ export default class AlmSettingsServiceMock {
       GitlabBindingDefinition[],
       AzureBindingDefinition[],
       BitbucketCloudBindingDefinition[],
-      BitbucketServerBindingDefinition[]
+      BitbucketServerBindingDefinition[],
     ]) {
       const foundIndex = definitionsGroup.findIndex((definition) => definition.key === key);
       if (foundIndex !== -1) {
@@ -199,7 +199,7 @@ export default class AlmSettingsServiceMock {
 
   removeFromAlmSettings = (almKey: string) => {
     this.#almSettings = cloneDeep(defaultAlmSettings).filter(
-      (almSetting) => almSetting.alm !== almKey
+      (almSetting) => almSetting.alm !== almKey,
     );
   };
 
@@ -235,7 +235,7 @@ export default class AlmSettingsServiceMock {
 
   handleUpdateGithubConfiguration = (data: GithubBindingDefinition & { newKey: string }) => {
     const definition = this.#almDefinitions[AlmKeys.GitHub].find(
-      (item) => item.key === data.key
+      (item) => item.key === data.key,
     ) as GithubBindingDefinition;
     Object.assign(definition, { ...data, key: data.newKey });
 
@@ -244,7 +244,7 @@ export default class AlmSettingsServiceMock {
 
   handleUpdateGitlabConfiguration = (data: GitlabBindingDefinition & { newKey: string }) => {
     const definition = this.#almDefinitions[AlmKeys.GitLab].find(
-      (item) => item.key === data.key
+      (item) => item.key === data.key,
     ) as GitlabBindingDefinition;
     Object.assign(definition, { ...data, key: data.newKey });
 
@@ -253,7 +253,7 @@ export default class AlmSettingsServiceMock {
 
   handleUpdateAzureConfiguration = (data: AzureBindingDefinition & { newKey: string }) => {
     const definition = this.#almDefinitions[AlmKeys.Azure].find(
-      (item) => item.key === data.key
+      (item) => item.key === data.key,
     ) as AzureBindingDefinition;
     Object.assign(definition, { ...data, key: data.newKey });
 
@@ -261,10 +261,10 @@ export default class AlmSettingsServiceMock {
   };
 
   handleUpdateBitbucketServerConfiguration = (
-    data: BitbucketServerBindingDefinition & { newKey: string }
+    data: BitbucketServerBindingDefinition & { newKey: string },
   ) => {
     const definition = this.#almDefinitions[AlmKeys.BitbucketServer].find(
-      (item) => item.key === data.key
+      (item) => item.key === data.key,
     ) as BitbucketServerBindingDefinition;
     Object.assign(definition, { ...data, key: data.newKey });
 
@@ -272,10 +272,10 @@ export default class AlmSettingsServiceMock {
   };
 
   handleUpdateBitbucketCloudConfiguration = (
-    data: BitbucketCloudBindingDefinition & { newKey: string }
+    data: BitbucketCloudBindingDefinition & { newKey: string },
   ) => {
     const definition = this.#almDefinitions[AlmKeys.BitbucketCloud].find(
-      (item) => item.key === data.key
+      (item) => item.key === data.key,
     ) as BitbucketCloudBindingDefinition;
     Object.assign(definition, { ...data, key: data.newKey });
 
@@ -289,7 +289,7 @@ export default class AlmSettingsServiceMock {
       return Promise.reject(
         new Response('', {
           status: 404,
-        })
+        }),
       );
     }
 
index c1f74f3d67e42be211ca346fe569c797fcf64cd6..a3a7385ac13c58850b29dd4e14f2541b4631df98 100644 (file)
@@ -89,7 +89,7 @@ export default class AuthenticationServiceMock {
         id: Math.random().toString(),
         type: TaskTypes.GithubProvisioning,
         ...overrides,
-      })
+      }),
     );
   };
 
@@ -135,10 +135,10 @@ export default class AuthenticationServiceMock {
     }
 
     const nextSync = this.tasks.find((t: Task) =>
-      [TaskStatuses.InProgress, TaskStatuses.Pending].includes(t.status)
+      [TaskStatuses.InProgress, TaskStatuses.Pending].includes(t.status),
     );
     const lastSync = this.tasks.find(
-      (t: Task) => ![TaskStatuses.InProgress, TaskStatuses.Pending].includes(t.status)
+      (t: Task) => ![TaskStatuses.InProgress, TaskStatuses.Pending].includes(t.status),
     );
 
     return Promise.resolve({
index af29f2d23360600508541afc4d03d9f5cd6bd7fc..4d01e18cfb6edbf9fd5b573c4f0820c098aa7857 100644 (file)
@@ -74,7 +74,7 @@ export default class BranchesServiceMock {
 
   excludeBranchFromPurgeHandler: typeof excludeBranchFromPurge = (_, name, value) => {
     this.branches = this.branches.map((b) =>
-      b.name === name ? { ...b, excludedFromPurge: value } : b
+      b.name === name ? { ...b, excludedFromPurge: value } : b,
     );
     return this.reply(null);
   };
index d22c7cc83e0751ff58010eed225b8348424806e6..4fd47633585be93775e524dd236c211926aa3dab 100644 (file)
@@ -148,7 +148,7 @@ export default class CodingRulesServiceMock {
         'cleanCodeAttributeCategory',
         'cleanCodeAttribute',
         'impacts',
-      ])
+      ]),
     );
   }
 
@@ -175,19 +175,21 @@ export default class CodingRulesServiceMock {
       filteredRules = filteredRules.filter(
         (r) =>
           r.cleanCodeAttributeCategory &&
-          cleanCodeAttributeCategories.includes(r.cleanCodeAttributeCategory)
+          cleanCodeAttributeCategories.includes(r.cleanCodeAttributeCategory),
       );
     }
     if (impactSoftwareQualities) {
       filteredRules = filteredRules.filter(
         (r) =>
           r.impacts &&
-          r.impacts.some(({ softwareQuality }) => impactSoftwareQualities.includes(softwareQuality))
+          r.impacts.some(({ softwareQuality }) =>
+            impactSoftwareQualities.includes(softwareQuality),
+          ),
       );
     }
     if (impactSeverities) {
       filteredRules = filteredRules.filter(
-        (r) => r.impacts && r.impacts.some(({ severity }) => impactSeverities.includes(severity))
+        (r) => r.impacts && r.impacts.some(({ severity }) => impactSeverities.includes(severity)),
       );
     }
     if (types) {
@@ -208,7 +210,7 @@ export default class CodingRulesServiceMock {
     }
     if (available_since) {
       filteredRules = filteredRules.filter(
-        (r) => r.createdAt && new Date(r.createdAt) > new Date(available_since)
+        (r) => r.createdAt && new Date(r.createdAt) > new Date(available_since),
       );
     }
     if (is_template !== undefined) {
@@ -526,7 +528,7 @@ export default class CodingRulesServiceMock {
 
   handleDeactivateRule = (data: { key: string; rule: string }) => {
     this.rulesActivations[data.rule] = this.rulesActivations[data.rule]?.filter(
-      (activation) => activation.qProfile !== data.key
+      (activation) => activation.qProfile !== data.key,
     );
     return this.reply(undefined);
   };
@@ -557,7 +559,7 @@ export default class CodingRulesServiceMock {
         dismissedNotices: {
           educationPrinciples: this.dismissedNoticesEP,
         },
-      })
+      }),
     );
   };
 
index e6100375decba076cd077ece704ae404fbc7d908..22ca9d37ac25adb4f415d25c65bff4ca35b2b777 100644 (file)
@@ -78,7 +78,7 @@ export default class ComponentsServiceMock {
       measures ||
       this.defaultComponents.reduce(
         (acc, tree) => ({ ...acc, ...mockFullMeasureData(tree, issueList) }),
-        {}
+        {},
       );
 
     this.components = cloneDeep(this.defaultComponents);
@@ -163,7 +163,7 @@ export default class ComponentsServiceMock {
         }
         return acc;
       },
-      { sourceFile: undefined, size: -Infinity }
+      { sourceFile: undefined, size: -Infinity },
     );
     if (sourceFile) {
       return sourceFile.component.key;
@@ -213,7 +213,7 @@ export default class ComponentsServiceMock {
   handleGetChildren = (
     component: string,
     metrics: string[] = [],
-    data: RequestData = {}
+    data: RequestData = {},
   ): Promise<{
     baseComponent: ComponentMeasure;
     components: ComponentMeasure[];
@@ -227,7 +227,7 @@ export default class ComponentsServiceMock {
     strategy: string,
     key: string,
     metricKeys: string[] = [],
-    { p = 1, ps = 100 }: RequestData = {}
+    { p = 1, ps = 100 }: RequestData = {},
   ): Promise<{
     baseComponent: ComponentMeasure;
     components: ComponentMeasure[];
@@ -353,7 +353,7 @@ export default class ComponentsServiceMock {
   handleGetComponentLeaves = (
     component: string,
     metrics: string[] = [],
-    data: RequestData = {}
+    data: RequestData = {},
   ): Promise<{
     baseComponent: ComponentMeasure;
     components: ComponentMeasure[];
index 3cb3cbbf21a6052616daae6e3bf59aae2a81b226..21e78952b0d5fcd8b02d18a87496ffde90f62745 100644 (file)
@@ -124,7 +124,7 @@ export default class ComputeEngineServiceMock {
         Math.max(
           +new Date(t.submittedAt),
           +new Date(t.startedAt ?? 0),
-          +new Date(t.executedAt ?? 0)
+          +new Date(t.executedAt ?? 0),
         );
 
       return getMaxDate(b) - getMaxDate(a);
@@ -167,7 +167,7 @@ export default class ComputeEngineServiceMock {
               case TaskStatuses.Pending:
                 stats.pendingTime = Math.max(
                   stats.pendingTime,
-                  differenceInMilliseconds(parseDate(task.submittedAt), Date.now())
+                  differenceInMilliseconds(parseDate(task.submittedAt), Date.now()),
                 );
                 stats.pending += 1;
                 break;
@@ -175,8 +175,8 @@ export default class ComputeEngineServiceMock {
 
             return stats;
           },
-          { failing: 0, inProgress: 0, pending: 0, pendingTime: 0 }
-        )
+          { failing: 0, inProgress: 0, pending: 0, pendingTime: 0 },
+        ),
     );
   };
 
@@ -203,10 +203,10 @@ export default class ComputeEngineServiceMock {
     const tasks = this.tasks.filter((t) => t.componentKey === componentKey);
     return Promise.resolve({
       queue: tasks.filter(
-        (t) => t.status === TaskStatuses.InProgress || t.status === TaskStatuses.Pending
+        (t) => t.status === TaskStatuses.InProgress || t.status === TaskStatuses.Pending,
       ),
       current: tasks.find(
-        (t) => t.status === TaskStatuses.Success || t.status === TaskStatuses.Failed
+        (t) => t.status === TaskStatuses.Success || t.status === TaskStatuses.Failed,
       ),
     });
   };
@@ -231,7 +231,7 @@ export default class ComputeEngineServiceMock {
       mockTask({
         id,
         ...overrides,
-      })
+      }),
     );
   };
 
index f4211603eca320cb282c5b24bd29029a0cd1763e..a1ca3a73498068ac56261c7af596a617b626c89a 100644 (file)
@@ -222,8 +222,8 @@ export default class GroupsServiceMock {
                 'External Users and Groups Provisioning': this.provider,
               },
             }
-          : {}
-      )
+          : {},
+      ),
     );
   };
 
index 24b07b1d60c7f793b278bf5fc3da6470460cb2fb..30c1a8dbf01a9c9cfb1bbd16cea317555a3a1d47 100644 (file)
@@ -282,22 +282,25 @@ export default class IssuesServiceMock {
       if (name === 'codeVariants') {
         return {
           property: 'codeVariants',
-          values: this.list.reduce((acc, { issue }) => {
-            if (issue.codeVariants?.length) {
-              issue.codeVariants.forEach((codeVariant) => {
-                const item = acc.find(({ val }) => val === codeVariant);
-                if (item) {
-                  item.count++;
-                } else {
-                  acc.push({
-                    val: codeVariant,
-                    count: 1,
-                  });
-                }
-              });
-            }
-            return acc;
-          }, [] as RawFacet['values']),
+          values: this.list.reduce(
+            (acc, { issue }) => {
+              if (issue.codeVariants?.length) {
+                issue.codeVariants.forEach((codeVariant) => {
+                  const item = acc.find(({ val }) => val === codeVariant);
+                  if (item) {
+                    item.count++;
+                  } else {
+                    acc.push({
+                      val: codeVariant,
+                      count: 1,
+                    });
+                  }
+                });
+              }
+              return acc;
+            },
+            [] as RawFacet['values'],
+          ),
         };
       }
 
@@ -315,14 +318,14 @@ export default class IssuesServiceMock {
               val: 'java',
               count: cleanCodeCategories.reduce<number>(
                 (acc, category) => acc + counters[category].java,
-                0
+                0,
               ),
             },
             {
               val: 'ts',
               count: cleanCodeCategories.reduce<number>(
                 (acc, category) => acc + counters[category].ts,
-                0
+                0,
               ),
             },
           ],
@@ -360,7 +363,7 @@ export default class IssuesServiceMock {
       .filter((item) => !query.types || query.types.split(',').includes(item.issue.type))
       .filter(
         (item) =>
-          !query.inNewCodePeriod || new Date(item.issue.creationDate) > new Date('2023-01-10')
+          !query.inNewCodePeriod || new Date(item.issue.creationDate) > new Date('2023-01-10'),
       );
 
     // Splice list items according to paging using a fixed page size
@@ -401,7 +404,7 @@ export default class IssuesServiceMock {
         }
 
         return item.issue.impacts.some(({ softwareQuality }) =>
-          query.impactSoftwareQualities.split(',').includes(softwareQuality)
+          query.impactSoftwareQualities.split(',').includes(softwareQuality),
         );
       })
       .filter((item) => {
@@ -410,7 +413,7 @@ export default class IssuesServiceMock {
         }
 
         return item.issue.impacts.some(({ severity }) =>
-          query.impactSeverities.split(',').includes(severity)
+          query.impactSeverities.split(',').includes(severity),
         );
       })
       .filter((item) => {
@@ -433,26 +436,28 @@ export default class IssuesServiceMock {
       })
       .filter(
         (item) =>
-          !query.createdBefore || new Date(item.issue.creationDate) <= new Date(query.createdBefore)
+          !query.createdBefore ||
+          new Date(item.issue.creationDate) <= new Date(query.createdBefore),
       )
       .filter(
         (item) =>
-          !query.createdAfter || new Date(item.issue.creationDate) >= new Date(query.createdAfter)
+          !query.createdAfter || new Date(item.issue.creationDate) >= new Date(query.createdAfter),
       )
       .filter((item) => !query.types || query.types.split(',').includes(item.issue.type))
       .filter(
-        (item) => !query.severities || query.severities.split(',').includes(item.issue.severity)
+        (item) => !query.severities || query.severities.split(',').includes(item.issue.severity),
       )
       .filter((item) => !query.scopes || query.scopes.split(',').includes(item.issue.scope))
       .filter((item) => !query.statuses || query.statuses.split(',').includes(item.issue.status))
       .filter((item) => !query.projects || query.projects.split(',').includes(item.issue.project))
       .filter((item) => !query.rules || query.rules.split(',').includes(item.issue.rule))
       .filter(
-        (item) => !query.resolutions || query.resolutions.split(',').includes(item.issue.resolution)
+        (item) =>
+          !query.resolutions || query.resolutions.split(',').includes(item.issue.resolution),
       )
       .filter(
         (item) =>
-          !query.inNewCodePeriod || new Date(item.issue.creationDate) > new Date('2023-01-10')
+          !query.inNewCodePeriod || new Date(item.issue.creationDate) > new Date('2023-01-10'),
       )
       .filter((item) => {
         if (!query.codeVariants) {
@@ -461,8 +466,8 @@ export default class IssuesServiceMock {
         if (!item.issue.codeVariants) {
           return false;
         }
-        return item.issue.codeVariants.some((codeVariant) =>
-          query.codeVariants?.split(',').includes(codeVariant)
+        return item.issue.codeVariants.some(
+          (codeVariant) => query.codeVariants?.split(',').includes(codeVariant),
         );
       });
 
@@ -515,7 +520,7 @@ export default class IssuesServiceMock {
   handleSetIssueAssignee = (data: { issue: string; assignee?: string }) => {
     return this.getActionsResponse(
       { assignee: data.assignee === '_me' ? this.currentUser.login : data.assignee },
-      data.issue
+      data.issue,
     );
   };
 
@@ -560,7 +565,7 @@ export default class IssuesServiceMock {
         transitions: transitionMap[statusMap[data.transition]],
         resolution: resolutionMap[data.transition],
       },
-      data.issue
+      data.issue,
     );
   };
 
@@ -583,7 +588,7 @@ export default class IssuesServiceMock {
           },
         ],
       },
-      data.issue
+      data.issue,
     );
   };
 
@@ -606,14 +611,13 @@ export default class IssuesServiceMock {
           },
         ],
       },
-      issueKey
+      issueKey,
     );
   };
 
   handleDeleteComment = (data: { comment: string }) => {
-    const issue = this.list.find((i) =>
-      i.issue.comments?.some((c) => c.key === data.comment)
-    )?.issue;
+    const issue = this.list.find((i) => i.issue.comments?.some((c) => c.key === data.comment))
+      ?.issue;
     if (!issue) {
       throw new Error(`Couldn't find issue for comment ${data.comment}`);
     }
@@ -621,7 +625,7 @@ export default class IssuesServiceMock {
       {
         comments: issue.comments?.filter((c) => c.key !== data.comment),
       },
-      issue.key
+      issue.key,
     );
   };
 
index ca1785671fd7f1b145368c86172f8b266bb69905..3d99a9945e645bdada71cb28b1900db25d294f8e 100644 (file)
@@ -85,7 +85,7 @@ export class MeasuresServiceMock {
   filterMeasures = (componentKey: string, metricKeys: string[]) => {
     return this.#measures[componentKey]
       ? Object.values(this.#measures[componentKey]).filter(({ metric }) =>
-          metricKeys.includes(metric)
+          metricKeys.includes(metric),
         )
       : [];
   };
@@ -103,7 +103,7 @@ export class MeasuresServiceMock {
   handleGetMeasuresWithPeriod = (
     component: string,
     metrics: string[],
-    _branchParameters?: BranchParameters
+    _branchParameters?: BranchParameters,
   ) => {
     const entry = this.findComponentTree(component);
     const measures = this.filterMeasures(entry.component.key, metrics);
index 167ee04638b67d2a8430a78fc0084ea5b435968f..4f109246014c0a5bc3b0156f803e2e5a2f9e5c61 100644 (file)
@@ -63,7 +63,7 @@ export default class NewCodeDefinitionServiceMock {
   handleGetNewCodePeriod = (data?: { branch?: string; project?: string }) => {
     if (data?.branch !== undefined) {
       return this.reply(
-        this.#listBranchesNewCode.find((b) => b.branchKey === data?.branch) as NewCodeDefinition
+        this.#listBranchesNewCode.find((b) => b.branchKey === data?.branch) as NewCodeDefinition,
       );
     }
 
@@ -80,7 +80,7 @@ export default class NewCodeDefinitionServiceMock {
     if (project !== undefined && branch !== undefined) {
       this.#listBranchesNewCode = this.#listBranchesNewCode.filter((b) => b.branchKey !== branch);
       this.#listBranchesNewCode.push(
-        mockNewCodePeriodBranch({ type, value, branchKey: branch, projectKey: project })
+        mockNewCodePeriodBranch({ type, value, branchKey: branch, projectKey: project }),
       );
     } else {
       this.#newCodePeriod = mockNewCodePeriod({ projectKey: project, type, value });
index 9bf0ac6290fa884d334433ea838106959d0ff053..38638afad62f28985f239efab08f3619e164f8d6 100644 (file)
@@ -63,7 +63,7 @@ export default class NotificationsMock {
 
   handleRemoveNotification = (params: AddRemoveNotificationParameters) => {
     const index = this.notifications.findIndex(
-      (n) => n.project === params.project && n.type === params.type && n.channel === params.channel
+      (n) => n.project === params.project && n.type === params.type && n.channel === params.channel,
     );
 
     if (index < 0) {
index cc3d3b5aeadfac24fcbde31b4a21970465db865e..57b70b7fc5275de5f89541b7d9e1dfded935a6f7 100644 (file)
@@ -123,7 +123,7 @@ const defaultTemplates: PermissionTemplate[] = [
         groupsCount: defaultGroups.filter((g) => g.permissions.includes(key)).length,
         usersCount: defaultUsers.filter((g) => g.permissions.includes(key)).length,
         withProjectCreator: false,
-      })
+      }),
     ),
   }),
   mockPermissionTemplate({
@@ -135,7 +135,7 @@ const defaultTemplates: PermissionTemplate[] = [
         groupsCount: 0,
         usersCount: 0,
         withProjectCreator: [Permissions.Browse, Permissions.CodeViewer].includes(key),
-      })
+      }),
     ),
   }),
 ];
@@ -157,7 +157,7 @@ export default class PermissionsServiceMock {
   constructor() {
     this.#permissionTemplates = cloneDeep(defaultTemplates);
     this.#permissions = PERMISSIONS_ORDER_FOR_PROJECT_TEMPLATE.map((key) =>
-      mockPermission({ key, name: key })
+      mockPermission({ key, name: key }),
     );
     this.#groups = cloneDeep(defaultGroups);
     this.#users = cloneDeep(defaultUsers);
@@ -217,7 +217,7 @@ export default class PermissionsServiceMock {
       params.projects.split(',').length > MAX_PROJECTS_TO_APPLY_PERMISSION_TEMPLATE
     ) {
       const response = new Response(
-        JSON.stringify({ errors: [{ msg: 'bulk apply permission template error message' }] })
+        JSON.stringify({ errors: [{ msg: 'bulk apply permission template error message' }] }),
       );
       return Promise.reject(response);
     }
@@ -262,13 +262,13 @@ export default class PermissionsServiceMock {
         ? this.#users.filter(
             (user) =>
               user.name.toLowerCase().includes(q.toLowerCase()) ||
-              user.login.toLowerCase().includes(q.toLowerCase())
+              user.login.toLowerCase().includes(q.toLowerCase()),
           )
         : this.#users;
 
     const usersChunked = chunk(
       permission ? users.filter((u) => u.permissions.includes(permission)) : users,
-      ps
+      ps,
     );
 
     return this.reply({
@@ -292,7 +292,7 @@ export default class PermissionsServiceMock {
 
     const groupsChunked = chunk(
       permission ? groups.filter((g) => g.permissions.includes(permission)) : groups,
-      ps
+      ps,
     );
 
     return this.reply({
index c5661f16d9e11bb85dd86271777aa5ec70a29ca3..2e644993284149cd4258328fc2bd4faaedc15a26 100644 (file)
@@ -162,7 +162,7 @@ export default class PluginsServiceMock {
 
   handleGetPluginUpdates = () => {
     return this.reply(
-      this.#installed.filter((plugin) => plugin.updates && plugin.updates.length > 0)
+      this.#installed.filter((plugin) => plugin.updates && plugin.updates.length > 0),
     );
   };
 
@@ -192,7 +192,7 @@ export default class PluginsServiceMock {
         'sonarLintSupported',
         'hash',
         'filename',
-        'documentationPath'
+        'documentationPath',
       ),
       implementationBuild: '20210101-000000',
     });
@@ -214,7 +214,7 @@ export default class PluginsServiceMock {
         'sonarLintSupported',
         'hash',
         'filename',
-        'documentationPath'
+        'documentationPath',
       ),
       version: plugin.updates[plugin.updates.length - 1].release?.version ?? '',
       implementationBuild: '20210101-000000',
index ab791b42a1e9a1b7702a54f712bbdfb38b60016a..599d6241aed40c61394dfe57870ab18e39a13241 100644 (file)
@@ -107,7 +107,7 @@ export class ProjectActivityServiceMock {
       from?: string;
       p?: number;
       ps?: number;
-    } & BranchParameters
+    } & BranchParameters,
   ) => {
     const { project, ps = PAGE_SIZE, p = DEFAULT_PAGE, category, from } = data;
 
@@ -145,7 +145,7 @@ export class ProjectActivityServiceMock {
     analysisKey: string,
     name: string,
     category = ProjectAnalysisEventCategory.Other,
-    description?: string
+    description?: string,
   ) => {
     const analysis = this.findAnalysis(analysisKey);
 
index b1e89751259939e4e1c32d3870ad6c012037888c..0a58c363fcc361d1245f41e701bf62d1d08bd542 100644 (file)
@@ -135,7 +135,7 @@ export default class ProjectManagementServiceMock {
         name,
         visibility,
         lastAnalysisDate: undefined,
-      })
+      }),
     );
     return this.reply({ project: this.#projects[0] });
   };
index 74bc38d4a1f56c9f0bb7dba9c404b259f4cf6e5f..ddd0528e4db3e164384ba64b687b6211575bff86 100644 (file)
@@ -298,7 +298,7 @@ export class QualityGatesServiceMock {
   showHandler = ({ name }: { name: string }) => {
     const qualityGate = omit(
       this.list.find((q) => q.name === name),
-      'isDefault'
+      'isDefault',
     );
     return this.reply({ ...qualityGate, actions: this.computeActions(qualityGate) });
   };
@@ -332,7 +332,7 @@ export class QualityGatesServiceMock {
         isDefault: false,
         isBuiltIn: false,
         caycStatus: CaycStatus.Compliant,
-      })
+      }),
     );
     return this.reply({
       name,
@@ -393,7 +393,7 @@ export class QualityGatesServiceMock {
   createConditionHandler = (
     data: {
       gateName: string;
-    } & Omit<Condition, 'id'>
+    } & Omit<Condition, 'id'>,
   ) => {
     const { metric, gateName, op, error } = data;
     const qg = this.list.find((q) => q.name === gateName);
index 3810265466015c036b4fca68d7fe9d5601ba72dc..237dabd2da8f07022c364d006cfa56c12d5ba8b7 100644 (file)
@@ -324,7 +324,7 @@ export default class QualityProfilesServiceMock {
   };
 
   handleGetProfileProjects = (
-    data: RequestData
+    data: RequestData,
   ): Promise<{
     more: boolean;
     paging: Paging;
@@ -333,7 +333,7 @@ export default class QualityProfilesServiceMock {
     const results = (this.profileProjects[data.key] ?? []).filter(
       (project) =>
         project.selected ===
-        (data.selected !== undefined ? Boolean(data.selected === 'selected') : true)
+        (data.selected !== undefined ? Boolean(data.selected === 'selected') : true),
     );
 
     return this.reply({
@@ -363,10 +363,10 @@ export default class QualityProfilesServiceMock {
     }
 
     const ancestors = this.listQualityProfile.filter(
-      (p) => p.key === profile.parentKey
+      (p) => p.key === profile.parentKey,
     ) as ProfileInheritanceDetails[];
     const children = this.listQualityProfile.filter(
-      (p) => p.parentKey === profile.key
+      (p) => p.parentKey === profile.key,
     ) as ProfileInheritanceDetails[];
 
     return this.reply({
@@ -470,7 +470,7 @@ export default class QualityProfilesServiceMock {
   };
 
   handleSearchQualityProfiles = (
-    parameters: SearchQualityProfilesParameters = {}
+    parameters: SearchQualityProfilesParameters = {},
   ): Promise<SearchQualityProfilesResponse> => {
     const { language } = parameters;
     let profiles = this.listQualityProfile;
@@ -498,7 +498,7 @@ export default class QualityProfilesServiceMock {
     const keyFilter = profile.name === this.comparisonResult.left.name ? 'inRight' : 'inLeft';
 
     this.comparisonResult[keyFilter] = this.comparisonResult[keyFilter].filter(
-      ({ key }) => key !== data.rule
+      ({ key }) => key !== data.rule,
     );
 
     return this.reply(undefined);
@@ -652,7 +652,7 @@ export default class QualityProfilesServiceMock {
     // delete Children
     const qualityProfileToDelete = this.listQualityProfile.find((profile) => profile.name === name);
     this.listQualityProfile = this.listQualityProfile.filter(
-      (profile) => profile.parentKey !== qualityProfileToDelete?.key
+      (profile) => profile.parentKey !== qualityProfileToDelete?.key,
     );
 
     // delete profile
index c0f2194865df36ad2f0ff8dffcd1fd78d4264c54..a71f7271513b2f7d3fc511f44e75389aafd0c895 100644 (file)
@@ -73,8 +73,8 @@ export default class SecurityHotspotServiceMock {
         mockSourceLine({
           line: n,
           code: '  <span class="sym-35 sym">symbole</span>',
-        })
-      )
+        }),
+      ),
     );
     jest.mocked(commentSecurityHotspot).mockImplementation(this.handleCommentSecurityHotspot);
     jest
@@ -136,7 +136,7 @@ export default class SecurityHotspotServiceMock {
     data: {
       projectKey: string;
       branch?: string;
-    }
+    },
   ) => {
     if (data?.branch === 'normal-branch') {
       return this.reply({
@@ -169,7 +169,7 @@ export default class SecurityHotspotServiceMock {
     return this.reply({
       paging: mockPaging(),
       hotspots: this.mockRawHotspots(false).filter(
-        (h) => hotspotKeys.includes(h.key) || hotspotKeys.length === 0
+        (h) => hotspotKeys.includes(h.key) || hotspotKeys.length === 0,
       ),
       components: [
         {
index 1352b8dcc971c6d573c7643fa5d5f54e927e61ef..9d28dd63c5426382d76a29d28e8ab8509fc8e25d 100644 (file)
@@ -195,11 +195,11 @@ export default class SettingsServiceMock {
   handleResetSettingValue = (data: { keys: string; component?: string } & BranchParameters) => {
     const setting = this.#settingValues.find((s) => s.key === data.keys) as SettingValue;
     const definition = this.#definitions.find(
-      (d) => d.key === data.keys
+      (d) => d.key === data.keys,
     ) as ExtendedSettingDefinition;
     if (data.keys === 'sonar.auth.github.userConsentForPermissionProvisioningRequired') {
       this.#settingValues = this.#settingValues.filter(
-        (s) => s.key !== 'sonar.auth.github.userConsentForPermissionProvisioningRequired'
+        (s) => s.key !== 'sonar.auth.github.userConsentForPermissionProvisioningRequired',
       );
     } else if (definition.type === SettingType.PROPERTY_SET) {
       setting.fieldValues = [];
index cda4ebdd0d00fdfcc25f459193e02bbbe0dde21e..3055376845b69195c7097d773fb3a75f110ba121 100644 (file)
@@ -71,7 +71,7 @@ export class TimeMachineServiceMock {
       p?: number;
       ps?: number;
       to?: string;
-    } & BranchParameters
+    } & BranchParameters,
   ) => {
     const { ps = PAGE_SIZE, p = DEFAULT_PAGE } = data;
 
@@ -91,7 +91,7 @@ export class TimeMachineServiceMock {
       p?: number;
       to?: string;
     } & BranchParameters,
-    _prev?: TimeMachineResponse
+    _prev?: TimeMachineResponse,
   ) => {
     const { p = DEFAULT_PAGE } = data;
     return this.reply({
index ed92fd94dff56826b1ab0b3381ea21994af9dd4d..d8e61963ae1a0e72576aea5d394d89865e085cb6 100644 (file)
@@ -175,7 +175,7 @@ export default class UsersServiceMock {
         (user.sonarQubeLastConnectionDate === null ||
           isBefore(
             new Date(user.sonarQubeLastConnectionDate),
-            new Date(sonarQubeLastConnectionDateFrom)
+            new Date(sonarQubeLastConnectionDateFrom),
           ))
       ) {
         return false;
@@ -194,7 +194,7 @@ export default class UsersServiceMock {
         (user.sonarLintLastConnectionDate === null ||
           isBefore(
             new Date(user.sonarLintLastConnectionDate),
-            new Date(sonarLintLastConnectionDateFrom)
+            new Date(sonarLintLastConnectionDateFrom),
           ))
       ) {
         return false;
@@ -314,8 +314,8 @@ export default class UsersServiceMock {
                 'External Users and Groups Provisioning': 'GitHub',
               },
             }
-          : {}
-      )
+          : {},
+      ),
     );
   };
 
index 0ae80cffcc787e646619b425082eb11ddec4336a..7500db21c985e7387ee97ac7534c909556e886e4 100644 (file)
@@ -82,7 +82,7 @@ export default class WebhooksMock {
   handleSearchWebhooks = ({ project }: { project?: string }) => {
     if (project !== this.project) {
       throw new Error(
-        'You are asking for webhooks of a project that is not mocked. Reset first the mock with the correct project'
+        'You are asking for webhooks of a project that is not mocked. Reset first the mock with the correct project',
       );
     }
     return this.response({
index 89651428ef5bc67264b37cbf9b7a39bad22c0344..aa6fcbf371165e3e235432e838c3419db9a732cc 100644 (file)
@@ -71,7 +71,7 @@ export function mockFullComponentTree(
     breadcrumbs: [
       { key: PARENT_COMPONENT_KEY, name: 'Foo', qualifier: ComponentQualifier.Project },
     ],
-  })
+  }),
 ): ComponentTree {
   const folderComponent = mockComponent({
     key: `${baseComponent.key}:${FOLDER1_KEY}`,
@@ -253,7 +253,7 @@ export function mockFullSourceViewerFileList(baseComponentKey = PARENT_COMPONENT
         mockSourceLine({
           line: n,
           code: 'function Test() {}',
-        })
+        }),
       ),
     },
     {
@@ -262,7 +262,7 @@ export function mockFullSourceViewerFileList(baseComponentKey = PARENT_COMPONENT
         mockSourceLine({
           line: n,
           code: 'function Test() {}',
-        })
+        }),
       ),
     },
     {
@@ -271,7 +271,7 @@ export function mockFullSourceViewerFileList(baseComponentKey = PARENT_COMPONENT
         mockSourceLine({
           line: n,
           code: 'function Test() {}',
-        })
+        }),
       ),
     },
     {
@@ -375,7 +375,7 @@ export function mockFullSourceViewerFileList(baseComponentKey = PARENT_COMPONENT
         mockSourceLine({
           line: n,
           code: `\u003cspan class\u003d"cd"\u003eLine ${n}\u003c/span\u003e`,
-        })
+        }),
       ),
     },
     {
@@ -388,7 +388,7 @@ export function mockFullSourceViewerFileList(baseComponentKey = PARENT_COMPONENT
         mockSourceLine({
           line: n,
           code: `\u003cspan class\u003d"cd"\u003eLine ${n}\u003c/span\u003e`,
-        })
+        }),
       ),
     },
     {
@@ -397,7 +397,7 @@ export function mockFullSourceViewerFileList(baseComponentKey = PARENT_COMPONENT
         mockSourceLine({
           line: n,
           code: '  <span class="sym-35 sym">symbole</span>',
-        })
+        }),
       ),
     },
   ] as SourceFile[];
index 4731f0558493001bfd5d70f7ae7bd04a4eb999ef..5a3085a5b805151515a2babae7d46e0b6b9c5576 100644 (file)
@@ -111,15 +111,15 @@ export function mockIssuesList(baseComponentKey = PARENT_COMPONENT_KEY): IssueDa
           mockSnippetsByComponent(
             ISSUE_TO_FILES[ISSUE_101][0],
             baseComponentKey,
-            times(40, (i) => i + 1)
+            times(40, (i) => i + 1),
           ),
           mockSnippetsByComponent(
             ISSUE_TO_FILES[ISSUE_101][1],
             baseComponentKey,
-            times(40, (i) => i + 1)
+            times(40, (i) => i + 1),
           ),
         ],
-        'component.key'
+        'component.key',
       ),
     },
     {
@@ -207,15 +207,15 @@ export function mockIssuesList(baseComponentKey = PARENT_COMPONENT_KEY): IssueDa
           mockSnippetsByComponent(
             ISSUE_TO_FILES[ISSUE_11][0],
             baseComponentKey,
-            times(40, (i) => i + 1)
+            times(40, (i) => i + 1),
           ),
           mockSnippetsByComponent(
             ISSUE_TO_FILES[ISSUE_11][1],
             baseComponentKey,
-            times(40, (i) => i + 1)
+            times(40, (i) => i + 1),
           ),
         ],
-        'component.key'
+        'component.key',
       ),
     },
     {
@@ -281,15 +281,15 @@ export function mockIssuesList(baseComponentKey = PARENT_COMPONENT_KEY): IssueDa
           mockSnippetsByComponent(
             ISSUE_TO_FILES[ISSUE_1][0],
             baseComponentKey,
-            times(80, (i) => i + 1)
+            times(80, (i) => i + 1),
           ),
           mockSnippetsByComponent(
             ISSUE_TO_FILES[ISSUE_1][0],
             baseComponentKey,
-            times(80, (i) => i + 1)
+            times(80, (i) => i + 1),
           ),
         ],
-        'component.key'
+        'component.key',
       ),
     },
     {
@@ -318,10 +318,10 @@ export function mockIssuesList(baseComponentKey = PARENT_COMPONENT_KEY): IssueDa
           mockSnippetsByComponent(
             ISSUE_TO_FILES[ISSUE_2][0],
             baseComponentKey,
-            times(40, (i) => i + 20)
+            times(40, (i) => i + 20),
           ),
         ],
-        'component.key'
+        'component.key',
       ),
     },
     {
@@ -344,10 +344,10 @@ export function mockIssuesList(baseComponentKey = PARENT_COMPONENT_KEY): IssueDa
           mockSnippetsByComponent(
             ISSUE_TO_FILES[ISSUE_3][0],
             baseComponentKey,
-            times(40, (i) => i + 20)
+            times(40, (i) => i + 20),
           ),
         ],
-        'component.key'
+        'component.key',
       ),
     },
     {
@@ -378,10 +378,10 @@ export function mockIssuesList(baseComponentKey = PARENT_COMPONENT_KEY): IssueDa
           mockSnippetsByComponent(
             ISSUE_TO_FILES[ISSUE_4][0],
             baseComponentKey,
-            times(40, (i) => i + 20)
+            times(40, (i) => i + 20),
           ),
         ],
-        'component.key'
+        'component.key',
       ),
     },
     {
index 73e76d3349a64f6eed2ba237d6220bb219e3fcea..de6dabf1daa6693f89fc31fdce3fcdd98a3db913 100644 (file)
@@ -35,7 +35,7 @@ export function mockFullMeasureData(tree: ComponentTree, issueList: IssueData[])
   listAllComponentTrees(tree).forEach((tree) => {
     measures[tree.component.key] = keyBy(
       Object.values(MetricKey).map((metricKey) => mockComponentMeasure(tree, issueList, metricKey)),
-      'metric'
+      'metric',
     );
   });
   return measures;
@@ -63,8 +63,8 @@ function mockComponentMeasure(tree: ComponentTree, issueList: IssueData[], metri
     .filter(({ component }) => componentKeys.includes(component))
     .filter(({ status }) =>
       [IssueStatus.Open, IssueStatus.Reopened, IssueStatus.Confirmed].includes(
-        status as IssueStatus
-      )
+        status as IssueStatus,
+      ),
     );
 
   if (isIssueType(metricKey)) {
index cc8a7aacb58098df5638b8e87d6b9d543f5244f1..ecfeffa1e684539f0687d182492ea08ccbb1ca16 100644 (file)
@@ -49,7 +49,7 @@ const globalWebhook1Deliveries = [
       httpStatus: i % 2 === 0 ? 200 : undefined,
       success: i % 2 === 0,
       durationMs: 1000 + i * 100,
-    })
+    }),
   ),
 ];
 
index 001b6b97fb09eda07523055b51ebed8d915b3e81..74fcca032a7440142551a8db3a62ff9235006f74 100644 (file)
@@ -24,7 +24,7 @@ import { BranchParameters } from '../types/branch-like';
 import { Extension, NavigationComponent } from '../types/types';
 
 export function getComponentNavigation(
-  data: { component: string } & BranchParameters
+  data: { component: string } & BranchParameters,
 ): Promise<NavigationComponent> {
   return getJSON('/api/navigation/component', data);
 }
index 733fabbb9fc3b741e8c69f58eb2cd311a708641a..0fdcc05e561103e9d6483e6ed6bedb056cc3fe24 100644 (file)
@@ -140,7 +140,7 @@ export function addProjectCreatorToTemplate(templateId: string, permission: stri
 
 export function removeProjectCreatorFromTemplate(
   templateId: string,
-  permission: string
+  permission: string,
 ): Promise<void> {
   return post('/api/permissions/remove_project_creator_from_template', { templateId, permission });
 }
@@ -223,7 +223,7 @@ export function getPermissionTemplateGroups(data: {
 
 export function changeProjectVisibility(
   project: string,
-  visibility: Visibility
+  visibility: Visibility,
 ): Promise<void | Response> {
   return post('/api/projects/update_visibility', { project, visibility }).catch(throwGlobalError);
 }
index 8321da4fb6b19dc56944fc3352abfb5499ff6e53..3a1b71f2e48522ce4e6b405f97ee6b8ed813ae5d 100644 (file)
@@ -40,7 +40,7 @@ export function getPendingPlugins(): Promise<PendingPluginResult> {
 export function getInstalledPlugins(type = PluginType.External): Promise<InstalledPlugin[]> {
   return getJSON('/api/plugins/installed', { f: 'category', type }).then(
     ({ plugins }) => plugins,
-    throwGlobalError
+    throwGlobalError,
   );
 }
 
index bda0c5b2eac40f93f6d26491439571f48b479a98..9a5e626817d5b493a6e59dc951d7da0b019d8268 100644 (file)
@@ -59,7 +59,7 @@ export function getComponents(parameters: SearchProjectsParameters): Promise<{
 }
 
 export function bulkDeleteProjects(
-  parameters: BaseSearchProjectsParameters
+  parameters: BaseSearchProjectsParameters,
 ): Promise<void | Response> {
   return post('/api/projects/bulk_delete', parameters).catch(throwGlobalError);
 }
@@ -98,9 +98,9 @@ export function setupManualProjectCreation(data: {
 }
 
 export function changeProjectDefaultVisibility(
-  projectVisibility: Visibility
+  projectVisibility: Visibility,
 ): Promise<void | Response> {
   return post('/api/projects/update_default_visibility', { projectVisibility }).catch(
-    throwGlobalError
+    throwGlobalError,
   );
 }
index 41414bf129a8a1b4bffa2873281969d6fa564c21..1a950f588a1f05af7d72f4343631c68f1e888f33 100644 (file)
@@ -41,7 +41,7 @@ export function getProjectActivity(
     from?: string;
     p?: number;
     ps?: number;
-  } & BranchParameters
+  } & BranchParameters,
 ): Promise<{ analyses: Analysis[]; paging: Paging }> {
   return getJSON('/api/project_analyses/search', data).catch(throwGlobalError);
 }
@@ -58,7 +58,7 @@ export function createEvent(
   analysis: string,
   name: string,
   category?: string,
-  description?: string
+  description?: string,
 ): Promise<CreateEventResponse> {
   const data: RequestData = { analysis, name };
   if (category) {
@@ -69,7 +69,7 @@ export function createEvent(
   }
   return postJSON('/api/project_analyses/create_event', data).then(
     (r) => r.event,
-    throwGlobalError
+    throwGlobalError,
   );
 }
 
@@ -80,7 +80,7 @@ export function deleteEvent(event: string): Promise<void | Response> {
 export function changeEvent(
   event: string,
   name?: string,
-  description?: string
+  description?: string,
 ): Promise<CreateEventResponse> {
   const data: RequestData = { event };
   if (name) {
@@ -91,7 +91,7 @@ export function changeEvent(
   }
   return postJSON('/api/project_analyses/update_event', data).then(
     (r) => r.event,
-    throwGlobalError
+    throwGlobalError,
   );
 }
 
index aab1867d7f9720b22d5851d6fb62e6b0aaa84bbe..5590cf49a155b8f71e851869da668f9e2c157212 100644 (file)
@@ -24,7 +24,7 @@ import { ProjectLink } from '../types/types';
 export function getProjectLinks(projectKey: string): Promise<ProjectLink[]> {
   return getJSON('/api/project_links/search', { projectKey }).then(
     (r) => r.links,
-    throwGlobalError
+    throwGlobalError,
   );
 }
 
index 4f63afdbb615498c248b67d95493053dba54a085..819efc454331d9134ef97771e25722238aafca22 100644 (file)
@@ -68,7 +68,7 @@ export function setQualityGateAsDefault(data: { name: string }): Promise<void |
 export function createCondition(
   data: {
     gateName: string;
-  } & Omit<Condition, 'id'>
+  } & Omit<Condition, 'id'>,
 ): Promise<Condition> {
   return postJSON('/api/qualitygates/create_condition', data).catch(throwGlobalError);
 }
@@ -87,7 +87,7 @@ export function getGateForProject(data: { project: string }): Promise<QualityGat
       ...qualityGate,
       isDefault: qualityGate.default,
     }),
-    throwGlobalError
+    throwGlobalError,
   );
 }
 
@@ -126,7 +126,7 @@ export function getQualityGateProjectStatus(
   data: {
     projectKey?: string;
     projectId?: string;
-  } & BranchParameters
+  } & BranchParameters,
 ): Promise<QualityGateProjectStatus> {
   return getJSON('/api/qualitygates/project_status', data)
     .then((r) => r.projectStatus)
index 8e87cbe5107737884776ec77d0986e7289cd8cfe..2860afa142cc51ef61a7b70c9fa73ea99164b922 100644 (file)
@@ -68,7 +68,7 @@ export interface SearchQualityProfilesResponse {
 }
 
 export function searchQualityProfiles(
-  parameters?: SearchQualityProfilesParameters
+  parameters?: SearchQualityProfilesParameters,
 ): Promise<SearchQualityProfilesResponse> {
   return getJSON('/api/qualityprofiles/search', parameters).catch(throwGlobalError);
 }
@@ -98,7 +98,7 @@ export interface ProfileProject {
 }
 
 export function getProfileProjects(
-  data: RequestData
+  data: RequestData,
 ): Promise<{ more: boolean; paging: Paging; results: ProfileProject[] }> {
   return getJSON('/api/qualityprofiles/projects', data).catch(throwGlobalError);
 }
@@ -135,7 +135,7 @@ export function deleteProfile({ language, name: qualityProfile }: Profile) {
 
 export function changeProfileParent(
   { language, name: qualityProfile }: Profile,
-  parentProfile?: Profile
+  parentProfile?: Profile,
 ) {
   return post('/api/qualityprofiles/change_parent', {
     language,
@@ -146,7 +146,7 @@ export function changeProfileParent(
 
 export function getQualityProfileExporterUrl(
   { key: exporterKey }: Exporter,
-  { language, name: qualityProfile }: Profile
+  { language, name: qualityProfile }: Profile,
 ) {
   const queryParams = Object.entries({ exporterKey, language, qualityProfile })
     .map(([key, value]) => `${key}=${encodeURIComponent(value)}`)
@@ -173,7 +173,7 @@ export function getProfileChangelog(
   since: any,
   to: any,
   { language, name: qualityProfile }: Profile,
-  page?: number
+  page?: number,
 ): Promise<ChangelogResponse> {
   return getJSON('/api/qualityprofiles/changelog', {
     since,
@@ -239,7 +239,7 @@ export interface SearchGroupsResponse {
 }
 
 export function searchGroups(
-  parameters: SearchUsersGroupsParameters
+  parameters: SearchUsersGroupsParameters,
 ): Promise<SearchGroupsResponse> {
   return getJSON('/api/qualityprofiles/search_groups', parameters).catch(throwGlobalError);
 }
index 666f798ac5083ba570a610dcc2cfc40d358f8417..6b0e8bfc23a2a2c07baf156fdc0204dc25486d15 100644 (file)
@@ -48,7 +48,7 @@ export function getRuleRepositories(parameters: {
 }): Promise<Array<{ key: string; language: string; name: string }>> {
   return getJSON('/api/rules/repositories', parameters).then(
     ({ repositories }) => repositories,
-    throwGlobalError
+    throwGlobalError,
   );
 }
 
@@ -74,7 +74,7 @@ export function createRule(data: CreateRuleData): Promise<RuleDetails> {
       } else {
         return throwGlobalError(response);
       }
-    }
+    },
   );
 }
 
index 3b3cd10bab1449684b185f16c98224e86da44670..5b481b8460d84cd4f5c2fe5d952cbe4f2e55fdb5 100644 (file)
@@ -37,23 +37,23 @@ const HOTSPOTS_SEARCH_URL = '/api/hotspots/search';
 
 export function assignSecurityHotspot(
   hotspotKey: string,
-  data: HotspotAssignRequest
+  data: HotspotAssignRequest,
 ): Promise<void> {
   return post('/api/hotspots/assign', { hotspot: hotspotKey, ...data }).catch(throwGlobalError);
 }
 
 export function setSecurityHotspotStatus(
   hotspotKey: string,
-  data: HotspotSetStatusRequest
+  data: HotspotSetStatusRequest,
 ): Promise<void> {
   return post('/api/hotspots/change_status', { hotspot: hotspotKey, ...data }).catch(
-    throwGlobalError
+    throwGlobalError,
   );
 }
 
 export function commentSecurityHotspot(hotspotKey: string, comment: string): Promise<void> {
   return post('/api/hotspots/add_comment', { hotspot: hotspotKey, comment }).catch(
-    throwGlobalError
+    throwGlobalError,
   );
 }
 
@@ -63,10 +63,10 @@ export function deleteSecurityHotspotComment(commentKey: string): Promise<void>
 
 export function editSecurityHotspotComment(
   commentKey: string,
-  comment: string
+  comment: string,
 ): Promise<HotspotComment> {
   return post('/api/hotspots/edit_comment', { comment: commentKey, text: comment }).catch(
-    throwGlobalError
+    throwGlobalError,
   );
 }
 
@@ -80,11 +80,11 @@ export function getSecurityHotspots(
     resolution?: HotspotResolution;
     status?: HotspotStatus;
   } & BranchParameters,
-  projectIsIndexing = false
+  projectIsIndexing = false,
 ): Promise<HotspotSearchResponse> {
   return getJSON(
     projectIsIndexing ? HOTSPOTS_LIST_URL : HOTSPOTS_SEARCH_URL,
-    projectIsIndexing ? { ...data, project: data.projectKey } : data
+    projectIsIndexing ? { ...data, project: data.projectKey } : data,
   ).catch(throwGlobalError);
 }
 
@@ -93,7 +93,7 @@ export function getSecurityHotspotList(
   data: {
     projectKey: string;
   } & BranchParameters,
-  projectIsIndexing = false
+  projectIsIndexing = false,
 ): Promise<HotspotSearchResponse> {
   return getJSON(projectIsIndexing ? HOTSPOTS_LIST_URL : HOTSPOTS_SEARCH_URL, {
     ...data,
index 1d81865ddbe4e87c607114dd801dfc5cd644c620..2c2f51115268c86b07f1c3fd2bdb8cfc75df2594 100644 (file)
@@ -33,18 +33,18 @@ import {
 export function getDefinitions(component?: string): Promise<ExtendedSettingDefinition[]> {
   return getJSON('/api/settings/list_definitions', { component }).then(
     (r) => r.definitions,
-    throwGlobalError
+    throwGlobalError,
   );
 }
 
 export function getValue(
-  data: { key: string; component?: string } & BranchParameters
+  data: { key: string; component?: string } & BranchParameters,
 ): Promise<SettingValue> {
   return getValues({ keys: [data.key], component: data.component }).then(([result]) => result);
 }
 
 export function getValues(
-  data: { keys: string[]; component?: string } & BranchParameters
+  data: { keys: string[]; component?: string } & BranchParameters,
 ): Promise<SettingValue[]> {
   return getJSON('/api/settings/values', {
     keys: data.keys.join(','),
@@ -56,7 +56,7 @@ export function getValues(
 }
 
 export function getAllValues(
-  data: { component?: string } & BranchParameters = {}
+  data: { component?: string } & BranchParameters = {},
 ): Promise<SettingValue[]> {
   return getJSON('/api/settings/values', data).then((r: SettingValueResponse) => [
     ...r.settings,
@@ -67,7 +67,7 @@ export function getAllValues(
 export function setSettingValue(
   definition: SettingDefinition,
   value: any,
-  component?: string
+  component?: string,
 ): Promise<void> {
   const { key } = definition;
   const data: RequestData = { key, component };
@@ -86,13 +86,13 @@ export function setSettingValue(
 }
 
 export function setSimpleSettingValue(
-  data: { component?: string; value: string; key: string } & BranchParameters
+  data: { component?: string; value: string; key: string } & BranchParameters,
 ): Promise<void | Response> {
   return post('/api/settings/set', data).catch(throwGlobalError);
 }
 
 export function resetSettingValue(
-  data: { keys: string; component?: string } & BranchParameters
+  data: { keys: string; component?: string } & BranchParameters,
 ): Promise<void> {
   return post('/api/settings/reset', data);
 }
index 25aab89fce45fca538e1cfdcaf903b1700f42759..17e04124345e8180c6192775b1944c7c3ca1fc0b 100644 (file)
@@ -70,6 +70,6 @@ export function waitSystemUPStatus(): Promise<{
   return requestTryAndRepeatUntil(
     getSystemStatus,
     { max: -1, slowThreshold: -15 },
-    ({ status }) => status === 'UP'
+    ({ status }) => status === 'UP',
   );
 }
index cc3eda1c05aa2867a2fb16c43561b4dedeca39c8..edd38f5dac8f66306e9ba3b6e982edee9ad3f723 100644 (file)
@@ -38,7 +38,7 @@ export function getTimeMachineData(
     p?: number;
     ps?: number;
     to?: string;
-  } & BranchParameters
+  } & BranchParameters,
 ): Promise<TimeMachineResponse> {
   return getJSON('/api/measures/search_history', data).catch(throwGlobalError);
 }
@@ -51,7 +51,7 @@ export function getAllTimeMachineData(
     p?: number;
     to?: string;
   } & BranchParameters,
-  prev?: TimeMachineResponse
+  prev?: TimeMachineResponse,
 ): Promise<TimeMachineResponse> {
   return getTimeMachineData({ ...data, ps: 1000 }).then((r) => {
     const result = prev
index 42240ee3237e237ef88a911fe8b4806de20c1d2c..fef9863a18ca81a1b67e57363ebc991975a74ec9 100644 (file)
@@ -39,7 +39,7 @@ export function fetchWebApi(showInternal = true): Promise<RawDomain[]> {
 
 export function fetchResponseExample(domain: string, action: string): Promise<WebApi.Example> {
   return getJSON('/api/webservices/response_example', { controller: domain, action }).catch(
-    throwGlobalError
+    throwGlobalError,
   );
 }
 
index ab8cfaa98680da8876c5256313b6f7957496bce4..8ee5d08687c58db02a50628e8db61e9666f953bc 100644 (file)
@@ -69,7 +69,7 @@ export class AdminContainer extends React.PureComponent<AdminContainerProps, Sta
   fetchNavigationSettings = () => {
     getSettingsNavigation().then(
       (r) => this.setState({ adminPages: r.extensions }),
-      () => {}
+      () => {},
     );
   };
 
@@ -80,7 +80,7 @@ export class AdminContainer extends React.PureComponent<AdminContainerProps, Sta
           this.setState({ pendingPlugins });
         }
       },
-      () => {}
+      () => {},
     );
   };
 
@@ -94,7 +94,7 @@ export class AdminContainer extends React.PureComponent<AdminContainerProps, Sta
           }
         }
       },
-      () => {}
+      () => {},
     );
   };
 
@@ -106,7 +106,7 @@ export class AdminContainer extends React.PureComponent<AdminContainerProps, Sta
           window.location.reload();
         }
       },
-      () => {}
+      () => {},
     );
   };
 
@@ -127,7 +127,7 @@ export class AdminContainer extends React.PureComponent<AdminContainerProps, Sta
           defer={false}
           titleTemplate={translateWithParameters(
             'page_title.template.with_category',
-            translate('layout.settings')
+            translate('layout.settings'),
           )}
         />
         <SettingsNav
index 920eaee6ac6b3204100b47153e700ead724dc0fb..ba21badbec4df0d9e3d15074a0db0a3bf1ed4527 100644 (file)
@@ -134,7 +134,7 @@ export class ComponentContainer extends React.PureComponent<Props, State> {
           if (shouldRedirectToDashboard && this.props.location.pathname.includes('tutorials')) {
             this.props.router.replace(getProjectUrl(key));
           }
-        }
+        },
       );
 
       this.fetchStatus(componentWithQualifier.key);
@@ -159,7 +159,7 @@ export class ComponentContainer extends React.PureComponent<Props, State> {
                 newTasksInProgress,
                 currentTask,
                 newCurrentTask,
-                component
+                component,
               );
 
               shouldRedirectToDashboard =
@@ -171,7 +171,7 @@ export class ComponentContainer extends React.PureComponent<Props, State> {
 
                 this.watchStatusTimer = window.setTimeout(
                   () => this.fetchStatus(componentKey),
-                  FETCH_STATUS_WAIT_TIME
+                  FETCH_STATUS_WAIT_TIME,
                 );
               }
 
@@ -187,11 +187,11 @@ export class ComponentContainer extends React.PureComponent<Props, State> {
               if (shouldFetchComponent) {
                 this.fetchComponent(shouldRedirectToDashboard);
               }
-            }
+            },
           );
         }
       },
-      () => {}
+      () => {},
     );
   };
 
@@ -202,7 +202,7 @@ export class ComponentContainer extends React.PureComponent<Props, State> {
       this.props.hasFeature(Feature.BranchSupport)
     ) {
       const projectBindingErrors = await validateProjectAlmBinding(component.key).catch(
-        () => undefined
+        () => undefined,
       );
 
       if (this.mounted) {
@@ -243,17 +243,17 @@ export class ComponentContainer extends React.PureComponent<Props, State> {
     newTasksInProgress: Task[],
     currentTask: Task | undefined,
     newCurrentTask: Task | undefined,
-    component: Component | undefined
+    component: Component | undefined,
   ) => {
     const progressHasChanged = Boolean(
       tasksInProgress &&
         (newTasksInProgress.length !== tasksInProgress.length ||
-          differenceBy(newTasksInProgress, tasksInProgress, 'id').length > 0)
+          differenceBy(newTasksInProgress, tasksInProgress, 'id').length > 0),
     );
 
     const currentTaskHasChanged = Boolean(
       (!currentTask && newCurrentTask) ||
-        (currentTask && newCurrentTask && currentTask.id !== newCurrentTask.id)
+        (currentTask && newCurrentTask && currentTask.id !== newCurrentTask.id),
     );
 
     if (progressHasChanged) {
@@ -275,7 +275,7 @@ export class ComponentContainer extends React.PureComponent<Props, State> {
   needsAnotherCheck = (
     shouldFetchComponent: boolean,
     component: Component | undefined,
-    newTasksInProgress: Task[]
+    newTasksInProgress: Task[],
   ) => {
     return (
       !shouldFetchComponent &&
@@ -336,7 +336,7 @@ export class ComponentContainer extends React.PureComponent<Props, State> {
           defer={false}
           titleTemplate={translateWithParameters(
             'page_title.template.with_instance',
-            component?.name ?? ''
+            component?.name ?? '',
           )}
         />
         {component &&
@@ -351,7 +351,7 @@ export class ComponentContainer extends React.PureComponent<Props, State> {
               isPending={isPending}
               projectBindingErrors={projectBindingErrors}
             />,
-            this.portalAnchor
+            this.portalAnchor,
           )}
         {loading ? (
           <div className="page page-limited">
index 0fafaea3e734bc7664ba7f9f14f17f8cd8e9cffa..e7dc987b52da0499ca44f07d0d1060925a41c752 100644 (file)
@@ -62,7 +62,7 @@ function LastSyncAlert({ info, short }: LastSyncProps) {
             <FormattedMessage
               id="settings.authentication.github.synchronization_successful.with_warning"
               defaultMessage={translate(
-                'settings.authentication.github.synchronization_successful.with_warning'
+                'settings.authentication.github.synchronization_successful.with_warning',
               )}
               values={{
                 date: formattedDate,
@@ -76,7 +76,7 @@ function LastSyncAlert({ info, short }: LastSyncProps) {
           ) : (
             translateWithParameters(
               'settings.authentication.github.synchronization_successful',
-              formattedDate
+              formattedDate,
             )
           )}
         </i>
@@ -109,7 +109,7 @@ function LastSyncAlert({ info, short }: LastSyncProps) {
           <>
             {translateWithParameters(
               'settings.authentication.github.synchronization_successful',
-              formattedDate
+              formattedDate,
             )}
             <br />
             {summary ?? ''}
@@ -119,7 +119,7 @@ function LastSyncAlert({ info, short }: LastSyncProps) {
             <div>
               {translateWithParameters(
                 'settings.authentication.github.synchronization_failed',
-                formattedDate
+                formattedDate,
               )}
             </div>
             <br />
@@ -160,7 +160,7 @@ function GitHubSynchronisationWarning({ short }: GitHubSynchronisationWarningPro
           translate(
             data.nextSync.status === TaskStatuses.Pending
               ? 'settings.authentication.github.synchronization_pending'
-              : 'settings.authentication.github.synchronization_in_progress'
+              : 'settings.authentication.github.synchronization_in_progress',
           )}
       </Alert>
 
index 802c786c127e0bd236fe011c769f8540ae8b85b0..abcf9c142c4e421572c593b7014745c7bd7c03f2 100644 (file)
@@ -67,7 +67,7 @@ export default function GlobalContainer() {
               className={classNames('page-wrapper', {
                 'new-background': TEMP_PAGELIST_WITH_NEW_BACKGROUND.includes(location.pathname),
                 'white-background': TEMP_PAGELIST_WITH_NEW_BACKGROUND_WHITE.includes(
-                  location.pathname
+                  location.pathname,
                 ),
               })}
               id="container"
index 617d182c9ff9ea4c0f5d85aabd2e7eed98b343ec..4d352ee5a05060b7ea74819f16f10cb645dab170 100644 (file)
@@ -115,7 +115,7 @@ function renderShortcuts(list: Shortcuts) {
                         <code key={k} className="little-spacer-right">
                           {k}
                         </code>
-                      )
+                      ),
                     )}
                   </td>
                   <td>{translate('keyboard_shortcuts', category, action)}</td>
index 99dd74100d9ff20810b691a1d8601f8e46fea487..3d21004432620f47b45119f82505b9062a5c9a84 100644 (file)
@@ -77,7 +77,7 @@ export function SonarLintConnection({ currentUser }: Props) {
     const newTokenName = await getNextAvailableTokenName(login, `${TOKEN_PREFIX}-${ideName}`);
     const expirationDate = await computeExpirationDate();
     const token = await generateToken({ name: newTokenName, login, expirationDate }).catch(
-      () => undefined
+      () => undefined,
     );
 
     if (!token) {
index e8f00fce9f9ae9f74c54ea7793371b5f26c22d45..5e68eadb3f698072b5c9c4814352b293b1827d7c 100644 (file)
@@ -51,6 +51,6 @@ function renderApp(props: Partial<App['props']> = {}) {
         },
       })}
       {...props}
-    />
+    />,
   );
 }
index d3ba659c70d1b472529bc9d89a36f3541db85482..e37b2475bc6eb816e1730a39269cc16a5c8fcbeb 100644 (file)
@@ -87,7 +87,7 @@ it('should render the component nav correctly for portfolio', async () => {
   expect(await ui.portfolioTitle.find()).toHaveAttribute('href', '/portfolio?id=portfolioKey');
   expect(ui.issuesPageLink.get()).toHaveAttribute(
     'href',
-    '/project/issues?id=portfolioKey&resolved=false'
+    '/project/issues?id=portfolioKey&resolved=false',
   );
   expect(ui.measuresPageLink.get()).toHaveAttribute('href', '/component_measures?id=portfolioKey');
   expect(ui.activityPageLink.get()).toHaveAttribute('href', '/project/activity?id=portfolioKey');
@@ -119,7 +119,7 @@ it('should render the component nav correctly for projects', async () => {
   expect(ui.overviewPageLink.get()).toHaveAttribute('href', '/dashboard?id=project-key');
   expect(ui.issuesPageLink.get()).toHaveAttribute(
     'href',
-    '/project/issues?id=project-key&resolved=false'
+    '/project/issues?id=project-key&resolved=false',
   );
   expect(ui.hotspotsPageLink.get()).toHaveAttribute('href', '/security_hotspots?id=project-key');
   expect(ui.measuresPageLink.get()).toHaveAttribute('href', '/component_measures?id=project-key');
@@ -359,7 +359,7 @@ describe('should correctly validate the project binding depending on the context
 
     renderComponentContainerAsComponent({ hasFeature: jest.fn().mockReturnValue(true) });
     expect(
-      await screen.findByText('component_navigation.pr_deco.error_detected_X', { exact: false })
+      await screen.findByText('component_navigation.pr_deco.error_detected_X', { exact: false }),
     ).toBeInTheDocument();
   });
 });
@@ -389,7 +389,7 @@ it.each([
     await waitFor(() => {
       expect(validateProjectAlmBinding).not.toHaveBeenCalled();
     });
-  }
+  },
 );
 
 function renderComponentContainerAsComponent(props: Partial<Props> = {}) {
@@ -402,7 +402,7 @@ function renderComponentContainerAsComponent(props: Partial<Props> = {}) {
         router={mockRouter()}
         {...props}
       />
-    </>
+    </>,
   );
 }
 
@@ -438,7 +438,7 @@ function TestComponent() {
               breadcrumbs: [
                 { key: 'portfolioKey', name: 'portfolio', qualifier: ComponentQualifier.Portfolio },
               ],
-            })
+            }),
           )
         }
         type="button"
index 45d78f8cba906a004f8197be38e35d53008622c7..c71bb5549a0b521675a2febc2e15e2b0a8cc3817 100644 (file)
@@ -29,7 +29,7 @@ it('should redirect to static doc for specific version', async () => {
 
   expect(await screen.findByRole('link')).toHaveAttribute(
     'href',
-    'https://docs.sonarsource.com/sonarqube/10.0/land'
+    'https://docs.sonarsource.com/sonarqube/10.0/land',
   );
 });
 
@@ -38,7 +38,7 @@ it('should redirect to static doc for latest version', async () => {
 
   expect(await screen.findByRole('link')).toHaveAttribute(
     'href',
-    'https://docs.sonarsource.com/sonarqube/latest/land'
+    'https://docs.sonarsource.com/sonarqube/latest/land',
   );
 });
 
@@ -46,6 +46,6 @@ function renderDocumentationRedirect(navigate: string, version?: string) {
   renderAppRoutes(
     `documentation/${navigate}`,
     () => <Route path="/documentation/*" element={<DocumentationRedirect />} />,
-    { appState: mockAppState({ version }) }
+    { appState: mockAppState({ version }) },
   );
 }
index 9f16d2bcf5c7f1e3c9d131477e500ed52e272269..5ccfbc0b61b7118b08a7204f9027020475eb977a 100644 (file)
@@ -67,7 +67,7 @@ it('should show the db warning message', () => {
 
 function renderGlobalFooter(
   props: Partial<FCProps<typeof GlobalFooter>> = {},
-  appStateOverride: Partial<AppState> = {}
+  appStateOverride: Partial<AppState> = {},
 ) {
   return renderComponent(<GlobalFooter {...props} />, '/', {
     appState: mockAppState({
index 0ef752c29be4eccbb3e87d025b1548d52459e9bc..1c815988f4f0612d8d6cee70a8715d09dd6a0146 100644 (file)
@@ -64,7 +64,7 @@ function renderKeyboardShortcutsModal() {
     <>
       <KeyboardShortcutsModal />
       <input type="text" />
-    </>
+    </>,
   );
 }
 
index d04c07c03f28dc36abb99f5b44dcdd98d917c35c..7a7a5bd6c4ed299e7b65a79289f033b3ff17c270 100644 (file)
@@ -63,7 +63,7 @@ it('should render correctly if system is starting', () => {
   renderMigrationContainer();
 
   expect(
-    byText('/maintenance?return_to=%2Fprojects%3Fquery%3Dtoto%23hash').get()
+    byText('/maintenance?return_to=%2Fprojects%3Fquery%3Dtoto%23hash').get(),
   ).toBeInTheDocument();
 });
 
index 89711a0edbaa02d2eee8cd3c549c53a687ab607a..568ee6fbbb28b23ba012c7912c3e9660369d5a13 100644 (file)
@@ -32,7 +32,7 @@ function Child() {
 
 it('should render correctly for an user that does not have access to all children', () => {
   renderNonAdminPagesContainer(
-    mockComponent({ qualifier: ComponentQualifier.Application, canBrowseAllChildProjects: false })
+    mockComponent({ qualifier: ComponentQualifier.Application, canBrowseAllChildProjects: false }),
   );
   expect(screen.getByText('application.cannot_access_all_child_projects1')).toBeInTheDocument();
 });
@@ -52,6 +52,6 @@ function renderNonAdminPagesContainer(component: Component) {
           </Route>
         </Routes>
       </MemoryRouter>
-    </ComponentContext.Provider>
+    </ComponentContext.Provider>,
   );
 }
index 4d5a81df5a45241523cb3f409ebdbb80a08a2c12..6d55922119dd2d88260bdebf37bec2e02e08f63d 100644 (file)
@@ -91,7 +91,7 @@ function renderPluginRiskConsent(props: Partial<PluginRiskConsentProps> = {}) {
       currentUser={mockLoggedInUser({ permissions: { global: ['admin'] } })}
       router={mockRouter()}
       {...props}
-    />
+    />,
   );
 }
 
index 90095b105b19799c1f72eba440171f1612638447..6d6823bf780e5ffa63ac5fca8c926ff090646c88 100644 (file)
@@ -69,7 +69,7 @@ it('should add item to history', () => {
   RecentHistory.add('bar', 'Bar', 'VW');
   expect(save).toHaveBeenCalledWith(
     'sonar_recent_history',
-    JSON.stringify([{ key: 'bar', name: 'Bar', icon: 'VW' }, ...history])
+    JSON.stringify([{ key: 'bar', name: 'Bar', icon: 'VW' }, ...history]),
   );
 });
 
@@ -82,7 +82,7 @@ it('should keep 10 items maximum', () => {
   RecentHistory.add('bar', 'Bar', 'VW');
   expect(save).toHaveBeenCalledWith(
     'sonar_recent_history',
-    JSON.stringify([{ key: 'bar', name: 'Bar', icon: 'VW' }, ...history.slice(0, 9)])
+    JSON.stringify([{ key: 'bar', name: 'Bar', icon: 'VW' }, ...history.slice(0, 9)]),
   );
 });
 
@@ -95,6 +95,6 @@ it('should remove component from history', () => {
   RecentHistory.remove('key-5');
   expect(save).toHaveBeenCalledWith(
     'sonar_recent_history',
-    JSON.stringify([...history.slice(0, 5), ...history.slice(6)])
+    JSON.stringify([...history.slice(0, 5), ...history.slice(6)]),
   );
 });
index e091c590e086da52160077ef8d452728b9ccc846..20e9dd54c1c2746c660680ab864e170d26ee7cd7 100644 (file)
@@ -74,13 +74,13 @@ it('should allow the user to accept the binding request', async () => {
   renderSonarLintConnection();
 
   expect(
-    await screen.findByRole('heading', { name: 'sonarlint-connection.request.title' })
+    await screen.findByRole('heading', { name: 'sonarlint-connection.request.title' }),
   ).toBeInTheDocument();
 
   await user.click(screen.getByRole('button', { name: 'sonarlint-connection.request.action' }));
 
   expect(
-    await screen.findByText('sonarlint-connection.success.description', { exact: false })
+    await screen.findByText('sonarlint-connection.success.description', { exact: false }),
   ).toBeInTheDocument();
 });
 
@@ -91,11 +91,11 @@ it('should handle token generation errors', async () => {
   renderSonarLintConnection();
 
   await user.click(
-    await screen.findByRole('button', { name: 'sonarlint-connection.request.action' })
+    await screen.findByRole('button', { name: 'sonarlint-connection.request.action' }),
   );
 
   expect(
-    await screen.findByText('sonarlint-connection.token-error.description')
+    await screen.findByText('sonarlint-connection.token-error.description'),
   ).toBeInTheDocument();
 });
 
@@ -106,11 +106,11 @@ it('should handle connection errors', async () => {
   renderSonarLintConnection();
 
   await user.click(
-    await screen.findByRole('button', { name: 'sonarlint-connection.request.action' })
+    await screen.findByRole('button', { name: 'sonarlint-connection.request.action' }),
   );
 
   expect(
-    await screen.findByText('sonarlint-connection.connection-error.description')
+    await screen.findByText('sonarlint-connection.connection-error.description'),
   ).toBeInTheDocument();
 
   const tokenValue = tokenMock.getLastToken()?.token ?? '';
@@ -129,11 +129,11 @@ it('should let the user copy the token if the port is not valid', async () => {
   renderSonarLintConnection({ port: '' });
 
   await user.click(
-    await screen.findByRole('button', { name: 'sonarlint-connection.request.action' })
+    await screen.findByRole('button', { name: 'sonarlint-connection.request.action' }),
   );
 
   expect(
-    await screen.findByText('sonarlint-connection.connection-error.description')
+    await screen.findByText('sonarlint-connection.connection-error.description'),
   ).toBeInTheDocument();
 });
 
index 06f745cb907b3833285bea5f8b18b91e23b1e73b..2c217be2caf84d453650dbfbec8b6f24f6f7a934 100644 (file)
@@ -95,7 +95,7 @@ function renderStartupModal(props: Partial<StartupModal['props']> = {}) {
       {...props}
     >
       <div />
-    </StartupModal>
+    </StartupModal>,
   );
 }
 
index 429b0d4a1e940bc9ca83387480f569af1dd37af9..6b7f29c9879caa1b805672cc0c8a5031c5c20cd4 100644 (file)
@@ -97,6 +97,6 @@ function renderSystemAnnouncement() {
   return renderComponent(
     <AvailableFeaturesContext.Provider value={[Feature.Announcement]}>
       <SystemAnnouncement />
-    </AvailableFeaturesContext.Provider>
+    </AvailableFeaturesContext.Provider>,
   );
 }
index ab133277074c2c8c0fa2d571dadca9f84eb36a8e..b241258efb5d036c290adcdf3fad5e9eb63bde77 100644 (file)
@@ -22,7 +22,7 @@ import { useOutletContext } from 'react-router-dom';
 import { AdminPagesContext } from '../../../types/admin';
 
 export default function withAdminPagesOutletContext(
-  WrappedComponent: React.ComponentType<AdminPagesContext>
+  WrappedComponent: React.ComponentType<AdminPagesContext>,
 ) {
   return function WithAdminPagesOutletContext() {
     const { adminPages } = useOutletContext<AdminPagesContext>();
index 5bd6de482ce8e7ba2391e14091f6f1e33317726f..1dc86de5a8c0926b5b7dcac015683d6fa684d397 100644 (file)
@@ -27,7 +27,7 @@ export interface WithAppStateContextProps {
 }
 
 export default function withAppStateContext<P>(
-  WrappedComponent: React.ComponentType<P & WithAppStateContextProps>
+  WrappedComponent: React.ComponentType<P & WithAppStateContextProps>,
 ) {
   return class WithAppStateContext extends React.PureComponent<
     Omit<P, keyof WithAppStateContextProps>
index d39af4f151c8f4c6893c861c34b8e30773914653..d81dc252fd030e073164ffff3175665e8bce14d3 100644 (file)
@@ -27,7 +27,7 @@ export interface WithAvailableFeaturesProps {
 }
 
 export default function withAvailableFeatures<P>(
-  WrappedComponent: React.ComponentType<P & WithAvailableFeaturesProps>
+  WrappedComponent: React.ComponentType<P & WithAvailableFeaturesProps>,
 ) {
   return class WithAvailableFeatures extends React.PureComponent<
     Omit<P, keyof WithAvailableFeaturesProps>
index 606967b93182cb9e421812752ea149b58d8f1d71..8d5049869d9a1b9922eb6b7f2310e2e8bf3f30ed 100644 (file)
@@ -23,7 +23,7 @@ import { ComponentContextShape } from '../../../types/component';
 import { ComponentContext } from './ComponentContext';
 
 export default function withComponentContext<P extends Partial<ComponentContextShape>>(
-  WrappedComponent: React.ComponentType<P>
+  WrappedComponent: React.ComponentType<P>,
 ) {
   return class WithComponentContext extends React.PureComponent<
     Omit<P, keyof ComponentContextShape>
index 9f0e85ba96dc0f73968a48b4a4bc21e5ab81bf6d..c3695f1f88ec598662af980138d1acbaad0bf479 100644 (file)
@@ -22,7 +22,7 @@ import { getWrappedDisplayName } from '../../../components/hoc/utils';
 import { CurrentUserContext, CurrentUserContextInterface } from './CurrentUserContext';
 
 export default function withCurrentUserContext<P>(
-  WrappedComponent: React.ComponentType<P & Pick<CurrentUserContextInterface, 'currentUser'>>
+  WrappedComponent: React.ComponentType<P & Pick<CurrentUserContextInterface, 'currentUser'>>,
 ) {
   return class WithCurrentUserContext extends React.PureComponent<
     Omit<P, 'currentUser' | 'updateCurrentUserHomepage' | 'updateDismissedNotices'>
index 179d690caa94cd9a430ec12446d75a46cb6defdb..816fb52b78e462000c5cb1c69ffb80ca4e9fb8e8 100644 (file)
@@ -138,5 +138,5 @@ class Extension extends React.PureComponent<ExtensionProps, State> {
 }
 
 export default injectIntl(
-  withRouter(withTheme(withAppStateContext(withCurrentUserContext(withQueryClient(Extension)))))
+  withRouter(withTheme(withAppStateContext(withCurrentUserContext(withQueryClient(Extension))))),
 );
index 26ed70a56e9fd32bec1c5117bbc4375fcaf8016d..80b73bbab9bfa157fcb20177245d1706e2efa1ae 100644 (file)
@@ -35,7 +35,7 @@ export default function ProjectAdminPageExtension() {
     component &&
     component.configuration &&
     (component.configuration.extensions || []).find(
-      (p) => p.key === `${pluginKey}/${extensionKey}`
+      (p) => p.key === `${pluginKey}/${extensionKey}`,
     );
 
   return extension ? (
index 647e202f81d9e9475305677e404a1d4f04d42a4c..08db46404c1ece6669282a2921cda16530467943 100644 (file)
@@ -54,7 +54,7 @@ beforeAll(() => {
           </button>
         </div>
       );
-    }
+    },
   );
 
   getEnhancedWindow().registerExtension(
@@ -66,7 +66,7 @@ beforeAll(() => {
           el.innerHTML = '';
         };
       }
-    }
+    },
   );
 
   getEnhancedWindow().registerExtension('second-extension', () => {
@@ -87,7 +87,7 @@ it('should render React extensions correctly', async () => {
   await user.click(screen.getByRole('button', { name: 'Click first react' }));
 
   expect(
-    await screen.findByRole('button', { name: 'Click first react change' })
+    await screen.findByRole('button', { name: 'Click first react change' }),
   ).toBeInTheDocument();
 });
 
index 828ccc4fe3731d4f77c390307c4f168edd5aeaf6..ec2959b6ec68f9ef23ab13aea977b9afbb2b9505 100644 (file)
@@ -56,7 +56,7 @@ it('should find the extension from props', () => {
 function renderGlobalPageExtension(
   navigateTo: string,
   globalPages: Extension[] = [],
-  params?: GlobalPageExtensionProps['params']
+  params?: GlobalPageExtensionProps['params'],
 ) {
   renderApp(`extension/:pluginKey/:extensionKey`, <GlobalPageExtension params={params} />, {
     appState: mockAppState({ globalPages }),
index 5d7ed345ae88392f803ab2a0d2bfcfaae5e7ec36..4125d6e6dcbf49fa2e1a83b4d8811e7982ede974 100644 (file)
@@ -39,7 +39,7 @@ it('should render correctly when the extension is found', () => {
     mockComponent({
       configuration: { extensions: [{ key: 'pluginId/extensionId', name: 'name' }] },
     }),
-    { pluginKey: 'pluginId', extensionKey: 'extensionId' }
+    { pluginKey: 'pluginId', extensionKey: 'extensionId' },
   );
   expect(getExtensionStart).toHaveBeenCalledWith('pluginId/extensionId');
 });
@@ -47,7 +47,7 @@ it('should render correctly when the extension is found', () => {
 it('should render correctly when the extension is not found', () => {
   renderProjectAdminPageExtension(
     mockComponent({ extensions: [{ key: 'pluginId/extensionId', name: 'name' }] }),
-    { pluginKey: 'not-found-plugin', extensionKey: 'not-found-extension' }
+    { pluginKey: 'not-found-plugin', extensionKey: 'not-found-extension' },
   );
   expect(screen.getByText('page_not_found')).toBeInTheDocument();
 });
@@ -57,7 +57,7 @@ function renderProjectAdminPageExtension(
   params: {
     extensionKey: string;
     pluginKey: string;
-  }
+  },
 ) {
   const { pluginKey, extensionKey } = params;
   const queryClient = new QueryClient();
@@ -74,6 +74,6 @@ function renderProjectAdminPageExtension(
           </ComponentContext.Provider>
         </IntlProvider>
       </HelmetProvider>
-    </QueryClientProvider>
+    </QueryClientProvider>,
   );
 }
index d61aeee9739ed7cea54f20e58d929533e44c3be7..d606f15c3fb64774e9ea0f1fd1d239da59820149 100644 (file)
@@ -50,7 +50,7 @@ it('should not render when no component is passed', () => {
 it('should render correctly when the extension is found', async () => {
   renderProjectPageExtension(
     mockComponent({ extensions: [{ key: 'pluginId/extensionId', name: 'name' }] }),
-    { params: { pluginKey: 'pluginId', extensionKey: 'extensionId' } }
+    { params: { pluginKey: 'pluginId', extensionKey: 'extensionId' } },
   );
   await waitFor(() => expect(getExtensionStart).toHaveBeenCalledWith('pluginId/extensionId'));
 });
@@ -58,14 +58,14 @@ it('should render correctly when the extension is found', async () => {
 it('should render correctly when the extension is not found', async () => {
   renderProjectPageExtension(
     mockComponent({ extensions: [{ key: 'pluginId/extensionId', name: 'name' }] }),
-    { params: { pluginKey: 'not-found-plugin', extensionKey: 'not-found-extension' } }
+    { params: { pluginKey: 'not-found-plugin', extensionKey: 'not-found-extension' } },
   );
   expect(await screen.findByText('page_not_found')).toBeInTheDocument();
 });
 
 function renderProjectPageExtension(
   component?: Component,
-  props?: Partial<ProjectPageExtensionProps>
+  props?: Partial<ProjectPageExtensionProps>,
 ) {
   const queryClient = new QueryClient();
   return render(
@@ -89,6 +89,6 @@ function renderProjectPageExtension(
           </ComponentContext.Provider>
         </IntlProvider>
       </HelmetProvider>
-    </QueryClientProvider>
+    </QueryClientProvider>,
   );
 }
index fb1ef0017e37f71eeda7532175bad80f6a0fd1d1..8eb9dbffc42d82e78523f717d29b3f3251b83816 100644 (file)
@@ -66,7 +66,7 @@ export default function GlobalSearchResults(props: Props): React.ReactElement<Pr
             )}
             <ItemDivider />
           </ul>
-        </li>
+        </li>,
       );
     }
   });
index 1840a9178a97fb7f4b5f68d90640745ea77bb3eb..2c330531e55533f0b32b18b0f9ddc2ade2dddb78 100644 (file)
@@ -70,7 +70,7 @@ export default class IndexationNotificationHelper {
 
   static shouldDisplayCompletedNotification() {
     return JSON.parse(
-      get(LS_INDEXATION_COMPLETED_NOTIFICATION_SHOULD_BE_DISPLAYED) || false.toString()
+      get(LS_INDEXATION_COMPLETED_NOTIFICATION_SHOULD_BE_DISPLAYED) || false.toString(),
     );
   }
 }
index db92ceaf415e1be1398f9fefa54c0e994b35d6ec..58c1cd912bf5b9df151a3e71e527fcff88952cc5 100644 (file)
@@ -87,7 +87,7 @@ function renderCompletedWithFailureBanner() {
         values={{
           link: renderBackgroundTasksPageLink(
             true,
-            translate('indexation.completed_with_error.link')
+            translate('indexation.completed_with_error.link'),
           ),
         }}
       />
@@ -113,7 +113,7 @@ function renderInProgressBanner(completedCount: number, total: number) {
         {translateWithParameters(
           'indexation.progression',
           completedCount.toString(),
-          total.toString()
+          total.toString(),
         )}
       </span>
 
@@ -150,12 +150,12 @@ function renderInProgressWithFailureBanner(completedCount: number, total: number
           defaultMessage={translateWithParameters(
             'indexation.progression_with_error',
             completedCount.toString(),
-            total.toString()
+            total.toString(),
           )}
           values={{
             link: renderBackgroundTasksPageLink(
               true,
-              translate('indexation.progression_with_error.link')
+              translate('indexation.progression_with_error.link'),
             ),
           }}
         />
index f59a04ab5256f73ed82f198358ff8e2a6ff48026..b0581903a6552212a9bb82963b33de6e619c8f4d 100644 (file)
@@ -45,7 +45,7 @@ export class PageUnavailableDueToIndexation extends React.PureComponent<WithInde
             <span className="sw-ml-1">
               <FormattedMessage
                 defaultMessage={translate(
-                  'indexation.page_unavailable.description.additional_information'
+                  'indexation.page_unavailable.description.additional_information',
                 )}
                 id="indexation.page_unavailable.description.additional_information"
                 values={{
index 71e9474b659daecfadcda84d051716730c1774b1..0c7d1eb9e2a700d861ef363247262e648bc4ea28 100644 (file)
@@ -70,7 +70,7 @@ function renderIndexationContextProvider(props?: IndexationContextProviderProps)
   return renderComponent(
     <IndexationContextProvider appState={mockAppState({ needIssueSync: true, ...props?.appState })}>
       <TestComponent />
-    </IndexationContextProvider>
+    </IndexationContextProvider>,
   );
 }
 
index da8f78d54f1d3cc408f96fa76c037011825b7c2a..0c379cdae0fcfc56016fca215e5e47aa3ff351ad 100644 (file)
@@ -43,7 +43,7 @@ describe('Completed banner', () => {
         indexationContext={{
           status: { completedCount: 23, hasFailures: false, isCompleted: true, total: 42 },
         }}
-      />
+      />,
     );
 
     expect(IndexationNotificationHelper.shouldDisplayCompletedNotification).toHaveBeenCalled();
@@ -100,7 +100,7 @@ describe('Completed banner', () => {
         indexationContext={{
           status: { completedCount: 23, hasFailures: true, isCompleted: false, total: 42 },
         }}
-      />
+      />,
     );
 
     expect(byText('indexation.progression_with_error').get()).toBeInTheDocument();
@@ -111,7 +111,7 @@ describe('Completed banner', () => {
         indexationContext={{
           status: { completedCount: 23, hasFailures: true, isCompleted: true, total: 42 },
         }}
-      />
+      />,
     );
     expect(byText('indexation.completed_with_error').get()).toBeInTheDocument();
   });
@@ -131,7 +131,7 @@ describe('Completed banner', () => {
         indexationContext={{
           status: { completedCount: 23, hasFailures: false, isCompleted: true, total: 42 },
         }}
-      />
+      />,
     );
     expect(IndexationNotificationHelper.shouldDisplayCompletedNotification).toHaveBeenCalled();
   });
@@ -156,6 +156,6 @@ function renderIndexationNotification(props?: Partial<IndexationNotification['pr
         status: { completedCount: 23, hasFailures: false, isCompleted: false, total: 42 },
       }}
       {...props}
-    />
+    />,
   );
 }
index c58dc4927da5f78ecc386fb5e9b65229dddba329..b2a3116c2aedab1ea0a92962be0beb41352b6fb3 100644 (file)
@@ -46,7 +46,7 @@ it('should not refresh the page once the indexation is complete if there were fa
       indexationContext={{
         status: { hasFailures: true, isCompleted: true },
       }}
-    />
+    />,
   );
 
   expect(reload).not.toHaveBeenCalled();
@@ -69,7 +69,7 @@ it('should refresh the page once the indexation is complete if there were NO fai
       indexationContext={{
         status: { hasFailures: false, isCompleted: true },
       }}
-    />
+    />,
   );
 
   expect(reload).toHaveBeenCalled();
@@ -81,6 +81,6 @@ function renderPageUnavailableToIndexation() {
       indexationContext={{
         status: { completedCount: 23, hasFailures: false, isCompleted: false, total: 42 },
       }}
-    />
+    />,
   );
 }
index 4d11c97021d5ff25baa55f08ae6228b404d71742..9b18b56b785c763edb967db377dbe93b9437b421 100644 (file)
@@ -44,7 +44,7 @@ function renderLanguagesContextProvider() {
   return renderComponent(
     <LanguagesContextProvider>
       <Consumer />
-    </LanguagesContextProvider>
+    </LanguagesContextProvider>,
   );
 }
 
index 02a5d7cccd35c6a79634de6401a7213ee4175ce0..f12107b3a52907b6d2d390cb3adf006b28797576 100644 (file)
@@ -27,7 +27,7 @@ export interface WithLanguagesContextProps {
 }
 
 export default function withLanguagesContext<P>(
-  WrappedComponent: React.ComponentType<P & WithLanguagesContextProps>
+  WrappedComponent: React.ComponentType<P & WithLanguagesContextProps>,
 ) {
   return class WithLanguagesContext extends React.PureComponent<
     Omit<P, keyof WithLanguagesContextProps>
index 589ccd31d03cdd05691ccf411acb89995527c32b..5fb127a111896e06014d2890eca1b048b8ae0b01 100644 (file)
@@ -45,7 +45,7 @@ function renderMetricsContextProvider() {
   return renderComponent(
     <MetricsContextProvider>
       <Consumer />
-    </MetricsContextProvider>
+    </MetricsContextProvider>,
   );
 }
 
index 178259642a7926c837ff36006d177f1b1c28b4a0..e17c3247762ab98add2be5c0d3574726a1396cdf 100644 (file)
@@ -27,7 +27,7 @@ export interface WithMetricsContextProps {
 }
 
 export default function withMetricsContext<P>(
-  WrappedComponent: React.ComponentType<P & WithMetricsContextProps>
+  WrappedComponent: React.ComponentType<P & WithMetricsContextProps>,
 ) {
   return class WithMetricsContext extends React.PureComponent<
     Omit<P, keyof WithMetricsContextProps>
index 0c4e6f66c85d4c1452db91e3cf54b38830b7ceeb..f855dbff147b3bd0fb2e57725af6ccad4587a0e9 100644 (file)
@@ -43,7 +43,7 @@ export function AnalysisLicenseError(props: Props) {
       <>
         {translateWithParameters(
           'component_navigation.status.last_blocked_due_to_bad_license_X',
-          translate('qualifier', currentTask.componentQualifier ?? ComponentQualifier.Project)
+          translate('qualifier', currentTask.componentQualifier ?? ComponentQualifier.Project),
         )}
       </>
     );
index f4d5ad90e94ed0f95ad11364fdc51e95c43bc97d..0ce833f0bba096d8cfda764ef8bcd6c9634974a9 100644 (file)
@@ -31,7 +31,7 @@ export interface ComponentNavProjectBindingErrorNotifProps {
 }
 
 export default function ComponentNavProjectBindingErrorNotif(
-  props: ComponentNavProjectBindingErrorNotifProps
+  props: ComponentNavProjectBindingErrorNotifProps,
 ) {
   const { component } = props;
   let action;
index d011f9d949e6ddec1f607ca80513cee251510bab..03d341ff57148c8062d32626fbbdc4ab4ebeb862 100644 (file)
@@ -80,7 +80,7 @@ export function Menu(props: Props) {
   };
 
   const isGovernanceEnabled = extensions.some((extension) =>
-    extension.key.startsWith('governance/')
+    extension.key.startsWith('governance/'),
   );
 
   const getQuery = (): Query => {
@@ -93,7 +93,7 @@ export function Menu(props: Props) {
         <Tooltip
           overlay={translateWithParameters(
             'layout.all_project_must_be_accessible',
-            translate('qualifier', qualifier)
+            translate('qualifier', qualifier),
           )}
         >
           <a aria-disabled="true" className="disabled-link">
@@ -211,7 +211,7 @@ export function Menu(props: Props) {
     }
 
     const hasSecurityReportsEnabled = extensions.some((extension) =>
-      extension.key.startsWith('securityreport/')
+      extension.key.startsWith('securityreport/'),
     );
 
     if (!hasSecurityReportsEnabled) {
@@ -237,7 +237,7 @@ export function Menu(props: Props) {
       query,
       isProject(qualifier),
       isApplication(qualifier),
-      isPortfolioLike(qualifier)
+      isPortfolioLike(qualifier),
     );
     if (!adminLinks.some((link) => link != null)) {
       return null;
@@ -273,7 +273,7 @@ export function Menu(props: Props) {
     query: Query,
     isProject: boolean,
     isApplication: boolean,
-    isPortfolio: boolean
+    isPortfolio: boolean,
   ) => {
     return [
       renderSettingsLink(query, isApplication, isPortfolio),
@@ -524,7 +524,7 @@ export function Menu(props: Props) {
     const query = getQuery();
     const withoutSecurityExtension = extensions.filter(
       (extension) =>
-        !extension.key.startsWith('securityreport/') && !extension.key.startsWith('governance/')
+        !extension.key.startsWith('securityreport/') && !extension.key.startsWith('governance/'),
     );
 
     if (withoutSecurityExtension.length === 0) {
index c7adb1be8435542e3d00c12767fc495ddd274184..932aac817eb9a947ad60e37be3c4c8045d041cea 100644 (file)
@@ -47,7 +47,7 @@ it('should work for errors on Pull Requests', async () => {
       currentTask: mockTask({ pullRequest: '01', pullRequestTitle: 'Fix stuff' }),
     },
     undefined,
-    'pullRequest=01&id=my-project'
+    'pullRequest=01&id=my-project',
   );
 
   expect(await screen.findByText(/component_navigation.status.failed_X/)).toBeInTheDocument();
@@ -68,7 +68,7 @@ it('should explain to admins how to get the staktrace', () => {
     {
       component: mockComponent({ configuration: { showBackgroundTasks: true } }),
     },
-    'project/background_tasks'
+    'project/background_tasks',
   );
 
   expect(screen.getByText(/component_navigation.status.failed_X.admin.help/)).toBeInTheDocument();
@@ -78,7 +78,7 @@ it('should explain to admins how to get the staktrace', () => {
 function renderAnalysisErrorMessage(
   overrides: Partial<Parameters<typeof AnalysisErrorMessage>[0]> = {},
   location = '/',
-  params?: string
+  params?: string,
 ) {
   return renderApp(
     location,
@@ -88,6 +88,6 @@ function renderAnalysisErrorMessage(
       onLeave={jest.fn()}
       {...overrides}
     />,
-    { navigateTo: params ? `/?${params}` : undefined, featureList: [Feature.BranchSupport] }
+    { navigateTo: params ? `/?${params}` : undefined, featureList: [Feature.BranchSupport] },
   );
 }
index 5405df2ec92ad4a462fe768e9dc1318517ac0a6d..6eb2a8a61673f90a72afa0be67e8e2acb66d0c9e 100644 (file)
@@ -36,8 +36,8 @@ it('should handle a valid license', async () => {
 
   expect(
     await screen.findByText(
-      'component_navigation.status.last_blocked_due_to_bad_license_X.qualifier.TRK'
-    )
+      'component_navigation.status.last_blocked_due_to_bad_license_X.qualifier.TRK',
+    ),
   ).toBeInTheDocument();
 });
 
@@ -59,18 +59,18 @@ it('should send provide a link to the admin', async () => {
     {
       currentTask: mockTask({ errorMessage, errorType: 'error-type' }),
     },
-    true
+    true,
   );
 
   expect(
-    await screen.findByText('license.component_navigation.button.error-type.')
+    await screen.findByText('license.component_navigation.button.error-type.'),
   ).toBeInTheDocument();
   expect(screen.getByText(errorMessage)).toBeInTheDocument();
 });
 
 function renderAnalysisLicenseError(
   overrides: Partial<Parameters<typeof AnalysisLicenseError>[0]> = {},
-  canAdmin = false
+  canAdmin = false,
 ) {
   return renderApp('/', <AnalysisLicenseError currentTask={mockTask()} {...overrides} />, {
     appState: mockAppState({ canAdmin }),
index a3b5a039a84b6b3c1bb66c19f6d58584bca1fa03..b184d09f82a81041c485c8af78c6198341671dbf 100644 (file)
@@ -30,21 +30,21 @@ import ComponentNav, { ComponentNavProps } from '../ComponentNav';
 it('renders correctly when there is a background task in progress', () => {
   renderComponentNav({ isInProgress: true });
   expect(
-    screen.getByText('project_navigation.analysis_status.in_progress', { exact: false })
+    screen.getByText('project_navigation.analysis_status.in_progress', { exact: false }),
   ).toBeInTheDocument();
 });
 
 it('renders correctly when there is a background task pending', () => {
   renderComponentNav({ isPending: true });
   expect(
-    screen.getByText('project_navigation.analysis_status.pending', { exact: false })
+    screen.getByText('project_navigation.analysis_status.pending', { exact: false }),
   ).toBeInTheDocument();
 });
 
 it('renders correctly when there is a failing background task', () => {
   renderComponentNav({ currentTask: mockTask({ status: TaskStatuses.Failed }) });
   expect(
-    screen.getByText('project_navigation.analysis_status.failed', { exact: false })
+    screen.getByText('project_navigation.analysis_status.failed', { exact: false }),
   ).toBeInTheDocument();
 });
 
@@ -53,7 +53,7 @@ it('renders correctly when the project binding is incorrect', () => {
     projectBindingErrors: mockProjectAlmBindingConfigurationErrors(),
   });
   expect(
-    screen.getByText('component_navigation.pr_deco.error_detected_X', { exact: false })
+    screen.getByText('component_navigation.pr_deco.error_detected_X', { exact: false }),
   ).toBeInTheDocument();
 });
 
@@ -73,6 +73,6 @@ function renderComponentNav(props: Partial<ComponentNavProps> = {}) {
       isInProgress={false}
       isPending={false}
       {...props}
-    />
+    />,
   );
 }
index 2ec27b6f16abf994081c760069f5073c83c9b00a..9e111dc4d2e7dab8a05bf0b8a3de612967f293db 100644 (file)
@@ -32,7 +32,7 @@ it('should not show a link if use is not allowed', () => {
   expect(
     screen.queryByRole('link', {
       name: 'component_navigation.pr_deco.action.check_project_settings',
-    })
+    }),
   ).not.toBeInTheDocument();
 });
 
@@ -41,14 +41,16 @@ it('should show a link if use is allowed', () => {
     component: mockComponent({ configuration: { showSettings: true } }),
   });
   expect(
-    screen.getByRole('link', { name: 'component_navigation.pr_deco.action.check_project_settings' })
+    screen.getByRole('link', {
+      name: 'component_navigation.pr_deco.action.check_project_settings',
+    }),
   ).toBeInTheDocument();
 });
 
 function renderComponentNavProjectBindingErrorNotif(
-  props: Partial<ComponentNavProjectBindingErrorNotifProps> = {}
+  props: Partial<ComponentNavProjectBindingErrorNotifProps> = {},
 ) {
   return renderComponent(
-    <ComponentNavProjectBindingErrorNotif component={mockComponent()} {...props} />
+    <ComponentNavProjectBindingErrorNotif component={mockComponent()} {...props} />,
   );
 }
index 0d22beda1d89b634b34beca20ea9a597027faed6..4896296810237dbda15e139cf6b407d6a0c48c24 100644 (file)
@@ -51,7 +51,7 @@ it('should render correctly when there is only 1 branch', async () => {
   expect(await screen.findByLabelText('help-tooltip')).toBeInTheDocument();
   expect(screen.getByText('project')).toBeInTheDocument();
   expect(
-    await screen.findByRole('button', { name: 'master overview.quality_gate_x.OK' })
+    await screen.findByRole('button', { name: 'master overview.quality_gate_x.OK' }),
   ).toBeDisabled();
 });
 
@@ -60,7 +60,7 @@ it('should render correctly when there are multiple branch', async () => {
   renderHeader();
 
   expect(
-    await screen.findByRole('button', { name: 'main overview.quality_gate_x.OK' })
+    await screen.findByRole('button', { name: 'main overview.quality_gate_x.OK' }),
   ).toBeEnabled();
 
   expect(screen.queryByLabelText('help-tooltip')).not.toBeInTheDocument();
@@ -70,19 +70,19 @@ it('should render correctly when there are multiple branch', async () => {
   expect(
     screen.getByRole('menuitem', {
       name: '03 – TEST-193 dumb commit overview.quality_gate_x.ERROR ERROR',
-    })
+    }),
   ).toBeInTheDocument();
   expect(
     screen.getByRole('menuitem', {
       name: '01 – TEST-191 update master overview.quality_gate_x.OK OK',
-    })
+    }),
   ).toBeInTheDocument();
   expect(
-    screen.getByRole('menuitem', { name: 'normal-branch overview.quality_gate_x.ERROR ERROR' })
+    screen.getByRole('menuitem', { name: 'normal-branch overview.quality_gate_x.ERROR ERROR' }),
   ).toBeInTheDocument();
 
   await user.click(
-    screen.getByRole('menuitem', { name: 'normal-branch overview.quality_gate_x.ERROR ERROR' })
+    screen.getByRole('menuitem', { name: 'normal-branch overview.quality_gate_x.ERROR ERROR' }),
   );
   expect(screen.getByText('/dashboard?branch=normal-branch&id=header-project')).toBeInTheDocument();
 });
@@ -102,7 +102,7 @@ it('should show manage branch and pull request button for admin', async () => {
   expect(screen.getByRole('link', { name: 'branch_like_navigation.manage' })).toBeInTheDocument();
   expect(screen.getByRole('link', { name: 'branch_like_navigation.manage' })).toHaveAttribute(
     'href',
-    '/project/branches?id=header-project'
+    '/project/branches?id=header-project',
   );
 });
 
@@ -113,7 +113,7 @@ it('should render favorite button if the user is logged in', async () => {
 
   await user.click(screen.getByRole('button', { name: 'favorite.action.TRK.add' }));
   expect(
-    await screen.findByRole('button', { name: 'favorite.action.TRK.remove' })
+    await screen.findByRole('button', { name: 'favorite.action.TRK.remove' }),
   ).toBeInTheDocument();
 
   await user.click(screen.getByRole('button', { name: 'favorite.action.TRK.remove' }));
@@ -130,12 +130,12 @@ it.each([['github'], ['gitlab'], ['bitbucket'], ['azure']])(
         currentUser: mockLoggedInUser(),
       },
       undefined,
-      'pullRequest=1001&id=compa'
+      'pullRequest=1001&id=compa',
     );
     const image = await screen.findByAltText(alm);
     expect(image).toBeInTheDocument();
     expect(image).toHaveAttribute('src', `/images/alm/${alm}.svg`);
-  }
+  },
 );
 
 it('should show the correct help tooltip for applications', async () => {
@@ -167,20 +167,20 @@ it('should show the correct help tooltip when branch support is not enabled', as
     {
       currentUser: mockLoggedInUser(),
     },
-    []
+    [],
   );
   expect(
-    await screen.findByText('branch_like_navigation.no_branch_support.title.mr')
+    await screen.findByText('branch_like_navigation.no_branch_support.title.mr'),
   ).toBeInTheDocument();
   expect(
-    screen.getByText('branch_like_navigation.no_branch_support.content_x.mr.alm.gitlab')
+    screen.getByText('branch_like_navigation.no_branch_support.content_x.mr.alm.gitlab'),
   ).toBeInTheDocument();
 });
 
 function renderHeader(
   props?: Partial<HeaderProps>,
   featureList = [Feature.BranchSupport],
-  params?: string
+  params?: string,
 ) {
   return renderApp(
     '/',
@@ -192,6 +192,6 @@ function renderHeader(
       currentUser={mockCurrentUser()}
       {...props}
     />,
-    { featureList, navigateTo: params ? `/?id=header-project&${params}` : '/?id=header-project' }
+    { featureList, navigateTo: params ? `/?id=header-project&${params}` : '/?id=header-project' },
   );
 }
index 3530de943b627f81abadc49ec103cb442ed16069..83d99549942817cc5c8718f70285bfdd6f407772 100644 (file)
@@ -51,7 +51,7 @@ it('should render correctly for a branch with warnings', async () => {
   expect(await screen.findByText('version_x.0.0.1')).toBeInTheDocument();
 
   expect(
-    await screen.findByText('project_navigation.analysis_status.warnings')
+    await screen.findByText('project_navigation.analysis_status.warnings'),
   ).toBeInTheDocument();
 
   await user.click(screen.getByText('project_navigation.analysis_status.details_link'));
@@ -94,7 +94,7 @@ it('should render correctly for a pull request', async () => {
   renderHeaderMeta({}, undefined, 'pullRequest=01&id=my-project');
 
   expect(
-    await screen.findByText('branch_like_navigation.for_merge_into_x_from_y')
+    await screen.findByText('branch_like_navigation.for_merge_into_x_from_y'),
   ).toBeInTheDocument();
   expect(screen.queryByText('version_x.0.0.1')).not.toBeInTheDocument();
 });
@@ -109,7 +109,7 @@ it('should render correctly when the user is not logged in', () => {
 function renderHeaderMeta(
   props: Partial<HeaderMetaProps> = {},
   currentUser: CurrentUser = mockLoggedInUser(),
-  params?: string
+  params?: string,
 ) {
   return renderApp('/', <HeaderMeta component={mockComponent({ version: '0.0.1' })} {...props} />, {
     currentUser,
index 2add79f18e5024ac71189534e24d617d8a716eba..1953d456f1e368666759ea21f64d6bcdc240df67 100644 (file)
@@ -101,7 +101,7 @@ it('should render correctly when on a branch', async () => {
         extensions: [{ key: 'component-foo', name: 'ComponentFoo' }],
       },
     },
-    'branch=normal-branch'
+    'branch=normal-branch',
   );
 
   expect(await screen.findByRole('link', { name: 'overview.page' })).toBeInTheDocument();
@@ -119,7 +119,7 @@ it('should render correctly when on a pull request', async () => {
         extensions: [{ key: 'component-foo', name: 'ComponentFoo' }],
       },
     },
-    'pullRequest=01'
+    'pullRequest=01',
   );
 
   expect(await screen.findByRole('link', { name: 'overview.page' })).toBeInTheDocument();
@@ -127,7 +127,7 @@ it('should render correctly when on a pull request', async () => {
   expect(screen.getByRole('link', { name: 'layout.measures' })).toBeInTheDocument();
 
   expect(
-    screen.queryByRole('link', { name: `layout.settings.${ComponentQualifier.Project}` })
+    screen.queryByRole('link', { name: `layout.settings.${ComponentQualifier.Project}` }),
   ).not.toBeInTheDocument();
   expect(screen.queryByRole('button', { name: 'project.info.title' })).not.toBeInTheDocument();
 });
@@ -169,6 +169,6 @@ function renderMenu(props: Partial<ComponentPropsType<typeof Menu>> = {}, params
       {...props}
     />,
     params ? `/?${params}` : '/',
-    { featureList: [Feature.BranchSupport] }
+    { featureList: [Feature.BranchSupport] },
   );
 }
index c2c7896c91910c76132d21c78c60e1c70a1f13b3..7cf9c7986b9055d7a0cf6c2ea55d2d8211b3cfd7 100644 (file)
@@ -28,8 +28,8 @@ describe('getCurrentPage', () => {
     expect(
       getCurrentPage(
         mockComponent({ key: 'foo', qualifier: ComponentQualifier.Portfolio }),
-        undefined
-      )
+        undefined,
+      ),
     ).toEqual({
       type: 'PORTFOLIO',
       component: 'foo',
@@ -40,8 +40,8 @@ describe('getCurrentPage', () => {
     expect(
       getCurrentPage(
         mockComponent({ key: 'foo', qualifier: ComponentQualifier.SubPortfolio }),
-        undefined
-      )
+        undefined,
+      ),
     ).toEqual({
       type: 'PORTFOLIO',
       component: 'foo',
@@ -52,8 +52,8 @@ describe('getCurrentPage', () => {
     expect(
       getCurrentPage(
         mockComponent({ key: 'foo', qualifier: ComponentQualifier.Application }),
-        mockBranch({ name: 'develop' })
-      )
+        mockBranch({ name: 'develop' }),
+      ),
     ).toEqual({ type: 'APPLICATION', component: 'foo', branch: 'develop' });
   });
 
index 0c42dd26b86f70680b9a3ff1c8668a5411de725c..6173b0a8dc6a2f5266b3542ceed3c067d0f1bdb8 100644 (file)
@@ -73,7 +73,7 @@ export default function BranchHelpTooltip({
             projectBinding != null
               ? translateWithParameters(
                   `branch_like_navigation.no_branch_support.content_x.${isGitLab ? 'mr' : 'pr'}`,
-                  translate('alm', projectBinding.alm)
+                  translate('alm', projectBinding.alm),
                 )
               : translate('branch_like_navigation.no_branch_support.content')
           }
index ec11d362bbe4e92110fbcab544608fe7ec0fa418..6073ba63a1b6a5de8e0630b3380ce009528d8b5c 100644 (file)
@@ -40,7 +40,7 @@ export function CurrentBranchLikeMergeInformation(props: CurrentBranchLikeMergeI
       title={translateWithParameters(
         'branch_like_navigation.for_merge_into_x_from_y.title',
         currentBranchLike.target,
-        currentBranchLike.branch
+        currentBranchLike.branch,
       )}
     >
       <FormattedMessage
index 6b8f94cf2aa2a2e4cc9b5acb13a144de1ed51c34..2dd8976b8187e5f57fb0e9ac7c6f3bbbce404f8a 100644 (file)
@@ -92,7 +92,7 @@ export class Menu extends React.PureComponent<Props, State> {
 
   highlightSiblingBranchlike = (indexDelta: number) => {
     const selectBranchLikeIndex = this.state.branchLikesToDisplay.findIndex((b) =>
-      isSameBranchLike(b, this.state.selectedBranchLike)
+      isSameBranchLike(b, this.state.selectedBranchLike),
     );
     const newIndex = selectBranchLikeIndex + indexDelta;
 
@@ -133,7 +133,7 @@ export class Menu extends React.PureComponent<Props, State> {
       isPullRequest(pr) && (pr.title.toLowerCase().includes(q) || pr.key.toLowerCase().includes(q));
 
     const filteredBranchLikes = this.props.branchLikes.filter(
-      (bl) => filterBranch(bl) || filterPullRequest(bl)
+      (bl) => filterBranch(bl) || filterPullRequest(bl),
     );
 
     this.setState({
index a579af63b49c7cd5f68070ba5d47c5c8b65ceb13..6c81cdc73250847ccdc76069fe10292950613daf 100644 (file)
@@ -142,7 +142,7 @@ class GlobalNavMenu extends React.PureComponent<Props> {
 
   render() {
     const governanceInstalled = this.props.appState.qualifiers.includes(
-      ComponentQualifier.Portfolio
+      ComponentQualifier.Portfolio,
     );
 
     return (
index f2bc2de133f218001d3b7b64087ad6fea986a6f0..66ee594c4d4cbb7d43aae4e4b1c9c7f7f749bdb1 100644 (file)
@@ -95,7 +95,7 @@ export class SettingsNav extends React.PureComponent<Props> {
 
   renderConfigurationTab() {
     const extensionsWithoutSupport = this.props.extensions.filter(
-      (extension) => extension.key !== 'license/support'
+      (extension) => extension.key !== 'license/support',
     );
     return (
       <Dropdown
@@ -234,7 +234,7 @@ export class SettingsNav extends React.PureComponent<Props> {
     const { extensions, pendingPlugins } = this.props;
     const hasSupportExtension = extensions.find((extension) => extension.key === 'license/support');
     const hasGovernanceExtension = extensions.find(
-      (e) => e.key === AdminPageExtension.GovernanceConsole
+      (e) => e.key === AdminPageExtension.GovernanceConsole,
     );
     const totalPendingPlugins =
       pendingPlugins.installing.length +
index 6c93e06ee73fa67a49e1857677da68c7afc6eb2d..684f2153e933fee7a9707b9a83989f21974c9e24 100644 (file)
@@ -86,6 +86,6 @@ function getWrapper(props = {}) {
       refreshPending={() => {}}
       systemStatus="UP"
       {...props}
-    />
+    />,
   );
 }
index b5d4600eb3f61ae807b18e484f42d5e98b33b9e8..fe1cf677498eb9aa363e4bbff32e2933389ead40 100644 (file)
@@ -56,7 +56,7 @@ it('should render correctly when governance is active', () => {
   expect(
     shallowRender({
       extensions: [{ key: AdminPageExtension.GovernanceConsole, name: 'governance' }],
-    })
+    }),
   ).toMatchSnapshot();
 });
 
@@ -70,6 +70,6 @@ function shallowRender(props: Partial<SettingsNav['props']> = {}) {
       pendingPlugins={{ installing: [], removing: [], updating: [] }}
       systemStatus="UP"
       {...props}
-    />
+    />,
   );
 }
index 4f30edf3a9c61620db748b3b22a98703b185ce91..85c551b6783ba190e544b0b13c17cf1fa18de086 100644 (file)
@@ -39,7 +39,7 @@ it('should render correctly', () => {
   expect(
     shallowRender({
       currentUser: mockLoggedInUser({ dismissedNotices: { [NoticeType.SONARLINT_AD]: true } }),
-    })
+    }),
   ).toMatchSnapshot('adAlreadySeen');
   expect(shallowRender({ currentUser: mockLoggedInUser() })).toMatchSnapshot('loggedIn');
 });
@@ -75,6 +75,6 @@ function shallowRender(props: Partial<CurrentUserContextInterface> = {}) {
       updateDismissedNotices={jest.fn()}
       updateCurrentUserHomepage={jest.fn()}
       {...props}
-    />
+    />,
   );
 }
index ea29a9146a31877c0504b12d73aa677279303f72..8d54909c6e0ed58aa641cacfcb9676a0c2e3a41e 100644 (file)
@@ -96,7 +96,7 @@ export class UpdateNotification extends React.PureComponent<Props, State> {
   isPreviousLTSUpdate(
     parsedVersion: number[],
     latestLTS: string,
-    systemUpgrades: GroupedSystemUpdate
+    systemUpgrades: GroupedSystemUpdate,
   ) {
     const [ltsMajor, ltsMinor] = latestLTS.split('.').map(Number);
     let ltsOlderThan6Month = false;
@@ -172,7 +172,7 @@ export class UpdateNotification extends React.PureComponent<Props, State> {
         groupBy(upgrades, (upgrade) => {
           const [, minor] = upgrade.version.split('.');
           return minor;
-        })
+        }),
     );
 
     let useCase = UpdateUseCase.NewMinorVersion;
@@ -190,7 +190,7 @@ export class UpdateNotification extends React.PureComponent<Props, State> {
     const latest = [...upgrades].sort(
       (upgrade1, upgrade2) =>
         new Date(upgrade2.releaseDate || '').getTime() -
-        new Date(upgrade1.releaseDate || '').getTime()
+        new Date(upgrade1.releaseDate || '').getTime(),
     )[0];
 
     const dismissKey = useCase + latest.version;
index 8aefb895618f10e8b692798ec2ad4c7651aed6dd..a3b01520871e7c1dfbd3038fdcddaf94d20075dc 100644 (file)
@@ -190,6 +190,6 @@ function shallowRender(props: Partial<UpdateNotification['props']> = {}) {
       appState={mockAppState()}
       currentUser={mockCurrentUser()}
       {...props}
-    />
+    />,
   );
 }
index 7c9f45d74e75b79f52653436d7947ddd2e1e0ea5..19ec40e317d72b28e65cd32b3404a6156b5981cf 100644 (file)
@@ -27,7 +27,9 @@
   border: 1px solid #ccc;
   border-radius: 3px;
   background-image: linear-gradient(to bottom, #f5f5f5, #eee);
-  box-shadow: inset 0 1px 0 #fff, 0 1px 0 #ccc;
+  box-shadow:
+    inset 0 1px 0 #fff,
+    0 1px 0 #ccc;
   color: var(--secondFontColor);
   font-size: 11px;
   text-align: center;
index e28ed3057f6860972518fc6807589da32c40156b..f97437c5e8c0639fc2becac3b6fdb3d5650b3d91 100644 (file)
@@ -23,7 +23,9 @@ a {
   cursor: pointer;
   outline: none;
   text-decoration: none;
-  transition: border-bottom-color 0.2s ease, color 0.2s ease;
+  transition:
+    border-bottom-color 0.2s ease,
+    color 0.2s ease;
 }
 
 a:hover,
index 1c010d010bf57803a5615d7baf42d6150e1359c3..4ebbca79f882ff454978f35892a90120c1db18b6 100644 (file)
@@ -45,6 +45,6 @@ function renderNavigateWithParams(transformParams: (params: Params) => Dict<stri
         />
         <Route path="*" element={<CatchAll />} />
       </Routes>
-    </MemoryRouter>
+    </MemoryRouter>,
   );
 }
index 904873fe47428428388ef769171ca3d02e33e354..b7122e1dac2dabb3169d5c7ca27f0ad29f9c212b 100644 (file)
@@ -47,6 +47,6 @@ afterAll(() => {
 it('should not render for anonymous user', () => {
   handleRequiredAuthorization();
   expect(replace).toHaveBeenCalledWith(
-    '/sessions/new?return_to=%2Fpath%3Fid%3D12%23tag&authorizationError=true'
+    '/sessions/new?return_to=%2Fpath%3Fid%3D12%23tag&authorizationError=true',
   );
 });
index 8b02cbeab11f717e7140c46a7560e9226fb3ee0b..1b800f04a37d1a2f2dc7dfa2ec0c1bdaa9f5cc5b 100644 (file)
@@ -180,7 +180,7 @@ export default function startReactApp(
   l10nBundle: IntlShape,
   currentUser?: CurrentUser,
   appState?: AppState,
-  availableFeatures?: Feature[]
+  availableFeatures?: Feature[],
 ) {
   exportModulesAsGlobals();
 
@@ -271,6 +271,6 @@ export default function startReactApp(
         </AvailableFeaturesContext.Provider>
       </AppStateContextProvider>
     </HelmetProvider>,
-    el
+    el,
   );
 }
index d167c0e78d750d003ac0b0fb2d773795cada677e..9eae981be686307764a89e5dc162433b716f872a 100644 (file)
@@ -40,7 +40,7 @@ export default function Account() {
         defer={false}
         titleTemplate={translateWithParameters(
           'page_title.template.with_category',
-          translate('my_account.page')
+          translate('my_account.page'),
         )}
       />
       <A11ySkipTarget anchor="account_main" />
index 32567821c963d11ef0ce591751e8a60fc523f3be..83ad1f33153c8381a49fb12b3f3c2e175931b542 100644 (file)
@@ -227,7 +227,7 @@ describe('profile page', () => {
     renderAccountApp(loggedInUser);
 
     expect(
-      await screen.findByText(`${loggedInUser.externalProvider}: ${loggedInUser.externalIdentity}`)
+      await screen.findByText(`${loggedInUser.externalProvider}: ${loggedInUser.externalIdentity}`),
     ).toBeInTheDocument();
   });
 
@@ -270,7 +270,7 @@ describe('security page', () => {
 
       renderAccountApp(
         mockLoggedInUser({ permissions: { global: [Permissions.Scan] } }),
-        securityPagePath
+        securityPagePath,
       );
 
       expect(await screen.findByText('users.tokens')).toBeInTheDocument();
@@ -316,7 +316,7 @@ describe('security page', () => {
       await user.click(generateButton);
 
       expect(
-        await screen.findByText(`users.tokens.new_token_created.${newTokenName}`)
+        await screen.findByText(`users.tokens.new_token_created.${newTokenName}`),
       ).toBeInTheDocument();
       expect(screen.getByRole('button', { name: 'copy_to_clipboard' })).toBeInTheDocument();
 
@@ -328,7 +328,7 @@ describe('security page', () => {
       // eslint-disable-next-line jest/no-conditional-in-test
       expect(screen.getByLabelText('users.new_token')).toHaveTextContent(
         // eslint-disable-next-line jest/no-conditional-in-test
-        lastTokenCreated.token ?? ''
+        lastTokenCreated.token ?? '',
       );
 
       expect(screen.getAllByRole('row')).toHaveLength(4); // 3 tokens + header
@@ -351,13 +351,13 @@ describe('security page', () => {
       await user.click(revokeButtons);
 
       expect(
-        screen.getByRole('heading', { name: 'users.tokens.revoke_label.importantToken' })
+        screen.getByRole('heading', { name: 'users.tokens.revoke_label.importantToken' }),
       ).toBeInTheDocument();
 
       await user.click(screen.getByRole('button', { name: 'yes' }));
 
       await waitFor(() => expect(screen.getAllByRole('row')).toHaveLength(3)); // 2 tokens + header
-    }
+    },
   );
 
   it('should flag expired tokens as such', async () => {
@@ -366,12 +366,12 @@ describe('security page', () => {
         name: 'expired token',
         isExpired: true,
         expirationDate: '2021-01-23T19:25:19+0000',
-      })
+      }),
     );
 
     renderAccountApp(
       mockLoggedInUser({ permissions: { global: [Permissions.Scan] } }),
-      securityPagePath
+      securityPagePath,
     );
 
     expect(await screen.findByText('users.tokens')).toBeInTheDocument();
@@ -383,7 +383,7 @@ describe('security page', () => {
     // unexpired token is not flagged
     const unexpiredTokenRow = screen.getAllByRole('row')[0];
     expect(
-      within(unexpiredTokenRow).queryByText('my_account.tokens.expired')
+      within(unexpiredTokenRow).queryByText('my_account.tokens.expired'),
     ).not.toBeInTheDocument();
   });
 
@@ -393,7 +393,7 @@ describe('security page', () => {
     });
     renderAccountApp(
       mockLoggedInUser({ permissions: { global: [Permissions.Scan] } }),
-      securityPagePath
+      securityPagePath,
     );
 
     selectEvent.openMenu(screen.getByRole('combobox', { name: 'users.tokens.type' }));
@@ -421,7 +421,7 @@ describe('security page', () => {
     });
     renderAccountApp(
       mockLoggedInUser({ permissions: { global: [Permissions.Scan] } }),
-      securityPagePath
+      securityPagePath,
     );
 
     await selectEvent.select(screen.getByRole('combobox', { name: 'users.tokens.type' }), [
@@ -436,7 +436,7 @@ describe('security page', () => {
     renderAccountApp(mockLoggedInUser({ local: true }), securityPagePath);
 
     expect(
-      await screen.findByRole('heading', { name: 'my_profile.password.title' })
+      await screen.findByRole('heading', { name: 'my_profile.password.title' }),
     ).toBeInTheDocument();
 
     const oldPasswordField = screen.getByLabelText('my_profile.password.old', {
@@ -543,7 +543,7 @@ describe('notifications page', () => {
 
     expect(projectUI.sonarQubeProject.get()).toBeInTheDocument();
     expect(
-      projectUI.checkbox(NotificationProjectType.NewFalsePositiveIssue).get()
+      projectUI.checkbox(NotificationProjectType.NewFalsePositiveIssue).get(),
     ).toBeInTheDocument();
 
     await user.click(projectUI.checkbox(NotificationProjectType.NewAlerts).get());
@@ -559,7 +559,7 @@ describe('notifications page', () => {
     renderAccountApp(mockLoggedInUser(), notificationsPagePath);
 
     await user.click(
-      await screen.findByRole('button', { name: 'my_profile.per_project_notifications.add' })
+      await screen.findByRole('button', { name: 'my_profile.per_project_notifications.add' }),
     );
     expect(screen.getByLabelText('search.placeholder', { selector: 'input' })).toBeInTheDocument();
     await user.keyboard('sonarqube');
index 9316ae6c50033f3479509d8d7493ce8169762ca4..d65f1289848586bcd9f565fb12647081f47abcb0 100644 (file)
@@ -39,7 +39,7 @@ interface Props {
 export default class NotificationsList extends React.PureComponent<Props> {
   isEnabled(type: string, channel: string) {
     return !!this.props.notifications.find(
-      (notification) => notification.type === type && notification.channel === channel
+      (notification) => notification.type === type && notification.channel === channel,
     );
   }
 
@@ -73,7 +73,7 @@ export default class NotificationsList extends React.PureComponent<Props> {
                 <Checkbox
                   label={translateWithParameters(
                     'notification.dispatcher.descrption_x',
-                    this.getDispatcherLabel(type)
+                    this.getDispatcherLabel(type),
                   )}
                   checked={this.isEnabled(type, channel)}
                   id={checkboxId(type, channel)}
index f246f0c703a5e62c402257cd4421f74c064e602d..67c88c6e2183665668775921c4db56698b2f86ff 100644 (file)
@@ -146,7 +146,7 @@ export default class ProjectModal extends React.PureComponent<Props, State> {
         if (this.mounted) {
           this.setState({ loading: false, open: false });
         }
-      }
+      },
     );
   };
 
index 028f3ece66a81debd2f29b2784ad911947554859..f4a41668981d44b7eba9461e35a15264d61342c5 100644 (file)
@@ -106,12 +106,12 @@ export default class Projects extends React.PureComponent<Props, State> {
     const { addedProjects, search } = this.state;
 
     const projects = uniqBy(notifications, ({ project }) => project).filter(
-      isNotificationProject
+      isNotificationProject,
     ) as NotificationProject[];
     const notificationsByProject = groupBy(notifications, (n) => n.project);
     const allProjects = uniqBy([...addedProjects, ...projects], (project) => project.project);
     const filteredProjects = sortBy(allProjects, 'projectName').filter((p) =>
-      this.filterSearch(p, search)
+      this.filterSearch(p, search),
     );
     const shouldBeCollapsed = Object.keys(notificationsByProject).length > THRESHOLD_COLLAPSED;
 
index 967e645cc7cf24f30a1bdeffa96c6885be733c18..0f99aad81e889a89be322e72c717a1f31aa4d52c 100644 (file)
@@ -28,7 +28,7 @@ import {
 
 export function Preferences() {
   const [shortcutsPreferenceValue, setShortcutsPreferenceValue] = React.useState(
-    getKeyboardShortcutEnabled()
+    getKeyboardShortcutEnabled(),
   );
 
   const handleToggleKeyboardShortcut = React.useCallback(
@@ -36,7 +36,7 @@ export function Preferences() {
       setKeyboardShortcutEnabled(value);
       setShortcutsPreferenceValue(value);
     },
-    [setShortcutsPreferenceValue]
+    [setShortcutsPreferenceValue],
   );
 
   return (
@@ -53,7 +53,7 @@ export function Preferences() {
                 <FormattedMessage
                   id="my_account.preferences.keyboard_shortcuts.description"
                   defaultMessage={translate(
-                    'my_account.preferences.keyboard_shortcuts.description'
+                    'my_account.preferences.keyboard_shortcuts.description',
                   )}
                   values={{
                     questionMark: (
index 34b3b2c16cc989a986587aa339665dfad013811a..eae33b2857f85c5a1450481710ec87b96eaebae1 100644 (file)
@@ -66,7 +66,7 @@ export default class UserExternalIdentity extends React.PureComponent<
       .then((providers) => {
         if (this.mounted) {
           const identityProvider = providers.find(
-            (provider) => provider.key === this.props.user.externalProvider
+            (provider) => provider.key === this.props.user.externalProvider,
           );
           this.setState({ loading: false, identityProvider });
         }
index dc29d25eaa25792b9027781b5adbe64192dbbb5a..4aff6828e96bccab530e11c0439f144f6311298f 100644 (file)
@@ -44,7 +44,7 @@ export default function ProjectCard({ project }: Props) {
         type,
         url: href,
       };
-    })
+    }),
   );
 
   const { lastAnalysisDate } = project;
index a05fdc35ebb1e1dcb8be372d7e6172858b49a69b..1b909e2a0b51bcdd03880671a6e1343539a40ac0 100644 (file)
@@ -66,7 +66,7 @@ export class AuditApp extends React.PureComponent<Props, State> {
 
   hasGovernanceExtension = () => {
     return Boolean(
-      this.props.adminPages?.find((e) => e.key === AdminPageExtension.GovernanceConsole)
+      this.props.adminPages?.find((e) => e.key === AdminPageExtension.GovernanceConsole),
     );
   };
 
index 1eecde710859bf65ee2b09d42f8143e1040aec24..cbb73cd3b677565391dc0983f4d872962b6eba49 100644 (file)
@@ -84,22 +84,22 @@ it('should handle download button click', async () => {
   expect(downloadButton).toBeInTheDocument();
   expect(downloadButton).toHaveAttribute(
     'href',
-    '/api/audit_logs/download?from=2020-07-21T12%3A00%3A00.000Z&to=2020-07-21T12%3A00%3A00.000Z'
+    '/api/audit_logs/download?from=2020-07-21T12%3A00%3A00.000Z&to=2020-07-21T12%3A00%3A00.000Z',
   );
   await user.click(ui.weekRadio.get());
   expect(downloadButton).toHaveAttribute(
     'href',
-    '/api/audit_logs/download?from=2020-07-14T12%3A00%3A00.000Z&to=2020-07-21T12%3A00%3A00.000Z'
+    '/api/audit_logs/download?from=2020-07-14T12%3A00%3A00.000Z&to=2020-07-21T12%3A00%3A00.000Z',
   );
   await user.click(ui.monthRadio.get());
   expect(downloadButton).toHaveAttribute(
     'href',
-    '/api/audit_logs/download?from=2020-06-21T12%3A00%3A00.000Z&to=2020-07-21T12%3A00%3A00.000Z'
+    '/api/audit_logs/download?from=2020-06-21T12%3A00%3A00.000Z&to=2020-07-21T12%3A00%3A00.000Z',
   );
   await user.click(ui.trimesterRadio.get());
   expect(downloadButton).toHaveAttribute(
     'href',
-    '/api/audit_logs/download?from=2020-04-22T12%3A00%3A00.000Z&to=2020-07-21T12%3A00%3A00.000Z'
+    '/api/audit_logs/download?from=2020-04-22T12%3A00%3A00.000Z&to=2020-07-21T12%3A00%3A00.000Z',
   );
 
   await user.click(downloadButton);
index a0ab84e8311f1c66870fc3b01a78f7c0f3d4d6ed..cdc0ed40273619f1c79655d9417fe4b7aa7eba97 100644 (file)
@@ -59,13 +59,13 @@ describe('The Global background task page', () => {
     const modal = screen.getByRole('dialog');
 
     expect(
-      within(modal).getByRole('heading', { name: 'background_tasks.change_number_of_workers' })
+      within(modal).getByRole('heading', { name: 'background_tasks.change_number_of_workers' }),
     ).toBeInTheDocument();
 
     await user.click(
       within(modal).getByLabelText('background_tasks.change_number_of_workers', {
         selector: 'input',
-      })
+      }),
     );
 
     await user.keyboard('[ArrowDown][ArrowDown][Enter]');
@@ -161,7 +161,7 @@ describe('The Global background task page', () => {
 
       expect(screen.queryByText('background_tasks.table.nodeName')).not.toBeInTheDocument();
       expect(screen.queryByText('best_node_ever')).not.toBeInTheDocument();
-    }
+    },
   );
 
   it('DCE edition should display node name', async () => {
index 62946b6765eb2c5a4bc6d60eefbeb7c1e9d6d4b4..70b0e5291af391346ea9931f5116141050f122b2 100644 (file)
@@ -85,7 +85,7 @@ export class BackgroundTasksApp extends React.PureComponent<Props, State> {
         this.setState({ types });
         this.loadTasks();
       },
-      () => {}
+      () => {},
     );
   }
 
@@ -147,7 +147,7 @@ export class BackgroundTasksApp extends React.PureComponent<Props, State> {
           }));
         }
       },
-      this.stopLoading
+      this.stopLoading,
     );
   };
 
index 0bf87a0f9834bd1a0c1299b97cfb6f031779a704..f4f5c9dd87bf370894f154b6a2accbf9b892d44c 100644 (file)
@@ -37,7 +37,7 @@ export default function CurrentsFilter(props: CurrentsFilterProps) {
       const newValue = value ? CURRENTS.ONLY_CURRENTS : CURRENTS.ALL;
       onChange(newValue);
     },
-    [onChange]
+    [onChange],
   );
 
   return (
index 367ad202a300e8b611264de9466e587d83a81731..92938ac6c891ee47f705625ea9d49a47c0555834 100644 (file)
@@ -58,7 +58,7 @@ export default class Stacktrace extends React.PureComponent<Props, State> {
         if (this.mounted) {
           this.setState({ loading: false });
         }
-      }
+      },
     );
   }
 
index 2c6d4d0278d523e5e2bd0521e38998ba174ee489..cf09c8f331fc70606e2903aefb29b7469c5227b7 100644 (file)
@@ -49,7 +49,7 @@ export default function StatusFilter(props: StatusFilterProps) {
     ({ value }: LabelValueSelectOption) => {
       onChange(value);
     },
-    [onChange]
+    [onChange],
   );
 
   return (
index e3533e0b1975ec9336c8787be300875b12506bfc..39b30634b87df93e597365550da19ff81c332f0f 100644 (file)
@@ -112,7 +112,7 @@ export default class TaskActions extends React.PureComponent<Props, State> {
             <ActionsDropdownItem className="js-task-filter" onClick={this.handleFilterClick}>
               {translateWithParameters(
                 'background_tasks.filter_by_component_x',
-                task.componentName
+                task.componentName,
               )}
             </ActionsDropdownItem>
           )}
index 745e6a1d02fa90a74096d82d46e14ddd8c9869d4..cbde95ea0d19619800313c066c07dcb29c183723 100644 (file)
@@ -72,7 +72,7 @@ export default class Workers extends React.PureComponent<{}, State> {
         if (this.mounted) {
           this.setState({ loading: false });
         }
-      }
+      },
     );
   };
 
index 336e31467822b27c0bef70fb25f7c51482718f7a..601b7d4b3a7821fe9d223a9e819636396c8d2fb6 100644 (file)
@@ -77,7 +77,7 @@ export default class WorkersForm extends React.PureComponent<Props, State> {
         if (this.mounted) {
           this.setState({ submitting: false });
         }
-      }
+      },
     );
   };
 
index 74f86ffa8d18ed2d12ab17e29e4d7091a072166a..98e0c7c9cad4f23ebff330d1e32fe36f3f9be227 100644 (file)
@@ -77,7 +77,7 @@ export class ChangeAdminPasswordApp extends React.PureComponent<Props, State> {
         password: passwordValue,
       }).then(
         () => true,
-        () => false
+        () => false,
       );
       if (this.mounted) {
         this.setState({ submitting: false, success });
index f764ee14d99415f569d3b1decfb0e6f1e34f5ce3..0c73250cc8c40b22707aa2f791818c44e7624e24 100644 (file)
@@ -43,7 +43,7 @@ const ui = {
   }),
   unauthorizedMessage: byText('unauthorized.message'),
   defaultPasswordWarningMessage: byText(
-    'users.change_admin_password.form.cannot_use_default_password'
+    'users.change_admin_password.form.cannot_use_default_password',
   ),
 };
 
@@ -55,7 +55,7 @@ it('should disallow change when not an admin', () => {
 it('should allow changing password when using the default admin password', async () => {
   const user = userEvent.setup();
   renderChangeAdminPasswordApp(
-    mockAppState({ instanceUsesDefaultAdminCredentials: true, canAdmin: true })
+    mockAppState({ instanceUsesDefaultAdminCredentials: true, canAdmin: true }),
   );
   expect(ui.updateButton.get()).toBeDisabled();
   await user.type(ui.passwordInput.get(), 'password');
@@ -75,7 +75,7 @@ it('should allow changing password when using the default admin password', async
 it('should not allow to submit the default password', async () => {
   const user = userEvent.setup();
   renderChangeAdminPasswordApp(
-    mockAppState({ instanceUsesDefaultAdminCredentials: true, canAdmin: true })
+    mockAppState({ instanceUsesDefaultAdminCredentials: true, canAdmin: true }),
   );
 
   await user.type(ui.passwordInput.get(), DEFAULT_ADMIN_PASSWORD);
index 91e4991ad4ce077232f8314ec46441c6fab30668..b432a72abf0a4d5ad23f6c7bd64e0d396f943716 100644 (file)
@@ -198,7 +198,7 @@ it.each([ComponentQualifier.Portfolio, ComponentQualifier.SubPortfolio])(
     });
 
     expect(await ui.notAccessToAllChildrenTxt.find()).toBeInTheDocument();
-  }
+  },
 );
 
 it('should correctly show measures for a project', async () => {
@@ -387,8 +387,8 @@ function getPageObject(user: UserEvent) {
     overallCodeBtn: byRole('radio', { name: 'projects.view.overall_code' }),
     measureRow: (name: string | RegExp) => byRole('row', { name, exact: false }),
     measureValueCell: (row: ReactTestingQuery, name: string, value: string) => {
-      const i = Array.from(screen.getAllByRole('columnheader')).findIndex((c) =>
-        c.textContent?.includes(name)
+      const i = Array.from(screen.getAllByRole('columnheader')).findIndex(
+        (c) => c.textContent?.includes(name),
       );
       if (i < 0) {
         // eslint-disable-next-line testing-library/no-debugging-utils
@@ -473,7 +473,7 @@ function generateMeasures(overallValue = '1.0', newValue = '2.0') {
       ].map((metric) =>
         isDiffMetric(metric)
           ? mockMeasure({ metric, period: { index: 1, value: newValue } })
-          : mockMeasure({ metric, value: overallValue, period: undefined })
+          : mockMeasure({ metric, value: overallValue, period: undefined }),
       ),
       mockMeasure({
         metric: MetricKey.alert_status,
@@ -481,7 +481,7 @@ function generateMeasures(overallValue = '1.0', newValue = '2.0') {
         period: undefined,
       }),
     ],
-    'metric'
+    'metric',
   );
 }
 
index 7bd8a004d557cd127fe9aa1b0540c029799a35e5..fd751991b387062d4ad6026eb1530d3c243fdd5c 100644 (file)
@@ -57,10 +57,10 @@ describe('getCodeMetrics', () => {
     expect(getCodeMetrics('VW')).toMatchSnapshot();
     expect(getCodeMetrics('VW', undefined, { includeQGStatus: true })).toMatchSnapshot();
     expect(
-      getCodeMetrics('VW', undefined, { includeQGStatus: true, newCode: true })
+      getCodeMetrics('VW', undefined, { includeQGStatus: true, newCode: true }),
     ).toMatchSnapshot();
     expect(
-      getCodeMetrics('VW', undefined, { includeQGStatus: true, newCode: false })
+      getCodeMetrics('VW', undefined, { includeQGStatus: true, newCode: false }),
     ).toMatchSnapshot();
   });
 
index a2e5a3a3dcb4d0a2ee3b2e725795d755749e84f6..f444ea4efb4f6c1c417044988789370051c443e9 100644 (file)
@@ -39,7 +39,7 @@ export function addComponentChildren(
   componentKey: string,
   children: ComponentMeasure[],
   total: number,
-  page: number
+  page: number,
 ): void {
   const previous = getComponentChildren(componentKey);
   if (previous) {
index 25845bd1ccb95d487c89ede6a9196f062370f856..f86495158a545e932ea6508065ac1792e0af735d 100644 (file)
@@ -90,12 +90,12 @@ class CodeApp extends React.Component<Props, State> {
       componentKey,
       this.props.component.qualifier,
       this,
-      this.props.branchLike
+      this.props.branchLike,
     ).then((r) => {
       if (this.mounted) {
         if (
           [ComponentQualifier.File, ComponentQualifier.TestFile].includes(
-            r.component.qualifier as ComponentQualifier
+            r.component.qualifier as ComponentQualifier,
           )
         ) {
           this.setState({
@@ -154,7 +154,7 @@ class CodeApp extends React.Component<Props, State> {
       page + 1,
       this.props.component.qualifier,
       this,
-      this.props.branchLike
+      this.props.branchLike,
     ).then((r) => {
       if (this.mounted && r.components.length) {
         this.setState({
index d420d15d43beb82f0854ad85115a037eebb015ad..6a573b846ecd81db60efd01f4c34731facd88581 100644 (file)
@@ -98,7 +98,7 @@ export default function CodeAppRenderer(props: Props) {
 
   const metricKeys = intersection(
     getCodeMetrics(component.qualifier, branchLike, { newCode: newCodeSelected }),
-    Object.keys(metrics)
+    Object.keys(metrics),
   );
   const filteredMetrics = metricKeys.map((metric) => metrics[metric]);
 
@@ -149,7 +149,7 @@ export default function CodeAppRenderer(props: Props) {
               <LightLabel>
                 {translate(
                   'code_viewer.no_source_code_displayed_due_to_empty_analysis',
-                  component.qualifier
+                  component.qualifier,
                 )}
               </LightLabel>
             </div>
index d7f3f746b8219f5be2b00908d73732020a663a79..377417bfe4b619343e720c0d977cb3369424d8d1 100644 (file)
@@ -69,10 +69,10 @@ export default function ComponentName({
 
   if (
     [ComponentQualifier.Application, ComponentQualifier.Portfolio].includes(
-      rootComponent.qualifier as ComponentQualifier
+      rootComponent.qualifier as ComponentQualifier,
     ) &&
     [ComponentQualifier.Application, ComponentQualifier.Project].includes(
-      component.qualifier as ComponentQualifier
+      component.qualifier as ComponentQualifier,
     )
   ) {
     return (
@@ -86,7 +86,7 @@ export default function ComponentName({
             showIcon,
             unclickable,
             canBrowse,
-            newCodeSelected
+            newCodeSelected,
           )}
         </div>
         {component.branch ? (
@@ -111,7 +111,7 @@ export default function ComponentName({
         rootComponent,
         showIcon,
         unclickable,
-        canBrowse
+        canBrowse,
       )}
     </span>
   );
@@ -125,7 +125,7 @@ function renderNameWithIcon(
   showIcon: boolean,
   unclickable = false,
   canBrowse = false,
-  newCodeSelected = true
+  newCodeSelected = true,
 ) {
   const name = renderName(component, previous);
   const codeType = newCodeSelected ? CodeScope.New : CodeScope.Overall;
@@ -136,7 +136,7 @@ function renderNameWithIcon(
       isProject(component.qualifier))
   ) {
     const branch = [ComponentQualifier.Application, ComponentQualifier.Portfolio].includes(
-      rootComponent.qualifier as ComponentQualifier
+      rootComponent.qualifier as ComponentQualifier,
     )
       ? component.branch
       : undefined;
@@ -147,7 +147,7 @@ function renderNameWithIcon(
           component.refKey ?? component.key,
           component.qualifier,
           { branch },
-          codeType
+          codeType,
         )}
       >
         {name}
index 222e0c1df58c2ab8a0d20535f6b178e005c3507c..431d271b77b72cc76005e2939669c99371d0d4a4 100644 (file)
@@ -109,7 +109,7 @@ function Components(props: ComponentsProps) {
             components,
             (c) => c.qualifier,
             (c) => c.name.toLowerCase(),
-            (c) => (c.branch ? c.branch.toLowerCase() : '')
+            (c) => (c.branch ? c.branch.toLowerCase() : ''),
           ).map((component, index, list) => (
             <Component
               branchLike={branchLike}
index e436e321fa18846a76b50d1d5190bb8e2b16c97f..7de9964cc832f4411b7873036f348012c2fbaca1 100644 (file)
@@ -64,8 +64,8 @@ export default function ComponentsHeader(props: ComponentsHeaderProps) {
       translate(
         'metric',
         metric,
-        SHORT_NAME_METRICS.includes(metric as MetricKey) ? 'short_name' : 'name'
-      )
+        SHORT_NAME_METRICS.includes(metric as MetricKey) ? 'short_name' : 'name',
+      ),
     );
 
     Cell = NumericalCell;
index 808ffd35c4abc9adcf41eb3bdd7070d85006ff72..d82b5af6db18eef81a3917b2c85e1413c0c84e63 100644 (file)
@@ -64,6 +64,6 @@ function renderSourceViewerWrapper(props: Partial<SourceViewerWrapperProps> = {}
       componentMeasures={[]}
       location={mockLocation({ query: { line: '2' } })}
       {...props}
-    />
+    />,
   );
 }
index 73a5f70b74e7646c4a8244a4465d71934d27a642..f4668d1ed78b29319486c8d384abe004919ef064 100644 (file)
@@ -115,7 +115,7 @@ function storeChildrenBreadcrumbs(parentComponentKey: string, children: Breadcru
 export function getCodeMetrics(
   qualifier: string,
   branchLike?: BranchLike,
-  options: { includeQGStatus?: boolean; newCode?: boolean } = {}
+  options: { includeQGStatus?: boolean; newCode?: boolean } = {},
 ) {
   if (isPortfolioLike(qualifier)) {
     let metrics: MetricKey[] = [];
@@ -141,7 +141,7 @@ function retrieveComponentBase(
   componentKey: string,
   qualifier: string,
   instance: { mounted: boolean },
-  branchLike?: BranchLike
+  branchLike?: BranchLike,
 ) {
   const existing = getComponentFromBucket(componentKey);
   if (existing) {
@@ -166,7 +166,7 @@ export async function retrieveComponentChildren(
   componentKey: string,
   qualifier: string,
   instance: { mounted: boolean },
-  branchLike?: BranchLike
+  branchLike?: BranchLike,
 ): Promise<{ components: ComponentMeasure[]; page: number; total: number }> {
   const existing = getComponentChildren(componentKey);
   if (existing) {
@@ -189,7 +189,7 @@ export async function retrieveComponentChildren(
 
   if (instance.mounted && isPortfolioLike(qualifier)) {
     await Promise.all(
-      result.components.map((c) => getComponentData({ component: c.refKey || c.key }))
+      result.components.map((c) => getComponentData({ component: c.refKey || c.key })),
     ).then(
       (data) => {
         data.forEach(({ component: { analysisDate } }, i) => {
@@ -198,7 +198,7 @@ export async function retrieveComponentChildren(
       },
       () => {
         // noop
-      }
+      },
     );
   }
 
@@ -214,7 +214,7 @@ export async function retrieveComponentChildren(
 function retrieveComponentBreadcrumbs(
   component: string,
   instance: { mounted: boolean },
-  branchLike?: BranchLike
+  branchLike?: BranchLike,
 ): Promise<Breadcrumb[]> {
   const existing = getComponentBreadcrumbs(component);
   if (existing) {
@@ -235,7 +235,7 @@ export function retrieveComponent(
   componentKey: string,
   qualifier: string,
   instance: { mounted: boolean },
-  branchLike?: BranchLike
+  branchLike?: BranchLike,
 ): Promise<{
   breadcrumbs: Breadcrumb[];
   component: ComponentMeasure;
@@ -263,7 +263,7 @@ export function loadMoreChildren(
   page: number,
   qualifier: string,
   instance: { mounted: boolean },
-  branchLike?: BranchLike
+  branchLike?: BranchLike,
 ): Promise<Children> {
   const metrics = getCodeMetrics(qualifier, branchLike, {
     includeQGStatus: true,
index a81bc28eee463a7df053dd7a8207d62ba385f46b..7258e03991b6fd5dea058d5508f2b534d3aed6f1 100644 (file)
@@ -51,24 +51,24 @@ describe('Rules app list', () => {
 
     // Render clean code attributes.
     expect(
-      ui.ruleCleanCodeAttributeCategory(CleanCodeAttributeCategory.Adaptable).getAll().length
+      ui.ruleCleanCodeAttributeCategory(CleanCodeAttributeCategory.Adaptable).getAll().length,
     ).toBeGreaterThan(1);
     expect(ui.ruleSoftwareQuality(SoftwareQuality.Maintainability).getAll().length).toBeGreaterThan(
-      1
+      1,
     );
 
     // Renders clean code categories and software qualities facets
     CLEAN_CODE_CATEGORIES.map(
-      (category) => `issue.clean_code_attribute_category.${category}`
+      (category) => `issue.clean_code_attribute_category.${category}`,
     ).forEach((name) => expect(ui.facetItem(name).get()).toBeInTheDocument());
 
     SOFTWARE_QUALITIES.map((quality) => `issue.software_quality.${quality}`).forEach((name) =>
-      expect(ui.facetItem(name).get()).toBeInTheDocument()
+      expect(ui.facetItem(name).get()).toBeInTheDocument(),
     );
 
     // Renders language facets
     ['JavaScript', 'Java', 'C'].forEach((name) =>
-      expect(ui.facetItem(name).get()).toBeInTheDocument()
+      expect(ui.facetItem(name).get()).toBeInTheDocument(),
     );
 
     // Other facets are collapsed
@@ -225,7 +225,7 @@ describe('Rules app list', () => {
       await act(async () => {
         await user.type(ui.facetSearchInput('search.search_for_cwe').get(), 'Certificate');
         await user.click(
-          ui.facetItem('CWE-297 - Improper Validation of Certificate with Host Mismatch').get()
+          ui.facetItem('CWE-297 - Improper Validation of Certificate with Host Mismatch').get(),
         );
       });
       expect(ui.ruleListItem.getAll(ui.rulesList.get())).toHaveLength(2);
@@ -287,7 +287,7 @@ describe('Rules app list', () => {
       await ui.bulkActivate(rulesCount, selectQPSuccess);
 
       expect(
-        ui.bulkSuccessMessage(selectQPSuccess.name, selectQPSuccess.languageName, rulesCount).get()
+        ui.bulkSuccessMessage(selectQPSuccess.name, selectQPSuccess.languageName, rulesCount).get(),
       ).toBeInTheDocument();
 
       await user.click(ui.bulkClose.get());
@@ -299,7 +299,7 @@ describe('Rules app list', () => {
       expect(
         ui
           .bulkWarningMessage(selectQPWarning.name, selectQPWarning.languageName, rulesCount - 1)
-          .get()
+          .get(),
       ).toBeInTheDocument();
     });
 
@@ -315,7 +315,7 @@ describe('Rules app list', () => {
       await ui.bulkDeactivate(rulesCount, selectQP);
 
       expect(
-        ui.bulkSuccessMessage(selectQP.name, selectQP.languageName, rulesCount).get()
+        ui.bulkSuccessMessage(selectQP.name, selectQP.languageName, rulesCount).get(),
       ).toBeInTheDocument();
     });
   });
@@ -358,7 +358,7 @@ describe('Rules app list', () => {
     await ui.appLoaded();
 
     expect(
-      ui.ruleListItemLink('Awsome java rule').get(ui.currentListItem.get())
+      ui.ruleListItemLink('Awsome java rule').get(ui.currentListItem.get()),
     ).toBeInTheDocument();
 
     await act(async () => {
@@ -370,7 +370,7 @@ describe('Rules app list', () => {
       await user.keyboard('{ArrowUp}');
     });
     expect(
-      ui.ruleListItemLink('Awsome java rule').get(ui.currentListItem.get())
+      ui.ruleListItemLink('Awsome java rule').get(ui.currentListItem.get()),
     ).toBeInTheDocument();
 
     await act(async () => {
@@ -382,7 +382,7 @@ describe('Rules app list', () => {
       await user.keyboard('{ArrowLeft}');
     });
     expect(
-      ui.ruleListItemLink('Awsome java rule').get(ui.currentListItem.get())
+      ui.ruleListItemLink('Awsome java rule').get(ui.currentListItem.get()),
     ).toBeInTheDocument();
   });
 });
@@ -395,7 +395,7 @@ describe('Rule app details', () => {
       await ui.appLoaded();
       expect(ui.ruleTitle('Awsome java rule').get()).toBeInTheDocument();
       expect(
-        ui.ruleCleanCodeAttributeCategory(CleanCodeAttributeCategory.Adaptable).get()
+        ui.ruleCleanCodeAttributeCategory(CleanCodeAttributeCategory.Adaptable).get(),
       ).toBeInTheDocument();
       expect(ui.ruleCleanCodeAttribute(CleanCodeAttribute.Clear).get()).toBeInTheDocument();
       // 1 In Rule details + 1 in facet
@@ -718,7 +718,7 @@ describe('redirects', () => {
 
     renderCodingRulesApp(
       mockLoggedInUser(),
-      'coding_rules#languages=c,js|types=BUG|cleanCodeAttributeCategories=ADAPTABLE'
+      'coding_rules#languages=c,js|types=BUG|cleanCodeAttributeCategories=ADAPTABLE',
     );
     expect(await screen.findByText('x_selected.2')).toBeInTheDocument();
     expect(screen.getByTitle('issue.type.BUG')).toBeInTheDocument();
index 99bb67dac32f293b4d2398ce2f8eccd468139d2e..3be15165c0e79350d6be07a1ba0027d9c15572e5 100644 (file)
@@ -94,8 +94,8 @@ export default class ActivationFormModal extends React.PureComponent<Props, Stat
           !profile.isBuiltIn &&
           profile.actions &&
           profile.actions.edit &&
-          profile.language === this.props.rule.lang
-      )
+          profile.language === this.props.rule.lang,
+      ),
     ).map((profile) => ({
       ...profile,
       // Decrease depth by 1, so the top level starts at 0
@@ -126,7 +126,7 @@ export default class ActivationFormModal extends React.PureComponent<Props, Stat
           if (this.mounted) {
             this.setState({ submitting: false });
           }
-        }
+        },
       );
   };
 
index b0396e8053ca58b749f6ef0e834c27f6f37421d6..51e21a5da34fde6da5105883dc52c2979941a772 100644 (file)
@@ -25,7 +25,7 @@ import Facet, { BasicProps } from './Facet';
 export default function AttributeCategoryFacet(props: BasicProps) {
   const renderName = React.useCallback(
     (attribute: string) => translate('issue.clean_code_attribute_category', attribute),
-    []
+    [],
   );
 
   return (
index 0961df63e5af2b11e2dfa080ffdfe7f9b0da7232..710bca3d4ffd37efd76aca9c59c3d291e150be8a 100644 (file)
@@ -77,7 +77,7 @@ export default class BulkChange extends React.PureComponent<Props, State> {
   render() {
     // show "Bulk Change" button only if user is admin of at least one QP
     const canBulkChange = Object.values(this.props.referencedProfiles).some((profile) =>
-      Boolean(profile.actions && profile.actions.edit)
+      Boolean(profile.actions && profile.actions.edit),
     );
     if (!canBulkChange) {
       return (
@@ -92,7 +92,7 @@ export default class BulkChange extends React.PureComponent<Props, State> {
     const { activation } = this.props.query;
     const profile = this.getSelectedProfile();
     const canChangeProfile = Boolean(
-      profile && !profile.isBuiltIn && profile.actions && profile.actions.edit
+      profile && !profile.isBuiltIn && profile.actions && profile.actions.edit,
     );
     const allowActivateOnProfile = canChangeProfile && activation === false;
     const allowDeactivateOnProfile = canChangeProfile && activation === true;
index 469c2efa63c30bda9eca592aa22a08f8d4dd3a90..f231e61eb1ca665d2c4488ae754a6b57c6da1496 100644 (file)
@@ -134,7 +134,7 @@ export class BulkChangeModal extends React.PureComponent<Props, State> {
           method({
             ...data,
             targetKey: profile,
-          })
+          }),
         )
         .then((response) => this.processResponse(profile, response));
     }
@@ -154,7 +154,7 @@ export class BulkChangeModal extends React.PureComponent<Props, State> {
         if (this.mounted) {
           this.setState({ submitting: false });
         }
-      }
+      },
     );
   };
 
@@ -174,13 +174,13 @@ export class BulkChangeModal extends React.PureComponent<Props, State> {
               profile.name,
               language,
               result.succeeded,
-              result.failed
+              result.failed,
             )
           : translateWithParameters(
               'coding_rules.bulk_change.success',
               profile.name,
               language,
-              result.succeeded
+              result.succeeded,
             )}
       </Alert>
     );
@@ -213,11 +213,11 @@ export class BulkChangeModal extends React.PureComponent<Props, State> {
       action === 'activate'
         ? `${translate('coding_rules.activate_in_quality_profile')} (${formatMeasure(
             total,
-            'INT'
+            'INT',
           )} ${translate('coding_rules._rules')})`
         : `${translate('coding_rules.deactivate_in_quality_profile')} (${formatMeasure(
             total,
-            'INT'
+            'INT',
           )} ${translate('coding_rules._rules')})`;
 
     return (
index 3998d0fc355faa99b2fc7e8cb173e236946bfa14..b4807c09316c34fe4717cafe449e260a8c2817e0 100644 (file)
@@ -108,7 +108,7 @@ export class CodingRulesApp extends React.PureComponent<Props, State> {
         'owaspTop10-2021': shouldOpenStandardsChildFacet(
           {},
           query,
-          SecurityStandard.OWASP_TOP10_2021
+          SecurityStandard.OWASP_TOP10_2021,
         ),
         sonarsourceSecurity: shouldOpenSonarSourceSecurityFacet({}, query),
         standards: shouldOpenStandardsFacet({}, query),
@@ -245,7 +245,7 @@ export class CodingRulesApp extends React.PureComponent<Props, State> {
         });
         this.fetchFirstRules();
       },
-      this.stopLoading
+      this.stopLoading,
     );
   };
 
@@ -255,7 +255,7 @@ export class CodingRulesApp extends React.PureComponent<Props, State> {
         const actives = rawActives && parseActives(rawActives);
         const facets = rawFacets && parseFacets(rawFacets);
         return { actives, facets, paging, rules };
-      }
+      },
     );
 
   fetchFirstRules = (query?: RawQuery) => {
@@ -292,7 +292,7 @@ export class CodingRulesApp extends React.PureComponent<Props, State> {
             }));
           }
         },
-        this.stopLoading
+        this.stopLoading,
       );
     }
   };
@@ -467,7 +467,7 @@ export class CodingRulesApp extends React.PureComponent<Props, State> {
       if (willOpenProperty && property === STANDARDS) {
         newState.openFacets.sonarsourceSecurity = shouldOpenSonarSourceSecurityFacet(
           newState.openFacets,
-          parseQuery(this.props.location.query)
+          parseQuery(this.props.location.query),
         );
         // Force loading of sonarsource security facet data
         property = newState.openFacets.sonarsourceSecurity ? 'sonarsourceSecurity' : property;
@@ -571,7 +571,7 @@ export class CodingRulesApp extends React.PureComponent<Props, State> {
             title={translateWithParameters('coding_rule.page', openRule.langName, openRule.name)}
             titleTemplate={translateWithParameters(
               'page_title.template.with_category',
-              translate('coding_rules.page')
+              translate('coding_rules.page'),
             )}
           />
         ) : (
index 08fef2f612c09fa5529c255199b623baedc26f84..60daacdc04b93e7d96f41f23f7102106b86b72cf 100644 (file)
@@ -126,7 +126,7 @@ export default class CustomRuleFormModal extends React.PureComponent<Props, Stat
         if (this.mounted) {
           this.setState({ reactivating: response.status === 409, submitting: false });
         }
-      }
+      },
     );
   };
 
index 6045fb3de9c99a17666097b24fcff454ce6ad1ef..9f8edbae309802dc0b8d74a80cb14b1f9ad0c20a 100644 (file)
@@ -59,7 +59,7 @@ export default class Facet extends React.PureComponent<Props> {
       newValue = itemValue === value ? undefined : itemValue;
     } else if (multiple) {
       newValue = orderBy(
-        values.includes(itemValue) ? without(values, itemValue) : [...values, itemValue]
+        values.includes(itemValue) ? without(values, itemValue) : [...values, itemValue],
       );
     } else {
       newValue = values.includes(itemValue) && values.length < 2 ? [] : [itemValue];
@@ -109,7 +109,7 @@ export default class Facet extends React.PureComponent<Props> {
         sortBy(
           Object.keys(stats),
           (key) => -stats[key],
-          (key) => renderTextName(key).toLowerCase()
+          (key) => renderTextName(key).toLowerCase(),
         ));
     const headerId = `facet_${property}`;
 
index 81e9b7b44badaa8376bebe74fc31a0e253a9e2dd..5de23c23a979dc8129d894b744829e996a831797 100644 (file)
@@ -40,7 +40,7 @@ class LanguageFacet extends React.PureComponent<Props> {
   handleSearch = (query: string) => {
     const options = this.getAllPossibleOptions();
     const results = options.filter((language) =>
-      language.name.toLowerCase().includes(query.toLowerCase())
+      language.name.toLowerCase().includes(query.toLowerCase()),
     );
     const paging = { pageIndex: 1, pageSize: results.length, total: results.length };
     return Promise.resolve({ paging, results });
@@ -54,7 +54,7 @@ class LanguageFacet extends React.PureComponent<Props> {
     // and make sure we reference each language only once
     return uniqBy<Language>(
       [...Object.values(languages), ...Object.keys(stats).map((key) => ({ key, name: key }))],
-      (language: Language) => language.key
+      (language: Language) => language.key,
     );
   };
 
index f791e997634610295c346376bfdc6e889d70369d..c3c22a1fb7219318d8e20ae222498a810b79e5f7 100644 (file)
@@ -160,7 +160,7 @@ export default class ProfileFacet extends React.PureComponent<Props> {
     profiles = sortBy(
       profiles,
       (profile) => profile.name.toLowerCase(),
-      (profile) => profile.languageName
+      (profile) => profile.languageName,
     );
 
     const property = 'profile';
index 0f5da16600184475c5de2118ff04c912e9480e24..244b4728a5cea777b72c3628f15dc4b6573f3f3c 100644 (file)
@@ -88,7 +88,7 @@ export default class RuleDetails extends React.PureComponent<Props, State> {
         if (this.mounted) {
           this.setState({ loading: false });
         }
-      }
+      },
     );
   };
 
@@ -102,7 +102,7 @@ export default class RuleDetails extends React.PureComponent<Props, State> {
     // optimistic update
     const oldTags = this.state.ruleDetails && this.state.ruleDetails.tags;
     this.setState((state) =>
-      state.ruleDetails ? { ruleDetails: { ...state.ruleDetails, tags } } : null
+      state.ruleDetails ? { ruleDetails: { ...state.ruleDetails, tags } } : null,
     );
     updateRule({
       key: this.props.ruleKey,
@@ -110,7 +110,7 @@ export default class RuleDetails extends React.PureComponent<Props, State> {
     }).catch(() => {
       if (this.mounted) {
         this.setState((state) =>
-          state.ruleDetails ? { ruleDetails: { ...state.ruleDetails, tags: oldTags } } : null
+          state.ruleDetails ? { ruleDetails: { ...state.ruleDetails, tags: oldTags } } : null,
         );
       }
     });
@@ -143,7 +143,7 @@ export default class RuleDetails extends React.PureComponent<Props, State> {
 
   handleDelete = () => {
     return deleteRule({ key: this.props.ruleKey }).then(() =>
-      this.props.onDelete(this.props.ruleKey)
+      this.props.onDelete(this.props.ruleKey),
     );
   };
 
@@ -202,7 +202,7 @@ export default class RuleDetails extends React.PureComponent<Props, State> {
                 isDestructive
                 modalBody={translateWithParameters(
                   'coding_rules.delete.custom.confirm',
-                  ruleDetails.name
+                  ruleDetails.name,
                 )}
                 modalHeader={translate('coding_rules.delete_rule')}
                 onConfirm={this.handleDelete}
index de10ac4a3a81d156f697ff09697dac5ebd1c92f0..df822427393c794cdeed4788d9f0902983894f8e 100644 (file)
@@ -74,7 +74,7 @@ export default class RuleDetailsCustomRules extends React.PureComponent<Props, S
         if (this.mounted) {
           this.setState({ loading: false });
         }
-      }
+      },
     );
   };
 
index f7e8184a9308991ffa46973e0c58c1db6ffbd588..62e860d6fab03da83ddb9368d7a0b134cc177fed 100644 (file)
@@ -100,7 +100,7 @@ export default class RuleDetailsDescription extends React.PureComponent<Props, S
         if (this.mounted) {
           this.setState({ submitting: false });
         }
-      }
+      },
     );
   };
 
@@ -217,7 +217,7 @@ export default class RuleDetailsDescription extends React.PureComponent<Props, S
         : undefined;
 
     const introductionSection = ruleDetails.descriptionSections?.find(
-      (section) => section.key === RuleDescriptionSections.INTRODUCTION
+      (section) => section.key === RuleDescriptionSections.INTRODUCTION,
     )?.content;
 
     return (
index d57d9a000060d2f4223d7ebebc6bc1152b1d571e..8ff95a870416181ec1c88f22dbb6da4401035a18 100644 (file)
@@ -77,7 +77,7 @@ export class RuleDetailsIssues extends React.PureComponent<Props, State> {
         resolved: 'false',
         rules: key,
       },
-      'projects'
+      'projects',
     ).then(
       ({ facet, response }) => {
         if (this.mounted) {
@@ -96,7 +96,7 @@ export class RuleDetailsIssues extends React.PureComponent<Props, State> {
         if (this.mounted) {
           this.setState({ loading: false });
         }
-      }
+      },
     );
   };
 
index b5e37e7893f05fe22ee96df614d7a5b590962791..f11ac3f8d4ef01b48bb2098ec65ec6b881b95367 100644 (file)
@@ -135,7 +135,7 @@ export default class RuleDetailsProfiles extends React.PureComponent<Props> {
                   confirmData={profile.key}
                   modalBody={translateWithParameters(
                     'coding_rules.revert_to_parent_definition.confirm',
-                    profile.parentName
+                    profile.parentName,
                   )}
                   modalHeader={translate('coding_rules.revert_to_parent_definition')}
                   onConfirm={this.handleRevert}
@@ -163,7 +163,7 @@ export default class RuleDetailsProfiles extends React.PureComponent<Props> {
                     className="coding-rules-detail-quality-profile-deactivate button-red spacer-left"
                     aria-label={translateWithParameters(
                       'coding_rules.deactivate_in_quality_profile_x',
-                      profile.name
+                      profile.name,
                     )}
                     onClick={onClick}
                   >
@@ -204,7 +204,7 @@ export default class RuleDetailsProfiles extends React.PureComponent<Props> {
   render() {
     const { activations = [], referencedProfiles, ruleDetails } = this.props;
     const canActivate = Object.values(referencedProfiles).some((profile) =>
-      Boolean(profile.actions && profile.actions.edit && profile.language === ruleDetails.lang)
+      Boolean(profile.actions && profile.actions.edit && profile.language === ruleDetails.lang),
     );
 
     return (
@@ -222,7 +222,7 @@ export default class RuleDetailsProfiles extends React.PureComponent<Props> {
               onDone={this.handleActivate}
               profiles={filter(
                 this.props.referencedProfiles,
-                (profile) => !activations.find((activation) => activation.qProfile === profile.key)
+                (profile) => !activations.find((activation) => activation.qProfile === profile.key),
               )}
               rule={ruleDetails}
             />
index ecbd3db0531e06090300b7ae9bb6c40aece6e99f..78fa36f593fcb19cd3619341339365357b3f913c 100644 (file)
@@ -57,7 +57,7 @@ export default class RuleDetailsTagsPopup extends React.PureComponent<Props, Sta
           this.setState({ searchResult: without(tags, ...this.props.sysTags) });
         }
       },
-      () => {}
+      () => {},
     );
   };
 
index 31281f1a830e0c6964988f7bed018fdcc83970b0..ab88c8a381e7575bc668056088cb10bf55de4f51 100644 (file)
@@ -55,7 +55,7 @@ export default class RuleListItem extends React.PureComponent<Props> {
       };
       deactivateRule(data).then(
         () => this.props.onDeactivate(data.key, data.rule),
-        () => {}
+        () => {},
       );
     }
   };
@@ -98,7 +98,7 @@ export default class RuleListItem extends React.PureComponent<Props> {
                 overlay={translateWithParameters(
                   'coding_rules.overrides',
                   selectedProfile.name,
-                  selectedProfile.parentName
+                  selectedProfile.parentName,
                 )}
               >
                 <RuleInheritanceIcon
@@ -112,7 +112,7 @@ export default class RuleListItem extends React.PureComponent<Props> {
                 overlay={translateWithParameters(
                   'coding_rules.inherits',
                   selectedProfile.name,
-                  selectedProfile.parentName
+                  selectedProfile.parentName,
                 )}
               >
                 <RuleInheritanceIcon
index cdb4f11e5b9e352447cb50e25b16459fdb0b38f7..b47d89269f2795ad7a996103c9c2ba8881366df9 100644 (file)
@@ -32,12 +32,12 @@ export default function SeverityFacet(props: BasicProps) {
         <span className="sw-ml-1">{translate('severity', severity)}</span>
       </div>
     ),
-    []
+    [],
   );
 
   const renderTextName = React.useCallback(
     (severity: string) => translate('severity', severity),
-    []
+    [],
   );
 
   return (
index 59d0da4736b82e94b3ee034b8d28919899fc28cd..90bf38f6da5db49a686096595e0a5fccd861c153 100644 (file)
@@ -26,7 +26,7 @@ import Facet, { BasicProps } from './Facet';
 export default function SoftwareQualityFacet(props: BasicProps) {
   const renderName = React.useCallback(
     (quality: string) => translate('issue.software_quality', quality),
-    []
+    [],
   );
 
   return (
index 41495c4995318cfc61c6cd62f3d10fa707b1f8c6..5255880611219b001df8da13060f7fd3b89bd36d 100644 (file)
@@ -146,22 +146,22 @@ export class StandardFacet extends React.PureComponent<Props, State> {
           });
         }
       },
-      () => {}
+      () => {},
     );
   };
 
   getValues = () => {
     return [
       ...this.props.sonarsourceSecurity.map((item) =>
-        renderSonarSourceSecurityCategory(this.state.standards, item, true)
+        renderSonarSourceSecurityCategory(this.state.standards, item, true),
       ),
 
       ...this.props.owaspTop10.map((item) =>
-        renderOwaspTop10Category(this.state.standards, item, true)
+        renderOwaspTop10Category(this.state.standards, item, true),
       ),
 
       ...this.props['owaspTop10-2021'].map((item) =>
-        renderOwaspTop102021Category(this.state.standards, item, true)
+        renderOwaspTop102021Category(this.state.standards, item, true),
       ),
 
       ...this.props.cwe.map((item) => renderCWECategory(this.state.standards, item)),
@@ -187,7 +187,7 @@ export class StandardFacet extends React.PureComponent<Props, State> {
 
     if (multiple) {
       const newValue = sortBy(
-        items.includes(itemValue) ? without(items, itemValue) : [...items, itemValue]
+        items.includes(itemValue) ? without(items, itemValue) : [...items, itemValue],
       );
 
       this.props.onChange({ [prop]: newValue });
@@ -213,7 +213,7 @@ export class StandardFacet extends React.PureComponent<Props, State> {
   handleCWESearch = (query: string) => {
     return Promise.resolve({
       results: Object.keys(this.state.standards.cwe).filter((cwe) =>
-        renderCWECategory(this.state.standards, cwe).toLowerCase().includes(query.toLowerCase())
+        renderCWECategory(this.state.standards, cwe).toLowerCase().includes(query.toLowerCase()),
       ),
     });
   };
@@ -230,7 +230,7 @@ export class StandardFacet extends React.PureComponent<Props, State> {
     statsProp: StatsProp,
     valuesProp: ValuesProp,
     renderName: (standards: Standards, category: string) => string,
-    onClick: (x: string, multiple?: boolean) => void
+    onClick: (x: string, multiple?: boolean) => void,
   ) => {
     const stats = this.props[statsProp];
     const values = this.props[valuesProp];
@@ -248,7 +248,7 @@ export class StandardFacet extends React.PureComponent<Props, State> {
       valuesProp,
       renderName,
       renderName,
-      onClick
+      onClick,
     );
   };
 
@@ -260,7 +260,7 @@ export class StandardFacet extends React.PureComponent<Props, State> {
     listKey: ValuesProp,
     renderName: (standards: Standards, category: string) => React.ReactNode,
     renderTooltip: (standards: Standards, category: string) => string,
-    onClick: (x: string, multiple?: boolean) => void
+    onClick: (x: string, multiple?: boolean) => void,
   ) => {
     if (!categories.length) {
       return (
@@ -303,7 +303,7 @@ export class StandardFacet extends React.PureComponent<Props, State> {
       'owaspTop10Stats',
       SecurityStandard.OWASP_TOP10,
       renderOwaspTop10Category,
-      this.handleOwaspTop10ItemClick
+      this.handleOwaspTop10ItemClick,
     );
   }
 
@@ -312,7 +312,7 @@ export class StandardFacet extends React.PureComponent<Props, State> {
       'owaspTop10-2021Stats',
       SecurityStandard.OWASP_TOP10_2021,
       renderOwaspTop102021Category,
-      this.handleOwaspTop102021ItemClick
+      this.handleOwaspTop102021ItemClick,
     );
   }
 
@@ -327,7 +327,7 @@ export class StandardFacet extends React.PureComponent<Props, State> {
     const sortedItems = sortBy(
       Object.keys(stats),
       (key) => -stats[key],
-      (key) => renderSonarSourceSecurityCategory(this.state.standards, key)
+      (key) => renderSonarSourceSecurityCategory(this.state.standards, key),
     );
 
     const limitedList = this.state.showFullSonarSourceList
@@ -428,7 +428,7 @@ export class StandardFacet extends React.PureComponent<Props, State> {
             onClick={() => this.props.onToggle('sonarsourceSecurity')}
             open={sonarsourceSecurityOpen}
             values={sonarsourceSecurity.map((item) =>
-              renderSonarSourceSecurityCategory(this.state.standards, item)
+              renderSonarSourceSecurityCategory(this.state.standards, item),
             )}
           />
 
@@ -448,7 +448,7 @@ export class StandardFacet extends React.PureComponent<Props, State> {
             onClick={() => this.props.onToggle('owaspTop10-2021')}
             open={owaspTop102021Open}
             values={owaspTop102021.map((item) =>
-              renderOwaspTop102021Category(this.state.standards, item)
+              renderOwaspTop102021Category(this.state.standards, item),
             )}
           />
 
index 603854509206f1924af3530d7b8d8a9fd8397da1..40acba723d835f1cbacf4b557d6d046089843c1c 100644 (file)
@@ -88,14 +88,14 @@ export function parseQuery(query: RawQuery): Query {
     availableSince: parseAsDate(query.available_since),
     cleanCodeAttributeCategories: parseAsArray<CleanCodeAttributeCategory>(
       query.cleanCodeAttributeCategories,
-      parseAsString
+      parseAsString,
     ),
     compareToProfile: parseAsOptionalString(query.compareToProfile),
     cwe: parseAsArray(query.cwe, parseAsString),
     impactSeverities: parseAsArray<SoftwareImpactSeverity>(query.impactSeverities, parseAsString),
     impactSoftwareQualities: parseAsArray<SoftwareQuality>(
       query.impactSoftwareQualities,
-      parseAsString
+      parseAsString,
     ),
     inheritance: parseAsInheritance(query.inheritance),
     languages: parseAsArray(query.languages, parseAsString),
index 5a9221be36b02f04eed3933ba00e21bbd92477b4..cbb95867ac9db3c5a2c7f3ca215910b4867aa2eb 100644 (file)
@@ -52,7 +52,7 @@ function HashEditWrapper() {
       };
       navigate(
         { pathname: location.pathname, search: new URLSearchParams(normalizedQuery).toString() },
-        { replace: true }
+        { replace: true },
       );
     }
   }, [location, navigate]);
index 8d0baf6d281595a4b289a610dd9e3aa829c24e33..c34b4c991b349eddb38e653ef534d7cc16f5d2e6 100644 (file)
@@ -42,7 +42,7 @@ jest.mock('lodash', () => ({
 jest.mock('../../../api/metrics', () => {
   const { DEFAULT_METRICS } = jest.requireActual('../../../helpers/mocks/metrics');
   const metrics = Object.values(MetricKey).map(
-    (key) => DEFAULT_METRICS[key] ?? mockMetric({ key })
+    (key) => DEFAULT_METRICS[key] ?? mockMetric({ key }),
   );
   return {
     getAllMetrics: jest.fn().mockResolvedValue(metrics),
@@ -170,7 +170,7 @@ describe('rendering', () => {
     await ui.appLoaded();
 
     expect(
-      within(ui.noAccessWarning.get()).getByText('component_measures.not_all_measures_are_shown')
+      within(ui.noAccessWarning.get()).getByText('component_measures.not_all_measures_are_shown'),
     ).toBeInTheDocument();
   });
 
@@ -205,7 +205,7 @@ describe('rendering', () => {
         }),
         ancestors: [tree.component],
         children: [],
-      }))
+      })),
     );
     componentsHandler.registerComponentTree(tree);
     measuresHandler.registerComponentMeasures(
@@ -218,7 +218,7 @@ describe('rendering', () => {
           }),
         };
         return acc;
-      }, measures)
+      }, measures),
     );
 
     const { ui, user } = getPageObject();
@@ -239,7 +239,7 @@ describe('rendering', () => {
     await user.click(ui.measureBtn('Code Smells 8').get());
     expect(ui.goToActivityLink.get()).toHaveAttribute(
       'href',
-      '/project/activity?id=foo&graph=custom&custom_metrics=code_smells'
+      '/project/activity?id=foo&graph=custom&custom_metrics=code_smells',
     );
   });
 
@@ -272,18 +272,18 @@ describe('navigation', () => {
 
     await user.click(ui.measureBtn('Code Smells 8').get());
     expect(
-      within(ui.measuresRow('folderA').get()).getByRole('cell', { name: '3' })
+      within(ui.measuresRow('folderA').get()).getByRole('cell', { name: '3' }),
     ).toBeInTheDocument();
     expect(
-      within(ui.measuresRow('test1.js').get()).getByRole('cell', { name: '2' })
+      within(ui.measuresRow('test1.js').get()).getByRole('cell', { name: '2' }),
     ).toBeInTheDocument();
 
     await user.click(ui.fileLink('folderA').get());
     expect(
-      within(ui.measuresRow('out.tsx').get()).getByRole('cell', { name: '1' })
+      within(ui.measuresRow('out.tsx').get()).getByRole('cell', { name: '1' }),
     ).toBeInTheDocument();
     expect(
-      within(ui.measuresRow('in.tsx').get()).getByRole('cell', { name: '2' })
+      within(ui.measuresRow('in.tsx').get()).getByRole('cell', { name: '2' }),
     ).toBeInTheDocument();
 
     await user.click(ui.fileLink('out.tsx').get());
@@ -305,10 +305,10 @@ describe('navigation', () => {
     await ui.changeViewToList();
 
     expect(
-      within(ui.measuresRow('out.tsx').get()).getByRole('cell', { name: '1' })
+      within(ui.measuresRow('out.tsx').get()).getByRole('cell', { name: '1' }),
     ).toBeInTheDocument();
     expect(
-      within(ui.measuresRow('test1.js').get()).getByRole('cell', { name: '2' })
+      within(ui.measuresRow('test1.js').get()).getByRole('cell', { name: '2' }),
     ).toBeInTheDocument();
 
     await user.click(ui.fileLink('out.tsx').get());
@@ -352,10 +352,10 @@ describe('navigation', () => {
     });
 
     expect(
-      within(ui.measuresRow('out.tsx').get()).getByRole('cell', { name: '1' })
+      within(ui.measuresRow('out.tsx').get()).getByRole('cell', { name: '1' }),
     ).toBeInTheDocument();
     expect(
-      within(ui.measuresRow('in.tsx').get()).getByRole('cell', { name: '2' })
+      within(ui.measuresRow('in.tsx').get()).getByRole('cell', { name: '2' }),
     ).toBeInTheDocument();
 
     // Move back to project.
@@ -364,7 +364,7 @@ describe('navigation', () => {
     });
 
     expect(
-      within(ui.measuresRow('folderA').get()).getByRole('cell', { name: '3' })
+      within(ui.measuresRow('folderA').get()).getByRole('cell', { name: '3' }),
     ).toBeInTheDocument();
 
     await act(async () => {
@@ -386,7 +386,7 @@ describe('redirects', () => {
   it('should redirect old history route', () => {
     renderMeasuresApp('component_measures/metric/bugs/history?id=foo');
     expect(
-      screen.getByText('/project/activity?id=foo&graph=custom&custom_metrics=bugs')
+      screen.getByText('/project/activity?id=foo&graph=custom&custom_metrics=bugs'),
     ).toBeInTheDocument();
   });
 
@@ -422,7 +422,7 @@ it('should allow to load more components', async () => {
       }),
       ancestors: [tree.component],
       children: [],
-    }))
+    })),
   );
   componentsHandler.registerComponentTree(tree);
 
@@ -545,6 +545,6 @@ function renderMeasuresApp(navigateTo?: string, componentContext?: Partial<Compo
     'component_measures',
     routes,
     { navigateTo, featureList: [Feature.BranchSupport] },
-    { component: mockComponent({ key: 'foo' }), ...componentContext }
+    { component: mockComponent({ key: 'foo' }), ...componentContext },
   );
 }
index 1ba9141ce063b0770731c115bbf0199b93c9e766..b74e7998c28ba9c47aea6e06bde09129b18b6517 100644 (file)
@@ -75,7 +75,7 @@ describe('filterMeasures', () => {
             type: 'INT',
           },
         },
-      ])
+      ]),
     ).toHaveLength(1);
   });
 });
@@ -103,7 +103,7 @@ describe('sortMeasures', () => {
         { metric: { id: '3', key: MetricKey.new_bugs, name: 'new_bugs', type: 'INT' } },
         { metric: { id: '4', key: MetricKey.bugs, name: 'bugs', type: 'INT' } },
         'overall_category',
-      ])
+      ]),
     ).toMatchSnapshot();
   });
 });
@@ -126,7 +126,7 @@ describe('parseQuery', () => {
       view: utils.DEFAULT_VIEW,
     });
     expect(
-      utils.parseQuery({ metric: 'foo', selected: 'bar', view: 'tree', asc: 'false' })
+      utils.parseQuery({ metric: 'foo', selected: 'bar', view: 'tree', asc: 'false' }),
     ).toEqual({
       metric: 'foo',
       selected: 'bar',
@@ -147,7 +147,7 @@ describe('serializeQuery', () => {
       view: 'list',
     });
     expect(
-      utils.serializeQuery({ metric: 'foo', selected: 'bar', view: MeasurePageView.tree })
+      utils.serializeQuery({ metric: 'foo', selected: 'bar', view: MeasurePageView.tree }),
     ).toEqual({
       metric: 'foo',
       selected: 'bar',
index 1d58466994b3a083ca6ff434d0e21a5b354c9348..380322a967d59d853fae28a64b7676d03a62523a 100644 (file)
@@ -100,7 +100,7 @@ class ComponentMeasuresApp extends React.PureComponent<Props, State> {
         this.setState({ metrics: byKey });
         this.fetchMeasures(byKey);
       },
-      () => {}
+      () => {},
     );
   }
 
@@ -132,7 +132,7 @@ class ComponentMeasuresApp extends React.PureComponent<Props, State> {
       ({ component, period }) => {
         if (this.mounted) {
           const measures = banQualityGateMeasure(component).map((measure) =>
-            enhanceMeasure(measure, metrics)
+            enhanceMeasure(measure, metrics),
           );
 
           const leakPeriod =
@@ -142,7 +142,7 @@ class ComponentMeasuresApp extends React.PureComponent<Props, State> {
             loading: false,
             leakPeriod,
             measures: measures.filter(
-              (measure) => measure.value !== undefined || measure.leak !== undefined
+              (measure) => measure.value !== undefined || measure.leak !== undefined,
             ),
           });
         }
@@ -151,7 +151,7 @@ class ComponentMeasuresApp extends React.PureComponent<Props, State> {
         if (this.mounted) {
           this.setState({ loading: false });
         }
-      }
+      },
     );
   }
 
index dc2b236b8220e50e0a56f4f9a128c11888b5fb6d..54685b9024109e2d7bd1c83b8ccc5a15bc24e488 100644 (file)
@@ -59,7 +59,7 @@ class LeakPeriodLegend extends React.PureComponent<LeakPeriodLegendProps & Wrapp
 
     const leakPeriodLabel = getNewCodePeriodLabel(
       period,
-      period.mode === 'manual_baseline' ? this.formatDateTime : this.formatDate
+      period.mode === 'manual_baseline' ? this.formatDateTime : this.formatDate,
     );
 
     const label = (
index f055182097dc8155ffff2341dc29607c1d41ab66..fbfa07fd775197a108ff1d1a817577042033516f 100644 (file)
@@ -137,7 +137,7 @@ export default class MeasureContent extends React.PureComponent<Props, State> {
           }
 
           const components = tree.components.map((component) =>
-            enhanceComponent(component, metric, metrics)
+            enhanceComponent(component, metric, metrics),
           );
 
           const measure = measures.find((m) => m.metric === requestedMetric.key);
@@ -155,7 +155,7 @@ export default class MeasureContent extends React.PureComponent<Props, State> {
               components.find(
                 (c) =>
                   getComponentMeasureUniqueKey(c) ===
-                  getComponentMeasureUniqueKey(selectedComponent)
+                  getComponentMeasureUniqueKey(selectedComponent),
               )
                 ? selectedComponent
                 : undefined,
@@ -164,7 +164,7 @@ export default class MeasureContent extends React.PureComponent<Props, State> {
       },
       () => {
         /* noop */
-      }
+      },
     );
   };
 
@@ -197,14 +197,14 @@ export default class MeasureContent extends React.PureComponent<Props, State> {
         if (this.mounted) {
           this.setState({ loadingMoreComponents: false });
         }
-      }
+      },
     );
   };
 
   getComponentRequestParams(
     view: MeasurePageView,
     metric: Pick<Metric, 'key' | 'direction'>,
-    options: Object = {}
+    options: Object = {},
   ) {
     const strategy = view === MeasurePageView.list ? 'leaves' : 'children';
     const metricKeys = [metric.key];
@@ -259,7 +259,7 @@ export default class MeasureContent extends React.PureComponent<Props, State> {
       const comp = this.state.components.find(
         (c) =>
           c.refKey === component.key ||
-          getComponentMeasureUniqueKey(c) === getComponentMeasureUniqueKey(component)
+          getComponentMeasureUniqueKey(c) === getComponentMeasureUniqueKey(component),
       );
 
       if (comp) {
@@ -285,7 +285,7 @@ export default class MeasureContent extends React.PureComponent<Props, State> {
       ? getComponentMeasureUniqueKey(this.state.baseComponent)
       : getComponentMeasureUniqueKey(this.state.selectedComponent);
     const index = this.state.components.findIndex(
-      (component) => getComponentMeasureUniqueKey(component) === componentKey
+      (component) => getComponentMeasureUniqueKey(component) === componentKey,
     );
     return index !== -1 ? index : undefined;
   };
index e26f7d7d2b63c7d3e82194be34eb71802cc0af36..d4cd99a31ce6318ed71d4c8b8dbecd92c3a86aa5 100644 (file)
@@ -69,7 +69,7 @@ export default function MeasureHeader(props: Props) {
                   measureValue
                     ? translateWithParameters(
                         'metric.has_rating_X',
-                        formatMeasure(measureValue, MetricType.Rating)
+                        formatMeasure(measureValue, MetricType.Rating),
                       )
                     : translate('metric.no_rating')
                 }
index 4fb34c5cfa34e2ddf552e5bdbe559704b1d43b57..0a467a268db4692aa7b0ba1eac3d12080b34ab11 100644 (file)
@@ -114,7 +114,7 @@ export default class MeasureOverview extends React.PureComponent<Props, State> {
           this.props.updateLoading({ bubbles: false });
         }
       },
-      () => this.props.updateLoading({ bubbles: false })
+      () => this.props.updateLoading({ bubbles: false }),
     );
   };
 
index f97567175bf14086ebdad940b33e53f30ff977dd..51dd4c65d39e19e2812b343373648f471e84aa17 100644 (file)
@@ -99,7 +99,7 @@ export default class MeasureOverviewContainer extends React.PureComponent<Props,
           this.updateLoading({ component: false });
         }
       },
-      () => this.updateLoading({ component: false })
+      () => this.updateLoading({ component: false }),
     );
   };
 
index 7eca8c1f17260f832fc7e8a8b2783c41754771d4..a46579b50e4b182ebf74f28e39545a3557934b7c 100644 (file)
@@ -92,7 +92,7 @@ export default class MeasuresBreadcrumbs extends React.PureComponent<Props, Stat
           this.setState({ breadcrumbs });
         }
       },
-      () => {}
+      () => {},
     );
   };
 
index 5c908450ce96e101ed8451b20b08efdc29788b22..9b917ff1026b0c2dc67e10f2db8e089232f75a91 100644 (file)
@@ -65,6 +65,6 @@ it('renders correctly with big period', () => {
 
 function renderLeakPeriodLegend(overrides: Partial<LeakPeriodLegendProps> = {}) {
   return renderComponent(
-    <LeakPeriodLegend component={mockComponentMeasure()} period={PERIOD} {...overrides} />
+    <LeakPeriodLegend component={mockComponentMeasure()} period={PERIOD} {...overrides} />,
   );
 }
index 9eb1d4ac8186431ae4edbe88d9be01ac1af982de..cce007d8b29819771e7aa09347dbcdfeef0d3409 100644 (file)
@@ -89,7 +89,7 @@ export default class BubbleChartView extends React.PureComponent<Props, State> {
   getTooltip(
     component: ComponentMeasureEnhanced,
     values: { x: number; y: number; size: number; colors?: Array<number | undefined> },
-    metrics: { x: Metric; y: Metric; size: Metric; colors?: Metric[] }
+    metrics: { x: Metric; y: Metric; size: Metric; colors?: Metric[] },
   ) {
     const inner = [
       [component.name, isProject(component.qualifier) ? component.branch : undefined]
@@ -204,7 +204,7 @@ export default class BubbleChartView extends React.PureComponent<Props, State> {
       ? translate('component_measures.overview', domain, 'title')
       : translateWithParameters(
           'component_measures.domain_x_overview',
-          getLocalizedMetricDomain(domain)
+          getLocalizedMetricDomain(domain),
         );
 
     return (
@@ -248,7 +248,7 @@ export default class BubbleChartView extends React.PureComponent<Props, State> {
                 {colorsMetric.length > 1
                   ? translateWithParameters(
                       'component_measures.legend.worse_of_x_y',
-                      ...colorsMetric.map((metric) => getLocalizedMetricName(metric))
+                      ...colorsMetric.map((metric) => getLocalizedMetricName(metric)),
                     )
                   : getLocalizedMetricName(colorsMetric[0])}
               </span>
index 7c7b01ccbbcaa22e862b64934667f54808987f5c..ff7d50bcc6df3a0162634c92a30ae6874749806f 100644 (file)
@@ -69,7 +69,7 @@ export default function ComponentCell(props: ComponentCellProps) {
     selectionKey,
     metric.key,
     component.branch ? fillBranchLike(component.branch) : branchLike,
-    view
+    view,
   );
 
   // This metric doesn't exist for project
index 69a0dda1d3502e33ad7b9f8084a8b97ffc449e79..89b5444ce5ada037aad752a8e58d9e3f700664a8 100644 (file)
@@ -186,9 +186,9 @@ export default class FilesView extends React.PureComponent<Props, State> {
               'component_measures.hidden_best_score_metrics',
               formatMeasure(
                 this.props.paging.total - filteredComponents.length,
-                MetricType.Integer
+                MetricType.Integer,
               ),
-              formatMeasure(this.props.metric.bestValue, this.props.metric.type)
+              formatMeasure(this.props.metric.bestValue, this.props.metric.type),
             )}
             <ButtonSecondary
               onClick={this.handleShowBestMeasures}
index db075edbbca88d25121de63413bfdcea3447bac3..1bf6c6a184a3a2a037bcfd5bbc667e594235d0ac 100644 (file)
@@ -50,7 +50,7 @@ export default function MeasureCell({ component, measure, metric }: Props) {
               value
                 ? translateWithParameters(
                     'metric.has_rating_X',
-                    formatMeasure(value, MetricType.Rating)
+                    formatMeasure(value, MetricType.Rating),
                   )
                 : translate('metric.no_rating')
             }
index c5a585643cd9408d8ee3a3ae97494235cab79d8a..f31bb10e84ea8ef8874f9e5dee3fb0fd5d2a0701 100644 (file)
@@ -76,7 +76,7 @@ export default class TreeMapView extends React.PureComponent<Props, State> {
     return components
       .map((component) => {
         const colorMeasure = component.measures.find(
-          (measure) => measure.metric.key === metric.key
+          (measure) => measure.metric.key === metric.key,
         );
         const sizeMeasure = component.measures.find((measure) => measure.metric.key !== metric.key);
         if (!sizeMeasure) {
@@ -216,7 +216,7 @@ export default class TreeMapView extends React.PureComponent<Props, State> {
             {translate(
               'metric',
               sizeMeasure && sizeMeasure.metric ? sizeMeasure.metric.key : MetricKey.ncloc,
-              'name'
+              'name',
             )}
           </span>
           <span>{this.renderLegend()}</span>
index e1f6a624b227b808270615198583b59d2064e991..92017149a0a3b73a7adce47d1c887f9624f70a79 100644 (file)
@@ -58,7 +58,7 @@ function MetricRedirect() {
           id: searchParams.get('id') ?? undefined,
           graph: 'custom',
           custom_metrics: params.metricKey,
-        })
+        }),
       ).toString(),
     };
     return <Navigate to={to} replace />;
@@ -70,7 +70,7 @@ function MetricRedirect() {
         ...searchParamsToQuery(searchParams),
         metric: params.metricKey,
         view: params.view,
-      })
+      }),
     ).toString(),
   };
   return <Navigate to={to} replace />;
index 7828bbc16891052b741fe3f3969084cc8460a05e..3e6fa70bbe49c13db58c68bc3ad56805f53874df 100644 (file)
@@ -104,7 +104,7 @@ export default function DomainSubnavigation(props: Props) {
             onChange={onChange}
             selected={selected}
           />
-        )
+        ),
       )}
     </SubnavigationAccordion>
   );
index f8d68f61eb50f4e587d811d87e58d1fc2829db2d..9794cefc834823db0e134d0c321f6c0172ab8fed 100644 (file)
@@ -64,7 +64,7 @@ export default function Sidebar(props: Props) {
     (metric: string) => {
       updateQuery({ metric });
     },
-    [updateQuery]
+    [updateQuery],
   );
 
   const handleProjectOverviewClick = () => {
index 74cfb3557954b8b41c220e21bc9de5cdc51be02e..e146258c98591de39eb9df639504743eb50ab21e 100644 (file)
@@ -78,7 +78,7 @@ export function filterMeasures(measures: MeasureEnhanced[]): MeasureEnhanced[] {
 
 export function sortMeasures(
   domainName: string,
-  measures: Array<MeasureEnhanced | string>
+  measures: Array<MeasureEnhanced | string>,
 ): Array<MeasureEnhanced | string> {
   const config = domains[domainName] || {};
   const configOrder = config.order || [];
@@ -106,7 +106,7 @@ export function addMeasureCategories(domainName: string, measures: MeasureEnhanc
 export function enhanceComponent(
   component: ComponentMeasure,
   metric: Pick<Metric, 'key'> | undefined,
-  metrics: Dict<Metric>
+  metrics: Dict<Metric>,
 ): ComponentMeasureEnhanced {
   if (!component.measures) {
     return { ...component, measures: [] };
@@ -158,7 +158,7 @@ export const groupByDomains = memoize((measures: MeasureEnhanced[]) => {
 
 export function hasList(metric: string): boolean {
   return ![MetricKey.releasability_rating, MetricKey.releasability_effort].includes(
-    metric as MetricKey
+    metric as MetricKey,
   );
 }
 
index 1ed1577464c377651e34c398a8f7456670aec22e..bb511fa73351b188006ca01d835151599007cacb 100644 (file)
@@ -192,7 +192,7 @@ export default class AzureProjectCreate extends React.PureComponent<Props, State
 
     const searchResults: AzureRepository[] = await searchAzureRepositories(
       selectedAlmInstance.key,
-      searchQuery
+      searchQuery,
     )
       .then(({ repositories }) => repositories)
       .catch(() => []);
@@ -215,7 +215,7 @@ export default class AzureProjectCreate extends React.PureComponent<Props, State
           almSetting: selectedAlmInstance.key,
           projectName: selectedRepository.projectName,
           repositoryName: selectedRepository.name,
-        })
+        }),
       );
     }
   };
@@ -238,7 +238,7 @@ export default class AzureProjectCreate extends React.PureComponent<Props, State
         this.fetchData().catch(() => {
           /* noop */
         });
-      }
+      },
     );
   };
 
index 8ea226667a8a7743a53390efbd92ecf3bdd9cf4b..20b0549034c616e38ca26154f1dd160750ce45a7 100644 (file)
@@ -88,12 +88,12 @@ export default function AzureProjectsList(props: AzureProjectsListProps) {
             name: r.projectName,
             description: translateWithParameters(
               'onboarding.create_project.azure.search_results_for_project_X',
-              r.projectName
+              r.projectName,
             ),
           }
         );
       }),
-      'name'
+      'name',
     );
   } else {
     filteredProjects = projects;
index e33feb31cafc3d3770c2f100ad8951819d91d1a8..7cf0a432fc257c7cec21e48435806e83565264d4 100644 (file)
@@ -160,13 +160,13 @@ export default function BitbucketCloudPersonalAccessTokenForm({
             <FormattedMessage
               id="onboarding.create_project.enter_password.instructions.bitbucket_cloud"
               defaultMessage={translate(
-                'onboarding.create_project.enter_password.instructions.bitbucket_cloud'
+                'onboarding.create_project.enter_password.instructions.bitbucket_cloud',
               )}
               values={{
                 link: (
                   <Link to="https://bitbucket.org/account/settings/app-passwords/new">
                     {translate(
-                      'onboarding.create_project.enter_password.instructions.bitbucket_cloud.link'
+                      'onboarding.create_project.enter_password.instructions.bitbucket_cloud.link',
                     )}
                   </Link>
                 ),
index 8012134258beefd0ce1caad58c243086c7a40ae3..4658635229222a86bdc208b557e8a00ce824dfe2 100644 (file)
@@ -112,7 +112,7 @@ export default class BitbucketCloudProjectCreate extends React.PureComponent<Pro
         selectedAlmInstance.key,
         searchQuery,
         pageSize,
-        pageIndex
+        pageIndex,
       ).catch(() => {
         this.handleError();
         return { isLastPage: undefined, repositories: undefined };
@@ -159,9 +159,9 @@ export default class BitbucketCloudProjectCreate extends React.PureComponent<Pro
           },
           () => {
             /* noop */
-          }
+          },
         );
-      }
+      },
     );
   };
 
@@ -183,9 +183,9 @@ export default class BitbucketCloudProjectCreate extends React.PureComponent<Pro
           },
           () => {
             /* noop */
-          }
+          },
         );
-      }
+      },
     );
   };
 
@@ -197,7 +197,7 @@ export default class BitbucketCloudProjectCreate extends React.PureComponent<Pro
         setupBitbucketCloudProjectCreation({
           almSetting: selectedAlmInstance.key,
           repositorySlug,
-        })
+        }),
       );
     }
   };
index 0682393082bc44b4125361882bfdf393a865cd90..495887aba0b77067ac814fdb6711066937ac76af 100644 (file)
@@ -47,7 +47,7 @@ export interface BitbucketCloudProjectCreateRendererProps {
 }
 
 export default function BitbucketCloudProjectCreateRenderer(
-  props: BitbucketCloudProjectCreateRendererProps
+  props: BitbucketCloudProjectCreateRendererProps,
 ) {
   const {
     almInstances,
index a2d11496fcccadb06adfc043b56fdb91c9b5eaa6..07cc3d9825d86090e62ff5670a6084f7da93d06d 100644 (file)
@@ -103,7 +103,7 @@ export default function BitbucketProjectAccordion(props: BitbucketProjectAccordi
             <FlagMessage variant="warning">
               {translateWithParameters(
                 'onboarding.create_project.only_showing_X_first_repos',
-                repositoryCount
+                repositoryCount,
               )}
             </FlagMessage>
           )}
index 87b2af6cc2f960a811e5b16e36c3707a49e61515..0815912f45be65470fbe476dcfd3aae73257aeca 100644 (file)
@@ -95,7 +95,7 @@ export default class BitbucketProjectCreate extends React.PureComponent<Props, S
       let projectRepositories;
       if (projects && projects.length > 0) {
         projectRepositories = await this.fetchBitbucketRepositories(projects).catch(
-          () => undefined
+          () => undefined,
         );
       }
 
@@ -120,7 +120,7 @@ export default class BitbucketProjectCreate extends React.PureComponent<Props, S
   };
 
   fetchBitbucketRepositories = (
-    projects: BitbucketProject[]
+    projects: BitbucketProject[],
   ): Promise<BitbucketProjectRepositories | undefined> => {
     const { selectedAlmInstance } = this.state;
 
@@ -155,15 +155,15 @@ export default class BitbucketProjectCreate extends React.PureComponent<Props, S
               isLastPage: realIsLastPage,
               projectKey: p.key,
             };
-          }
+          },
         );
-      })
+      }),
     ).then((results) => {
       return results.reduce(
         (acc: BitbucketProjectRepositories, { isLastPage, projectKey, repositories }) => {
           return { ...acc, [projectKey]: { allShown: isLastPage, repositories } };
         },
-        {}
+        {},
       );
     });
   };
@@ -189,7 +189,7 @@ export default class BitbucketProjectCreate extends React.PureComponent<Props, S
           almSetting: selectedAlmInstance.key,
           projectKey: selectedRepository.projectKey,
           repositorySlug: selectedRepository.slug,
-        })
+        }),
       );
     }
   };
index 8caf9497501199dc57bb1184db6d4cdc723cce35..1daa02e8e98091af5028b97665ffa419cb668a06 100644 (file)
@@ -36,12 +36,12 @@ export default function BitbucketRepositories(props: BitbucketRepositoriesProps)
   const { projects, projectRepositories } = props;
 
   const [openProjectKeys, setOpenProjectKeys] = React.useState(
-    projects.length > 0 ? [projects[0].key] : []
+    projects.length > 0 ? [projects[0].key] : [],
   );
 
   const handleClick = (isOpen: boolean, projectKey: string) => {
     setOpenProjectKeys(
-      isOpen ? without(openProjectKeys, projectKey) : uniq([...openProjectKeys, projectKey])
+      isOpen ? without(openProjectKeys, projectKey) : uniq([...openProjectKeys, projectKey]),
     );
   };
 
index 479d75f929a622590c170102a9c19a9ce6f758f8..8972d4a782c58bfea29eb0e2b098040c69f38ea2 100644 (file)
@@ -42,11 +42,11 @@ export default function BitbucketSearchResults(props: BitbucketSearchResultsProp
   }
 
   const filteredProjects = projects.filter((p) =>
-    searchResults.some((r) => r.projectKey === p.key)
+    searchResults.some((r) => r.projectKey === p.key),
   );
   const filteredProjectKeys = filteredProjects.map((p) => p.key);
   const filteredSearchResults = searchResults.filter(
-    (r) => !filteredProjectKeys.includes(r.projectKey)
+    (r) => !filteredProjectKeys.includes(r.projectKey),
   );
 
   return (
index 885f69aa646e907cbb4698807ff89852894cb986..1380c2c4e10e43e198b7869ecec013b26e94289a 100644 (file)
@@ -122,13 +122,13 @@ export default function BitbucketServerPersonalAccessTokenForm({
             <FormattedMessage
               id="onboarding.create_project.pat_help.instructions.bitbucket_server"
               defaultMessage={translate(
-                'onboarding.create_project.pat_help.instructions.bitbucket_server'
+                'onboarding.create_project.pat_help.instructions.bitbucket_server',
               )}
               values={{
                 link: url ? (
                   <Link to={`${url.replace(/\/$/, '')}/account`}>
                     {translate(
-                      'onboarding.create_project.pat_help.instructions.bitbucket_server.link'
+                      'onboarding.create_project.pat_help.instructions.bitbucket_server.link',
                     )}
                   </Link>
                 ) : (
index 1c0dd2de98ceb6269b68508677704b73412e5c2e..84d9c2afd3806000c4edb7ffde454c7e0e2843d9 100644 (file)
@@ -63,7 +63,7 @@ const almList: almList = [
 function renderAlmOption(
   props: CreateProjectModeSelectionProps,
   alm: AlmKeys,
-  mode: CreateProjectModes
+  mode: CreateProjectModes,
 ) {
   const {
     almCounts,
@@ -126,7 +126,7 @@ function separateAvailableOptions(almCounts: CreateProjectModeSelectionProps['al
   const availableOptions: almList = [];
   const unavailableOptions: almList = [];
   almList.forEach(({ key, mode }) =>
-    (almCounts[key] > 0 ? availableOptions : unavailableOptions).push({ key, mode })
+    (almCounts[key] > 0 ? availableOptions : unavailableOptions).push({ key, mode }),
   );
   return {
     availableOptions,
index 14dc303bc3095edd9f14eae0a5c7b62160b5b672..70ca875fe663c5472f270fce0fc527e5b5fe6f5d 100644 (file)
@@ -104,7 +104,7 @@ export default class GitHubProjectCreate extends React.Component<Props, State> {
       almInstances,
     } = this.props;
     const selectedAlmInstance = almInstances.find(
-      (instance) => instance.key === selectedAlmInstanceKey
+      (instance) => instance.key === selectedAlmInstanceKey,
     );
     if (selectedAlmInstance) {
       return selectedAlmInstance;
@@ -155,7 +155,7 @@ export default class GitHubProjectCreate extends React.Component<Props, State> {
         value: encodeURIComponent(
           `${getHostUrl()}/projects/create?mode=${AlmKeys.GitHub}&almInstance=${
             selectedAlmInstance.key
-          }`
+          }`,
         ),
       },
     ]
@@ -268,7 +268,7 @@ export default class GitHubProjectCreate extends React.Component<Props, State> {
           almSetting: selectedAlmInstance.key,
           organization: selectedOrganization.key,
           repositoryKey: repoKey,
-        })
+        }),
       );
     }
   };
@@ -280,7 +280,7 @@ export default class GitHubProjectCreate extends React.Component<Props, State> {
         this.initialize().catch(() => {
           /* noop */
         });
-      }
+      },
     );
   };
 
index 722a20276974dee81e764914245fac87f252be19..9cb78a8a90cab31a36d9c2c84815b68853e6f0e8 100644 (file)
@@ -199,7 +199,7 @@ export default function GitHubProjectCreateRenderer(props: GitHubProjectCreateRe
                           link: (
                             <Link to="/admin/settings?category=almintegration">
                               {translate(
-                                'onboarding.create_project.github.warning.message_admin.link'
+                                'onboarding.create_project.github.warning.message_admin.link',
                               )}
                             </Link>
                           ),
index d7b47b15c2f6647dc0f2658ef104836a0db1651e..ccab7b7b2e432527a31d175c4eb0cecf92eae15c 100644 (file)
@@ -139,7 +139,7 @@ export default class GitlabProjectCreate extends React.PureComponent<Props, Stat
 
     if (selectedAlmInstance) {
       this.props.onProjectSetupDone(
-        setupGitlabProjectCreation({ almSetting: selectedAlmInstance.key, gitlabProjectId })
+        setupGitlabProjectCreation({ almSetting: selectedAlmInstance.key, gitlabProjectId }),
       );
     }
   };
index 747cc0a90052a4cd053f31355db4aa2caaeeb4cc..47ee1d8c54df0accfc59172d2cce64bde751ec77 100644 (file)
@@ -103,27 +103,27 @@ it('should show import project feature when PAT is already set', async () => {
   expect(
     screen.getByRole('row', {
       name: 'Azure repo 1 onboarding.create_project.repository_imported',
-    })
+    }),
   ).toBeInTheDocument();
 
   expect(
     screen.getByRole('row', {
       name: 'Azure repo 2 onboarding.create_project.import',
-    })
+    }),
   ).toBeInTheDocument();
 
   const importButton = screen.getByText('onboarding.create_project.import');
   await user.click(importButton);
 
   expect(
-    screen.getByRole('heading', { name: 'onboarding.create_project.new_code_definition.title' })
+    screen.getByRole('heading', { name: 'onboarding.create_project.new_code_definition.title' }),
   ).toBeInTheDocument();
 
   await user.click(screen.getByRole('radio', { name: 'new_code_definition.global_setting' }));
   await user.click(
     screen.getByRole('button', {
       name: 'onboarding.create_project.new_code_definition.create_project',
-    })
+    }),
   );
 
   expect(await screen.findByText('/dashboard?id=key')).toBeInTheDocument();
@@ -140,7 +140,7 @@ it('should show search filter when PAT is already set', async () => {
 
   // Should search with positive results
   const inputSearch = screen.getByPlaceholderText(
-    'onboarding.create_project.search_projects_repositories'
+    'onboarding.create_project.search_projects_repositories',
   );
   await user.click(inputSearch);
   await user.keyboard('s');
index 1072dfe83cc9333b8e5008ebd6de237c6e809a1a..cd517e202ba3d2888c78dc4fbf06a18087dd96c9 100644 (file)
@@ -81,7 +81,7 @@ it('should ask for PAT when it is not set yet and show the import project featur
   await user.click(
     screen.getByRole('textbox', {
       name: /onboarding.create_project.enter_pat/,
-    })
+    }),
   );
 
   await user.keyboard('password');
@@ -109,13 +109,13 @@ it('should show import project feature when PAT is already set', async () => {
   const projectItem = screen.getByRole('region', { name: /Bitbucket Project 1/ });
 
   expect(
-    within(projectItem).getByText('onboarding.create_project.repository_imported')
+    within(projectItem).getByText('onboarding.create_project.repository_imported'),
   ).toBeInTheDocument();
 
   expect(within(projectItem).getByRole('link', { name: /Bitbucket Repo 1/ })).toBeInTheDocument();
   expect(within(projectItem).getByRole('link', { name: /Bitbucket Repo 1/ })).toHaveAttribute(
     'href',
-    '/dashboard?id=key'
+    '/dashboard?id=key',
   );
 
   await user.click(projectItem);
@@ -123,27 +123,27 @@ it('should show import project feature when PAT is already set', async () => {
   expect(
     screen.getByRole('row', {
       name: 'Bitbucket Repo 1 onboarding.create_project.repository_imported',
-    })
+    }),
   ).toBeInTheDocument();
 
   expect(
     screen.getByRole('row', {
       name: 'Bitbucket Repo 2 onboarding.create_project.import',
-    })
+    }),
   ).toBeInTheDocument();
 
   const importButton = screen.getByText('onboarding.create_project.import');
   await user.click(importButton);
 
   expect(
-    screen.getByRole('heading', { name: 'onboarding.create_project.new_code_definition.title' })
+    screen.getByRole('heading', { name: 'onboarding.create_project.new_code_definition.title' }),
   ).toBeInTheDocument();
 
   await user.click(screen.getByRole('radio', { name: 'new_code_definition.global_setting' }));
   await user.click(
     screen.getByRole('button', {
       name: 'onboarding.create_project.new_code_definition.create_project',
-    })
+    }),
   );
 
   expect(await screen.findByText('/dashboard?id=key')).toBeInTheDocument();
@@ -168,7 +168,7 @@ it('should show search filter when PAT is already set', async () => {
 
   expect(searchForBitbucketServerRepositories).toHaveBeenLastCalledWith(
     'conf-bitbucketserver-2',
-    'search'
+    'search',
   );
 });
 
index 8cf355084dab21252dc7220a2a11f9cdc3c01fc2..9886b30d6bed240cd0a62f67c5d1bb0b52d1a80b 100644 (file)
@@ -40,7 +40,7 @@ let newCodePeriodHandler: NewCodeDefinitionServiceMock;
 
 const ui = {
   bitbucketCloudCreateProjectButton: byText(
-    'onboarding.create_project.select_method.bitbucketcloud'
+    'onboarding.create_project.select_method.bitbucketcloud',
   ),
   personalAccessTokenInput: byRole('textbox', {
     name: /onboarding.create_project.enter_pat/,
@@ -79,16 +79,16 @@ it('should ask for PAT when it is not set yet and show the import project featur
   expect(await ui.instanceSelector.find()).toBeInTheDocument();
 
   expect(
-    screen.getByText('onboarding.create_project.bitbucket_cloud.enter_password')
+    screen.getByText('onboarding.create_project.bitbucket_cloud.enter_password'),
   ).toBeInTheDocument();
   expect(
-    screen.getByText('onboarding.create_project.enter_password.instructions.bitbucket_cloud')
+    screen.getByText('onboarding.create_project.enter_password.instructions.bitbucket_cloud'),
   ).toBeInTheDocument();
 
   expect(
     screen.getByText(
-      'onboarding.create_project.pat.expired.info_message onboarding.create_project.pat.expired.info_message_contact'
-    )
+      'onboarding.create_project.pat.expired.info_message onboarding.create_project.pat.expired.info_message_contact',
+    ),
   ).toBeInTheDocument();
 
   expect(screen.getByRole('button', { name: 'save' })).toBeDisabled();
@@ -96,7 +96,7 @@ it('should ask for PAT when it is not set yet and show the import project featur
   await user.click(
     screen.getByRole('textbox', {
       name: /onboarding.create_project.bitbucket_cloud.enter_username/,
-    })
+    }),
   );
 
   await user.keyboard('username');
@@ -104,7 +104,7 @@ it('should ask for PAT when it is not set yet and show the import project featur
   await user.click(
     screen.getByRole('textbox', {
       name: /onboarding.create_project.bitbucket_cloud.enter_password/,
-    })
+    }),
   );
 
   await user.keyboard('password');
@@ -133,15 +133,15 @@ it('should show import project feature when PAT is already set', async () => {
 
   projectItem = screen.getByRole('row', { name: /BitbucketCloud Repo 1/ });
   expect(
-    within(projectItem).getByText('onboarding.create_project.repository_imported')
+    within(projectItem).getByText('onboarding.create_project.repository_imported'),
   ).toBeInTheDocument();
 
   expect(
-    within(projectItem).getByRole('link', { name: /BitbucketCloud Repo 1/ })
+    within(projectItem).getByRole('link', { name: /BitbucketCloud Repo 1/ }),
   ).toBeInTheDocument();
   expect(within(projectItem).getByRole('link', { name: /BitbucketCloud Repo 1/ })).toHaveAttribute(
     'href',
-    '/dashboard?id=key'
+    '/dashboard?id=key',
   );
 
   projectItem = screen.getByRole('row', { name: /BitbucketCloud Repo 2/ });
@@ -152,14 +152,14 @@ it('should show import project feature when PAT is already set', async () => {
   await user.click(setupButton);
 
   expect(
-    screen.getByRole('heading', { name: 'onboarding.create_project.new_code_definition.title' })
+    screen.getByRole('heading', { name: 'onboarding.create_project.new_code_definition.title' }),
   ).toBeInTheDocument();
 
   await user.click(screen.getByRole('radio', { name: 'new_code_definition.global_setting' }));
   await user.click(
     screen.getByRole('button', {
       name: 'onboarding.create_project.new_code_definition.create_project',
-    })
+    }),
   );
 
   expect(await screen.findByText('/dashboard?id=key')).toBeInTheDocument();
@@ -180,7 +180,7 @@ it('should show search filter when PAT is already set', async () => {
     'conf-bitbucketcloud-2',
     '',
     BITBUCKET_CLOUD_PROJECTS_PAGESIZE,
-    1
+    1,
   );
 
   const inputSearch = screen.getByRole('searchbox', {
@@ -193,7 +193,7 @@ it('should show search filter when PAT is already set', async () => {
     'conf-bitbucketcloud-2',
     'search',
     BITBUCKET_CLOUD_PROJECTS_PAGESIZE,
-    1
+    1,
   );
 });
 
@@ -209,7 +209,7 @@ it('should show no result message when there are no projects', async () => {
   });
 
   expect(
-    screen.getByText('onboarding.create_project.bitbucketcloud.no_projects')
+    screen.getByText('onboarding.create_project.bitbucketcloud.no_projects'),
   ).toBeInTheDocument();
 });
 
@@ -217,7 +217,7 @@ it('should have load more', async () => {
   const user = userEvent.setup();
   almIntegrationHandler.createRandomBitbucketCloudProjectsWithLoadMore(
     BITBUCKET_CLOUD_PROJECTS_PAGESIZE,
-    BITBUCKET_CLOUD_PROJECTS_PAGESIZE + 1
+    BITBUCKET_CLOUD_PROJECTS_PAGESIZE + 1,
   );
   renderCreateProject();
 
@@ -236,7 +236,7 @@ it('should have load more', async () => {
    */
   almIntegrationHandler.createRandomBitbucketCloudProjectsWithLoadMore(
     BITBUCKET_CLOUD_PROJECTS_PAGESIZE + 1,
-    BITBUCKET_CLOUD_PROJECTS_PAGESIZE + 1
+    BITBUCKET_CLOUD_PROJECTS_PAGESIZE + 1,
   );
   await user.click(screen.getByRole('button', { name: 'show_more' }));
 
@@ -244,7 +244,7 @@ it('should have load more', async () => {
     'conf-bitbucketcloud-2',
     '',
     BITBUCKET_CLOUD_PROJECTS_PAGESIZE,
-    2
+    2,
   );
 
   await waitFor(() => {
index fc26be288345209eeb664f08267ee90d572e21cc..ca674f03d672b1930435b2252713d70739c9aaa9 100644 (file)
@@ -70,7 +70,7 @@ it('should not be able to setup if no config and no admin rights', async () => {
   expect(await screen.findByText('onboarding.create_project.select_method')).toBeInTheDocument();
   expect(screen.queryByRole('button', { name: 'setup' })).not.toBeInTheDocument();
   await expect(screen.getByLabelText('help-tooltip')).toHaveATooltipWithContent(
-    'onboarding.create_project.alm_not_configured'
+    'onboarding.create_project.alm_not_configured',
   );
 });
 
@@ -78,7 +78,7 @@ it('should be able to setup if config is present', async () => {
   renderCreateProject();
   expect(await screen.findByText('onboarding.create_project.select_method')).toBeInTheDocument();
   expect(
-    screen.getByRole('link', { name: 'onboarding.create_project.import_select_method.bitbucket' })
+    screen.getByRole('link', { name: 'onboarding.create_project.import_select_method.bitbucket' }),
   ).toBeInTheDocument();
 });
 
index 96243570673aedd7caaf2ff8db0173ebe69e6ef6..af3002d3eb2e6cfd5856d239047fe495ed2f1f96 100644 (file)
@@ -108,13 +108,13 @@ it('should show import project feature when the authentication is successfull',
   });
 
   expect(
-    within(repoItem).getByText('onboarding.create_project.repository_imported')
+    within(repoItem).getByText('onboarding.create_project.repository_imported'),
   ).toBeInTheDocument();
 
   expect(within(repoItem).getByRole('link', { name: /Github repo 1/ })).toBeInTheDocument();
   expect(within(repoItem).getByRole('link', { name: /Github repo 1/ })).toHaveAttribute(
     'href',
-    '/dashboard?id=key123'
+    '/dashboard?id=key123',
   );
 
   repoItem = screen.getByRole('row', {
@@ -125,14 +125,14 @@ it('should show import project feature when the authentication is successfull',
   await user.click(importButton);
 
   expect(
-    screen.getByRole('heading', { name: 'onboarding.create_project.new_code_definition.title' })
+    screen.getByRole('heading', { name: 'onboarding.create_project.new_code_definition.title' }),
   ).toBeInTheDocument();
 
   await user.click(screen.getByRole('radio', { name: 'new_code_definition.global_setting' }));
   await user.click(
     screen.getByRole('button', {
       name: 'onboarding.create_project.new_code_definition.create_project',
-    })
+    }),
   );
 
   expect(await screen.findByText('/dashboard?id=key')).toBeInTheDocument();
index 43d9f8d11f08e9b2c0c51f2d9761ebeb1c664781..b0eb033ec8dec26e944f439e532fd5cee750e811 100644 (file)
@@ -77,7 +77,7 @@ it('should ask for PAT when it is not set yet and show the import project featur
 
   expect(screen.getByText('onboarding.create_project.enter_pat')).toBeInTheDocument();
   expect(
-    screen.getByText('onboarding.create_project.pat_help.instructions.gitlab')
+    screen.getByText('onboarding.create_project.pat_help.instructions.gitlab'),
   ).toBeInTheDocument();
   expect(screen.getByRole('button', { name: 'save' })).toBeInTheDocument();
   await act(async () => {
@@ -107,12 +107,12 @@ it('should show import project feature when PAT is already set', async () => {
 
   projectItem = screen.getByRole('row', { name: /Gitlab project 1/ });
   expect(
-    within(projectItem).getByText('onboarding.create_project.repository_imported')
+    within(projectItem).getByText('onboarding.create_project.repository_imported'),
   ).toBeInTheDocument();
   expect(within(projectItem).getByRole('link', { name: /Gitlab project 1/ })).toBeInTheDocument();
   expect(within(projectItem).getByRole('link', { name: /Gitlab project 1/ })).toHaveAttribute(
     'href',
-    '/dashboard?id=key'
+    '/dashboard?id=key',
   );
 
   projectItem = screen.getByRole('row', { name: /Gitlab project 2/ });
@@ -123,14 +123,14 @@ it('should show import project feature when PAT is already set', async () => {
   await user.click(importButton);
 
   expect(
-    screen.getByRole('heading', { name: 'onboarding.create_project.new_code_definition.title' })
+    screen.getByRole('heading', { name: 'onboarding.create_project.new_code_definition.title' }),
   ).toBeInTheDocument();
 
   await user.click(screen.getByRole('radio', { name: 'new_code_definition.global_setting' }));
   await user.click(
     screen.getByRole('button', {
       name: 'onboarding.create_project.new_code_definition.create_project',
-    })
+    }),
   );
 
   expect(await screen.findByText('/dashboard?id=key')).toBeInTheDocument();
index 1cfce61f2248e4a779e8f6dadadf74428b2f7276..86a1e67dbee212953da261cd52685dbcb7d943a2 100644 (file)
@@ -50,7 +50,7 @@ beforeEach(() => {
 it('should show branch information', async () => {
   renderManualProjectCreate({ branchesEnabled: true });
   expect(
-    await screen.findByText('onboarding.create_project.pr_decoration.information')
+    await screen.findByText('onboarding.create_project.pr_decoration.information'),
   ).toBeInTheDocument();
 });
 
@@ -62,11 +62,11 @@ it('should validate form input', async () => {
   await user.click(
     await screen.findByRole('textbox', {
       name: /onboarding.create_project.display_name/,
-    })
+    }),
   );
   await user.keyboard('test');
   expect(
-    screen.getByRole('textbox', { name: /onboarding.create_project.project_key/ })
+    screen.getByRole('textbox', { name: /onboarding.create_project.project_key/ }),
   ).toHaveValue('test');
   expect(ui.nextButton.get()).toBeEnabled();
 
@@ -74,21 +74,21 @@ it('should validate form input', async () => {
   await user.click(
     await screen.findByRole('textbox', {
       name: /onboarding.create_project.display_name/,
-    })
+    }),
   );
   await user.keyboard('{Control>}a{/Control}This is not a key%^$');
   expect(
-    screen.getByRole('textbox', { name: /onboarding.create_project.project_key/ })
+    screen.getByRole('textbox', { name: /onboarding.create_project.project_key/ }),
   ).toHaveValue('This-is-not-a-key-');
 
   // Clear name
   await user.clear(
     screen.getByRole('textbox', {
       name: /onboarding.create_project.display_name/,
-    })
+    }),
   );
   expect(
-    screen.getByRole('textbox', { name: /onboarding.create_project.project_key/ })
+    screen.getByRole('textbox', { name: /onboarding.create_project.project_key/ }),
   ).toHaveValue('');
 
   expect(ui.nextButton.get()).toBeDisabled();
@@ -97,11 +97,11 @@ it('should validate form input', async () => {
   await user.click(
     await screen.findByRole('textbox', {
       name: /onboarding.create_project.project_key/,
-    })
+    }),
   );
   await user.keyboard('awsome-key');
   expect(
-    screen.getByRole('textbox', { name: /onboarding.create_project.display_name/ })
+    screen.getByRole('textbox', { name: /onboarding.create_project.display_name/ }),
   ).toHaveValue('');
   expect(ui.nextButton.get()).toBeDisabled();
 
@@ -109,7 +109,7 @@ it('should validate form input', async () => {
   await user.click(
     await screen.findByRole('textbox', {
       name: /onboarding.create_project.project_key/,
-    })
+    }),
   );
   await user.keyboard('{Control>}a{/Control}123');
   expect(ui.nextButton.get()).toBeDisabled();
@@ -124,7 +124,7 @@ it('should validate form input', async () => {
   await user.clear(
     screen.getByRole('textbox', {
       name: /onboarding.create_project.main_branch_name/,
-    })
+    }),
   );
   expect(ui.nextButton.get()).toBeDisabled();
 });
@@ -138,7 +138,7 @@ it('should submit form input', async () => {
   await user.click(
     await screen.findByRole('textbox', {
       name: /onboarding.create_project.display_name/,
-    })
+    }),
   );
   await user.keyboard('test');
   await user.click(ui.nextButton.get());
@@ -154,16 +154,16 @@ it('should handle component exists failure', async () => {
   await user.click(
     await screen.findByRole('textbox', {
       name: /onboarding.create_project.display_name/,
-    })
+    }),
   );
   await user.keyboard('test');
   expect(
-    screen.getByRole('textbox', { name: /onboarding.create_project.display_name/ })
+    screen.getByRole('textbox', { name: /onboarding.create_project.display_name/ }),
   ).toHaveValue('test');
 });
 
 function renderManualProjectCreate(props: Partial<ManualProjectCreate['props']> = {}) {
   renderComponent(
-    <ManualProjectCreate branchesEnabled={false} onProjectSetupDone={jest.fn()} {...props} />
+    <ManualProjectCreate branchesEnabled={false} onProjectSetupDone={jest.fn()} {...props} />,
   );
 }
index 76f1c49061d2672b45a4f304bf95762199f0c5c9..b63dd993932d67a0ec9b0e69a0b9715f54803e6f 100644 (file)
@@ -47,7 +47,7 @@ export default function NewCodeDefinitionSelection(props: Props) {
       setSubmitting(true);
       const { project } = await createProjectFnRef(
         selectedDefinition.type,
-        selectedDefinition.value
+        selectedDefinition.value,
       );
       setSubmitting(false);
       router.push(getProjectUrl(project.key));
index 40e0335e4ec97b03a6fad8748ba99dd8059b73cc..a1cd2bb6b41918eccb2b3bcc202bc7e5c3b42b6f 100644 (file)
@@ -29,7 +29,7 @@ it('render the component correctly when sqProjectKey is not present', () => {
   expect(screen.getByText('test1')).toBeInTheDocument();
   expect(screen.getByText('url text')).toHaveAttribute('href', '/url');
   expect(
-    screen.getByRole('button', { name: 'onboarding.create_project.import' })
+    screen.getByRole('button', { name: 'onboarding.create_project.import' }),
   ).toBeInTheDocument();
 });
 
@@ -39,7 +39,7 @@ it('render the component correctly when sqProjectKey is present', () => {
   expect(screen.getByText('url text')).toHaveAttribute('href', '/url');
   expect(screen.getByText('onboarding.create_project.repository_imported')).toBeInTheDocument();
   expect(
-    screen.queryByRole('button', { name: 'onboarding.create_project.import' })
+    screen.queryByRole('button', { name: 'onboarding.create_project.import' }),
   ).not.toBeInTheDocument();
 });
 
@@ -53,6 +53,6 @@ function renderAlmRepoItem(props?: Partial<FCProps<typeof AlmRepoItem>>) {
       almIconSrc="src"
       onImport={jest.fn()}
       {...props}
-    />
+    />,
   );
 }
index b6785ef3398a9a92b49b60c035e403cadfdc3997..5cf0729d81dc0038ca3028391f4092708aa1cf4a 100644 (file)
@@ -125,7 +125,7 @@ export default class ManualProjectCreate extends React.PureComponent<Props, Stat
         projectNameError === undefined &&
         !isEmpty(projectKey) &&
         !isEmpty(projectName) &&
-        !isEmpty(mainBranchName)
+        !isEmpty(mainBranchName),
     );
   }
 
@@ -138,7 +138,7 @@ export default class ManualProjectCreate extends React.PureComponent<Props, Stat
           project: projectKey,
           name: (projectName || projectKey).trim(),
           mainBranch: mainBranchName,
-        })
+        }),
       );
     }
   };
@@ -171,7 +171,7 @@ export default class ManualProjectCreate extends React.PureComponent<Props, Stat
             .replace(PROJECT_KEY_INVALID_CHARACTERS, '-');
           this.handleProjectKeyChange(sanitizedProjectKey);
         }
-      }
+      },
     );
   };
 
index 6b578e4705ea35e18fb70a728d716068cfafb23c..3933da55379c94fa60258c5414f2c792efe46693 100644 (file)
@@ -31,5 +31,5 @@ export enum CreateProjectModes {
 
 export type CreateProjectApiCallback = (
   newCodeDefinitionType?: NewCodeDefinitionType,
-  newCodeDefinitionValue?: string
+  newCodeDefinitionValue?: string,
 ) => Promise<{ project: ProjectBase }>;
index ab4c5e2779d6dd9fab7150bd1d9b37705b3d6fc6..c73bdfb086e4d1d4bfd9bb4fadb2f1baf810a0a5 100644 (file)
@@ -44,7 +44,7 @@ export interface PATType {
 export const usePersonalAccessToken = (
   almSetting: AlmSettingsInstance,
   resetPat: boolean,
-  onPersonalAccessTokenCreated: () => void
+  onPersonalAccessTokenCreated: () => void,
 ): PATType => {
   const [checkingPat, setCheckingPat] = useState(false);
   const [touched, setTouched] = useState(false);
index 3c8e2ef4a1c01be8edc25c557e5c054c4b9de5cc..bbd668a96324da6f1a48001d6bb680bead7853b7 100644 (file)
@@ -394,7 +394,7 @@ describe('in manage mode', () => {
       });
 
       expect(
-        within(ui.githubManagedGroupRow.get()).getByRole('img', { name: 'github' })
+        within(ui.githubManagedGroupRow.get()).getByRole('img', { name: 'github' }),
       ).toBeInTheDocument();
     });
   });
index 8e77e94bf8bf1163be7509026b7331fde96d98ec..d1d733f55426a51e279acd9bdf3e3733aef044cc 100644 (file)
@@ -68,7 +68,7 @@ export default class Members extends React.PureComponent<Props, State> {
         <ButtonIcon
           aria-label={translateWithParameters(
             isManaged || group.default ? 'groups.users.view' : 'groups.users.edit',
-            group.name
+            group.name,
           )}
           className="button-small little-spacer-left little-padded"
           onClick={this.handleMembersClick}
index 8804df16a5e71f1f528f9e870854418c96998108..05909ba00503048106d282132aec1629deaf4f38 100644 (file)
@@ -40,23 +40,23 @@ it('renders correctly', async () => {
         externalRuleEngine: 'eslint',
       },
     },
-    { eslint: 'eslint' }
+    { eslint: 'eslint' },
   );
 
   // Title
   expect(byRole('heading', { name: issue.message }).get()).toBeInTheDocument();
   expect(byRole('button', { name: 'permalink' }).get()).toHaveAttribute(
     'data-clipboard-text',
-    'http://localhost/project/issues?issues=AVsae-CQS-9G3txfbFN2&open=AVsae-CQS-9G3txfbFN2&id=myproject'
+    'http://localhost/project/issues?issues=AVsae-CQS-9G3txfbFN2&open=AVsae-CQS-9G3txfbFN2&id=myproject',
   );
 
   // CCT attribute
   const cctBadge = byText(
-    `issue.clean_code_attribute_category.${issue.cleanCodeAttributeCategory}.title_short`
+    `issue.clean_code_attribute_category.${issue.cleanCodeAttributeCategory}.title_short`,
   ).get();
   expect(cctBadge).toBeInTheDocument();
   await expect(cctBadge).toHaveATooltipWithContent(
-    `issue.clean_code_attribute.${issue.cleanCodeAttribute}`
+    `issue.clean_code_attribute.${issue.cleanCodeAttribute}`,
   );
   jest.runOnlyPendingTimers();
 
@@ -104,7 +104,7 @@ it('renders correctly when some data is not provided', () => {
 
   // SonarLint badge
   expect(
-    byText('issue.quick_fix_available_with_sonarlint_no_link').query()
+    byText('issue.quick_fix_available_with_sonarlint_no_link').query(),
   ).not.toBeInTheDocument();
 
   // Rule external engine
@@ -113,7 +113,7 @@ it('renders correctly when some data is not provided', () => {
 
 function renderIssueHeader(
   props: Partial<IssueHeader['props']> = {},
-  externalRules: Dict<string> = {}
+  externalRules: Dict<string> = {},
 ) {
   return renderComponent(
     <WorkspaceContext.Provider
@@ -125,6 +125,6 @@ function renderIssueHeader(
         onIssueChange={jest.fn()}
         {...props}
       />
-    </WorkspaceContext.Provider>
+    </WorkspaceContext.Provider>,
   );
 }
index 1cc286451d5f27a362b7708afa9c67dabd610324..527b152307db92c1e9301abe91b4e975ae4039fd 100644 (file)
@@ -272,13 +272,13 @@ describe('issues app filtering', () => {
     expect(
       within(ui.ruleFacetList.get()).getByRole('checkbox', {
         name: /Advanced rule/,
-      })
+      }),
     ).toBeInTheDocument();
 
     expect(
       within(ui.ruleFacetList.get()).getByRole('checkbox', {
         name: /Simple rule/,
-      })
+      }),
     ).toBeInTheDocument();
   });
 
@@ -290,10 +290,10 @@ describe('issues app filtering', () => {
     await user.click(await ui.languageFacet.find());
     expect(await ui.languageFacetList.find()).toBeInTheDocument();
     expect(
-      within(ui.languageFacetList.get()).getByRole('checkbox', { name: 'java' })
+      within(ui.languageFacetList.get()).getByRole('checkbox', { name: 'java' }),
     ).toHaveTextContent('java25short_number_suffix.k');
     expect(
-      within(ui.languageFacetList.get()).getByRole('checkbox', { name: 'ts' })
+      within(ui.languageFacetList.get()).getByRole('checkbox', { name: 'ts' }),
     ).toHaveTextContent('ts3.4short_number_suffix.k');
 
     await user.click(ui.languageFacet.get());
@@ -303,10 +303,10 @@ describe('issues app filtering', () => {
     await user.click(ui.languageFacet.get());
     expect(await ui.languageFacetList.find()).toBeInTheDocument();
     expect(
-      within(ui.languageFacetList.get()).getByRole('checkbox', { name: 'java' })
+      within(ui.languageFacetList.get()).getByRole('checkbox', { name: 'java' }),
     ).toHaveTextContent('java111');
     expect(
-      within(ui.languageFacetList.get()).getByRole('checkbox', { name: 'ts' })
+      within(ui.languageFacetList.get()).getByRole('checkbox', { name: 'ts' }),
     ).toHaveTextContent('ts674');
   });
 
@@ -334,7 +334,7 @@ describe('issues app filtering', () => {
         /* eslint-disable-next-line testing-library/render-result-naming-convention */
         const linkName = renderOwaspTop102021Category(standard, val);
         expect(screen.getByRole('checkbox', { name: linkName })).toBeInTheDocument();
-      })
+      }),
     );
   });
 });
index 142d079167084578e3df10ebf31e93a95d0fe55c..2a109065e40481b2d5ea436bda02b669a4b9cf6e 100644 (file)
@@ -100,7 +100,7 @@ describe('issues app', () => {
         await user.keyboard('{ArrowRight}');
       });
       expect(
-        screen.getByRole('heading', { name: issuesHandler.list[1].issue.message })
+        screen.getByRole('heading', { name: issuesHandler.list[1].issue.message }),
       ).toBeInTheDocument();
 
       // Go back
@@ -108,7 +108,7 @@ describe('issues app', () => {
         await user.keyboard('{ArrowLeft}');
       });
       expect(
-        screen.queryByRole('heading', { name: issuesHandler.list[1].issue.message })
+        screen.queryByRole('heading', { name: issuesHandler.list[1].issue.message }),
       ).not.toBeInTheDocument();
 
       // Navigate to 1st issue and select it
@@ -118,7 +118,7 @@ describe('issues app', () => {
         await user.keyboard('{ArrowRight}');
       });
       expect(
-        screen.getByRole('heading', { name: issuesHandler.list[0].issue.message })
+        screen.getByRole('heading', { name: issuesHandler.list[0].issue.message }),
       ).toBeInTheDocument();
     });
 
@@ -139,7 +139,7 @@ describe('issues app', () => {
       // Select the "why is this an issue" tab and check its content
       await act(async () => {
         await user.click(
-          screen.getByRole('tab', { name: `coding_rules.description_section.title.root_cause` })
+          screen.getByRole('tab', { name: `coding_rules.description_section.title.root_cause` }),
         );
       });
       expect(screen.getByRole('heading', { name: 'Because' })).toBeInTheDocument();
@@ -147,7 +147,7 @@ describe('issues app', () => {
       // Select the "how to fix it" tab
       await act(async () => {
         await user.click(
-          screen.getByRole('tab', { name: `coding_rules.description_section.title.how_to_fix` })
+          screen.getByRole('tab', { name: `coding_rules.description_section.title.how_to_fix` }),
         );
       });
 
@@ -156,7 +156,7 @@ describe('issues app', () => {
       expect(screen.getByRole('radio', { name: 'Context 3' })).toBeInTheDocument();
       expect(screen.getByRole('radio', { name: 'Spring' })).toBeInTheDocument();
       expect(
-        screen.getByRole('radio', { name: 'coding_rules.description_context.other' })
+        screen.getByRole('radio', { name: 'coding_rules.description_context.other' }),
       ).toBeInTheDocument();
       expect(screen.getByRole('radio', { name: 'Spring', current: true })).toBeInTheDocument();
 
@@ -169,19 +169,19 @@ describe('issues app', () => {
       // Select the "other" context and check tab content
       await act(async () => {
         await user.click(
-          screen.getByRole('radio', { name: 'coding_rules.description_context.other' })
+          screen.getByRole('radio', { name: 'coding_rules.description_context.other' }),
         );
       });
       expect(screen.getByText('coding_rules.context.others.title')).toBeInTheDocument();
       expect(screen.getByText('coding_rules.context.others.description.first')).toBeInTheDocument();
       expect(
-        screen.getByText('coding_rules.context.others.description.second')
+        screen.getByText('coding_rules.context.others.description.second'),
       ).toBeInTheDocument();
 
       // Select the main info tab and check its content
       await act(async () => {
         await user.click(
-          screen.getByRole('tab', { name: `coding_rules.description_section.title.more_info` })
+          screen.getByRole('tab', { name: `coding_rules.description_section.title.more_info` }),
         );
       });
       expect(screen.getByRole('heading', { name: 'Link' })).toBeInTheDocument();
@@ -202,7 +202,7 @@ describe('issues app', () => {
       // Select the "why is this an issue tab" and check its content
       await act(async () => {
         await user.click(
-          screen.getByRole('tab', { name: `coding_rules.description_section.title.root_cause` })
+          screen.getByRole('tab', { name: `coding_rules.description_section.title.root_cause` }),
         );
       });
       expect(screen.getByRole('heading', { name: 'Default' })).toBeInTheDocument();
@@ -218,12 +218,12 @@ describe('issues app', () => {
 
       // The "Where is the issue" tab should be selected by default. Check its content
       expect(screen.getAllByRole('button', { name: 'Issue on file', exact: false })).toHaveLength(
-        2
+        2,
       ); // there will be 2 buttons one in concise issue and other in code viewer
       expect(
         screen.getByRole('row', {
           name: '2 * SonarQube',
-        })
+        }),
       ).toBeInTheDocument();
     });
 
@@ -275,7 +275,7 @@ describe('issues app', () => {
       });
 
       expect(
-        screen.getByRole('button', { name: 'issues.bulk_change_X_issues.10' })
+        screen.getByRole('button', { name: 'issues.bulk_change_X_issues.10' }),
       ).toBeInTheDocument();
       await user.click(screen.getByRole('button', { name: 'issues.bulk_change_X_issues.10' }));
       await user.click(screen.getByRole('button', { name: 'cancel' }));
@@ -286,7 +286,7 @@ describe('issues app', () => {
       const issueBoxFixThat = within(screen.getByRole('region', { name: 'Fix that' }));
 
       await user.click(
-        screen.getByRole('checkbox', { name: 'issues.action_select.label.Fix that' })
+        screen.getByRole('checkbox', { name: 'issues.action_select.label.Fix that' }),
       );
       await user.click(screen.getByRole('button', { name: 'issues.bulk_change_X_issues.1' }));
 
@@ -299,8 +299,8 @@ describe('issues app', () => {
 
       expect(
         issueBoxFixThat.queryByLabelText(
-          'issue.transition.status_x_click_to_change.issue.status.falsepositive'
-        )
+          'issue.transition.status_x_click_to_change.issue.status.falsepositive',
+        ),
       ).not.toBeInTheDocument();
     });
   });
@@ -313,7 +313,7 @@ describe('issues item', () => {
     expect(
       await screen.findByRole('tab', {
         name: `coding_rules.description_section.title.root_cause`,
-      })
+      }),
     ).toHaveAttribute('aria-current', 'true');
   });
 
@@ -371,12 +371,12 @@ describe('issues item', () => {
     await user.keyboard('{Alt>}{ArrowRight}{/Alt}');
     expect(screen.getByRole('link', { name: '1 Execution location 1' })).toHaveAttribute(
       'aria-current',
-      'true'
+      'true',
     );
     await user.keyboard('{Alt>}{ArrowLeft}{/Alt}');
     expect(screen.getByRole('link', { name: '1 Data location 1' })).toHaveAttribute(
       'aria-current',
-      'true'
+      'true',
     );
   });
 
@@ -384,7 +384,7 @@ describe('issues item', () => {
     const user = userEvent.setup();
     renderProjectIssuesApp('project/issues?issues=issue2&open=issue2&id=myproject');
     await user.click(
-      await screen.findByRole('tab', { name: `coding_rules.description_section.title.more_info` })
+      await screen.findByRole('tab', { name: `coding_rules.description_section.title.more_info` }),
     );
     expect(screen.getByRole('heading', { name: 'Defense-In-Depth', level: 3 })).toBeInTheDocument();
   });
@@ -410,7 +410,7 @@ describe('issues item', () => {
       await user.click(listItem.getByText('issue.transition.confirm'));
     });
     expect(
-      listItem.getByLabelText('issue.transition.status_x_click_to_change.issue.status.CONFIRMED')
+      listItem.getByLabelText('issue.transition.status_x_click_to_change.issue.status.CONFIRMED'),
     ).toBeInTheDocument();
 
     // As won't fix
@@ -425,13 +425,13 @@ describe('issues item', () => {
       await user.click(listItem.getByRole('button', { name: 'issue.comment.formlink' }));
     });
     expect(
-      listItem.queryByRole('button', { name: 'issue.comment.submit' })
+      listItem.queryByRole('button', { name: 'issue.comment.submit' }),
     ).not.toBeInTheDocument();
 
     // Assign issue to a different user
     await act(async () => {
       await user.click(
-        listItem.getByRole('combobox', { name: 'issue.assign.unassigned_click_to_assign' })
+        listItem.getByRole('combobox', { name: 'issue.assign.unassigned_click_to_assign' }),
       );
       await user.click(screen.getByLabelText('search.search_for_users'));
       await user.keyboard('luke');
@@ -447,7 +447,7 @@ describe('issues item', () => {
     expect(
       listItem.getByRole('combobox', {
         name: 'issue.assign.assigned_to_x_click_to_change.luke',
-      })
+      }),
     ).toBeInTheDocument();
 
     // Change tags
@@ -466,7 +466,7 @@ describe('issues item', () => {
 
     await user.keyboard('{Escape}');
     await expect(
-      byRole('button', { name: 'accessibility android +' }).byText('accessibility').get()
+      byRole('button', { name: 'accessibility android +' }).byText('accessibility').get(),
     ).toHaveATooltipWithContent('accessibility, android');
 
     await act(async () => {
@@ -480,7 +480,7 @@ describe('issues item', () => {
 
     await user.keyboard('{Escape}');
     await expect(
-      byRole('button', { name: 'android +' }).byText('android').get()
+      byRole('button', { name: 'android +' }).byText('android').get(),
     ).toHaveATooltipWithContent('android');
 
     await act(async () => {
@@ -492,7 +492,7 @@ describe('issues item', () => {
       await user.keyboard('addNewTag');
     });
     expect(
-      screen.getByRole('checkbox', { name: 'issue.create_tag: addnewtag' })
+      screen.getByRole('checkbox', { name: 'issue.create_tag: addnewtag' }),
     ).toBeInTheDocument();
   });
 
@@ -507,23 +507,23 @@ describe('issues item', () => {
     expect(
       screen.queryByRole('button', {
         name: `issue.assign.unassigned_click_to_assign`,
-      })
+      }),
     ).not.toBeInTheDocument();
     expect(
       screen.queryByRole('button', {
         name: `issue.type.type_x_click_to_change.issue.type.CODE_SMELL`,
-      })
+      }),
     ).not.toBeInTheDocument();
 
     expect(
       screen.queryByRole('button', {
         name: `issue.transition.status_x_click_to_change.issue.status.OPEN`,
-      })
+      }),
     ).not.toBeInTheDocument();
     expect(
       screen.queryByRole('button', {
         name: `issue.severity.severity_x_click_to_change.severity.MAJOR`,
-      })
+      }),
     ).not.toBeInTheDocument();
   });
 
@@ -604,13 +604,13 @@ describe('issues item', () => {
     // Select the "why is this an issue" tab
     await act(async () => {
       await user.click(
-        screen.getByRole('tab', { name: 'coding_rules.description_section.title.root_cause' })
+        screen.getByRole('tab', { name: 'coding_rules.description_section.title.root_cause' }),
       );
     });
     expect(
       screen.queryByRole('tab', {
         name: `issue.tabs.${TabKeys.Code}`,
-      })
+      }),
     ).toHaveAttribute('aria-current', 'false');
 
     await act(async () => {
@@ -619,19 +619,19 @@ describe('issues item', () => {
     expect(
       screen.queryByRole('tab', {
         name: `issue.tabs.${TabKeys.Code}`,
-      })
+      }),
     ).toHaveAttribute('aria-current', 'true');
 
     // Select the same selected hotspot location should also navigate back to code page
     await act(async () => {
       await user.click(
-        screen.getByRole('tab', { name: 'coding_rules.description_section.title.root_cause' })
+        screen.getByRole('tab', { name: 'coding_rules.description_section.title.root_cause' }),
       );
     });
     expect(
       screen.queryByRole('tab', {
         name: `issue.tabs.${TabKeys.Code}`,
-      })
+      }),
     ).toHaveAttribute('aria-current', 'false');
 
     await act(async () => {
@@ -640,7 +640,7 @@ describe('issues item', () => {
     expect(
       screen.queryByRole('tab', {
         name: `issue.tabs.${TabKeys.Code}`,
-      })
+      }),
     ).toHaveAttribute('aria-current', 'true');
   });
 
@@ -655,7 +655,7 @@ describe('issues item', () => {
     });
 
     await expect(
-      screen.getByText('issue.quick_fix_available_with_sonarlint_no_link')
+      screen.getByText('issue.quick_fix_available_with_sonarlint_no_link'),
     ).toHaveATooltipWithContent('issue.quick_fix_available_with_sonarlint');
   });
 });
index 385ae0f873e5232e98f43a790df821dfed29dadb..afe8af37ce5cffeb14e6fc2ba8130c74145c0633 100644 (file)
@@ -63,12 +63,12 @@ it('should be able to add or update comment', async () => {
   });
 
   expect(
-    screen.getByRole('tab', { name: `coding_rules.description_section.title.activity` })
+    screen.getByRole('tab', { name: `coding_rules.description_section.title.activity` }),
   ).toBeInTheDocument();
 
   await act(async () => {
     await user.click(
-      screen.getByRole('tab', { name: `coding_rules.description_section.title.activity` })
+      screen.getByRole('tab', { name: `coding_rules.description_section.title.activity` }),
     );
   });
 
@@ -77,7 +77,7 @@ it('should be able to add or update comment', async () => {
     await user.click(
       screen.getByRole('button', {
         name: `issue.activity.add_comment`,
-      })
+      }),
     );
     await user.click(screen.getByRole('textbox'));
     await user.keyboard('activity comment');
@@ -120,19 +120,19 @@ it('should be able to show changelog', async () => {
     await user.click(await screen.findByRole('link', { name: 'Fix that' }));
 
     await user.click(
-      screen.getByRole('tab', { name: `coding_rules.description_section.title.activity` })
+      screen.getByRole('tab', { name: `coding_rules.description_section.title.activity` }),
     );
   });
 
   expect(screen.getByText('issue.activity.review_history.created')).toBeInTheDocument();
   expect(
     screen.getByText(
-      'issue.changelog.changed_to.issue.changelog.field.assign.darth.vader (issue.changelog.was.luke.skywalker)'
-    )
+      'issue.changelog.changed_to.issue.changelog.field.assign.darth.vader (issue.changelog.was.luke.skywalker)',
+    ),
   ).toBeInTheDocument();
   expect(
     screen.getByText(
-      'issue.changelog.changed_to.issue.changelog.field.status.REOPENED (issue.changelog.was.CONFIRMED)'
-    )
+      'issue.changelog.changed_to.issue.changelog.field.status.REOPENED (issue.changelog.was.CONFIRMED)',
+    ),
   ).toBeInTheDocument();
 });
index e8460b50de32b639ae0c363f74ef5ae92422c6c8..fe8b8d36bb2ea84a3b025fe46a4fe435e31954e0 100644 (file)
@@ -106,7 +106,7 @@ it('should display guide', async () => {
 
 it('should not show guide for those who dismissed it', async () => {
   renderIssueApp(
-    mockCurrentUser({ isLoggedIn: true, dismissedNotices: { [NoticeType.ISSUE_GUIDE]: true } })
+    mockCurrentUser({ isLoggedIn: true, dismissedNotices: { [NoticeType.ISSUE_GUIDE]: true } }),
   );
 
   expect((await ui.issueItems.findAll()).length).toBeGreaterThan(0);
@@ -153,7 +153,7 @@ it('should show guide on issue page', async () => {
   renderProjectIssuesApp(
     'project/issues?issues=issue11&open=issue11&id=myproject',
     undefined,
-    mockCurrentUser({ isLoggedIn: true })
+    mockCurrentUser({ isLoggedIn: true }),
   );
 
   expect(await ui.guidePopup.find()).toBeInTheDocument();
index 5b5ec5786637119ce57a5d54f187a7ad01ca1b79..233c24bfe9a0ef06decc99b9cc1dfc22fdd0f4ac 100644 (file)
@@ -34,26 +34,26 @@ describe('selectFlow', () => {
 describe('enableLocationsNavigator', () => {
   it('should compute the correct flow index', () => {
     expect(
-      enableLocationsNavigator({ openIssue: mockIssue(true), selectedFlowIndex: 20 } as State)
+      enableLocationsNavigator({ openIssue: mockIssue(true), selectedFlowIndex: 20 } as State),
     ).toEqual(
       expect.objectContaining({
         locationsNavigator: true,
         selectedFlowIndex: 20,
-      })
+      }),
     );
     expect(enableLocationsNavigator({ openIssue: mockIssue(true) } as State)).toEqual(
       expect.objectContaining({
         locationsNavigator: true,
         selectedFlowIndex: 0,
-      })
+      }),
     );
     expect(
-      enableLocationsNavigator({ openIssue: mockIssue(true, { flows: [] }) } as State)
+      enableLocationsNavigator({ openIssue: mockIssue(true, { flows: [] }) } as State),
     ).toEqual(
       expect.objectContaining({
         locationsNavigator: true,
         selectedFlowIndex: undefined,
-      })
+      }),
     );
   });
 
@@ -62,25 +62,25 @@ describe('enableLocationsNavigator', () => {
       expect.objectContaining({
         locationsNavigator: true,
         selectedLocationIndex: undefined,
-      })
+      }),
     );
 
     expect(
-      enableLocationsNavigator({ openIssue: mockIssue(true), selectedLocationIndex: -1 } as State)
+      enableLocationsNavigator({ openIssue: mockIssue(true), selectedLocationIndex: -1 } as State),
     ).toEqual(
       expect.objectContaining({
         locationsNavigator: true,
         selectedLocationIndex: 0,
-      })
+      }),
     );
 
     expect(
-      enableLocationsNavigator({ openIssue: mockIssue(true), selectedLocationIndex: 20 } as State)
+      enableLocationsNavigator({ openIssue: mockIssue(true), selectedLocationIndex: 20 } as State),
     ).toEqual(
       expect.objectContaining({
         locationsNavigator: true,
         selectedLocationIndex: 20,
-      })
+      }),
     );
   });
 
@@ -89,7 +89,7 @@ describe('enableLocationsNavigator', () => {
     expect(
       enableLocationsNavigator({
         openIssue: mockIssue(true, { flows: [], secondaryLocations: [] }),
-      } as State)
+      } as State),
     ).toBeNull();
   });
 
index e366cd670d52ecf75bfbded7d5f0de04f202bd00..398f7b9b7916d0cfc1239d1b63c209939859a0ea 100644 (file)
@@ -73,7 +73,7 @@ describe('serialize/deserialize', () => {
         statuses: ['a', 'b'],
         tags: ['a', 'b'],
         types: ['a', 'b'],
-      })
+      }),
     ).toStrictEqual({
       assignees: 'a,b',
       author: ['a', 'b'],
@@ -120,7 +120,7 @@ describe('serialize/deserialize', () => {
         impactSeverities: 'LOW',
         severities: 'CRITICAL,MAJOR',
         impactSoftwareQualities: 'MAINTAINABILITY',
-      })
+      }),
     ).toStrictEqual({
       assigned: true,
       assignees: ['first', 'second'],
@@ -180,50 +180,50 @@ describe('shouldOpenStandardsFacet', () => {
 describe('shouldOpenStandardsChildFacet', () => {
   it('should open standard child facet', () => {
     expect(
-      shouldOpenStandardsChildFacet({ owaspTop10: true }, {}, SecurityStandard.OWASP_TOP10)
+      shouldOpenStandardsChildFacet({ owaspTop10: true }, {}, SecurityStandard.OWASP_TOP10),
     ).toBe(true);
     expect(
       shouldOpenStandardsChildFacet(
         { cwe: true },
         { owaspTop10: ['A1'] },
-        SecurityStandard.OWASP_TOP10
-      )
+        SecurityStandard.OWASP_TOP10,
+      ),
     ).toBe(true);
     expect(
       shouldOpenStandardsChildFacet(
         { owaspTop10: false },
         { owaspTop10: ['A1'] },
-        SecurityStandard.OWASP_TOP10
-      )
+        SecurityStandard.OWASP_TOP10,
+      ),
     ).toBe(true);
     expect(
-      shouldOpenStandardsChildFacet({}, { owaspTop10: ['A1'] }, SecurityStandard.OWASP_TOP10)
+      shouldOpenStandardsChildFacet({}, { owaspTop10: ['A1'] }, SecurityStandard.OWASP_TOP10),
     ).toBe(true);
     expect(
       shouldOpenStandardsChildFacet(
         {},
         { owaspTop10: ['A1'], sonarsourceSecurity: ['sql-injection'] },
-        SecurityStandard.SONARSOURCE
-      )
+        SecurityStandard.SONARSOURCE,
+      ),
     ).toBe(true);
   });
 
   it('should NOT open standard child facet', () => {
     expect(
-      shouldOpenStandardsChildFacet({ standards: true }, {}, SecurityStandard.OWASP_TOP10)
+      shouldOpenStandardsChildFacet({ standards: true }, {}, SecurityStandard.OWASP_TOP10),
     ).toBe(false);
     expect(shouldOpenStandardsChildFacet({ cwe: true }, {}, SecurityStandard.OWASP_TOP10)).toBe(
-      false
+      false,
     );
     expect(
-      shouldOpenStandardsChildFacet({}, { types: ['VULNERABILITY'] }, SecurityStandard.OWASP_TOP10)
+      shouldOpenStandardsChildFacet({}, { types: ['VULNERABILITY'] }, SecurityStandard.OWASP_TOP10),
     ).toBe(false);
     expect(
       shouldOpenStandardsChildFacet(
         {},
         { owaspTop10: ['A1'], sonarsourceSecurity: ['sql-injection'] },
-        SecurityStandard.OWASP_TOP10_2021
-      )
+        SecurityStandard.OWASP_TOP10_2021,
+      ),
     ).toBe(false);
   });
 });
@@ -237,8 +237,8 @@ describe('shouldOpenSonarSourceSecurityFacet', () => {
     expect(
       shouldOpenSonarSourceSecurityFacet(
         { sonarsourceSecurity: false },
-        { sonarsourceSecurity: ['xss'] }
-      )
+        { sonarsourceSecurity: ['xss'] },
+      ),
     ).toBe(true);
   });
 
index 65438454488e445b2bb3b1261e4396fe61dae9a9..3f874a20adcfb12b40334b66102b1b6cce6a53cf 100644 (file)
@@ -42,7 +42,7 @@ export function disableLocationsNavigator() {
 }
 
 export function selectNextLocation(
-  state: Pick<State, 'selectedFlowIndex' | 'selectedLocationIndex' | 'openIssue'>
+  state: Pick<State, 'selectedFlowIndex' | 'selectedLocationIndex' | 'openIssue'>,
 ) {
   const { selectedFlowIndex, selectedLocationIndex: index = -1, openIssue } = state;
   if (openIssue) {
index 0de539ae33397f21eda27a832ca74b98eef1115f..2f371153229466a7aa00dcadb15aa344196bee71 100644 (file)
@@ -81,7 +81,7 @@ export default function AssigneeSelect(props: AssigneeSelectProps) {
         .then(resolve)
         .catch(() => resolve([]));
     },
-    []
+    [],
   );
 
   return (
index b91c1521ab8737415f14dc1bd10c533ba312a26a..64d6ced956afefbc5c1826234bfe75355ceffeb6 100644 (file)
@@ -114,7 +114,7 @@ export class BulkChangeModal extends React.PureComponent<Props, State> {
           });
         }
       },
-      () => {}
+      () => {},
     );
   }
 
@@ -171,7 +171,7 @@ export class BulkChangeModal extends React.PureComponent<Props, State> {
         set_severity: this.state.severity,
         set_type: this.state.type,
       },
-      (x) => x !== undefined
+      (x) => x !== undefined,
     );
 
     const issueKeys = this.state.issues.map((issue) => issue.key);
@@ -187,7 +187,7 @@ export class BulkChangeModal extends React.PureComponent<Props, State> {
       (error) => {
         this.setState({ submitting: false });
         throwGlobalError(error);
-      }
+      },
     );
   };
 
@@ -221,7 +221,7 @@ export class BulkChangeModal extends React.PureComponent<Props, State> {
         assignee ||
         severity ||
         transition ||
-        type
+        type,
     );
   };
 
@@ -229,7 +229,7 @@ export class BulkChangeModal extends React.PureComponent<Props, State> {
     field: InputField,
     label: string,
     affected: number | undefined,
-    input: React.ReactNode
+    input: React.ReactNode,
   ) => (
     <FormField htmlFor={`issues-bulk-change-${field}`} label={translate(label)}>
       <div className="sw-flex sw-items-center sw-justify-between">
@@ -269,7 +269,7 @@ export class BulkChangeModal extends React.PureComponent<Props, State> {
   renderTagsField = (
     field: InputField.addTags | InputField.removeTags,
     label: string,
-    allowCreate: boolean
+    allowCreate: boolean,
   ) => {
     const { initialTags } = this.state;
     const tags = this.state[field] ?? [];
index 777284552d041121def9faa2c99659269ca79f6c..847758675d0d729194619e9055c61adb482965a6 100644 (file)
@@ -44,7 +44,7 @@ export default function ComponentBreadcrumbs({
   const displayProject =
     !component ||
     ![ComponentQualifier.Project, ComponentQualifier.Directory].includes(
-      component.qualifier as ComponentQualifier
+      component.qualifier as ComponentQualifier,
     );
 
   const displayBranchInformation = isView(component?.qualifier);
@@ -57,7 +57,7 @@ export default function ComponentBreadcrumbs({
     <DivStyled
       aria-label={translateWithParameters(
         'issues.on_file_x',
-        `${displayProject ? issue.projectName + ', ' : ''}${componentName}`
+        `${displayProject ? issue.projectName + ', ' : ''}${componentName}`,
       )}
       className="sw-flex sw-box-border sw-body-sm sw-w-full sw-pb-2 sw-pt-4 sw-truncate"
     >
index 2d277d0c49b21c381499ab1ea1b9f0dbdb462225..279fe66737acae9fe4ca645feb8895f7617a66bc 100644 (file)
@@ -78,7 +78,7 @@ export default function IssueGuide({ run }: Props) {
   const constructContent = (
     first: string,
     second: string,
-    extraContent?: string | React.ReactNode
+    extraContent?: string | React.ReactNode,
   ) => (
     <>
       <span>{translate(first)}</span>
@@ -115,7 +115,7 @@ export default function IssueGuide({ run }: Props) {
           <li>{translate('guiding.issue_list.4.content.list.1')}</li>
           <li>{translate('guiding.issue_list.4.content.list.2')}</li>
           <li>{translate('guiding.issue_list.4.content.list.3')}</li>
-        </ul>
+        </ul>,
       ),
       title: translate('guiding.issue_list.4.title'),
     },
index a0b4fd5adba47d6d764e9d8d8c768009bd9f4934..4517be6d239237e01b07614fa5a653946d837860 100644 (file)
@@ -90,7 +90,7 @@ export default class IssueHeader extends React.PureComponent<Props, State> {
     if (issue.assignee !== login) {
       updateIssue(
         this.props.onIssueChange,
-        setIssueAssignee({ issue: issue.key, assignee: login })
+        setIssueAssignee({ issue: issue.key, assignee: login }),
       );
     }
     this.handleIssuePopupToggle('assign', false);
index 069339952d5d8ff6e45750b78a38e24d8281884a..47c11317fd97226611c6daa4e503a454a872b6e4 100644 (file)
@@ -59,7 +59,7 @@ export default function IssueReviewHistory(props: HotspotReviewHistoryProps) {
       ({ changelog }) => {
         setChangeLog(changelog);
       },
-      () => {}
+      () => {},
     );
   }, [issue]);
 
index ce777fbce27434f8d857da8ba0a45eb167f1a186..4c201355d24ec7993770669bf3c3af7a9f9dddfc 100644 (file)
@@ -47,7 +47,7 @@ export default class IssueReviewHistoryAndComments extends React.PureComponent<P
   handleSubmitComment = (comment: string) => {
     return updateIssue(
       this.props.onChange,
-      addIssueComment({ issue: this.props.issue.key, text: comment })
+      addIssueComment({ issue: this.props.issue.key, text: comment }),
     );
   };
 
index dd60808c9682a5663b428072a43665a434319ba4..78aa3b0f2418f043e36c6a8abe97537e095f6891 100644 (file)
@@ -178,7 +178,7 @@ export class App extends React.PureComponent<Props, State> {
         'owaspTop10-2021': shouldOpenStandardsChildFacet(
           {},
           query,
-          SecurityStandard.OWASP_TOP10_2021
+          SecurityStandard.OWASP_TOP10_2021,
         ),
         cleanCodeAttributeCategories: true,
         impactSoftwareQualities: true,
@@ -472,7 +472,7 @@ export class App extends React.PureComponent<Props, State> {
         const { components, issues, rules } = response;
 
         const parsedIssues = issues.map((issue) =>
-          parseIssueFromResponse(issue, components, undefined, rules)
+          parseIssueFromResponse(issue, components, undefined, rules),
         );
 
         return { ...response, issues: parsedIssues } as FetchIssuesPromise;
@@ -485,7 +485,7 @@ export class App extends React.PureComponent<Props, State> {
       timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone,
     }).then((response) => {
       const parsedIssues = response.issues.map((issue) =>
-        parseIssueFromResponse(issue, response.components, response.users, response.rules)
+        parseIssueFromResponse(issue, response.components, response.users, response.rules),
       );
 
       return { ...response, issues: parsedIssues } as FetchIssuesPromise;
@@ -495,7 +495,7 @@ export class App extends React.PureComponent<Props, State> {
   fetchIssues = (
     additional: RawQuery,
     requestFacets = false,
-    firstRequest = false
+    firstRequest = false,
   ): Promise<FetchIssuesPromise> => {
     const { component } = this.props;
     const { myIssues, openFacets, query } = this.state;
@@ -618,7 +618,7 @@ export class App extends React.PureComponent<Props, State> {
 
   fetchIssuesUntil = (
     page: number,
-    done: (pageIssues: Issue[], paging: Paging) => boolean
+    done: (pageIssues: Issue[], paging: Paging) => boolean,
   ): Promise<FetchIssuesPromise> => {
     const recursiveFetch = (p: number, prevIssues: Issue[]): Promise<FetchIssuesPromise> => {
       return this.fetchIssuesPage(p).then(({ issues: pageIssues, paging, ...other }) => {
@@ -659,7 +659,7 @@ export class App extends React.PureComponent<Props, State> {
         if (this.mounted) {
           this.setState({ loadingMore: false });
         }
-      }
+      },
     );
   };
 
@@ -689,7 +689,7 @@ export class App extends React.PureComponent<Props, State> {
       },
       () => {
         /* Do nothing */
-      }
+      },
     );
   };
 
@@ -802,7 +802,7 @@ export class App extends React.PureComponent<Props, State> {
       if (willOpenProperty && property === STANDARDS) {
         newState.openFacets.sonarsourceSecurity = shouldOpenSonarSourceSecurityFacet(
           newState.openFacets,
-          state.query
+          state.query,
         );
 
         // Force loading of sonarsource security facet data
@@ -1286,7 +1286,7 @@ export class App extends React.PureComponent<Props, State> {
                       <FlagMessage className="sw-mb-4" variant="warning">
                         {translateWithParameters(
                           'issues.cannot_open_issue_max_initial_X_fetched',
-                          MAX_INITAL_FETCH
+                          MAX_INITAL_FETCH,
                         )}
                       </FlagMessage>
                     )}
@@ -1320,7 +1320,7 @@ export class App extends React.PureComponent<Props, State> {
                   title={openIssue.message}
                   titleTemplate={translateWithParameters(
                     'page_title.template.with_category',
-                    translate('issues.page')
+                    translate('issues.page'),
                   )}
                 />
               ) : (
@@ -1362,11 +1362,11 @@ export default withRouter(
                 (isCompleted === false || hasFailures === true || completedCount !== total)) ||
               (component?.qualifier !== ComponentQualifier.Project &&
                 component?.needIssueSync === true),
-          })
-        )
-      )
-    )
-  )
+          }),
+        ),
+      ),
+    ),
+  ),
 );
 
 const PageWrapperStyle = styled.div`
index c78890c6d90942ccff8f4bad275f938800db3edb..51b95bf1b4eba7a400439ccd6b03f83aafd26825 100644 (file)
@@ -101,7 +101,7 @@ export default class IssuesSourceViewer extends React.PureComponent<IssuesSource
     const selectedLocation = getSelectedLocation(
       openIssue,
       selectedFlowIndex,
-      selectedLocationIndex
+      selectedLocationIndex,
     );
 
     const highlightedLocationMessage =
index 6b52f0e53194981864c2667ec9a046c8ea42ba2d..bebaf72fffe66ae47137d6d3ddd7afdcf28803d1 100644 (file)
@@ -44,21 +44,21 @@ export default function TagsSelect(props: Props) {
       const results = await onSearch(query);
       setSearchResults(results);
     },
-    [onSearch, setSearchResults]
+    [onSearch, setSearchResults],
   );
 
   const onSelect = React.useCallback(
     (newTag: string) => {
       onChange([...selectedTags, newTag]);
     },
-    [onChange, selectedTags]
+    [onChange, selectedTags],
   );
 
   const onUnselect = React.useCallback(
     (toRemove: string) => {
       onChange(selectedTags.filter((tag) => tag !== toRemove));
     },
-    [onChange, selectedTags]
+    [onChange, selectedTags],
   );
 
   return (
index a2f9cc0c33a5243b7d7acb5dcda3486c60101619..3ad07ae90fe536e89c3993980c76b98a2d3d2ffb 100644 (file)
@@ -64,7 +64,7 @@ it('should show correct suggestions when there is assignable issue for the curre
     {
       issues: [mockIssue(false, { assignee: 'someone' })],
     },
-    mockLoggedInUser({ name: 'Skywalker' })
+    mockLoggedInUser({ name: 'Skywalker' }),
   );
 
   await user.click(ui.combobox.get());
@@ -77,7 +77,7 @@ it('should show correct suggestions when all issues are already assigned to curr
     {
       issues: [mockIssue(false, { assignee: 'luke' })],
     },
-    mockLoggedInUser({ login: 'luke', name: 'Skywalker' })
+    mockLoggedInUser({ login: 'luke', name: 'Skywalker' }),
   );
 
   await user.click(ui.combobox.get());
@@ -133,11 +133,11 @@ it('should handle assignee selection', async () => {
 
 function renderAssigneeSelect(
   overrides: Partial<AssigneeSelectProps> = {},
-  currentUser: CurrentUser = mockCurrentUser()
+  currentUser: CurrentUser = mockCurrentUser(),
 ) {
   return renderComponent(
     <CurrentUserContextProvider currentUser={currentUser}>
       <AssigneeSelect inputId="id" issues={[]} onAssigneeSelect={jest.fn()} {...overrides} />
-    </CurrentUserContextProvider>
+    </CurrentUserContextProvider>,
   );
 }
index 5cf5594f19b34da19ff94404850deed594025eea..03caf6a4ddb7227f9984c19b92de60489e05bf6d 100644 (file)
@@ -55,7 +55,7 @@ it('should display warning when too many issues are passed', async () => {
   renderBulkChangeModal(issues, { needIssueSync: true });
 
   expect(
-    await screen.findByText(`issue_bulk_change.form.title.${MAX_PAGE_SIZE}`)
+    await screen.findByText(`issue_bulk_change.form.title.${MAX_PAGE_SIZE}`),
   ).toBeInTheDocument();
 
   expect(await screen.findByText('issue_bulk_change.max_issues_reached')).toBeInTheDocument();
@@ -122,7 +122,7 @@ it('should properly submit', async () => {
     mockLoggedInUser({
       login: 'toto',
       name: 'Toto',
-    })
+    }),
   );
 
   expect(bulkChangeIssues).toHaveBeenCalledTimes(0);
@@ -130,7 +130,7 @@ it('should properly submit', async () => {
 
   // Assign
   await user.click(
-    await screen.findByRole('combobox', { name: 'issue_bulk_change.assignee.change' })
+    await screen.findByRole('combobox', { name: 'issue_bulk_change.assignee.change' }),
   );
 
   await user.click(await screen.findByText('Toto'));
@@ -169,7 +169,7 @@ it('should properly submit', async () => {
 function renderBulkChangeModal(
   issues: Issue[],
   props: Partial<ComponentPropsType<typeof BulkChangeModal>> = {},
-  currentUser: CurrentUser = mockLoggedInUser()
+  currentUser: CurrentUser = mockLoggedInUser(),
 ) {
   return renderComponent(
     <CurrentUserContextProvider currentUser={currentUser}>
@@ -189,6 +189,6 @@ function renderBulkChangeModal(
         {...props}
       />
     </CurrentUserContextProvider>,
-    ''
+    '',
   );
 }
index fb6b445d99e510abb00c8417635ced71ccab6b2b..f7a2e6b16644d0bb5e28efbea41b3b3236dd8ee0 100644 (file)
@@ -61,6 +61,6 @@ describe('renders properly', () => {
 
 function renderComponentBreadcrumbs(component?: Component, issue: Partial<Issue> = {}) {
   return renderComponent(
-    <ComponentBreadcrumbs component={component} issue={{ ...baseIssue, ...issue }} />
+    <ComponentBreadcrumbs component={component} issue={{ ...baseIssue, ...issue }} />,
   );
 }
index f2c5df4f80fab9931a36317c553a8df6f4040a46..454babaa25b72791f228bfe4ac437c193b9ca6b4 100644 (file)
@@ -69,7 +69,7 @@ interface Props {
   renderDuplicationPopup: (
     component: SourceViewerFile,
     index: number,
-    line: number
+    line: number,
   ) => React.ReactNode;
   snippetGroup: SnippetGroup;
 }
@@ -152,7 +152,7 @@ export default class ComponentSourceSnippetGroupViewer extends React.PureCompone
           line.coverageStatus = getCoverageStatus(line);
           lineMap[line.line] = line;
           return lineMap;
-        }, {})
+        }, {}),
       )
       .then((newLinesMapped) => {
         const newSnippets = expandSnippet({
@@ -194,14 +194,14 @@ export default class ComponentSourceSnippetGroupViewer extends React.PureCompone
         if (this.mounted) {
           this.setState({ loading: false });
         }
-      }
+      },
     );
   };
 
   handleSymbolClick = (clickedSymbols: string[]) => {
     this.setState(({ highlightedSymbols }) => {
       const newHighlightedSymbols = clickedSymbols.filter(
-        (symb) => !highlightedSymbols.includes(symb)
+        (symb) => !highlightedSymbols.includes(symb),
       );
       return { highlightedSymbols: newHighlightedSymbols };
     });
@@ -228,7 +228,7 @@ export default class ComponentSourceSnippetGroupViewer extends React.PureCompone
     const issuesForLine = (issuesByLine[line.line] || []).filter(
       (issueForline) =>
         issue.key !== issueForline.key ||
-        (issue.key === issueForline.key && issueLocations.length > 0)
+        (issue.key === issueForline.key && issueLocations.length > 0),
     );
 
     return (
@@ -348,7 +348,7 @@ export default class ComponentSourceSnippetGroupViewer extends React.PureCompone
             locationsByLine={getLocationsByLine(
               issue,
               snippetGroup,
-              isLastOccurenceOfPrimaryComponent
+              isLastOccurenceOfPrimaryComponent,
             )}
             onLocationSelect={this.props.onLocationSelect}
             renderDuplicationPopup={this.renderDuplicationPopup}
@@ -366,7 +366,7 @@ export default class ComponentSourceSnippetGroupViewer extends React.PureCompone
 function getLocationsByLine(
   issue: TypeIssue,
   snippetGroup: SnippetGroup,
-  isLastOccurenceOfPrimaryComponent: boolean
+  isLastOccurenceOfPrimaryComponent: boolean,
 ) {
   const isFlow = issue.secondaryLocations.length === 0;
   const includeIssueLocation = isFlow ? isLastOccurenceOfPrimaryComponent : true;
index 018c43287b7f7d6b24cafa776903441561e892f0..c5c2dfcb4f7507799299a79220a171c47dec19a1 100644 (file)
@@ -114,7 +114,7 @@ export default class CrossComponentSourceViewer extends React.PureComponent<Prop
       },
       () => {
         /* No error hanlding here  */
-      }
+      },
     );
   };
 
@@ -211,7 +211,7 @@ export default class CrossComponentSourceViewer extends React.PureComponent<Prop
     const locationsByComponent = groupLocationsByComponent(issue, locations, components);
 
     const lastOccurenceOfPrimaryComponent = findLastIndex(locationsByComponent, ({ component }) =>
-      component ? component.key === issue.component : true
+      component ? component.key === issue.component : true,
     );
 
     if (components[issue.component] === undefined) {
index a9973b3484862ce7775ae942d2d2ee647833cec4..b578a558fa502dba2977983c85ef97fff632f76c 100644 (file)
@@ -84,7 +84,7 @@ function IssueSourceViewerHeader(props: Props & ThemeProp) {
     <IssueSourceViewerStyle
       className={classNames(
         'sw-flex sw-justify-space-between sw-items-center sw-px-4 sw-py-3 sw-text-sm',
-        className
+        className,
       )}
       role="separator"
       aria-label={sourceViewerFile.path}
index 09a02abaf94c37221ee084d09d75d7574a2ba05b..1c802c5710487746a16eeb0a172565bbd04fb03c 100644 (file)
@@ -114,9 +114,9 @@ function SnippetViewer(props: Props) {
       throttle(
         (hoveredLine: number) =>
           snippetSourcesMap ? setHoveredLine(snippetSourcesMap[hoveredLine]) : undefined,
-        THROTTLE_SHORT_DELAY
+        THROTTLE_SHORT_DELAY,
       ),
-    [snippetSourcesMap]
+    [snippetSourcesMap],
   );
 
   const onLineMouseLeave = React.useMemo(
@@ -124,9 +124,9 @@ function SnippetViewer(props: Props) {
       debounce(
         (line: number) =>
           setHoveredLine((hoveredLine) => (hoveredLine?.line === line ? undefined : hoveredLine)),
-        THROTTLE_SHORT_DELAY
+        THROTTLE_SHORT_DELAY,
       ),
-    []
+    [],
   );
 
   return (
@@ -149,7 +149,7 @@ function SnippetViewer(props: Props) {
             {snippet.map((line, index) => {
               const secondaryIssueLocations = getSecondaryIssueLocationsForLine(
                 line,
-                props.locations
+                props.locations,
               );
               const lineDuplications =
                 (duplicationsCount && duplicationsByLine && duplicationsByLine[line.line]) || [];
@@ -172,11 +172,11 @@ function SnippetViewer(props: Props) {
                   highlighted={false}
                   highlightedLocationMessage={optimizeLocationMessage(
                     props.highlightedLocationMessage,
-                    secondaryIssueLocations
+                    secondaryIssueLocations,
                   )}
                   highlightedSymbols={optimizeHighlightedSymbols(
                     symbols[line.line],
-                    props.highlightedSymbols
+                    props.highlightedSymbols,
                   )}
                   issueLocations={locationsByLine[line.line] || []}
                   issues={[]}
index e758996e1fcff10d14749f044e87f33553a66c74..87a880a9687e6bc010a5d483744c77f04814ec3b 100644 (file)
@@ -78,6 +78,6 @@ function renderIssueSourceViewerHeader(props: Partial<Props> = {}) {
       onExpand={jest.fn()}
       sourceViewerFile={mockSourceViewerFile('foo/bar.ts', 'my-project')}
       {...props}
-    />
+    />,
   );
 }
index ac9da7c0565d17a31b2e276ce4c7195f527769e1..42ae540f7cffcdc1084168c5ce078173cc037b3f 100644 (file)
@@ -108,6 +108,6 @@ function renderSnippetViewer(props: Partial<SnippetViewerProps> = {}) {
       renderDuplicationPopup={jest.fn()}
       snippet={[]}
       {...props}
-    />
+    />,
   );
 }
index 69d90b4064418b710685be74577344bf284b6359..b01c61dc8e4727747b9f60d27e3cb5d24ec48a0a 100644 (file)
@@ -44,9 +44,9 @@ describe('groupLocationsByComponent', () => {
         'main.js': mockSnippetsByComponent(
           'main.js',
           'project',
-          [14, 15, 16, 17, 18, 22, 23, 24, 25, 26]
+          [14, 15, 16, 17, 18, 22, 23, 24, 25, 26],
         ),
-      }
+      },
     );
 
     expect(results).toHaveLength(1);
@@ -72,7 +72,7 @@ describe('groupLocationsByComponent', () => {
       {
         'A.js': mockSnippetsByComponent('A.js', 'project', [13, 14, 15, 16, 17, 18]),
         'B.js': mockSnippetsByComponent('B.js', 'project', [14, 15, 16, 17, 18]),
-      }
+      },
     );
 
     expect(results).toHaveLength(3);
index fe8b66271fbb2292c22e29897b381c05385974cb..38b268a09173edfa6c8d513e29a797fdda900e14 100644 (file)
@@ -132,7 +132,7 @@ export function createSnippets(params: {
 
       return snippets;
     },
-    []
+    [],
   );
 
   // Sort snippets by line number
@@ -161,7 +161,7 @@ export function linesForSnippets(snippets: Snippet[], componentLines: LineMap) {
 export function groupLocationsByComponent(
   issue: Issue,
   locations: FlowLocation[],
-  components: { [key: string]: SnippetsByComponent }
+  components: { [key: string]: SnippetsByComponent },
 ) {
   let currentComponent = '';
   let currentGroup: SnippetGroup;
@@ -214,7 +214,7 @@ export function expandSnippet({
 
   snippetToExpand.start = Math.max(
     0,
-    snippetToExpand.start - (direction === 'up' ? EXPAND_BY_LINES : 0)
+    snippetToExpand.start - (direction === 'up' ? EXPAND_BY_LINES : 0),
   );
   snippetToExpand.end += direction === 'down' ? EXPAND_BY_LINES : 0;
 
@@ -238,7 +238,7 @@ export function inSnippet(line: number, snippet: SourceLine[]) {
 
 export function getIssueReviewHistory(
   issue: Issue,
-  changelog: IssueChangelog[]
+  changelog: IssueChangelog[],
 ): ReviewHistoryElement[] {
   const history: ReviewHistoryElement[] = [];
 
@@ -265,7 +265,7 @@ export function getIssueReviewHistory(
           name: log.userName || log.user,
         },
         diffs: log.diffs,
-      }))
+      })),
     );
   }
 
@@ -283,7 +283,7 @@ export function getIssueReviewHistory(
         html: comment.htmlText,
         key: comment.key,
         markdown: comment.markdown,
-      }))
+      })),
     );
   }
 
index fa12fafb98ecbf530f7c33e776ebf5a3dafd59f8..f0a351a1001b39b5b1cd1227535e08d70884ad0b 100644 (file)
@@ -51,7 +51,7 @@ export default function IssueLocation(props: Props) {
       event.preventDefault();
       onClick(index);
     },
-    [index, onClick]
+    [index, onClick],
   );
 
   return (
index c70dc70bfee9d9199f384b56cabf72e91c8f6d78..b289e2edbade0246a686bc46f49ff0f7e06109e5 100644 (file)
@@ -34,7 +34,7 @@ export default function IssueLocations(props: Props) {
   const { concealed, issue, locations, onLocationSelect, selectedLocationIndex } = props;
   const isCrossFile = useMemo(
     () => locations.some((location) => location.component !== issue.component),
-    [locations, issue.component]
+    [locations, issue.component],
   );
 
   return isCrossFile ? (
index 816aa0253690102c71b4f3556e2889619c9e2ca2..ca8e3bb8c940953265cf02a91a42ade370bae99b 100644 (file)
@@ -125,7 +125,7 @@ export default class IssueLocationsCrossFile extends PureComponent<Props, State>
   renderGroup = (
     group: LocationGroup,
     groupIndex: number,
-    { onlyFirst = false, onlyLast = false } = {}
+    { onlyFirst = false, onlyLast = false } = {},
   ) => {
     const { firstLocationIndex } = group;
     const lastLocationIndex = group.locations.length - 1;
@@ -142,13 +142,13 @@ export default class IssueLocationsCrossFile extends PureComponent<Props, State>
             {onlyLast &&
               this.renderLocation(
                 firstLocationIndex + lastLocationIndex,
-                group.locations[lastLocationIndex].msg
+                group.locations[lastLocationIndex].msg,
               )}
 
             {!onlyFirst &&
               !onlyLast &&
               group.locations.map((location, index) =>
-                this.renderLocation(firstLocationIndex + index, location.msg)
+                this.renderLocation(firstLocationIndex + index, location.msg),
               )}
           </GroupBody>
         )}
@@ -179,7 +179,7 @@ export default class IssueLocationsCrossFile extends PureComponent<Props, State>
             >
               {translateWithParameters(
                 'issues.show_x_more_locations',
-                locations.length - VISIBLE_LOCATIONS_COLLAPSE
+                locations.length - VISIBLE_LOCATIONS_COLLAPSE,
               )}
             </ExpandLink>
           </div>
index bfcf853f0ad20cf323ca96eba8cdb18df9c329ea..30e297450fd696ba0a563d0b9cefe153d54747f2 100644 (file)
@@ -57,7 +57,7 @@ export default function IssueLocationsNavigator(props: Props) {
         }
       }
     },
-    [selectedFlowIndex, onFlowSelect]
+    [selectedFlowIndex, onFlowSelect],
   );
 
   if (!hasSecondaryLocations && !hasFlows) {
index 04b3969f7dd16003bf9fcda4cd59667cb2e91a3e..c5388deb0770cc69b049276c92f9db2210012361 100644 (file)
@@ -129,7 +129,7 @@ describe('rendering', () => {
       ],
       {
         selected: 'custom',
-      }
+      },
     );
 
     expect(ui.expandBadgesButton.query()).not.toBeInTheDocument();
@@ -157,7 +157,7 @@ describe('interacting', () => {
         component: `component-${i}`,
         index: i,
         msg: `loc ${i}`,
-      })
+      }),
     );
 
     renderConciseIssues(
@@ -172,7 +172,7 @@ describe('interacting', () => {
       {
         selected: 'custom',
         selectedFlowIndex: 0,
-      }
+      },
     );
 
     expect(ui.expandBadgesButton.get()).toBeInTheDocument();
@@ -214,7 +214,7 @@ describe('interacting', () => {
       {
         onFlowSelect,
         selected: 'custom',
-      }
+      },
     );
 
     expect(onFlowSelect).not.toHaveBeenCalled();
@@ -245,7 +245,7 @@ function getPageObject() {
 
 function renderConciseIssues(
   issues: Issue[],
-  listProps: Partial<ComponentPropsType<typeof SubnavigationIssuesList>> = {}
+  listProps: Partial<ComponentPropsType<typeof SubnavigationIssuesList>> = {},
 ) {
   const wrapper = renderComponent(
     <SubnavigationIssuesList
@@ -261,12 +261,12 @@ function renderConciseIssues(
       selectedFlowIndex={undefined}
       selectedLocationIndex={undefined}
       {...listProps}
-    />
+    />,
   );
 
   function override(
     issues: Issue[],
-    listProps: Partial<ComponentPropsType<typeof SubnavigationIssuesList>> = {}
+    listProps: Partial<ComponentPropsType<typeof SubnavigationIssuesList>> = {},
   ) {
     wrapper.rerender(
       <SubnavigationIssuesList
@@ -282,7 +282,7 @@ function renderConciseIssues(
         selectedFlowIndex={undefined}
         selectedLocationIndex={undefined}
         {...listProps}
-      />
+      />,
     );
   }
 
index 45f3366a725fe58f17e98c9f6a850103ec37e39c..16db0f29db8775f21194e100b68dd01c45ca2846 100644 (file)
@@ -47,10 +47,10 @@ function IssuesNavigate() {
                 branch: searchParams.get('branch'),
                 pullRequest: searchParams.get('pullRequest'),
                 assignedToMe: 'false',
-              })
+              }),
             ).toString(),
           },
-          { replace: true }
+          { replace: true },
         );
       } else {
         const filteredTypes = types
index e02b0abe46354ad21b40dbbb5b0d969026b9a530..89586dd7709148384915190ecc3d62b2ce93d96f 100644 (file)
@@ -55,7 +55,7 @@ export class AssigneeFacet extends React.PureComponent<Props> {
       this.props.onChange({ assigned: !this.props.assigned, assignees: [] });
     } else if (multiple) {
       const newValue = sortBy(
-        assignees.includes(itemValue) ? without(assignees, itemValue) : [...assignees, itemValue]
+        assignees.includes(itemValue) ? without(assignees, itemValue) : [...assignees, itemValue],
       );
 
       this.props.onChange({ assigned: true, assignees: newValue });
@@ -100,7 +100,7 @@ export class AssigneeFacet extends React.PureComponent<Props> {
       // put "not assigned" first
       (key) => (key === '' ? 0 : 1),
       // the sort by number
-      (key) => -stats[key]
+      (key) => -stats[key],
     );
   };
 
index e585b8fb015219a6b641536f4ea426ca1d825965..5d564d98cdd9fee3842336ef211aa8029926d164 100644 (file)
@@ -138,7 +138,7 @@ export class CreationDateFacetClass extends React.PureComponent<Props & WrappedC
         'issues.facet.createdAt.bar_description',
         formatMeasure(stats[start], MetricType.ShortInteger),
         formatDate(startDate, longFormatterOption),
-        formatDate(tooltipEndDate, longFormatterOption)
+        formatDate(tooltipEndDate, longFormatterOption),
       );
 
       return {
@@ -156,7 +156,7 @@ export class CreationDateFacetClass extends React.PureComponent<Props & WrappedC
 
     const maxValue = max(data.map((d) => d.y));
     const xValues = data.map((d) =>
-      d.y === maxValue ? formatMeasure(maxValue, MetricType.ShortInteger) : ''
+      d.y === maxValue ? formatMeasure(maxValue, MetricType.ShortInteger) : '',
     );
 
     return (
index 979d2a94176922c3ffa4b3f9de03a05f76fc2a8b..fd52ecb1583669586e275aed571e771a5f5db971 100644 (file)
@@ -105,7 +105,7 @@ export class FileFacet extends React.PureComponent<Props> {
     return this.renderFile(
       <>
         {head}/{highlightTerm(tail, term)}
-      </>
+      </>,
     );
   };
 
index 28fc6c213397c8009f44a453ce76dd1ed536f313..2076d755f2ce37a9cafe165599ad32bef3a547cb 100644 (file)
@@ -52,7 +52,7 @@ class LanguageFacetClass extends React.PureComponent<Props> {
     const options = this.getAllPossibleOptions();
 
     const results = options.filter((language) =>
-      language.name.toLowerCase().includes(query.toLowerCase())
+      language.name.toLowerCase().includes(query.toLowerCase()),
     );
 
     const paging = { pageIndex: 1, pageSize: results.length, total: results.length };
@@ -68,7 +68,7 @@ class LanguageFacetClass extends React.PureComponent<Props> {
     // and make sure we reference each language only once
     return uniqBy(
       [...Object.values(languages), ...Object.keys(stats).map((key) => ({ key, name: key }))],
-      (language) => language.key
+      (language) => language.key,
     );
   };
 
index 8ea575ab347f0e41351fc3027036127b49c47c09..2771a1d618281acc13a36c83b4bef52bdac3b099 100644 (file)
@@ -145,7 +145,7 @@ export class ListStyleFacet<S> extends React.Component<Props<S>, State<S>> {
 
       if (multiple) {
         const newValue = sortBy(
-          values.includes(itemValue) ? without(values, itemValue) : [...values, itemValue]
+          values.includes(itemValue) ? without(values, itemValue) : [...values, itemValue],
         );
 
         this.props.onChange({ [this.props.property]: newValue });
@@ -295,7 +295,7 @@ export class ListStyleFacet<S> extends React.Component<Props<S>, State<S>> {
       : sortBy(
           Object.keys(stats),
           (key) => -stats[key],
-          (key) => this.props.getFacetItemText(key)
+          (key) => this.props.getFacetItemText(key),
         );
 
     const limitedList = this.state.showFullList
index 03e06c132ee70336ca01ebb341844c5dd6300233..45d61be60624f81666fe18489040c8574bb13a98 100644 (file)
@@ -52,7 +52,7 @@ interface SearchedProject {
 export class ProjectFacet extends React.PureComponent<Props> {
   handleSearch = (
     query: string,
-    page = 1
+    page = 1,
   ): Promise<{ results: SearchedProject[]; paging: Paging }> => {
     const { component } = this.props;
 
index 30b12397f3a2f79b6d0fe3d1301b2dd8964bf379..b2995f774de6ce258e3e010b597c166d34aff422 100644 (file)
@@ -55,7 +55,7 @@ export class ResolutionFacet extends React.PureComponent<Props> {
       const newValue = orderBy(
         resolutions.includes(itemValue)
           ? without(resolutions, itemValue)
-          : [...resolutions, itemValue]
+          : [...resolutions, itemValue],
       );
 
       this.props.onChange({ resolved: true, [this.property]: newValue });
index 9a33b8ab1b1c4aca03f44479a5caef0fb7037a2b..5b92665c8b2c32c946a8259beac1e67ef778aa14 100644 (file)
@@ -146,20 +146,20 @@ export class StandardFacet extends React.PureComponent<Props, State> {
           });
         }
       },
-      () => {}
+      () => {},
     );
   };
 
   getValues = () => {
     return [
       ...this.props.sonarsourceSecurity.map((item) =>
-        renderSonarSourceSecurityCategory(this.state.standards, item, true)
+        renderSonarSourceSecurityCategory(this.state.standards, item, true),
       ),
       ...this.props.owaspTop10.map((item) =>
-        renderOwaspTop10Category(this.state.standards, item, true)
+        renderOwaspTop10Category(this.state.standards, item, true),
       ),
       ...this.props['owaspTop10-2021'].map((item) =>
-        renderOwaspTop102021Category(this.state.standards, item, true)
+        renderOwaspTop102021Category(this.state.standards, item, true),
       ),
       ...this.props.cwe.map((item) => renderCWECategory(this.state.standards, item)),
     ];
@@ -200,7 +200,7 @@ export class StandardFacet extends React.PureComponent<Props, State> {
 
     if (multiple) {
       const newValue = sortBy(
-        items.includes(itemValue) ? without(items, itemValue) : [...items, itemValue]
+        items.includes(itemValue) ? without(items, itemValue) : [...items, itemValue],
       );
 
       this.props.onChange({ [prop]: newValue });
@@ -226,7 +226,7 @@ export class StandardFacet extends React.PureComponent<Props, State> {
   handleCWESearch = (query: string) => {
     return Promise.resolve({
       results: Object.keys(this.state.standards.cwe).filter((cwe) =>
-        renderCWECategory(this.state.standards, cwe).toLowerCase().includes(query.toLowerCase())
+        renderCWECategory(this.state.standards, cwe).toLowerCase().includes(query.toLowerCase()),
       ),
     });
   };
@@ -243,7 +243,7 @@ export class StandardFacet extends React.PureComponent<Props, State> {
     statsProp: StatsProp,
     valuesProp: ValuesProp,
     renderName: (standards: Standards, category: string) => string,
-    onClick: (x: string, multiple?: boolean) => void
+    onClick: (x: string, multiple?: boolean) => void,
   ) => {
     const stats = this.props[statsProp];
     const values = this.props[valuesProp];
@@ -264,7 +264,7 @@ export class StandardFacet extends React.PureComponent<Props, State> {
     categories: string[],
     renderName: (standards: Standards, category: string) => React.ReactNode,
     renderTooltip: (standards: Standards, category: string) => string,
-    onClick: (x: string, multiple?: boolean) => void
+    onClick: (x: string, multiple?: boolean) => void,
   ) => {
     if (!categories.length) {
       return <TextMuted className="sw-ml-2 sw-mt-1" text={translate('no_results')} />;
@@ -305,7 +305,7 @@ export class StandardFacet extends React.PureComponent<Props, State> {
       'owaspTop10Stats',
       SecurityStandard.OWASP_TOP10,
       renderOwaspTop10Category,
-      this.handleOwaspTop10ItemClick
+      this.handleOwaspTop10ItemClick,
     );
   }
 
@@ -314,7 +314,7 @@ export class StandardFacet extends React.PureComponent<Props, State> {
       'owaspTop10-2021Stats',
       SecurityStandard.OWASP_TOP10_2021,
       renderOwaspTop102021Category,
-      this.handleOwaspTop102021ItemClick
+      this.handleOwaspTop102021ItemClick,
     );
   }
 
@@ -329,7 +329,7 @@ export class StandardFacet extends React.PureComponent<Props, State> {
     const sortedItems = sortBy(
       Object.keys(stats),
       (key) => -stats[key],
-      (key) => renderSonarSourceSecurityCategory(this.state.standards, key)
+      (key) => renderSonarSourceSecurityCategory(this.state.standards, key),
     );
 
     const limitedList = this.state.showFullSonarSourceList
index 0f3a1e7ddcd3d8040b5741c92afdbc0c5874bcea..f87bb22032113bc956ea198b627682f7f5dfee62 100644 (file)
@@ -54,7 +54,7 @@ export class StatusFacet extends React.PureComponent<Props> {
 
     if (multiple) {
       const newValue = orderBy(
-        statuses.includes(itemValue) ? without(statuses, itemValue) : [...statuses, itemValue]
+        statuses.includes(itemValue) ? without(statuses, itemValue) : [...statuses, itemValue],
       );
 
       this.props.onChange({ [this.property]: newValue });
index cacde371aaa3e46fe6d012b2aa8dce9d92057eb0..6c05f81e3a2a0cb337b701f68b4cace933c5bfb1 100644 (file)
@@ -51,7 +51,7 @@ export class TypeFacet extends React.PureComponent<Props> {
     const { types } = this.props;
     if (multiple) {
       const newValue = orderBy(
-        types.includes(itemValue) ? without(types, itemValue) : [...types, itemValue]
+        types.includes(itemValue) ? without(types, itemValue) : [...types, itemValue],
       );
       this.props.onChange({ [this.property]: newValue });
     } else {
index b7a2a50d71691e6f7b506b58fce915da9ea5c242..b3a1b6a92d581c30ca731755e0e1a4920dd09cba 100644 (file)
@@ -55,7 +55,7 @@ export function VariantFacet(props: VariantFacetProps) {
         onChange({ [FACET_NAME]: undefined });
       } else if (multiple) {
         const newValues = orderBy(
-          values.includes(value) ? without(values, value) : [...values, value]
+          values.includes(value) ? without(values, value) : [...values, value],
         );
 
         onChange({ [FACET_NAME]: newValues });
@@ -66,7 +66,7 @@ export function VariantFacet(props: VariantFacetProps) {
       }
     },
 
-    [values, onChange]
+    [values, onChange],
   );
 
   const id = `facet_${FACET_NAME}`;
@@ -96,7 +96,7 @@ export function VariantFacet(props: VariantFacetProps) {
         {sortBy(
           Object.keys(stats),
           (key) => -stats[key],
-          (key) => key
+          (key) => key,
         ).map((codeVariant) => (
           <FacetItem
             active={values.includes(codeVariant)}
index 9f5b8a0e040249cbc17c936799bf4a93237fe127..7b627fbae351abb749ab91ce6ef3f67b13f0b512 100644 (file)
@@ -206,7 +206,7 @@ function shallowRender(props: Partial<Props<string>> = {}) {
       stats={{ a: 10, b: 8, c: 1 }}
       values={[]}
       {...props}
-    />
+    />,
   );
 }
 
index 89deb00c4db79f341f3875ecae41904afd1b19e2..34e53c6b2afd148b38ced9375e4b97411379e62c 100644 (file)
@@ -78,6 +78,6 @@ it('should render "show less", not "show more"', async () => {
 
 function render(props: Partial<Props> = {}) {
   return renderComponent(
-    <ListStyleFacetFooter nbShown={1} showMore={jest.fn()} total={42} {...props} />
+    <ListStyleFacetFooter nbShown={1} showMore={jest.fn()} total={42} {...props} />,
   );
 }
index 1056bcf758305f4fd85d1fa0af9a81572a9b5f06..1778b6336fdb998bd3f5997c9a3a4dd3ba1b8a30 100644 (file)
@@ -136,6 +136,6 @@ function renderSidebar(props: Partial<Sidebar['props']> = {}) {
       referencedRules={{}}
       referencedUsers={{}}
       {...props}
-    />
+    />,
   );
 }
index 1a9aa8edd0e756fca1f9dadb026c9b10caaa8bde..bf1b336708c056ce784363e093c0d9533f20dc36 100644 (file)
@@ -139,7 +139,7 @@ export async function waitOnDataLoaded() {
 }
 
 export function renderIssueApp(
-  currentUser = mockCurrentUser({ dismissedNotices: { [NoticeType.ISSUE_GUIDE]: true } })
+  currentUser = mockCurrentUser({ dismissedNotices: { [NoticeType.ISSUE_GUIDE]: true } }),
 ) {
   renderApp('issues', <IssuesApp />, { currentUser });
 }
@@ -147,7 +147,7 @@ export function renderIssueApp(
 export function renderProjectIssuesApp(
   navigateTo?: string,
   overrides?: Partial<Component>,
-  currentUser = mockCurrentUser({ dismissedNotices: { [NoticeType.ISSUE_GUIDE]: true } })
+  currentUser = mockCurrentUser({ dismissedNotices: { [NoticeType.ISSUE_GUIDE]: true } }),
 ) {
   renderAppWithComponentContext(
     'project/issues',
@@ -163,6 +163,6 @@ export function renderProjectIssuesApp(
       </Route>
     ),
     { navigateTo, currentUser },
-    { component: mockComponent(overrides) }
+    { component: mockComponent(overrides) },
   );
 }
index 81f6e8bf76452bf2f77dfa872a0d8e175f757994..f043d71ee6a4d9dc1f01093c03ef83653aebcaa7 100644 (file)
@@ -96,7 +96,7 @@ export function parseQuery(query: RawQuery): Query {
     author: isArray(query.author) ? query.author : [query.author].filter(isDefined),
     cleanCodeAttributeCategories: parseAsArray<CleanCodeAttributeCategory>(
       query.cleanCodeAttributeCategories,
-      parseAsString
+      parseAsString,
     ),
     createdAfter: parseAsDate(query.createdAfter),
     createdAt: parseAsString(query.createdAt),
@@ -108,7 +108,7 @@ export function parseQuery(query: RawQuery): Query {
     impactSeverities: parseAsArray<SoftwareImpactSeverity>(query.impactSeverities, parseAsString),
     impactSoftwareQualities: parseAsArray<SoftwareQuality>(
       query.impactSoftwareQualities,
-      parseAsString
+      parseAsString,
     ),
     inNewCodePeriod: parseAsBoolean(query.inNewCodePeriod, false),
     issues: parseAsArray(query.issues, parseAsString),
@@ -211,7 +211,7 @@ export function formatFacetStat(stat: number | undefined) {
 
 export const searchAssignees = (
   query: string,
-  page = 1
+  page = 1,
 ): Promise<{ paging: Paging; results: RestUser[] }> => {
   return getUsers<RestUser>({ pageIndex: page, q: query }).then(({ page, users }) => ({
     paging: page,
@@ -235,7 +235,7 @@ export function getLocations(
     secondaryLocations,
     flowsWithType,
   }: Pick<Issue, 'flows' | 'secondaryLocations' | 'flowsWithType'>,
-  selectedFlowIndex: number | undefined
+  selectedFlowIndex: number | undefined,
 ) {
   if (secondaryLocations.length > 0) {
     return secondaryLocations;
@@ -248,7 +248,7 @@ export function getLocations(
 export function getSelectedLocation(
   issue: Pick<Issue, 'flows' | 'secondaryLocations' | 'flowsWithType'>,
   selectedFlowIndex: number | undefined,
-  selectedLocationIndex: number | undefined
+  selectedLocationIndex: number | undefined,
 ) {
   const locations = getLocations(issue, selectedFlowIndex);
   if (
@@ -263,14 +263,14 @@ export function getSelectedLocation(
 
 export function allLocationsEmpty(
   issue: Pick<Issue, 'flows' | 'secondaryLocations' | 'flowsWithType'>,
-  selectedFlowIndex: number | undefined
+  selectedFlowIndex: number | undefined,
 ) {
   return getLocations(issue, selectedFlowIndex).every((location) => !location.msg);
 }
 
 export function shouldOpenStandardsFacet(
   openFacets: Dict<boolean>,
-  query: Partial<Query>
+  query: Partial<Query>,
 ): boolean {
   return (
     openFacets[STANDARDS] ||
@@ -286,7 +286,7 @@ export function shouldOpenStandardsChildFacet(
     | SecurityStandard.CWE
     | SecurityStandard.OWASP_TOP10
     | SecurityStandard.OWASP_TOP10_2021
-    | SecurityStandard.SONARSOURCE
+    | SecurityStandard.SONARSOURCE,
 ): boolean {
   const filter = query[standardType];
   return (
@@ -298,7 +298,7 @@ export function shouldOpenStandardsChildFacet(
 
 export function shouldOpenSonarSourceSecurityFacet(
   openFacets: Dict<boolean>,
-  query: Partial<Query>
+  query: Partial<Query>,
 ): boolean {
   // Open it by default if the parent is open, and no other standard is open.
   return (
@@ -318,7 +318,7 @@ function isOneStandardChildFacetOpen(openFacets: Dict<boolean>, query: Partial<Q
         | SecurityStandard.CWE
         | SecurityStandard.OWASP_TOP10
         | SecurityStandard.OWASP_TOP10_2021
-        | SecurityStandard.SONARSOURCE
-    ) => shouldOpenStandardsChildFacet(openFacets, query, standardType)
+        | SecurityStandard.SONARSOURCE,
+    ) => shouldOpenStandardsChildFacet(openFacets, query, standardType),
   );
 }
index 3cd6dc2e6a35540f5fcc80ce218aa510118c6ab7..167c8b11f3b231d975c22980b6f8007c8788fe52 100644 (file)
@@ -129,7 +129,7 @@ export default class App extends React.PureComponent<Props, State> {
           this.setState({ message, startedAt, state });
         }
       },
-      () => {}
+      () => {},
     );
   };
 
index 5b5ed01c8f1f20af885adb78bd6305c61d65a181..cd2408c3bf3ef6d129fe70e9901cfbebf35f4bfb 100644 (file)
@@ -111,7 +111,7 @@ describe('Maintenance', () => {
         // eslint-disable-next-line jest/no-conditional-expect
         expect(link).toHaveAttribute('href', linkInfo.href);
       }
-    }
+    },
   );
 
   it('should poll status', async () => {
@@ -147,7 +147,7 @@ describe('Maintenance', () => {
         location={mockLocation({ query: { return_to: '/return/to' } })}
         setup={false}
         {...props}
-      />
+      />,
     );
   }
 });
@@ -218,7 +218,7 @@ describe('Setup', () => {
         // eslint-disable-next-line jest/no-conditional-expect
         expect(link).toHaveAttribute('href', linkInfo.href);
       }
-    }
+    },
   );
 
   it('should handle DB migration', async () => {
@@ -267,7 +267,7 @@ describe('Setup', () => {
   function renderSetupApp(props: Partial<App['props']> = {}) {
     return renderApp(
       '/',
-      <App location={mockLocation({ query: { return_to: '/return/to' } })} setup {...props} />
+      <App location={mockLocation({ query: { return_to: '/return/to' } })} setup {...props} />,
     );
   }
 });
index cd302fabda35840f1f6dd13da791ddd48db9a49c..6eb9933397f11ce7a4a59b908e23807ab2155abb 100644 (file)
@@ -108,7 +108,7 @@ class App extends React.PureComponent<Props, State> {
   fetchAllPlugins = (): Promise<Plugin[] | void> => {
     return Promise.all([getInstalledPluginsWithUpdates(), getAvailablePlugins()]).then(
       ([installed, available]) => uniqBy([...installed, ...available.plugins], 'key'),
-      this.stopLoadingPlugins
+      this.stopLoadingPlugins,
     );
   };
 
index ece0bfdba48554ea76a62aa9f5dcc1a2ef736882..ab55f97f288147cd2664e44fd403fe8dad826b8d 100644 (file)
@@ -52,7 +52,7 @@ export default class EditionBoxes extends React.PureComponent<Props, State> {
           this.setState({ ...formData });
         }
       },
-      () => {}
+      () => {},
     );
   };
 
index a1302a952ee95f544ca7a428933f41a98c92b4e2..cbc5b7416e7b3ada9b09952c892b49598bab9089 100644 (file)
@@ -193,7 +193,7 @@ it('should show details on the row', async () => {
 
   const rowWithMultipleUpdates = rows[1];
   expect(rowWithMultipleUpdates).toHaveTextContent(
-    '1.2.0marketplace._installedmarketplace.updates:1.3.0'
+    '1.2.0marketplace._installedmarketplace.updates:1.3.0',
   );
   await user.click(ui.releaseDetailsButton.get(rowWithMultipleUpdates));
   expect(ui.releaseNotesLink.getAll(rowWithMultipleUpdates)).toHaveLength(2);
@@ -223,11 +223,11 @@ it.each([
           // eslint-disable-next-line jest/no-conditional-expect
           expect(ui[`${key}Title`].query()).not.toBeInTheDocument();
         }
-      }
+      },
     );
 
     expect(ui.riskConsentMessage.query()).not.toBeInTheDocument();
-  }
+  },
 );
 
 describe('accessibility', () => {
index aff28bf3c4fd089ae9e75c53b8bc9bee616a0589..0d3748414ef63690ca1d885b31e19b1d7df9d34d 100644 (file)
@@ -63,7 +63,7 @@ export default class PluginActions extends React.PureComponent<Props, State> {
         if (this.mounted) {
           this.setState({ loading: false });
         }
-      }
+      },
     );
   };
 
index 1b9fc1a0226de4008388912c41718e45453571a8..8e60ab9e7ae0ac92b0872bb5ad34d0bb3e6e2bcd 100644 (file)
@@ -62,7 +62,7 @@ export default function PluginAvailable(props: PluginAvailableProps) {
                       plugin.update.requires
                         .filter(({ key }) => !installedPluginKeys.includes(key))
                         .map((requiredPlugin) => requiredPlugin.name)
-                        .join(', ')
+                        .join(', '),
                     )}
                   </strong>
                 </p>
index 0c0296256dfff340fcd6018bd2c85684fadf4f6d..d531e6673f28416c66e3d45c93e5c40de5e0489d 100644 (file)
@@ -42,7 +42,7 @@ export default function PluginChangeLog({ release, update }: Props) {
                   release={previousUpdate.release}
                   update={previousUpdate}
                 />
-              ) : null
+              ) : null,
           )}
         <PluginChangeLogItem release={release} update={update} />
       </ul>
index f1b073ecaa3655373188e1954e4a0ea9007a8a5b..ebfcc296264910266465d331cfebf7a95f317c30 100644 (file)
@@ -42,7 +42,7 @@ export default function PluginChangeLogButton({ pluginName, release, update }: P
         aria-label={translateWithParameters(
           'marketplace.show_plugin_changelog',
           pluginName,
-          release.version
+          release.version,
         )}
       >
         <EllipsisIcon />
index 424590c611b777e8f192688ab0670bf6356b7fe0..af8f6f428f61f17e460a56f1c5c09daf12ffa607 100644 (file)
@@ -43,7 +43,7 @@ export default function PluginUpdates({ pluginName, updates }: PluginUpdatesProp
               release={update.release}
               update={update}
             />
-          ) : null
+          ) : null,
         )}
       </ul>
     </li>
index 8b93d2ecedb40e8833d010fab26ab1be957b5de2..c38916da1c3a04932a4c4e8c746cfa171f4e712f 100644 (file)
@@ -52,7 +52,7 @@ export const parseQuery = memoize(
   (urlQuery: RawQuery): Query => ({
     filter: parseAsString(urlQuery['filter']) || DEFAULT_FILTER,
     search: parseAsString(urlQuery['search']),
-  })
+  }),
 );
 
 export const serializeQuery = memoize(
@@ -60,7 +60,7 @@ export const serializeQuery = memoize(
     cleanQuery({
       filter: query.filter === DEFAULT_FILTER ? undefined : serializeString(query.filter),
       search: query.search ? serializeString(query.search) : undefined,
-    })
+    }),
 );
 
 function getLastUpdates(updates: undefined | Update[]): Update[] {
@@ -71,7 +71,7 @@ function getLastUpdates(updates: undefined | Update[]): Update[] {
     (status) => {
       const index = findLastIndex(updates, (update) => update.status === status);
       return index > -1 ? updates[index] : undefined;
-    }
+    },
   );
   return lastUpdate.filter(isDefined);
 }
@@ -90,19 +90,19 @@ export function getInstalledPluginsWithUpdates(): Promise<InstalledPlugin[]> {
     .then(([installed, updates]) =>
       installed.map((plugin: InstalledPlugin) => {
         const updatePlugin: InstalledPlugin = updates.plugins.find(
-          (p: InstalledPlugin) => p.key === plugin.key
+          (p: InstalledPlugin) => p.key === plugin.key,
         );
         if (updatePlugin) {
           return {
             ...updatePlugin,
             ...plugin,
             updates: getLastUpdates(updatePlugin.updates).map((update) =>
-              addChangelog(update, updatePlugin.updates)
+              addChangelog(update, updatePlugin.updates),
             ),
           };
         }
         return plugin;
-      })
+      }),
     )
     .catch(throwGlobalError);
 }
@@ -112,7 +112,7 @@ export function getPluginUpdates(): Promise<InstalledPlugin[]> {
     .then(([updates, installed]) =>
       updates.plugins.map((updatePlugin: InstalledPlugin) => {
         const updates = getLastUpdates(updatePlugin.updates).map((update) =>
-          addChangelog(update, updatePlugin.updates)
+          addChangelog(update, updatePlugin.updates),
         );
         const plugin = installed.find((p: InstalledPlugin) => p.key === updatePlugin.key);
         if (plugin) {
@@ -123,7 +123,7 @@ export function getPluginUpdates(): Promise<InstalledPlugin[]> {
           };
         }
         return { ...updatePlugin, updates };
-      })
+      }),
     )
     .catch(throwGlobalError);
 }
index b1bec3ff132649fb7b82ab84b5775923bec77f22..97fa74cb952a2007f96135ffe19bc2ab6ce3a18c 100644 (file)
@@ -99,7 +99,7 @@ export function ActivityPanel(props: ActivityPanelProps) {
           analyses={[]}
           ariaLabel={translateWithParameters(
             'overview.activity.graph_shows_data_for_x',
-            displayedMetrics.map((metricKey) => localizeMetric(metricKey)).join(', ')
+            displayedMetrics.map((metricKey) => localizeMetric(metricKey)).join(', '),
           )}
           canShowDataAsTable={false}
           graph={graph}
index 8ac5f5204c2f00daf5302a0e298e8b013ba1532f..ebb1124583558acea7f3c8b75d8c4f78830187bf 100644 (file)
@@ -36,7 +36,7 @@ export function Analysis({ analysis, ...props }: AnalysisProps) {
     // versions first
     (event) => (event.category === 'VERSION' ? 0 : 1),
     // then the rest sorted by category
-    'category'
+    'category',
   );
 
   // use `TRK` for all components but applications
index e33d5ea5e6735ff3361d17acd8f617068e983868..a97d90e3fd3256f2d86d920e27fdaab5cd5e9448 100644 (file)
@@ -38,7 +38,7 @@ export function ApplicationLeakPeriodInfo({ leakPeriod }: ApplicationLeakPeriodI
         className="sw-ml-1"
         overlay={translateWithParameters(
           'overview.max_new_code_period_from_x',
-          leakPeriod.projectName
+          leakPeriod.projectName,
         )}
       >
         <HelperHintIcon />
index 9544aaec21f87b992c4df2a134c530da5a652d25..017fe9649face93f7331b18b9caf26701b2170e1 100644 (file)
@@ -37,7 +37,7 @@ export default function ApplicationNonCaycProjectWarning({ projects }: Props) {
       <FlagMessage variant="warning">
         {translateWithParameters(
           'overview.quality_gate.application.non_cayc.projects_x',
-          projects.length
+          projects.length,
         )}
       </FlagMessage>
 
index 820159a466a321b9b0460a3f5d5d7d87eaddc04b..fc05f24bcb6ab33dcf2c4896dbaf6085acacca9b 100644 (file)
@@ -157,7 +157,7 @@ export default class BranchOverview extends React.PureComponent<Props, State> {
         if (this.mounted) {
           this.setState({ appLeak: undefined });
         }
-      }
+      },
     );
 
     // We need to load the measures for each project in an application
@@ -176,13 +176,13 @@ export default class BranchOverview extends React.PureComponent<Props, State> {
           projectBranchLike,
           // Only load metrics that apply to failing QG conditions; we don't
           // need the others anyway.
-          project.conditions.filter((c) => c.status !== 'OK').map((c) => c.metric)
+          project.conditions.filter((c) => c.status !== 'OK').map((c) => c.metric),
         ).then(({ measures }) => ({
           measures,
           project,
           projectBranchLike,
         }));
-      })
+      }),
     ).then(
       (results) => {
         if (this.mounted) {
@@ -216,7 +216,7 @@ export default class BranchOverview extends React.PureComponent<Props, State> {
         if (this.mounted) {
           this.setState({ loadingStatus: false, qgStatuses: undefined });
         }
-      }
+      },
     );
   };
 
@@ -271,7 +271,7 @@ export default class BranchOverview extends React.PureComponent<Props, State> {
         if (this.mounted) {
           this.setState({ loadingStatus: false, qgStatuses: undefined });
         }
-      }
+      },
     );
   };
 
@@ -285,12 +285,12 @@ export default class BranchOverview extends React.PureComponent<Props, State> {
   loadMeasuresAndMeta = (
     componentKey: string,
     branchLike?: BranchLike,
-    metricKeys: string[] = []
+    metricKeys: string[] = [],
   ) => {
     return getMeasuresWithPeriodAndMetrics(
       componentKey,
       metricKeys.length > 0 ? metricKeys : METRICS,
-      getBranchLikeQuery(branchLike)
+      getBranchLikeQuery(branchLike),
     ).then(({ component: { measures }, metrics, period }) => {
       return {
         measures: enhanceMeasuresWithMetrics(measures || [], metrics || []),
@@ -305,7 +305,7 @@ export default class BranchOverview extends React.PureComponent<Props, State> {
 
     return Promise.all([this.loadHistoryMeasures(), this.loadAnalyses()]).then(
       this.doneLoadingHistory,
-      this.doneLoadingHistory
+      this.doneLoadingHistory,
     );
   };
 
@@ -335,7 +335,7 @@ export default class BranchOverview extends React.PureComponent<Props, State> {
           });
         }
       },
-      () => {}
+      () => {},
     );
   };
 
@@ -358,7 +358,7 @@ export default class BranchOverview extends React.PureComponent<Props, State> {
           });
         }
       },
-      () => {}
+      () => {},
     );
   };
 
@@ -430,7 +430,7 @@ export default class BranchOverview extends React.PureComponent<Props, State> {
       loadingStatus === false &&
       (measures === undefined ||
         measures.find((measure) =>
-          ([MetricKey.lines, MetricKey.new_lines] as string[]).includes(measure.metric.key)
+          ([MetricKey.lines, MetricKey.new_lines] as string[]).includes(measure.metric.key),
         ) === undefined);
 
     return (
index e29df5e6119bf47a0019c134a72acdb754aad844..a392da60c78eed1a3326d2567f276ec2d39e885d 100644 (file)
@@ -57,7 +57,7 @@ export function DebtValue(props: DebtValueProps) {
           ariaLabel={translateWithParameters(
             'overview.see_more_details_on_x_of_y',
             formattedValue,
-            metricName
+            metricName,
           )}
           branchLike={branchLike}
           className="overview-measures-value text-light"
index ca94e6fe352a0220217845367edd9223425574a0..93e9b1771ba89d0ad2a3e145381e983fa60f7506 100644 (file)
@@ -53,7 +53,7 @@ export function DrilldownMeasureValue(props: DrilldownMeasureValueProps) {
         aria-label={translateWithParameters(
           'overview.see_more_details_on_x_y',
           measure.value,
-          localizeMetric(metric)
+          localizeMetric(metric),
         )}
         to={url}
       >
index 63367c2a4421d422f9b7605f2102df7affda0dc8..0539e81fd647024d171cb4de81ad47d95dc75fa9 100644 (file)
@@ -155,7 +155,7 @@ export function MeasuresPanel(props: MeasuresPanelProps) {
             <FlagMessage className="sw-mt-4" variant="info">
               <span>
                 {`${translate('indexation.in_progress')} ${translate(
-                  'indexation.details_unavailable'
+                  'indexation.details_unavailable',
                 )}`}
                 <DocLink
                   className="sw-ml-1 sw-whitespace-nowrap"
index ab42b7aa5fadedc6488a531684729b3093297cee..1b5714c23267154cd2f62f8b7078a8a3cfa4d512 100644 (file)
@@ -25,7 +25,7 @@ interface Props {
 }
 
 export default function MeasuresPanelCard(
-  props: React.PropsWithChildren<Props & React.HTMLAttributes<HTMLDivElement>>
+  props: React.PropsWithChildren<Props & React.HTMLAttributes<HTMLDivElement>>,
 ) {
   const { category, children, rating, ...attributes } = props;
 
index 5cf3f1055a56334937a6cd11a021a6d3d79293d5..2c015bfb3f53babf218b0945be06a4557f260bbf 100644 (file)
@@ -88,7 +88,7 @@ export default function MeasuresPanelPercentMeasure(props: Props) {
               aria-label={translateWithParameters(
                 'overview.see_more_details_on_x_of_y',
                 value,
-                localizeMetric(metricKey)
+                localizeMetric(metricKey),
               )}
               to={url}
             >
index 07ad44e7ed0372bbe2f9c8643161c6a8db43371c..459b1203a5db983910ebc78c316105bc4000fe1f 100644 (file)
@@ -65,7 +65,7 @@ export function NoCodeWarning({ branchLike, component, measures }: Props) {
       } else if (branchLike !== undefined) {
         title = translateWithParameters(
           'overview.project.branch_X_empty',
-          getBranchLikeDisplayName(branchLike)
+          getBranchLikeDisplayName(branchLike),
         );
       } else {
         title = translate('overview.project.empty');
@@ -76,7 +76,7 @@ export function NoCodeWarning({ branchLike, component, measures }: Props) {
       } else if (branchLike !== undefined) {
         title = translateWithParameters(
           'overview.project.branch_X_no_lines_of_code',
-          getBranchLikeDisplayName(branchLike)
+          getBranchLikeDisplayName(branchLike),
         );
       }
     }
index ff14b007ff1fb8cb00dc62eeb3f423b3bc637a9c..7923d65a31d3ebab657cd4fc2e558ee5c0d818fd 100644 (file)
@@ -41,7 +41,7 @@ export function ProjectLeakPeriodInfo(props: ProjectLeakPeriodInfoProps) {
     leakPeriod,
     ['manual_baseline', NewCodeDefinitionType.SpecificAnalysis].includes(leakPeriod.mode)
       ? (date: string) => formatTime(date, formatterOption)
-      : (date: string) => formatDate(date, longFormatterOption)
+      : (date: string) => formatDate(date, longFormatterOption),
   );
 
   if (!leakPeriodLabel) {
@@ -74,7 +74,7 @@ export function ProjectLeakPeriodInfo(props: ProjectLeakPeriodInfoProps) {
             leakPeriod.mode === 'previous_analysis'
               ? 'overview.previous_analysis_x'
               : 'overview.started_x',
-            fromNow
+            fromNow,
           )
         }
       </DateFromNow>
index 0e708a4be2b32fc3400e79680d6305ddebb76677..6a7c54afdc034769fd4768da1a9c543bd7e48c99 100644 (file)
@@ -54,7 +54,7 @@ export function QualityGatePanel(props: QualityGatePanelProps) {
 
   const overallFailedConditionsCount = qgStatuses.reduce(
     (acc, qgStatus) => acc + qgStatus.failedConditions.length,
-    0
+    0,
   );
 
   const isApp = isApplication(component.qualifier);
index 76f60db5dea31d83bec4123bec074b435aa083ce..c9bb970d1020f25a581cda17916f0ee581113a2a 100644 (file)
@@ -37,7 +37,7 @@ export interface QualityGatePanelSectionProps {
 }
 
 function splitConditions(
-  conditions: QualityGateStatusConditionEnhanced[]
+  conditions: QualityGateStatusConditionEnhanced[],
 ): [QualityGateStatusConditionEnhanced[], QualityGateStatusConditionEnhanced[]] {
   const newCodeFailedConditions = [];
   const overallFailedConditions = [];
@@ -62,7 +62,7 @@ export function QualityGatePanelSection(props: QualityGatePanelSectionProps) {
   }, [collapsed]);
 
   const [newCodeFailedConditions, overallFailedConditions] = splitConditions(
-    qgStatus.failedConditions
+    qgStatus.failedConditions,
   );
 
   const showSectionTitles =
@@ -77,7 +77,7 @@ export function QualityGatePanelSection(props: QualityGatePanelSectionProps) {
       ? translate('quality_gates.conditions.new_code_1')
       : translateWithParameters(
           'quality_gates.conditions.new_code_x',
-          newCodeFailedConditions.length.toString()
+          newCodeFailedConditions.length.toString(),
         );
 
   const overallText =
@@ -85,7 +85,7 @@ export function QualityGatePanelSection(props: QualityGatePanelSectionProps) {
       ? translate('quality_gates.conditions.overall_code_1')
       : translateWithParameters(
           'quality_gates.conditions.overall_code_x',
-          overallFailedConditions.length.toString()
+          overallFailedConditions.length.toString(),
         );
 
   const renderFailedConditions = () => {
index 0448c68e0ac146cb44b141051ca5c6e0c5a9353a..ccd451ab98ff2a50cb225c9d39fa222130941c81 100644 (file)
@@ -68,7 +68,7 @@ jest.mock('../../../../api/measures', () => {
           mockMeasure({
             metric: key,
             ...(isDiffMetric(key) ? { leak: '1' } : { period: undefined }),
-          })
+          }),
         );
       });
       return Promise.resolve({
@@ -185,7 +185,7 @@ beforeAll(() => {
           status: 'ERROR',
         },
       ],
-    })
+    }),
   );
   qualityGatesMock.setApplicationQualityGateStatus(mockQualityGateApplicationStatus());
 });
@@ -202,7 +202,7 @@ describe('project overview', () => {
     qualityGatesMock.setQualityGateProjectStatus(
       mockQualityGateProjectStatus({
         status: 'OK',
-      })
+      }),
     );
     renderBranchOverview();
 
@@ -210,7 +210,7 @@ describe('project overview', () => {
     expect(await screen.findByText('metric.level.OK')).toBeInTheDocument();
     expect(screen.getByText('overview.passed.clean_code')).toBeInTheDocument();
     expect(
-      screen.queryByText('overview.quality_gate.conditions.cayc.warning')
+      screen.queryByText('overview.quality_gate.conditions.cayc.warning'),
     ).not.toBeInTheDocument();
 
     //Measures panel
@@ -226,14 +226,14 @@ describe('project overview', () => {
     jest
       .mocked(getQualityGateProjectStatus)
       .mockResolvedValueOnce(
-        mockQualityGateProjectStatus({ status: 'OK', caycStatus: CaycStatus.NonCompliant })
+        mockQualityGateProjectStatus({ status: 'OK', caycStatus: CaycStatus.NonCompliant }),
       );
 
     renderBranchOverview();
 
     expect(await screen.findByText('metric.level.OK')).toBeInTheDocument();
     expect(
-      screen.queryByText('overview.quality_gate.conditions.cayc.warning')
+      screen.queryByText('overview.quality_gate.conditions.cayc.warning'),
     ).not.toBeInTheDocument();
   });
 
@@ -241,7 +241,7 @@ describe('project overview', () => {
     jest
       .mocked(getQualityGateProjectStatus)
       .mockResolvedValueOnce(
-        mockQualityGateProjectStatus({ status: 'OK', caycStatus: CaycStatus.NonCompliant })
+        mockQualityGateProjectStatus({ status: 'OK', caycStatus: CaycStatus.NonCompliant }),
       );
     qualityGatesMock.setIsAdmin(true);
     qualityGatesMock.setGetGateForProjectName('Non Cayc QG');
@@ -250,7 +250,7 @@ describe('project overview', () => {
 
     await screen.findByText('metric.level.OK');
     expect(
-      await screen.findByText('overview.quality_gate.conditions.cayc.warning')
+      await screen.findByText('overview.quality_gate.conditions.cayc.warning'),
     ).toBeInTheDocument();
   });
 
@@ -284,7 +284,7 @@ describe('project overview', () => {
             status: 'ERROR',
           },
         ],
-      })
+      }),
     );
 
     renderBranchOverview();
@@ -363,7 +363,7 @@ describe('application overview', () => {
 
     renderBranchOverview({ component });
     expect(
-      await screen.findByText('overview.quality_gate.application.non_cayc.projects_x.3')
+      await screen.findByText('overview.quality_gate.application.non_cayc.projects_x.3'),
     ).toBeInTheDocument();
     expect(screen.getByText('first project')).toBeInTheDocument();
     expect(screen.queryByText('second')).not.toBeInTheDocument();
@@ -399,7 +399,7 @@ it.each([
     await screen.findByText('overview.quality_gate.status');
 
     expect(screen.queryByText('overview.project.next_steps.set_up_ci') === null).toBe(expected);
-  }
+  },
 );
 
 it('should correctly handle graph type storage', async () => {
@@ -422,7 +422,7 @@ it('should correctly handle graph type storage', async () => {
   expect(saveActivityGraph).toHaveBeenCalledWith(
     BRANCH_OVERVIEW_ACTIVITY_GRAPH,
     'foo',
-    GraphType.issues
+    GraphType.issues,
   );
 });
 
@@ -438,6 +438,6 @@ function renderBranchOverview(props: Partial<BranchOverview['props']> = {}) {
         })}
         {...props}
       />
-    </CurrentUserContextProvider>
+    </CurrentUserContextProvider>,
   );
 }
index b7af3642e81349c41d2c2d297ea5b4840673b370..4643f7a7408cb2f3f2f0bf76079e16a168f737a5 100644 (file)
@@ -31,8 +31,8 @@ it('should render correctly', () => {
 
   expect(
     screen.getByLabelText(
-      'overview.see_more_details_on_x_of_y.work_duration.x_minutes.1.sqale_index'
-    )
+      'overview.see_more_details_on_x_of_y.work_duration.x_minutes.1.sqale_index',
+    ),
   ).toBeInTheDocument();
 
   expect(screen.getByText('sqale_index')).toBeInTheDocument();
@@ -43,8 +43,8 @@ it('should render diff metric correctly', () => {
 
   expect(
     screen.getByLabelText(
-      'overview.see_more_details_on_x_of_y.work_duration.x_minutes.1.new_technical_debt'
-    )
+      'overview.see_more_details_on_x_of_y.work_duration.x_minutes.1.new_technical_debt',
+    ),
   ).toBeInTheDocument();
 
   expect(screen.getByText('new_technical_debt')).toBeInTheDocument();
@@ -67,6 +67,6 @@ function renderDebtValue(props: Partial<DebtValueProps> = {}) {
         mockMeasureEnhanced({ metric: mockMetric({ key: MetricKey.new_technical_debt }) }),
       ]}
       {...props}
-    />
+    />,
   );
 }
index e03094a7ac997a6443b9dfb3cfa4abc03b14a775..c915f6937a65ae35ec506b7a266c9a4f2456928c 100644 (file)
@@ -73,7 +73,7 @@ it('should render correctly for "manual_baseline"', async () => {
   const rtl = renderProjectLeakPeriodInfo({ mode: 'manual_baseline' });
 
   expect(
-    await screen.findByText(/overview\.period\.manual_baseline\.formattedTime\..*/)
+    await screen.findByText(/overview\.period\.manual_baseline\.formattedTime\..*/),
   ).toBeInTheDocument();
   rtl.unmount();
   renderProjectLeakPeriodInfo({ mode: 'manual_baseline', parameter: '1.1.2' });
@@ -101,6 +101,6 @@ function renderProjectLeakPeriodInfo(period: Partial<Period> = {}) {
         } as IntlShape
       }
       leakPeriod={mockPeriod({ ...period })}
-    />
+    />,
   );
 }
index e7addbf5864540506f8b451c4110b532366214b5..70f38cb1f94a04a817f46be1aecec0ebbe460f32 100644 (file)
@@ -93,12 +93,12 @@ export function EmptyOverview(props: EmptyOverviewProps) {
     warning = translateWithParameters(
       'provisioning.no_analysis_on_main_branch.bad_configuration',
       getBranchLikeDisplayName(branchLike),
-      translate('branches.main_branch')
+      translate('branches.main_branch'),
     );
   } else {
     warning = translateWithParameters(
       'provisioning.no_analysis_on_main_branch',
-      getBranchLikeDisplayName(branchLike)
+      getBranchLikeDisplayName(branchLike),
     );
   }
 
index baf7b512cdeeb324a8a350ec253e2148d65413ea..a2a1c55f1db63daa5642d42ee968eff013859cc8 100644 (file)
@@ -76,7 +76,7 @@ export function IssueLabel(props: IssueLabelProps) {
         'aria-label': translateWithParameters(
           'overview.see_list_of_x_y_issues',
           value as string,
-          localizeMetric(metricKey)
+          localizeMetric(metricKey),
         ),
         to: url,
       };
index a6076b2869099ed216b12aa9fa1298934c627c2b..5a5a96c3a64997e04f464063b789ef3f028f4185 100644 (file)
@@ -51,7 +51,7 @@ export class LeakPeriodLegend extends React.PureComponent<Props & WrappedCompone
     const { period } = this.props;
     const leakPeriodLabel = getNewCodePeriodLabel(
       period,
-      MODE_INCLUDES_TIME[period.mode] ? this.formatDateTime : this.formatDate
+      MODE_INCLUDES_TIME[period.mode] ? this.formatDateTime : this.formatDate,
     );
     if (!leakPeriodLabel) {
       return null;
@@ -76,7 +76,7 @@ export class LeakPeriodLegend extends React.PureComponent<Props & WrappedCompone
           period.mode === 'previous_analysis'
             ? 'overview.previous_analysis_on_x'
             : 'overview.started_on_x',
-          formattedLeakPeriodDate
+          formattedLeakPeriodDate,
         )}
       </span>
     );
@@ -102,7 +102,7 @@ export class LeakPeriodLegend extends React.PureComponent<Props & WrappedCompone
                   period.mode === 'previous_analysis'
                     ? 'overview.previous_analysis_x'
                     : 'overview.started_x',
-                  fromNow
+                  fromNow,
                 )}
               </span>
             )}
index 1a4734af020b25935c8e0d9b22d215f34338763c..e48cc9c35fe8bc43fb1fb23829266fe1642260ba 100644 (file)
@@ -105,7 +105,7 @@ export default class MeasurementLabel extends React.Component<Props> {
         ariaLabel={translateWithParameters(
           'overview.see_more_details_on_x_of_y',
           formattedValue,
-          localizeMetric(metricKey)
+          localizeMetric(metricKey),
         )}
         branchLike={branchLike}
         className="overview-measures-value text-light"
index 78409d0e74e742bfc644f39777bec8cc59bb4be0..1bb11ca11142427882c39f8532229d582c4f8356 100644 (file)
@@ -181,7 +181,7 @@ export default class QualityGateCondition extends React.PureComponent<Props> {
           </div>
           <TextMuted text={`${operator} ${formatMeasure(threshold, metric.type)}`} />
         </div>
-      </div>
+      </div>,
     );
   }
 }
index 4714a15e81f016896662d066c6f7e60fffd70a15..b090edb64574cf385b5762acff1cb38b3b54b146 100644 (file)
@@ -44,7 +44,7 @@ export function QualityGateConditions(props: QualityGateConditionsProps) {
   const handleToggleCollapsed = React.useCallback(() => toggleCollapsed(!collapsed), [collapsed]);
 
   const sortedConditions = sortBy(failedConditions, (condition) =>
-    LEVEL_ORDER.indexOf(condition.level)
+    LEVEL_ORDER.indexOf(condition.level),
   );
 
   let renderConditions;
index 625dc9c628248bc393afee6e8a1d9de5597804b7..c033dab60eeec281f30dcae964bc49a387d4d469 100644 (file)
@@ -50,7 +50,7 @@ const CONDITIONS_TO_SHOW = [
 export function SonarLintPromotion({ currentUser, qgConditions }: SonarLintPromotionProps) {
   const showMessage = qgConditions?.some(
     (qgCondition) =>
-      CONDITIONS_TO_SHOW.includes(qgCondition.metric as MetricKey) && qgCondition.level === 'ERROR'
+      CONDITIONS_TO_SHOW.includes(qgCondition.metric as MetricKey) && qgCondition.level === 'ERROR',
   );
   if (!showMessage || currentUser.usingSonarLintConnectedMode) {
     return null;
index 5bab683525a5f8e5d2dfafc595b59fff340fcc1e..f8ed71133a442f8c957c6535aa6215aa90e1aec8 100644 (file)
@@ -49,7 +49,7 @@ it('should render Empty Overview on main branch with no analysis', async () => {
   renderApp({}, mockCurrentUser());
 
   expect(
-    await screen.findByText('provisioning.no_analysis_on_main_branch.main')
+    await screen.findByText('provisioning.no_analysis_on_main_branch.main'),
   ).toBeInTheDocument();
 });
 
@@ -58,8 +58,8 @@ it('should render Empty Overview on main branch with multiple branches with bad
 
   expect(
     await screen.findByText(
-      'provisioning.no_analysis_on_main_branch.bad_configuration.main.branches.main_branch'
-    )
+      'provisioning.no_analysis_on_main_branch.bad_configuration.main.branches.main_branch',
+    ),
   ).toBeInTheDocument();
 });
 
@@ -91,14 +91,14 @@ describe('Permission provisioning', () => {
         componentKey: 'my-project',
         type: TaskTypes.GithubProjectPermissionsProvisioning,
         status: TaskStatuses.InProgress,
-      })
+      }),
     );
 
     renderApp();
     await jest.runOnlyPendingTimersAsync();
 
     expect(
-      await screen.findByText('provisioning.permission_synch_in_progress')
+      await screen.findByText('provisioning.permission_synch_in_progress'),
     ).toBeInTheDocument();
 
     handlerCe.clearTasks();
@@ -107,7 +107,7 @@ describe('Permission provisioning', () => {
         componentKey: 'my-project',
         type: TaskTypes.GithubProjectPermissionsProvisioning,
         status: TaskStatuses.Success,
-      })
+      }),
     );
 
     await jest.runOnlyPendingTimersAsync();
@@ -121,6 +121,6 @@ function renderApp(props = {}, userProps = {}) {
     <CurrentUserContextProvider currentUser={mockCurrentUser({ isLoggedIn: true, ...userProps })}>
       <App hasFeature={jest.fn().mockReturnValue(false)} component={mockComponent()} {...props} />
     </CurrentUserContextProvider>,
-    '/?id=my-project'
+    '/?id=my-project',
   );
 }
index 5b2746e36212706ce41a2ca41687c15d26cd718b..2143f578136f7be18a0dfcd31879ca82918d2736 100644 (file)
@@ -38,7 +38,7 @@ it('should render correctly for bugs', async () => {
   expect(
     await screen.findByRole('link', {
       name: 'overview.see_list_of_x_y_issues.1.0.metric.bugs.name',
-    })
+    }),
   ).toBeInTheDocument();
 
   rtl.unmount();
@@ -48,7 +48,7 @@ it('should render correctly for bugs', async () => {
   expect(
     await screen.findByRole('link', {
       name: 'overview.see_list_of_x_y_issues.1.0.metric.new_bugs.name',
-    })
+    }),
   ).toBeInTheDocument();
 });
 
@@ -69,7 +69,7 @@ it('should render correctly for hotspots with tooltip', async () => {
   expect(
     await screen.findByRole('link', {
       name: 'overview.see_list_of_x_y_issues.1.0.metric.security_hotspots.name',
-    })
+    }),
   ).toBeInTheDocument();
 
   expect(screen.getByText('tooltip text')).toBeInTheDocument();
@@ -91,7 +91,7 @@ it('should render correctly for a re-indexing Application', () => {
   expect(
     screen.queryByRole('link', {
       name: 'overview.see_list_of_x_y_issues.1.0.metric.security_hotspots.name',
-    })
+    }),
   ).not.toBeInTheDocument();
 });
 
@@ -103,6 +103,6 @@ function renderIssueLabel(props: Partial<IssueLabelProps> = {}) {
       measures={[]}
       type={IssueType.Bug}
       {...props}
-    />
+    />,
   );
 }
index c10092ce098ef6f085ca6d9a8db9c9936f6351d2..1b22e6fc595383424988d16b3b85b64d359573ea 100644 (file)
@@ -55,6 +55,6 @@ function renderIssueRating(props: Partial<IssueRatingProps> = {}) {
       ]}
       type={IssueType.Bug}
       {...props}
-    />
+    />,
   );
 }
index dac366c5566895b6c2e2799c8fd29d997b8e8d24..de57ac88fdeeed37bd266e99c21acd06d5bd4a10 100644 (file)
@@ -34,7 +34,7 @@ it('10 days', async () => {
   renderLeakPeriodLegend({ mode: 'days', parameter: '10' });
 
   expect(
-    await screen.findByText('overview.new_code_period_x.overview.period.days.10')
+    await screen.findByText('overview.new_code_period_x.overview.period.days.10'),
   ).toBeInTheDocument();
 });
 
@@ -42,7 +42,7 @@ it('date', async () => {
   renderLeakPeriodLegend({ mode: 'date', parameter: '2013-01-01' });
 
   expect(
-    await screen.findByText('overview.new_code_period_x.overview.period.date.formatted.2013-01-01')
+    await screen.findByText('overview.new_code_period_x.overview.period.date.formatted.2013-01-01'),
   ).toBeInTheDocument();
   expect(await screen.findByText('overview.started_x.9 years ago')).toBeInTheDocument();
   expect(await screen.findByText(/overview\.started_on_x\..*/)).toBeInTheDocument();
@@ -52,7 +52,7 @@ it('version', async () => {
   renderLeakPeriodLegend({ mode: 'version', parameter: '0.1' });
 
   expect(
-    await screen.findByText('overview.new_code_period_x.overview.period.version.0.1')
+    await screen.findByText('overview.new_code_period_x.overview.period.version.0.1'),
   ).toBeInTheDocument();
   expect(await screen.findByText(/overview\.started_x\..*/)).toBeInTheDocument();
   expect(await screen.findByText(/overview\.started_on_x\..*/)).toBeInTheDocument();
@@ -62,7 +62,9 @@ it('previous_version', async () => {
   renderLeakPeriodLegend({ mode: 'previous_version' });
 
   expect(
-    await screen.findByText('overview.new_code_period_x.overview.period.previous_version_only_date')
+    await screen.findByText(
+      'overview.new_code_period_x.overview.period.previous_version_only_date',
+    ),
   ).toBeInTheDocument();
   expect(await screen.findByText(/overview\.started_x\..*/)).toBeInTheDocument();
   expect(await screen.findByText(/overview\.started_on_x\..*/)).toBeInTheDocument();
@@ -72,7 +74,7 @@ it('previous_analysis', async () => {
   renderLeakPeriodLegend({ mode: 'previous_analysis' });
 
   expect(
-    await screen.findByText('overview.new_code_period_x.overview.period.previous_analysis.')
+    await screen.findByText('overview.new_code_period_x.overview.period.previous_analysis.'),
   ).toBeInTheDocument();
   expect(await screen.findByText(/overview\.previous_analysis_x\..*/)).toBeInTheDocument();
   expect(await screen.findByText(/overview\.previous_analysis_x\..*/)).toBeInTheDocument();
@@ -83,8 +85,8 @@ it('manual_baseline', async () => {
 
   expect(
     await screen.findByText(
-      /overview\.new_code_period_x\.overview\.period\.manual_baseline\.formattedTime\..*/
-    )
+      /overview\.new_code_period_x\.overview\.period\.manual_baseline\.formattedTime\..*/,
+    ),
   ).toBeInTheDocument();
   expect(await screen.findByText(/overview\.started_x\..*/)).toBeInTheDocument();
   expect(await screen.findByText(/overview\.started_on_x\..*/)).toBeInTheDocument();
@@ -93,10 +95,10 @@ it('manual_baseline', async () => {
   renderLeakPeriodLegend({ mode: 'manual_baseline', parameter: '1.1.2' });
 
   expect(
-    await screen.findByText('overview.new_code_period_x.overview.period.manual_baseline.1.1.2')
+    await screen.findByText('overview.new_code_period_x.overview.period.manual_baseline.1.1.2'),
   ).toBeInTheDocument();
   expect(
-    await screen.findByText('overview.new_code_period_x.overview.period.manual_baseline.1.1.2')
+    await screen.findByText('overview.new_code_period_x.overview.period.manual_baseline.1.1.2'),
   ).toBeInTheDocument();
 });
 
@@ -106,7 +108,9 @@ it('should render a more precise date', async () => {
   renderLeakPeriodLegend({ date: '2018-08-17T00:00:00+0200', mode: 'previous_version' });
 
   expect(
-    await screen.findByText('overview.new_code_period_x.overview.period.previous_version_only_date')
+    await screen.findByText(
+      'overview.new_code_period_x.overview.period.previous_version_only_date',
+    ),
   ).toBeInTheDocument();
   expect(await screen.findByText(/overview\.started_x\..*/)).toBeInTheDocument();
   expect(await screen.findByText(/overview\.started_on_x\..*/)).toBeInTheDocument();
@@ -127,6 +131,6 @@ function renderLeakPeriodLegend(period: Partial<Period> = {}) {
         mode: 'version',
         ...period,
       }}
-    />
+    />,
   );
 }
index ac51384db5a68e4e5830fc0ad9bf71ee7db422de..8b7cec474cbb410644d5ebcea10bae1d9f49ad36 100644 (file)
@@ -62,7 +62,7 @@ it('should render correctly for duplications', async () => {
   expect(
     screen.getByRole('link', {
       name: 'overview.see_more_details_on_x_of_y.1.0%.metric.duplicated_lines_density.name',
-    })
+    }),
   ).toBeInTheDocument();
   expect(await screen.findByText('metric.duplicated_lines_density.short_name')).toBeInTheDocument();
 
@@ -90,7 +90,7 @@ it('should render correctly for duplications', async () => {
   expect(
     screen.getByRole('link', {
       name: 'overview.see_more_details_on_x_of_y.1.0%.metric.new_duplicated_lines_density.name',
-    })
+    }),
   ).toBeInTheDocument();
   expect(await screen.findByText('overview.duplications_on_X_new_lines')).toBeInTheDocument();
 });
@@ -108,6 +108,6 @@ function renderMeasurementLabel(props: Partial<MeasurementLabel['props']> = {})
       measures={[mockMeasureEnhanced({ metric: mockMetric({ key: MetricKey.coverage }) })]}
       type={MeasurementType.Coverage}
       {...props}
-    />
+    />,
   );
 }
index 979b58c89768834e2f636a2adfc832ce774b9e7c..d3498db1edb87e3637a9b4077107d118aa6e3c56 100644 (file)
@@ -39,11 +39,11 @@ it.each([
 ])('should render correclty', async (condition) => {
   renderQualityGateCondition({ condition });
   expect(
-    await screen.findByText(`metric.${condition.measure.metric.name}.name`)
+    await screen.findByText(`metric.${condition.measure.metric.name}.name`),
   ).toBeInTheDocument();
 
   expect(
-    await screen.findByText(`quality_gates.operator.${condition.op}`, { exact: false })
+    await screen.findByText(`quality_gates.operator.${condition.op}`, { exact: false }),
   ).toBeInTheDocument();
   // if (condition.measure.metric.type === 'RATING') {
   //   expect(await screen.findByText('.rating', { exact: false })).toBeInTheDocument();
@@ -61,7 +61,7 @@ it('should work with branch', async () => {
 
   expect(await screen.findByText('metric.new_maintainability_rating.name')).toBeInTheDocument();
   expect(
-    await screen.findByText('quality_gates.operator.GT.rating', { exact: false })
+    await screen.findByText('quality_gates.operator.GT.rating', { exact: false }),
   ).toBeInTheDocument();
 });
 
@@ -71,14 +71,14 @@ function renderQualityGateCondition(props: Partial<QualityGateCondition['props']
       component={{ key: 'abcd-key' }}
       condition={mockQualityGateStatusConditionEnhanced()}
       {...props}
-    />
+    />,
   );
 }
 
 function quickMock(
   metric: MetricKey,
   type = 'RATING',
-  addPeriod = false
+  addPeriod = false,
 ): QualityGateStatusConditionEnhanced {
   return mockQualityGateStatusConditionEnhanced({
     error: '1',
index ed4fd8bb5b57fe2d34b97ea0b1a96136ef4effd5..f04df834356d1655969d1fb24badd1c82eb0f6f5 100644 (file)
@@ -35,7 +35,7 @@ it('should render correctly', async () => {
   expect(await screen.findAllByText(/.*metric..+.name.*/)).toHaveLength(ALL_CONDITIONS);
 
   expect(await screen.findAllByText('quality_gates.operator', { exact: false })).toHaveLength(
-    ALL_CONDITIONS
+    ALL_CONDITIONS,
   );
 });
 
@@ -45,14 +45,14 @@ it('should be collapsible', async () => {
 
   expect(await screen.findAllByText(/.*metric..+.name.*/)).toHaveLength(HALF_CONDITIONS);
   expect(await screen.findAllByText('quality_gates.operator', { exact: false })).toHaveLength(
-    HALF_CONDITIONS
+    HALF_CONDITIONS,
   );
 
   await user.click(screen.getByRole('link', { name: 'show_more' }));
 
   expect(await screen.findAllByText(/.*metric..+.name.*/)).toHaveLength(ALL_CONDITIONS);
   expect(await screen.findAllByText('quality_gates.operator', { exact: false })).toHaveLength(
-    ALL_CONDITIONS
+    ALL_CONDITIONS,
   );
 });
 
@@ -62,11 +62,11 @@ function renderQualityGateConditions(props: Partial<QualityGateConditionsProps>
     conditions.push(
       mockQualityGateStatusConditionEnhanced({
         measure: mockMeasureEnhanced({ metric: mockMetric({ key: i.toString() }) }),
-      })
+      }),
     );
   }
 
   return renderComponent(
-    <QualityGateConditions component={mockComponent()} failedConditions={conditions} {...props} />
+    <QualityGateConditions component={mockComponent()} failedConditions={conditions} {...props} />,
   );
 }
index 0e31004d2f48d70f972442912e8a0eef58a07d6b..734f7a40a2211f4db63e711bf20460b553e64888 100644 (file)
@@ -28,12 +28,12 @@ import { SonarLintPromotion, SonarLintPromotionProps } from '../SonarLintPromoti
 it('should render correctly', () => {
   renderSonarLintPromotion();
   expect(
-    screen.queryByText('overview.fix_failed_conditions_with_sonarlint')
+    screen.queryByText('overview.fix_failed_conditions_with_sonarlint'),
   ).not.toBeInTheDocument();
 
   renderSonarLintPromotion({ currentUser: mockCurrentUser({ usingSonarLintConnectedMode: true }) });
   expect(
-    screen.queryByText('overview.fix_failed_conditions_with_sonarlint')
+    screen.queryByText('overview.fix_failed_conditions_with_sonarlint'),
   ).not.toBeInTheDocument();
 });
 
@@ -51,14 +51,14 @@ it.each(
     MetricKey.new_security_rating,
     MetricKey.new_maintainability_rating,
     MetricKey.new_reliability_rating,
-  ].map(Array.of)
+  ].map(Array.of),
 )('should show message for %s', async (metric) => {
   renderSonarLintPromotion({
     qgConditions: [mockQualityGateStatusCondition({ metric: metric as string })],
   });
 
   expect(
-    await screen.findByText('overview.fix_failed_conditions_with_sonarlint')
+    await screen.findByText('overview.fix_failed_conditions_with_sonarlint'),
   ).toBeInTheDocument();
 });
 
index 61389583269baea80e8dc13d134b8d797f4b2d2e..8a30ca0312d7df77db977599655a980fef6afddb 100644 (file)
@@ -87,7 +87,7 @@ export default function PullRequestOverview(props: Props) {
       },
       () => {
         setLoadingMeasure(false);
-      }
+      },
     );
   }, [branchLike, component.key, conditions]);
 
@@ -202,7 +202,7 @@ export default function PullRequestOverview(props: Props) {
                       useDiffMetric
                     />
                   </Card>
-                )
+                ),
               )}
             </div>
           </div>
index 53473aeb27c7d89b47e62e4756a343eb9d0eecbf..a7260b8320b31ef917374c112d8cc07014b88eb3 100644 (file)
@@ -78,7 +78,7 @@ jest.mock('../../../../api/measures', () => {
 
 jest.mock('../../../../api/quality-gates', () => {
   const { mockQualityGateProjectStatus, mockQualityGateApplicationStatus } = jest.requireActual(
-    '../../../../helpers/mocks/quality-gates'
+    '../../../../helpers/mocks/quality-gates',
   );
   const { MetricKey } = jest.requireActual('../../../../types/metrics');
   return {
@@ -111,7 +111,7 @@ jest.mock('../../../../api/quality-gates', () => {
             status: 'ERROR',
           },
         ],
-      })
+      }),
     ),
     getApplicationQualityGate: jest.fn().mockResolvedValue(mockQualityGateApplicationStatus()),
   };
@@ -139,7 +139,7 @@ it('should render correctly if conditions are ignored', async () => {
   renderPullRequestOverview();
 
   await waitFor(async () =>
-    expect(await screen.findByText('overview.quality_gate.ignored_conditions')).toBeInTheDocument()
+    expect(await screen.findByText('overview.quality_gate.ignored_conditions')).toBeInTheDocument(),
   );
 });
 
@@ -169,14 +169,14 @@ it('should render correctly for a failed QG', async () => {
   renderPullRequestOverview();
 
   await waitFor(async () =>
-    expect(await screen.findByText('metric.level.ERROR')).toBeInTheDocument()
+    expect(await screen.findByText('metric.level.ERROR')).toBeInTheDocument(),
   );
 
   expect(await screen.findByText('metric.new_coverage.name')).toBeInTheDocument();
   expect(await screen.findByText('quality_gates.operator.GT 2.0%')).toBeInTheDocument();
 
   expect(
-    await screen.findByText('metric.duplicated_lines.name quality_gates.conditions.new_code')
+    await screen.findByText('metric.duplicated_lines.name quality_gates.conditions.new_code'),
   ).toBeInTheDocument();
   expect(await screen.findByText('quality_gates.operator.GT 1.0%')).toBeInTheDocument();
 
@@ -184,7 +184,7 @@ it('should render correctly for a failed QG', async () => {
 });
 
 function renderPullRequestOverview(
-  props: Partial<ComponentPropsType<typeof PullRequestOverview>> = {}
+  props: Partial<ComponentPropsType<typeof PullRequestOverview>> = {},
 ) {
   renderComponent(
     <CurrentUserContextProvider currentUser={mockLoggedInUser()}>
@@ -197,6 +197,6 @@ function renderPullRequestOverview(
         })}
         {...props}
       />
-    </CurrentUserContextProvider>
+    </CurrentUserContextProvider>,
   );
 }
index 26e76c7ba7dd0c55795b9fe28a6ada2e53e11277..85cc3137e6744398e47ae7907da5f278f9f6b3a8 100644 (file)
@@ -75,7 +75,7 @@ class ActionsCell extends React.PureComponent<Props, State> {
     projectKeyPattern: string;
   }) => {
     return updatePermissionTemplate({ id: this.props.permissionTemplate.id, ...data }).then(
-      this.props.refresh
+      this.props.refresh,
     );
   };
 
@@ -99,7 +99,7 @@ class ActionsCell extends React.PureComponent<Props, State> {
   setDefault = (qualifier: string) => () => {
     setDefaultPermissionTemplate(this.props.permissionTemplate.id, qualifier).then(
       this.props.refresh,
-      () => {}
+      () => {},
     );
   };
 
@@ -136,8 +136,8 @@ class ActionsCell extends React.PureComponent<Props, State> {
     return availableQualifiers.map((qualifier) =>
       this.renderSetDefaultLink(
         qualifier,
-        <span>{translate('permission_templates.set_default')}</span>
-      )
+        <span>{translate('permission_templates.set_default')}</span>,
+      ),
     );
   }
 
@@ -148,8 +148,8 @@ class ActionsCell extends React.PureComponent<Props, State> {
         <span>
           {translate('permission_templates.set_default_for')}{' '}
           <QualifierIcon qualifier={qualifier} /> {translate('qualifiers', qualifier)}
-        </span>
-      )
+        </span>,
+      ),
     );
   }
 
index c29b65a05a12d8afd2958435252ea4420b40a2e1..838b0f37d4b500860f416394c4a1a28a2ec48d64 100644 (file)
@@ -44,7 +44,7 @@ export default function DeleteForm({ onClose, onSubmit, permissionTemplate: t }:
           <div className="modal-body">
             {translateWithParameters(
               'permission_template.do_you_want_to_delete_template_xxx',
-              t.name
+              t.name,
             )}
           </div>
 
index 0806b4325c0edae924fe32a4f186574ae69077a3..211f8fe87b4b6cc38e6206c56e07899fe0683236 100644 (file)
@@ -65,7 +65,7 @@ class PermissionTemplatesApp extends React.PureComponent<Props, State> {
       const sortedPerm = sortPermissions(permissions);
       const permissionTemplatesMerged = mergeDefaultsToTemplates(
         mergePermissionsToTemplates(permissionTemplates, sortedPerm),
-        defaultTemplates
+        defaultTemplates,
       );
       this.setState({
         ready: true,
index 444d686ca8362d5b3a925ffbddbdac2f8df3e5a3..0632302090c212bacff0291267ec4971f770e9f5 100644 (file)
@@ -122,7 +122,7 @@ export default class Template extends React.PureComponent<Props, State> {
     });
     const [usersResponse, groupsResponse] = await this.loadUsersAndGroups(
       usersPaging ? usersPaging.pageIndex + 1 : 1,
-      groupsPaging ? groupsPaging.pageIndex + 1 : 1
+      groupsPaging ? groupsPaging.pageIndex + 1 : 1,
     );
     if (this.mounted) {
       this.setState(({ groups, users }) => ({
@@ -138,23 +138,23 @@ export default class Template extends React.PureComponent<Props, State> {
   removePermissionFromEntity = <T extends { login?: string; name: string; permissions: string[] }>(
     entities: T[],
     entity: string,
-    permission: string
+    permission: string,
   ): T[] =>
     entities.map((candidate) =>
       candidate.name === entity || candidate.login === entity
         ? { ...candidate, permissions: without(candidate.permissions, permission) }
-        : candidate
+        : candidate,
     );
 
   addPermissionToEntity = <T extends { login?: string; name: string; permissions: string[] }>(
     entities: T[],
     entity: string,
-    permission: string
+    permission: string,
   ): T[] =>
     entities.map((candidate) =>
       candidate.name === entity || candidate.login === entity
         ? { ...candidate, permissions: [...candidate.permissions, permission] }
-        : candidate
+        : candidate,
     );
 
   grantPermissionToUser = (login: string, permission: string) => {
@@ -297,7 +297,7 @@ export default class Template extends React.PureComponent<Props, State> {
       this.state;
     const permissions = convertToPermissionDefinitions(
       PERMISSIONS_ORDER_FOR_PROJECT_TEMPLATE,
-      'projects_role'
+      'projects_role',
     );
     const allUsers = [...users];
 
index 32f0bc74bfbc4167f94b22973634cf529f5a13da..b9dbff74e5ca17bdf880eb9551d4900ee99bb6ba 100644 (file)
@@ -55,10 +55,10 @@ describe('rendering', () => {
 
     // Shows warning for browse and code viewer permissions.
     await expect(ui.getHeaderTooltipIconByIndex(1)).toHaveATooltipWithContent(
-      'projects_role.public_projects_warning'
+      'projects_role.public_projects_warning',
     );
     await expect(ui.getHeaderTooltipIconByIndex(2)).toHaveATooltipWithContent(
-      'projects_role.public_projects_warning'
+      'projects_role.public_projects_warning',
     );
 
     // Check summaries.
@@ -69,13 +69,13 @@ describe('rendering', () => {
     const row1 = within(screen.getByRole('row', { name: /Permission Template 1/ }));
     PERMISSIONS_ORDER_FOR_PROJECT_TEMPLATE.forEach((permission, i) => {
       expect(row1.getAllByRole('cell').at(i + 1)?.textContent).toMatchSnapshot(
-        `Permission Template 1: ${permission}`
+        `Permission Template 1: ${permission}`,
       );
     });
     const row2 = within(screen.getByRole('row', { name: /Permission Template 2/ }));
     PERMISSIONS_ORDER_FOR_PROJECT_TEMPLATE.forEach((permission, i) => {
       expect(row2.getAllByRole('cell').at(i + 1)?.textContent).toMatchSnapshot(
-        `Permission Template 2: ${permission}`
+        `Permission Template 2: ${permission}`,
       );
     });
   });
@@ -104,9 +104,9 @@ describe('rendering', () => {
       await ui.appLoaded();
 
       await expect(ui.getHeaderTooltipIconByIndex(i)).toHaveATooltipWithContent(
-        `projects_role.${permission}.desc`
+        `projects_role.${permission}.desc`,
       );
-    }
+    },
   );
 });
 
@@ -148,7 +148,7 @@ describe('CRUD', () => {
       'Permission Template 2',
       'Updated name',
       'Updated description',
-      '/new pattern/'
+      '/new pattern/',
     );
 
     expect(ui.templateLink('Updated name').get()).toBeInTheDocument();
@@ -169,7 +169,7 @@ describe('CRUD', () => {
       'Permission Template 2',
       'Updated name',
       'Updated description',
-      '/new pattern/'
+      '/new pattern/',
     );
 
     expect(screen.getByText('Updated name')).toBeInTheDocument();
@@ -394,7 +394,7 @@ it.each([ComponentQualifier.Project, ComponentQualifier.Application, ComponentQu
     const regex = new RegExp(`permission_template\\.default_for\\.(.*)qualifiers.${qualifier}`);
     expect(row2.getByText(regex)).toBeInTheDocument();
     expect(row1.queryByText(regex)).not.toBeInTheDocument();
-  }
+  },
 );
 
 it('should show github warning', async () => {
@@ -485,7 +485,7 @@ function getPageObject(user: UserEvent) {
       if (pattern) {
         await user.type(
           modal.getByRole('textbox', { name: 'permission_template.key_pattern' }),
-          pattern
+          pattern,
         );
       }
       await user.click(modal.getByRole('button', { name: 'create' }));
@@ -508,7 +508,7 @@ function getPageObject(user: UserEvent) {
       name: string,
       newName: string,
       newDescription: string,
-      newPattern: string
+      newPattern: string,
     ) {
       await user.click(ui.cogMenuBtn(name).get());
       await user.click(ui.updateDetailsBtn.get());
@@ -543,7 +543,7 @@ function getPageObject(user: UserEvent) {
 
 function renderPermissionTemplatesApp(
   qualifiers = [ComponentQualifier.Project],
-  featureList: Feature[] = []
+  featureList: Feature[] = [],
 ) {
   renderAppWithAdminContext('admin/permission_templates', routes, {
     appState: mockAppState({ qualifiers }),
index dd618487364e05e337541a74c99866539aebc10b..63df428cd7436b42d9b2a7977ca7c4540445780d 100644 (file)
@@ -37,14 +37,14 @@ export function sortPermissions(permissions: Permission[]) {
 
 export function mergePermissionsToTemplates(
   permissionTemplates: PermissionTemplate[],
-  basePermissions: Permission[]
+  basePermissions: Permission[],
 ): PermissionTemplate[] {
   return permissionTemplates.map((permissionTemplate) => {
     // it's important to keep the order of the permission template's permissions
     // the same as the order of base permissions
     const permissions = basePermissions.map((basePermission) => {
       const projectPermission = permissionTemplate.permissions.find(
-        (p) => p.key === basePermission.key
+        (p) => p.key === basePermission.key,
       );
       return { usersCount: 0, groupsCount: 0, ...basePermission, ...projectPermission };
     });
@@ -55,7 +55,7 @@ export function mergePermissionsToTemplates(
 
 export function mergeDefaultsToTemplates(
   permissionTemplates: PermissionTemplate[],
-  defaultTemplates: Array<{ templateId: string; qualifier: string }> = []
+  defaultTemplates: Array<{ templateId: string; qualifier: string }> = [],
 ): PermissionTemplate[] {
   return permissionTemplates.map((permissionTemplate) => {
     const defaultFor: string[] = [];
index ffe8ae439a3d23617d59dab6ddef6c6f4e3c7ec9..b048597dda22c1823b485c4fd145a012908c373c 100644 (file)
@@ -117,7 +117,7 @@ class PermissionsGlobalApp extends React.PureComponent<Props, State> {
 
     this.loadUsersAndGroups(
       usersPaging ? usersPaging.pageIndex + 1 : 1,
-      groupsPaging ? groupsPaging.pageIndex + 1 : 1
+      groupsPaging ? groupsPaging.pageIndex + 1 : 1,
     ).then(([usersResponse, groupsResponse]) => {
       if (this.mounted) {
         this.setState(({ groups, users }) => ({
@@ -143,7 +143,7 @@ class PermissionsGlobalApp extends React.PureComponent<Props, State> {
     return groups.map((candidate) =>
       candidate.name === group
         ? { ...candidate, permissions: [...candidate.permissions, permission] }
-        : candidate
+        : candidate,
     );
   };
 
@@ -151,7 +151,7 @@ class PermissionsGlobalApp extends React.PureComponent<Props, State> {
     return users.map((candidate) =>
       candidate.login === user
         ? { ...candidate, permissions: [...candidate.permissions, permission] }
-        : candidate
+        : candidate,
     );
   };
 
@@ -159,7 +159,7 @@ class PermissionsGlobalApp extends React.PureComponent<Props, State> {
     return groups.map((candidate) =>
       candidate.name === group
         ? { ...candidate, permissions: without(candidate.permissions, permission) }
-        : candidate
+        : candidate,
     );
   };
 
@@ -167,7 +167,7 @@ class PermissionsGlobalApp extends React.PureComponent<Props, State> {
     return users.map((candidate) =>
       candidate.login === user
         ? { ...candidate, permissions: without(candidate.permissions, permission) }
-        : candidate
+        : candidate,
     );
   };
 
@@ -253,7 +253,7 @@ class PermissionsGlobalApp extends React.PureComponent<Props, State> {
     const hasApplicationsEnabled = appState.qualifiers.includes(ComponentQualifier.Application);
     const permissions = convertToPermissionDefinitions(
       filterPermissions(PERMISSIONS_ORDER_GLOBAL, hasApplicationsEnabled, hasPortfoliosEnabled),
-      'global_permissions'
+      'global_permissions',
     );
     return (
       <main className="page page-limited">
index 126671aec9f82cfbf08392a60acf4db8c81b9a21..fbc39615f26d062b4ec20e4927d02bd37bf53fc8 100644 (file)
@@ -52,7 +52,7 @@ describe('rendering', () => {
     without(
       flattenPermissionsList(PERMISSIONS_ORDER_GLOBAL),
       Permissions.ApplicationCreation,
-      Permissions.PortfolioCreation
+      Permissions.PortfolioCreation,
     ).forEach((permission) => {
       expect(ui.globalPermissionCheckbox('johndoe', permission).get()).toBeInTheDocument();
     });
index 54e8541bc9684c6563eac268c04ba6e419036f45..6a119bd9738ba61c4de0937f7a75107538887d0a 100644 (file)
@@ -66,7 +66,7 @@ export default class ApplyTemplate extends React.PureComponent<Props, State> {
         if (this.mounted) {
           this.setState({ loading: false });
         }
-      }
+      },
     );
   };
 
@@ -93,7 +93,7 @@ export default class ApplyTemplate extends React.PureComponent<Props, State> {
   render() {
     const header = translateWithParameters(
       'projects_role.apply_template_to_x',
-      this.props.project.name
+      this.props.project.name,
     );
 
     const options = this.state.permissionTemplates
index 9def5136bc472c95bedc55cdba1ace9bd3c736ac..fe2daf84bcf386391512e51188927dc1033f35a1 100644 (file)
@@ -129,7 +129,7 @@ class PermissionsProjectApp extends React.PureComponent<Props, State> {
 
     this.loadUsersAndGroups(
       usersPaging ? usersPaging.pageIndex + 1 : 1,
-      groupsPaging ? groupsPaging.pageIndex + 1 : 1
+      groupsPaging ? groupsPaging.pageIndex + 1 : 1,
     ).then(([usersResponse, groupsResponse]) => {
       if (this.mounted) {
         this.setState(({ groups, users }) => ({
@@ -162,7 +162,7 @@ class PermissionsProjectApp extends React.PureComponent<Props, State> {
           selectedPermission:
             state.selectedPermission === selectedPermission ? undefined : selectedPermission,
         }),
-        this.loadHolders
+        this.loadHolders,
       );
     }
   };
@@ -171,7 +171,7 @@ class PermissionsProjectApp extends React.PureComponent<Props, State> {
     return this.state.groups.map((candidate) =>
       candidate.name === group
         ? { ...candidate, permissions: [...candidate.permissions, permission] }
-        : candidate
+        : candidate,
     );
   };
 
@@ -179,7 +179,7 @@ class PermissionsProjectApp extends React.PureComponent<Props, State> {
     return this.state.users.map((candidate) =>
       candidate.login === user
         ? { ...candidate, permissions: [...candidate.permissions, permission] }
-        : candidate
+        : candidate,
     );
   };
 
@@ -187,7 +187,7 @@ class PermissionsProjectApp extends React.PureComponent<Props, State> {
     return this.state.groups.map((candidate) =>
       candidate.name === group
         ? { ...candidate, permissions: without(candidate.permissions, permission) }
-        : candidate
+        : candidate,
     );
   };
 
@@ -195,7 +195,7 @@ class PermissionsProjectApp extends React.PureComponent<Props, State> {
     return this.state.users.map((candidate) =>
       candidate.login === user
         ? { ...candidate, permissions: without(candidate.permissions, permission) }
-        : candidate
+        : candidate,
     );
   };
 
index 989bcc851dd347d1657e3362b56ebcfb04f8b055..e3c2cbfceebbff4e10c2b31b4f28033ae3c7457d 100644 (file)
@@ -151,14 +151,14 @@ describe('assigning/revoking permissions', () => {
 
     expect(ui.visibilityRadio(Visibility.Public).get()).toBeChecked();
     expect(
-      ui.projectPermissionCheckbox('sonar-users', Permissions.Browse).query()
+      ui.projectPermissionCheckbox('sonar-users', Permissions.Browse).query(),
     ).not.toBeInTheDocument();
     await act(async () => {
       await ui.turnProjectPrivate();
     });
     expect(ui.visibilityRadio(Visibility.Private).get()).toBeChecked();
     expect(
-      ui.projectPermissionCheckbox('sonar-users', Permissions.Browse).get()
+      ui.projectPermissionCheckbox('sonar-users', Permissions.Browse).get(),
     ).toBeInTheDocument();
 
     await ui.turnProjectPublic();
@@ -318,13 +318,13 @@ it('should have disabled permissions for GH Project', async () => {
     { featureList: [Feature.GithubProvisioning] },
     {
       component: mockComponent({ visibility: Visibility.Private }),
-    }
+    },
   );
   await ui.appLoaded();
 
   expect(ui.pageTitle.get()).toBeInTheDocument();
   await waitFor(() =>
-    expect(ui.pageTitle.get()).toHaveAccessibleName(/project_permission.github_managed/)
+    expect(ui.pageTitle.get()).toHaveAccessibleName(/project_permission.github_managed/),
   );
   expect(ui.pageTitle.byRole('img').get()).toBeInTheDocument();
   expect(ui.githubExplanations.get()).toBeInTheDocument();
@@ -332,41 +332,41 @@ it('should have disabled permissions for GH Project', async () => {
   expect(ui.projectPermissionCheckbox('John', Permissions.Admin).get()).toBeChecked();
   expect(ui.projectPermissionCheckbox('John', Permissions.Admin).get()).toHaveAttribute(
     'aria-disabled',
-    'true'
+    'true',
   );
   expect(ui.projectPermissionCheckbox('Alexa', Permissions.IssueAdmin).get()).toBeChecked();
   expect(ui.projectPermissionCheckbox('Alexa', Permissions.IssueAdmin).get()).toHaveAttribute(
     'aria-disabled',
-    'false'
+    'false',
   );
   await ui.toggleProjectPermission('Alexa', Permissions.IssueAdmin);
   expect(ui.confirmRemovePermissionDialog.get()).toBeInTheDocument();
   expect(ui.confirmRemovePermissionDialog.get()).toHaveTextContent(
-    `${Permissions.IssueAdmin}Alexa`
+    `${Permissions.IssueAdmin}Alexa`,
   );
   await act(() =>
-    user.click(ui.confirmRemovePermissionDialog.byRole('button', { name: 'confirm' }).get())
+    user.click(ui.confirmRemovePermissionDialog.byRole('button', { name: 'confirm' }).get()),
   );
   expect(ui.projectPermissionCheckbox('Alexa', Permissions.IssueAdmin).get()).not.toBeChecked();
 
   expect(ui.projectPermissionCheckbox('sonar-users', Permissions.Browse).get()).toBeChecked();
   expect(ui.projectPermissionCheckbox('sonar-users', Permissions.Browse).get()).toHaveAttribute(
     'aria-disabled',
-    'false'
+    'false',
   );
   await ui.toggleProjectPermission('sonar-users', Permissions.Browse);
   expect(ui.confirmRemovePermissionDialog.get()).toBeInTheDocument();
   expect(ui.confirmRemovePermissionDialog.get()).toHaveTextContent(
-    `${Permissions.Browse}sonar-users`
+    `${Permissions.Browse}sonar-users`,
   );
   await act(() =>
-    user.click(ui.confirmRemovePermissionDialog.byRole('button', { name: 'confirm' }).get())
+    user.click(ui.confirmRemovePermissionDialog.byRole('button', { name: 'confirm' }).get()),
   );
   expect(ui.projectPermissionCheckbox('sonar-users', Permissions.Browse).get()).not.toBeChecked();
   expect(ui.projectPermissionCheckbox('sonar-admins', Permissions.Admin).get()).toBeChecked();
   expect(ui.projectPermissionCheckbox('sonar-admins', Permissions.Admin).get()).toHaveAttribute(
     'aria-disabled',
-    'true'
+    'true',
   );
 
   const johnRow = screen.getAllByRole('row')[4];
@@ -388,7 +388,7 @@ it('should have disabled permissions for GH Project', async () => {
   expect(
     screen
       .getAllByRole('checkbox', { checked: false })
-      .every((item) => item.getAttribute('aria-disabled') === 'true')
+      .every((item) => item.getAttribute('aria-disabled') === 'true'),
   ).toBe(true);
 });
 
@@ -404,7 +404,7 @@ it('should allow to change permissions for GH Project without auto-provisioning'
   });
   renderPermissionsProjectApp(
     { visibility: Visibility.Private },
-    { featureList: [Feature.GithubProvisioning] }
+    { featureList: [Feature.GithubProvisioning] },
   );
   await ui.appLoaded();
 
@@ -415,7 +415,7 @@ it('should allow to change permissions for GH Project without auto-provisioning'
 
   // no restrictions
   expect(
-    screen.getAllByRole('checkbox').every((item) => item.getAttribute('aria-disabled') !== 'true')
+    screen.getAllByRole('checkbox').every((item) => item.getAttribute('aria-disabled') !== 'true'),
   ).toBe(true);
 });
 
@@ -434,14 +434,14 @@ it('should allow to change permissions for non-GH Project', async () => {
 
   // no restrictions
   expect(
-    screen.getAllByRole('checkbox').every((item) => item.getAttribute('aria-disabled') !== 'true')
+    screen.getAllByRole('checkbox').every((item) => item.getAttribute('aria-disabled') !== 'true'),
   ).toBe(true);
 });
 
 function renderPermissionsProjectApp(
   override: Partial<Component> = {},
   contextOverride: Partial<RenderContext> = {},
-  componentContextOverride: Partial<ComponentContextShape> = {}
+  componentContextOverride: Partial<ComponentContextShape> = {},
 ) {
   return renderAppWithComponentContext(
     'project_roles?id=my-project',
@@ -457,6 +457,6 @@ function renderPermissionsProjectApp(
         ...override,
       }),
       ...componentContextOverride,
-    }
+    },
   );
 }
index 3acb1f2169d8c36c358d5ea2bcc2d279c8e095be..5d010ae94494073609e422b90809e95b813ae708 100644 (file)
@@ -47,7 +47,7 @@ export function getPageObject(user: UserEvent) {
     }),
     nonGHProjectWarning: byText('project_permission.local_project_with_github_provisioning'),
     makePublicDisclaimer: byText(
-      'projects_role.are_you_sure_to_turn_project_to_public.warning.TRK'
+      'projects_role.are_you_sure_to_turn_project_to_public.warning.TRK',
     ),
     confirmPublicBtn: byRole('button', { name: 'projects_role.turn_project_to_public.TRK' }),
     applyTemplateBtn: byRole('button', { name: 'projects_role.apply_template' }),
@@ -127,7 +127,7 @@ export function flattenPermissionsList(
         category: string;
         permissions: Permissions[];
       }
-  >
+  >,
 ) {
   function isPermissions(
     p:
@@ -135,7 +135,7 @@ export function flattenPermissionsList(
       | {
           category: string;
           permissions: Permissions[];
-        }
+        },
   ): p is Permissions {
     return typeof p === 'string';
   }
index b5f2967e9004e3a340f15cf076def46e0b4ef18a..bc0455abf415dffc4c392c888d78ef181c1e3c4f 100644 (file)
@@ -105,14 +105,14 @@ describe('changeEvent', () => {
         key: 'E1',
         name: 'changed',
         category: ProjectAnalysisEventCategory.Version,
-      })(state).analyses[0]
+      })(state).analyses[0],
     ).toMatchSnapshot();
     expect(
       actions.changeEvent('A2', {
         key: 'E2',
         name: 'foo',
         category: ProjectAnalysisEventCategory.Version,
-      })(state).analyses[1].events
+      })(state).analyses[1].events,
     ).toHaveLength(0);
   });
 });
index 8b802d8fd3a1091ffb968a87d1e864bc1e558deb..0a4704de6e8ced68b50cac3d46b13d7f567d3edd 100644 (file)
@@ -96,14 +96,14 @@ describe('getAnalysesByVersionByDay', () => {
     expect(
       utils.getAnalysesByVersionByDay(ANALYSES, {
         category: '',
-      })
+      }),
     ).toMatchSnapshot();
   });
   it('should also filter analysis based on the query', () => {
     expect(
       utils.getAnalysesByVersionByDay(ANALYSES, {
         category: 'QUALITY_PROFILE',
-      })
+      }),
     ).toMatchSnapshot();
     expect(
       utils.getAnalysesByVersionByDay(ANALYSES, {
@@ -111,7 +111,7 @@ describe('getAnalysesByVersionByDay', () => {
 
         to: dates.parseDate('2017-06-09T11:12:27.000Z'),
         from: dates.parseDate('2017-05-18T14:13:07.000Z'),
-      })
+      }),
     ).toMatchSnapshot();
   });
   it('should create fake version', () => {
@@ -141,8 +141,8 @@ describe('getAnalysesByVersionByDay', () => {
         ],
         {
           category: '',
-        }
-      )
+        },
+      ),
     ).toMatchSnapshot();
   });
 });
@@ -154,7 +154,7 @@ describe('parseQuery', () => {
         from: '2017-04-27T08:21:32.000Z',
         custom_metrics: 'foo,bar,baz',
         id: 'foo',
-      })
+      }),
     ).toEqual(QUERY);
   });
 });
@@ -170,7 +170,7 @@ describe('serializeQuery', () => {
         from: '2017-04-27T08:21:32+0000',
         project: 'foo',
         category: 'test',
-      }
+      },
     );
   });
 });
@@ -188,7 +188,7 @@ describe('serializeUrlQuery', () => {
         graph: GraphType.coverage,
         category: 'test',
         customMetrics: [],
-      })
+      }),
     ).toEqual({
       from: '2017-04-27T08:21:32+0000',
       id: 'foo',
index 8b26ad8f8a92e213a6875c151e7f209685493fe6..a9baf18f1147f71ff75650ccdb68bf033c14e6e6 100644 (file)
@@ -51,7 +51,7 @@ export function changeEvent(analysis: string, event: AnalysisEvent) {
       return {
         ...item,
         events: item.events.map((eventItem) =>
-          eventItem.key === event.key ? { ...eventItem, ...event } : eventItem
+          eventItem.key === event.key ? { ...eventItem, ...event } : eventItem,
         ),
       };
     }),
index ec0414f1bc8e8e63b4f6159dfa3f4519ebc09008..803459eab486ab8673f1bbf4eab5ed92bf2f6d96 100644 (file)
@@ -105,7 +105,7 @@ function Event(props: EventProps) {
           onClose={() => setDeleting(false)}
           onConfirm={props.onDelete}
           removeEventQuestion={translate(
-            `project_activity.${isVersion ? 'remove_version' : 'remove_custom_event'}.question`
+            `project_activity.${isVersion ? 'remove_version' : 'remove_custom_event'}.question`,
           )}
         />
       )}
index 028d0f6cda44da61d695afabd9fb0e585915f928..7cbc39b72ad1b4beb1ee723b9ae34edec54962fc 100644 (file)
@@ -39,7 +39,7 @@ function Events(props: EventsProps) {
     // versions last
     (event) => (event.category === ProjectAnalysisEventCategory.Version ? 1 : 0),
     // then the rest sorted by category
-    'category'
+    'category',
   );
 
   return (
index b17cd760b5483da3d15b13e1a091eebc9b02a10c..70224f29be1651c1099271195687ddf2deb4fc5a 100644 (file)
@@ -150,7 +150,7 @@ export default class ProjectActivityAnalysesList extends React.PureComponent<Pro
                     'sw-sticky sw-top-0 sw-left-0 sw-pb-1 -sw-ml-4 sw-z-normal',
                     {
                       'sw-top-0 sw-pt-0': idx === 0,
-                    }
+                    },
                   )}
                 >
                   <Tooltip
index 29c087777609302351f2f13c4598f21ad9790fa8..08fe4aee127cf94e470c1ac19eb281ef8bc9ceb3 100644 (file)
@@ -120,11 +120,11 @@ function ProjectActivityAnalysis(props: ProjectActivityAnalysisProps) {
             'it__project-activity-analysis sw-flex sw-cursor-pointer sw-p-1 sw-relative',
             {
               active: selected,
-            }
+            },
           )}
           aria-label={translateWithParameters(
             'project_activity.show_analysis_X_on_graph',
-            analysis.buildString || formatDate(parsedDate, formatterOption)
+            analysis.buildString || formatDate(parsedDate, formatterOption),
           )}
           onClick={() => props.onUpdateSelectedDate(analysis.date)}
           ref={(ref) => (node = ref)}
@@ -145,7 +145,7 @@ function ProjectActivityAnalysis(props: ProjectActivityAnalysisProps) {
                 <ActionsDropdown
                   ariaLabel={translateWithParameters(
                     'project_activity.analysis_X_actions',
-                    analysis.buildString || formatDate(parsedDate, formatterOption)
+                    analysis.buildString || formatDate(parsedDate, formatterOption),
                   )}
                   buttonSize="small"
                   id="it__analysis-actions"
index 728be1233e2555bc2f51ec5fab6b079582f95dd6..555837b63b6ea40a86643962c00b30644d62c4df 100644 (file)
@@ -147,7 +147,7 @@ class ProjectActivityApp extends React.PureComponent<Props, State> {
       if (this.mounted) {
         this.updateGraphData(
           this.state.query.graph || DEFAULT_GRAPH,
-          this.state.query.customMetrics
+          this.state.query.customMetrics,
         );
         this.setState(actions.deleteAnalysis(analysis));
       }
@@ -167,7 +167,7 @@ class ProjectActivityApp extends React.PureComponent<Props, State> {
     statuses: ProjectActivityStatuses[],
     p: number,
     ps: number,
-    additional?: RawQuery
+    additional?: RawQuery,
   ) => {
     const parameters = {
       project,
@@ -200,7 +200,7 @@ class ProjectActivityApp extends React.PureComponent<Props, State> {
           date: parseDate(analysis.date),
           value: analysis.value,
         })),
-      }))
+      })),
     );
   };
 
@@ -219,13 +219,13 @@ class ProjectActivityApp extends React.PureComponent<Props, State> {
         if (this.mounted) {
           this.setState({ analysesLoading: false });
         }
-      }
+      },
     );
   };
 
   loadAllActivities = (
     project: string,
-    prevResult?: { analyses: ParsedAnalysis[]; paging: Paging }
+    prevResult?: { analyses: ParsedAnalysis[]; paging: Paging },
   ): Promise<{ analyses: ParsedAnalysis[]; paging: Paging }> => {
     if (
       prevResult &&
@@ -241,7 +241,7 @@ class ProjectActivityApp extends React.PureComponent<Props, State> {
         ProjectActivityStatuses.STATUS_LIVE_MEASURE_COMPUTE,
       ],
       nextPage,
-      ACTIVITY_PAGE_SIZE
+      ACTIVITY_PAGE_SIZE,
     ).then((result) => {
       if (!prevResult) {
         return this.loadAllActivities(project, result);
@@ -278,12 +278,12 @@ class ProjectActivityApp extends React.PureComponent<Props, State> {
 
     if (isPortfolioLike(qualifier)) {
       return Object.values(metrics).filter(
-        (metric) => metric.key !== MetricKey.security_hotspots_reviewed
+        (metric) => metric.key !== MetricKey.security_hotspots_reviewed,
       );
     }
 
     return Object.values(metrics).filter(
-      (metric) => metric.key !== MetricKey.security_review_rating
+      (metric) => metric.key !== MetricKey.security_review_rating,
     );
   };
 
@@ -299,7 +299,7 @@ class ProjectActivityApp extends React.PureComponent<Props, State> {
         ],
         1,
         ACTIVITY_PAGE_SIZE_FIRST_BATCH,
-        serializeQuery(query)
+        serializeQuery(query),
       ),
       this.fetchMeasuresHistory(graphMetrics),
     ]).then(
@@ -319,7 +319,7 @@ class ProjectActivityApp extends React.PureComponent<Props, State> {
         if (this.mounted) {
           this.setState({ initialized: true, graphLoading: false });
         }
-      }
+      },
     );
   }
 
@@ -336,7 +336,7 @@ class ProjectActivityApp extends React.PureComponent<Props, State> {
         if (this.mounted) {
           this.setState({ graphLoading: false, measuresHistory: [] });
         }
-      }
+      },
     );
   };
 
@@ -416,5 +416,5 @@ function RedirectWrapper(props: Props) {
 }
 
 export default withComponentContext(
-  withRouter(withMetricsContext(withBranchLikes(RedirectWrapper)))
+  withRouter(withMetricsContext(withBranchLikes(RedirectWrapper))),
 );
index 9a424a2365f79d887d57d4c8af56c6bd99efbe36..708635c3fdb4ff2873a2b4452ea139bb64f0289e 100644 (file)
@@ -70,7 +70,7 @@ export default class ProjectActivityGraphs extends React.PureComponent<Props, St
       props.measuresHistory,
       props.query.graph,
       props.metrics,
-      getDisplayedHistoryMetrics(props.query.graph, props.query.customMetrics)
+      getDisplayedHistoryMetrics(props.query.graph, props.query.customMetrics),
     );
     this.state = {
       series,
@@ -91,7 +91,7 @@ export default class ProjectActivityGraphs extends React.PureComponent<Props, St
         this.props.measuresHistory,
         this.props.query.graph,
         this.props.metrics,
-        getDisplayedHistoryMetrics(this.props.query.graph, this.props.query.customMetrics)
+        getDisplayedHistoryMetrics(this.props.query.graph, this.props.query.customMetrics),
       );
       newGraphs = splitSeriesInGraphs(newSeries, MAX_GRAPH_NB, MAX_SERIES_PER_GRAPH);
     }
@@ -125,11 +125,11 @@ export default class ProjectActivityGraphs extends React.PureComponent<Props, St
     if (newDates.to === undefined && newDates.from === undefined && newSeries !== undefined) {
       const firstValid = minBy(
         newSeries.map((serie) => serie.data.find((p) => Boolean(p.y || p.y === 0))),
-        'x'
+        'x',
       );
       const lastValid = maxBy<Point>(
         newSeries.map((serie) => findLast(serie.data, (p) => Boolean(p.y || p.y === 0))!),
-        'x'
+        'x',
       );
       return {
         graphEndDate: lastValid?.x,
@@ -156,7 +156,7 @@ export default class ProjectActivityGraphs extends React.PureComponent<Props, St
 
   handleRemoveCustomMetric = (removedMetric: string) => {
     const customMetrics = this.props.query.customMetrics.filter(
-      (metric) => metric !== removedMetric
+      (metric) => metric !== removedMetric,
     );
     saveActivityGraph(PROJECT_ACTIVITY_GRAPH, this.props.project, GraphType.custom, customMetrics);
     this.props.updateQuery({ customMetrics });
index c310e755e07cd7c808193710e1e9ed7fe6a9b703..eb3c15e6e47a55d0ee4a56aa30a8f55744b87cf7 100644 (file)
@@ -53,7 +53,7 @@ export default function ProjectActivityPageFilters(props: ProjectActivityPageFil
     (option: { value: string } | null) => {
       updateQuery({ category: option ? option.value : '' });
     },
-    [updateQuery]
+    [updateQuery],
   );
 
   return (
index bba186f2cd6f85b612ef0b3af699f685ab3291b2..f2ad64252b730a18ec9c89ba5cb636dcdc1bd9b0 100644 (file)
@@ -78,8 +78,8 @@ beforeEach(() => {
         history: projectActivityHandler
           .getAnalysesList()
           .map(({ date }) => mockHistoryItem({ value: '3', date: parseDate(date) })),
-      })
-    )
+      }),
+    ),
   );
 });
 
@@ -102,7 +102,7 @@ describe('rendering', () => {
         breadcrumbs: [
           { key: 'breadcrumb', name: 'breadcrumb', qualifier: ComponentQualifier.Project },
         ],
-      })
+      }),
     );
 
     await ui.appLoaded();
@@ -118,7 +118,7 @@ describe('rendering', () => {
         breadcrumbs: [
           { key: 'breadcrumb', name: 'breadcrumb', qualifier: ComponentQualifier.Project },
         ],
-      })
+      }),
     );
 
     await ui.changeGraphType(GraphType.custom);
@@ -136,7 +136,7 @@ describe('rendering', () => {
         mockComponent({
           qualifier,
           breadcrumbs: [{ key: 'breadcrumb', name: 'breadcrumb', qualifier }],
-        })
+        }),
       );
 
       await ui.changeGraphType(GraphType.custom);
@@ -144,9 +144,9 @@ describe('rendering', () => {
       expect(ui.metricCheckbox(MetricKey.security_review_rating).get()).toBeInTheDocument();
 
       expect(
-        ui.metricCheckbox(MetricKey.security_hotspots_reviewed).query()
+        ui.metricCheckbox(MetricKey.security_hotspots_reviewed).query(),
       ).not.toBeInTheDocument();
-    }
+    },
   );
 });
 
@@ -162,7 +162,7 @@ describe('CRUD', () => {
           { key: 'breadcrumb', name: 'breadcrumb', qualifier: ComponentQualifier.Project },
         ],
         configuration: { showHistory: true },
-      })
+      }),
     );
 
     await ui.appLoaded();
@@ -190,7 +190,7 @@ describe('CRUD', () => {
           { key: 'breadcrumb', name: 'breadcrumb', qualifier: ComponentQualifier.Project },
         ],
         configuration: { showHistory: true },
-      })
+      }),
     );
 
     await ui.appLoaded();
@@ -218,7 +218,7 @@ describe('CRUD', () => {
           { key: 'breadcrumb', name: 'breadcrumb', qualifier: ComponentQualifier.Project },
         ],
         configuration: { showHistory: true },
-      })
+      }),
     );
 
     await ui.appLoaded();
@@ -247,7 +247,7 @@ describe('data loading', () => {
           key: `analysis-${i}`,
           date: '2016-01-01T00:00:00+0200',
         });
-      })
+      }),
     );
 
     const { ui } = getPageObject();
@@ -277,7 +277,7 @@ describe('data loading', () => {
           { key: 'foo', name: 'foo', qualifier: ComponentQualifier.Portfolio },
           { key: 'unknown', name: 'unknown', qualifier: ComponentQualifier.SubPortfolio },
         ],
-      })
+      }),
     );
 
     await ui.appLoaded();
@@ -330,7 +330,7 @@ describe('filtering', () => {
           key: `analysis-${i}`,
           date: date.toDateString(),
         });
-      })
+      }),
     );
 
     const { ui } = getPageObject();
@@ -517,7 +517,7 @@ function getPageObject() {
       },
 
       async filterByCategory(
-        category: ProjectAnalysisEventCategory | ApplicationAnalysisEventCategory
+        category: ProjectAnalysisEventCategory | ApplicationAnalysisEventCategory,
       ) {
         await user.click(ui.categorySelect.get());
         const optionForType = await screen.findByText(`event.category.${category}`);
@@ -555,7 +555,7 @@ function getPageObject() {
 
         await user.click(monthSelector);
         const selectedMonthElements = within(ui.monthSelector.get()).getAllByText(
-          monthMap[parseDate(parsedDate).getMonth()]
+          monthMap[parseDate(parsedDate).getMonth()],
         );
         await user.click(selectedMonthElements[selectedMonthElements.length - 1]);
 
@@ -563,12 +563,12 @@ function getPageObject() {
 
         await user.click(yearSelector);
         const selectedYearElements = within(ui.yearSelector.get()).getAllByText(
-          parseDate(parsedDate).getFullYear()
+          parseDate(parsedDate).getFullYear(),
         );
         await user.click(selectedYearElements[selectedYearElements.length - 1]);
 
         await user.click(
-          screen.getByText(parseDate(parsedDate).getDate().toString(), { selector: 'button' })
+          screen.getByText(parseDate(parsedDate).getDate().toString(), { selector: 'button' }),
         );
       },
 
@@ -582,7 +582,7 @@ function getPageObject() {
 function renderProjectActivityAppContainer(
   component = mockComponent({
     breadcrumbs: [{ key: 'breadcrumb', name: 'breadcrumb', qualifier: ComponentQualifier.Project }],
-  })
+  }),
 ) {
   return renderAppWithComponentContext(
     'project/activity',
@@ -595,9 +595,9 @@ function renderProjectActivityAppContainer(
           mockMetric({ key: MetricKey.security_hotspots_reviewed }),
           mockMetric({ key: MetricKey.security_review_rating, type: MetricType.Rating }),
         ],
-        'key'
+        'key',
       ),
     },
-    { component }
+    { component },
   );
 }
index c6d689e2a41a7b5876f99e7854977ca4f57894be..66c88134a3831863d64f8160f9708ad311b81693 100644 (file)
@@ -67,7 +67,7 @@ interface AnalysesByDay {
 
 export function getAnalysesByVersionByDay(
   analyses: ParsedAnalysis[],
-  query: Pick<Query, 'category' | 'from' | 'to'>
+  query: Pick<Query, 'category' | 'from' | 'to'>,
 ) {
   return analyses.reduce<AnalysesByDay[]>((acc, analysis) => {
     let currentVersion = acc[acc.length - 1];
index a93db488c41a3e91b4af3a847b289298709a4060..c4d75bdcb911dc4e08d945ac60afb3508ee3c01e 100644 (file)
@@ -102,7 +102,7 @@ it('should show all branches', async () => {
   expect(ui.linkForAdmin.query()).not.toBeInTheDocument();
   expect(await ui.branchRow.findAll()).toHaveLength(4);
   expect(ui.branchRow.getAt(1)).toHaveTextContent(
-    'mainbranches.main_branchOK1 month agoproject_branch_pull_request.branch.auto_deletion.main_branch_tooltip'
+    'mainbranches.main_branchOK1 month agoproject_branch_pull_request.branch.auto_deletion.main_branch_tooltip',
   );
   expect(within(ui.branchRow.getAt(1)).getByRole('switch')).toBeDisabled();
   expect(within(ui.branchRow.getAt(1)).getByRole('switch')).toBeChecked();
@@ -126,19 +126,19 @@ it('should be able to rename main branch, but not others', async () => {
   expect(ui.renameBranchDialog.get()).toBeInTheDocument();
   expect(within(ui.renameBranchDialog.get()).getByRole('textbox')).toHaveValue('main');
   expect(
-    within(ui.renameBranchDialog.get()).getByRole('button', { name: 'rename' })
+    within(ui.renameBranchDialog.get()).getByRole('button', { name: 'rename' }),
   ).toBeDisabled();
   await user.clear(within(ui.renameBranchDialog.get()).getByRole('textbox'));
   expect(
-    within(ui.renameBranchDialog.get()).getByRole('button', { name: 'rename' })
+    within(ui.renameBranchDialog.get()).getByRole('button', { name: 'rename' }),
   ).toBeDisabled();
   await user.type(within(ui.renameBranchDialog.get()).getByRole('textbox'), 'develop');
   expect(within(ui.renameBranchDialog.get()).getByRole('button', { name: 'rename' })).toBeEnabled();
   await act(() =>
-    user.click(within(ui.renameBranchDialog.get()).getByRole('button', { name: 'rename' }))
+    user.click(within(ui.renameBranchDialog.get()).getByRole('button', { name: 'rename' })),
   );
   expect(ui.branchRow.getAt(1)).toHaveTextContent(
-    'developbranches.main_branchOK1 month agoproject_branch_pull_request.branch.auto_deletion.main_branch_tooltip'
+    'developbranches.main_branchOK1 month agoproject_branch_pull_request.branch.auto_deletion.main_branch_tooltip',
   );
 
   await user.click(await ui.updateSecondBranchBtn.find());
@@ -164,14 +164,14 @@ it('should be able to set a branch as the main branch', async () => {
     await user.click(
       within(ui.dialog.get()).getByRole('button', {
         name: 'project_branch_pull_request.branch.set_x_as_main.delete-branch',
-      })
+      }),
     );
   });
 
   // "delete-branch" is now the main branch.
   expect(ui.getBranchRow(/delete-branch/)).toBeInTheDocument();
   expect(
-    within(ui.getBranchRow(/delete-branch/)).getByText('branches.main_branch')
+    within(ui.getBranchRow(/delete-branch/)).getByText('branches.main_branch'),
   ).toBeInTheDocument();
   expect(within(ui.getBranchRow(/delete-branch/)).getByRole('switch')).toBeChecked();
   expect(within(ui.getBranchRow(/delete-branch/)).getByRole('switch')).toBeDisabled();
@@ -189,7 +189,7 @@ it('should be able to delete branch, but not main', async () => {
   expect(ui.deleteBranchDialog.get()).toBeInTheDocument();
   expect(ui.deleteBranchDialog.get()).toHaveTextContent('delete-branch');
   await act(() =>
-    user.click(within(ui.deleteBranchDialog.get()).getByRole('button', { name: 'delete' }))
+    user.click(within(ui.deleteBranchDialog.get()).getByRole('button', { name: 'delete' })),
   );
   expect(ui.branchRow.getAll()).toHaveLength(3);
 
@@ -224,7 +224,7 @@ it('should show all pull requests', async () => {
   expect(await ui.pullRequestRow.findAll()).toHaveLength(4);
   expect(ui.pullRequestRow.getAt(1)).toHaveTextContent('01 – TEST-191 update masterOK1 month ago');
   expect(ui.pullRequestRow.getAt(2)).toHaveTextContent(
-    '02 – TEST-192 update normal-branchERROR2 days ago'
+    '02 – TEST-192 update normal-branchERROR2 days ago',
   );
 });
 
@@ -238,7 +238,7 @@ it('should delete pull requests', async () => {
   expect(await ui.deletePullRequestDialog.find()).toBeInTheDocument();
   expect(ui.deletePullRequestDialog.get()).toHaveTextContent('01 – TEST-191 update master');
   await act(() =>
-    user.click(within(ui.deletePullRequestDialog.get()).getByRole('button', { name: 'delete' }))
+    user.click(within(ui.deletePullRequestDialog.get()).getByRole('button', { name: 'delete' })),
   );
   expect(ui.pullRequestRow.getAll()).toHaveLength(3);
 });
@@ -255,6 +255,6 @@ function renderProjectBranchesApp(overrides?: Partial<AppState>) {
       <ProjectBranchesApp />
     </ComponentContext.Provider>,
     '/?id=my-project',
-    { appState: mockAppState(overrides), featureList: [Feature.BranchSupport] }
+    { appState: mockAppState(overrides), featureList: [Feature.BranchSupport] },
   );
 }
index 669b4fe761a0cb7ce53810cc44d9261036fc0b1d..b0c4e46659d66bf1e0569cb53a86f978216addb2 100644 (file)
@@ -70,7 +70,7 @@ function BranchLikeRow(props: BranchLikeRowProps) {
         <ActionsDropdown
           label={translateWithParameters(
             'project_branch_pull_request.branch.actions_label',
-            getBranchLikeDisplayName(branchLike)
+            getBranchLikeDisplayName(branchLike),
           )}
         >
           {isBranch(branchLike) && !isMainBranch(branchLike) && (
@@ -88,7 +88,7 @@ function BranchLikeRow(props: BranchLikeRowProps) {
               {translate(
                 isPullRequest(branchLike)
                   ? 'project_branch_pull_request.pull_request.delete'
-                  : 'project_branch_pull_request.branch.delete'
+                  : 'project_branch_pull_request.branch.delete',
               )}
             </ActionsDropdownItem>
           )}
index c4ce15ed618fa89dd427c5a4a434c6e544c0cbb8..a76cea3e6fd9f7a6591a59703ce74ea63cf05348 100644 (file)
@@ -55,13 +55,13 @@ function BranchLikeTable(props: BranchLikeTableProps) {
                 <div className="display-flex-center">
                   <span>
                     {translate(
-                      'project_branch_pull_request.branch.auto_deletion.keep_when_inactive'
+                      'project_branch_pull_request.branch.auto_deletion.keep_when_inactive',
                     )}
                   </span>
                   <HelpTooltip
                     className="little-spacer-left"
                     overlay={translate(
-                      'project_branch_pull_request.branch.auto_deletion.keep_when_inactive.tooltip'
+                      'project_branch_pull_request.branch.auto_deletion.keep_when_inactive.tooltip',
                     )}
                   />
                 </div>
index e063fc2a0b3b9acc88a65beef07b4bc9325ca49a..fb5d85e8bd621fa0b9ca7b6a5af9c7711b3d5e8f 100644 (file)
@@ -106,7 +106,7 @@ export default function BranchLikeTabs(props: Props) {
   const title = translate(
     isBranchMode
       ? 'project_branch_pull_request.table.branch'
-      : 'project_branch_pull_request.table.pull_request'
+      : 'project_branch_pull_request.table.pull_request',
   );
 
   return (
index 06e16afec8a5c8f2c17297aa0a37b69583d8e424..c28a6e61c0ff11b8faab48cd8945f5785e77e210 100644 (file)
@@ -57,7 +57,7 @@ export default function BranchPurgeSetting(props: Props) {
       {isTheMainBranch && (
         <HelpTooltip
           overlay={translate(
-            'project_branch_pull_request.branch.auto_deletion.main_branch_tooltip'
+            'project_branch_pull_request.branch.auto_deletion.main_branch_tooltip',
           )}
         />
       )}
index c11ac8febe1ea19c40ff1a75b35976a2b9b4a295..7f0512c3ef9194d0ce64e4032d6418ca378d8fc6 100644 (file)
@@ -42,14 +42,14 @@ export default function DeleteBranchModal(props: Props) {
       { component, branchLike },
       {
         onSuccess: props.onClose,
-      }
+      },
     );
   };
 
   const header = translate(
     isPullRequest(branchLike)
       ? 'project_branch_pull_request.pull_request.delete'
-      : 'project_branch_pull_request.branch.delete'
+      : 'project_branch_pull_request.branch.delete',
   );
 
   return (
@@ -63,7 +63,7 @@ export default function DeleteBranchModal(props: Props) {
             isPullRequest(branchLike)
               ? 'project_branch_pull_request.pull_request.delete.are_you_sure'
               : 'project_branch_pull_request.branch.delete.are_you_sure',
-            getBranchLikeDisplayName(branchLike)
+            getBranchLikeDisplayName(branchLike),
           )}
         </div>
         <footer className="modal-foot">
index 16cb1d4e8fc152eb0de541a434a0d05143eac0f9..6ef69b9edeb7671c6d622854a65f63c46816d66f 100644 (file)
@@ -60,7 +60,7 @@ class LifetimeInformation extends React.PureComponent<Props, State> {
         if (this.mounted) {
           this.setState({ loading: false });
         }
-      }
+      },
     );
   }
 
index 1f5445bc23e3fac264b8334d5bd4b845310d5d7a..99407a7bdcbbaaa04ec0c93d8bcaecfb5fe8a330 100644 (file)
@@ -55,14 +55,14 @@ export default function SetAsMainBranchModal(props: SetAsMainBranchModalProps) {
           <p className="sw-mb-4">
             {translateWithParameters(
               'project_branch_pull_request.branch.main_branch.are_you_sure',
-              branch.name
+              branch.name,
             )}
           </p>
           <p className="sw-mb-4">
             <FormattedMessage
               id="project_branch_pull_request.branch.main_branch.learn_more"
               defaultMessage={translate(
-                'project_branch_pull_request.branch.main_branch.learn_more'
+                'project_branch_pull_request.branch.main_branch.learn_more',
               )}
               values={{
                 documentation: (
index b9c387f966494cf86b3ca099c637759d31cce7d9..5a8b33da38a32f1ee6bd163e9c592713ef869279 100644 (file)
@@ -48,7 +48,7 @@ export class Form extends React.PureComponent<Props> {
     await deleteMethod(component.key);
 
     addGlobalSuccessMessage(
-      translateWithParameters('project_deletion.resource_deleted', component.name)
+      translateWithParameters('project_deletion.resource_deleted', component.name),
     );
     this.props.router.replace(redirectTo);
   };
@@ -61,7 +61,7 @@ export class Form extends React.PureComponent<Props> {
         isDestructive
         modalBody={translateWithParameters(
           'project_deletion.delete_resource_confirmation',
-          component.name
+          component.name,
         )}
         modalHeader={translate('qualifier.delete', component.qualifier)}
         onConfirm={this.handleDelete}
index 54c5276c1e5896b5f87d37669922b3759eafdc70..03683dc33c7d25ed8150c309ec392a33b5455d5e 100644 (file)
@@ -47,7 +47,7 @@ it('should be able to delete project', async () => {
   });
 
   renderProjectDeletionApp(
-    mockComponent({ key: 'foo', name: 'Foo', qualifier: ComponentQualifier.Project })
+    mockComponent({ key: 'foo', name: 'Foo', qualifier: ComponentQualifier.Project }),
   );
 
   expect(byText('deletion.page').get()).toBeInTheDocument();
@@ -55,7 +55,7 @@ it('should be able to delete project', async () => {
   user.click(byRole('button', { name: 'delete' }).get());
   expect(await byRole('dialog', { name: 'qualifier.delete.TRK' }).find()).toBeInTheDocument();
   user.click(
-    byRole('dialog', { name: 'qualifier.delete.TRK' }).byRole('button', { name: 'delete' }).get()
+    byRole('dialog', { name: 'qualifier.delete.TRK' }).byRole('button', { name: 'delete' }).get(),
   );
 
   expect(await byText(/project_deletion.resource_dele/).find()).toBeInTheDocument();
@@ -73,7 +73,7 @@ it('should be able to delete Portfolio', async () => {
   });
 
   renderProjectDeletionApp(
-    mockComponent({ key: 'foo', name: 'Foo', qualifier: ComponentQualifier.Portfolio })
+    mockComponent({ key: 'foo', name: 'Foo', qualifier: ComponentQualifier.Portfolio }),
   );
 
   expect(byText('deletion.page').get()).toBeInTheDocument();
@@ -83,7 +83,7 @@ it('should be able to delete Portfolio', async () => {
 
   expect(await byRole('dialog', { name: 'qualifier.delete.VW' }).find()).toBeInTheDocument();
   user.click(
-    byRole('dialog', { name: 'qualifier.delete.VW' }).byRole('button', { name: 'delete' }).get()
+    byRole('dialog', { name: 'qualifier.delete.VW' }).byRole('button', { name: 'delete' }).get(),
   );
 
   expect(await byText(/project_deletion.resource_dele/).find()).toBeInTheDocument();
@@ -101,7 +101,7 @@ it('should be able to delete Application', async () => {
   });
 
   renderProjectDeletionApp(
-    mockComponent({ key: 'foo', name: 'Foo', qualifier: ComponentQualifier.Application })
+    mockComponent({ key: 'foo', name: 'Foo', qualifier: ComponentQualifier.Application }),
   );
 
   expect(byText('deletion.page').get()).toBeInTheDocument();
@@ -110,7 +110,7 @@ it('should be able to delete Application', async () => {
   user.click(byRole('button', { name: 'delete' }).get());
   expect(await byRole('dialog', { name: 'qualifier.delete.APP' }).find()).toBeInTheDocument();
   user.click(
-    byRole('dialog', { name: 'qualifier.delete.APP' }).byRole('button', { name: 'delete' }).get()
+    byRole('dialog', { name: 'qualifier.delete.APP' }).byRole('button', { name: 'delete' }).get(),
   );
 
   expect(await byText(/project_deletion.resource_dele/).find()).toBeInTheDocument();
@@ -128,6 +128,6 @@ function renderProjectDeletionApp(component?: Component) {
     'project-delete',
     <ComponentContext.Provider value={{ component } as ComponentContextShape}>
       <App />
-    </ComponentContext.Provider>
+    </ComponentContext.Provider>,
   );
 }
index f054795c1e037ccf6f423f5c430c79a1b5609ed4..f2f793c6256abd82a48479f5045be3d7d269bd7e 100644 (file)
@@ -123,7 +123,7 @@ export class ProjectDumpApp extends React.Component<Props, State> {
           lastImportTask,
           lastAnalysisTask,
         };
-      }
+      },
     );
   };
 
@@ -148,7 +148,7 @@ export class ProjectDumpApp extends React.Component<Props, State> {
       },
       () => {
         /* no catch needed */
-      }
+      },
     );
   };
 
index 3a49a306f7aa288cc4b6d8afeb2110a5364efbfd..e4d0ab4f66f4ce474e43a3c50c8b161a2842292a 100644 (file)
@@ -196,6 +196,6 @@ function renderProjectKeyApp(featureList: Feature[] = []) {
     'import_export',
     routes,
     { featureList },
-    { component: mockComponent({ key: COMPONENT_KEY }) }
+    { component: mockComponent({ key: COMPONENT_KEY }) },
   );
 }
index c97edfef2fca5fb5ea4f1648b78decb3a31c4747..ea57b000c5070708b7d9df32549416b4fc3d8efa 100644 (file)
@@ -100,7 +100,7 @@ export default class Export extends React.Component<Props> {
   renderWhenExportFailed() {
     const { componentKey } = this.props;
     const detailsUrl = `/project/background_tasks?id=${encodeURIComponent(
-      componentKey
+      componentKey,
     )}&status=FAILED&taskType=PROJECT_EXPORT`;
 
     return (
index 04d71e753a5afaf44eb2bf7cd9386623f8db1424..a4782ae5f862545e77d9029afc3222bae9afffca 100644 (file)
@@ -122,7 +122,7 @@ export default class Import extends React.Component<Props> {
     const detailsUrl = getComponentBackgroundTaskUrl(
       componentKey,
       TaskStatuses.Failed,
-      TaskTypes.ProjectImport
+      TaskTypes.ProjectImport,
     );
 
     return (
index d1ef52932d34b2f371fb6f6dc7ddd028be303499..c8cd62f1b984db6ca09aa61e7a616fef67d4b9ae 100644 (file)
@@ -113,5 +113,5 @@ function ProjectInformationApp(props: Props) {
 }
 
 export default withComponentContext(
-  withCurrentUserContext(withMetricsContext(withAvailableFeatures(ProjectInformationApp)))
+  withCurrentUserContext(withMetricsContext(withAvailableFeatures(ProjectInformationApp))),
 );
index 1041565c05b66e6827146d1fe4fc7e2291816a48..6b07de6668bc2537af974961654725a2f9eb0f08 100644 (file)
@@ -86,7 +86,7 @@ it('should show fields for project', async () => {
       description: 'Test description',
       tags: ['bar'],
     },
-    mockLoggedInUser()
+    mockLoggedInUser(),
   );
   expect(await ui.projectPageTitle.find()).toBeInTheDocument();
   expect(ui.qualityGateList.get()).toBeInTheDocument();
@@ -114,7 +114,7 @@ it('should show application fields', async () => {
       description: 'Test description',
       tags: ['bar'],
     },
-    mockLoggedInUser()
+    mockLoggedInUser(),
   );
   expect(await ui.applicationPageTitle.find()).toBeInTheDocument();
   expect(ui.qualityGateList.query()).not.toBeInTheDocument();
@@ -167,7 +167,7 @@ it('should hide visibility if public', async () => {
 
 function renderProjectInformationApp(
   overrides: Partial<Component> = {},
-  currentUser: CurrentUser = mockCurrentUser()
+  currentUser: CurrentUser = mockCurrentUser(),
 ) {
   const component = mockComponent(overrides);
   componentsMock.registerComponent(component, [componentsMock.components[0].component]);
@@ -176,6 +176,6 @@ function renderProjectInformationApp(
     'project/information',
     routes,
     { currentUser },
-    { component }
+    { component },
   );
 }
index 168c2dc593fa20c1bc1c252efff48f27397ecba5..91b8efcb3602fafd42733def2d75eea55b36c96a 100644 (file)
@@ -48,7 +48,7 @@ export default function AboutProject(props: AboutProjectProps) {
     if (!isApp) {
       getProjectLinks(component.key).then(
         (links) => setLinks(links),
-        () => {}
+        () => {},
       );
     }
   }, [component.key, isApp]);
index efdc4c794e2252822715d44cfb0957f9f14de559..75bb25127ccce044dd891057146b12571d2aa95a 100644 (file)
@@ -56,7 +56,7 @@ export function MetaQualityProfiles({ headerClassName, profiles }: Props) {
         });
         setDeprecatedByKey(deprecatedByKey);
       },
-      () => {}
+      () => {},
     );
   }, [profiles]);
 
@@ -111,7 +111,7 @@ function ProfileItem({
                   aria-label={translateWithParameters(
                     'overview.link_to_x_profile_y',
                     languageName,
-                    profile.name
+                    profile.name,
                   )}
                 >
                   {profile.name}
index a015f048d94d62e5c244b297e4ca29189efdbc28..9b48480493ef0321ee49587834191e3f8c59b866 100644 (file)
@@ -56,7 +56,7 @@ export default function MetaSize({ component, measures }: MetaSizeProps) {
               <span
                 aria-label={translateWithParameters(
                   'project.info.see_more_info_on_x_locs',
-                  ncloc.value
+                  ncloc.value,
                 )}
               >
                 {formatMeasure(ncloc.value, 'SHORT_INT')}
index fd7c98b51f87722fd7a042af4dbad71d97931ca3..52bd4d1494749d5fcdeb7f4866b4c40b0a3653a2 100644 (file)
@@ -59,7 +59,7 @@ export default function MetaTags(props: Props) {
   const handleSetProjectTags = (values: string[]) => {
     setTags(values).then(
       () => props.onComponentChange({ tags: values }),
-      () => {}
+      () => {},
     );
   };
 
@@ -103,7 +103,7 @@ function MetaTagsSelector({ selectedTags, setProjectTags }: MetaTagsSelectorProp
       ps: Math.min(selectedTags.length - 1 + LIST_SIZE, MAX_LIST_SIZE),
     }).then(
       ({ tags }) => setSearchResult(tags),
-      () => {}
+      () => {},
     );
   };
 
index 17d2a8c315d7a15ddab86a3dcf21fcc946354964..dfe878646a22d773a154c9be90167e04db04fa4e 100644 (file)
@@ -26,13 +26,13 @@ import MetaKey from '../MetaKey';
 it('should render correctly', () => {
   renderMetaKey();
   expect(
-    screen.getByText(`overview.project_key.${ComponentQualifier.Project}`)
+    screen.getByText(`overview.project_key.${ComponentQualifier.Project}`),
   ).toBeInTheDocument();
   expect(screen.getByRole('button', { name: 'Copy to clipboard' })).toBeInTheDocument();
 });
 
 function renderMetaKey(props: Partial<Parameters<typeof MetaKey>[0]> = {}) {
   return renderComponent(
-    <MetaKey componentKey="foo" qualifier={ComponentQualifier.Project} {...props} />
+    <MetaKey componentKey="foo" qualifier={ComponentQualifier.Project} {...props} />,
   );
 }
index 8d2f51f585b72e888c37470b2d7028ff356e45a5..12a51dd8c7c22fd890c1a053c5ceb83d797b5b7a 100644 (file)
@@ -59,7 +59,7 @@ it('should render correctly', async () => {
 });
 
 function renderMetaQualityprofiles(
-  overrides: Partial<Parameters<typeof MetaQualityProfiles>[0]> = {}
+  overrides: Partial<Parameters<typeof MetaQualityProfiles>[0]> = {},
 ) {
   return renderComponent(
     <LanguagesContext.Provider value={{ css: mockLanguage() }}>
@@ -79,6 +79,6 @@ function renderMetaQualityprofiles(
         ]}
         {...overrides}
       />
-    </LanguagesContext.Provider>
+    </LanguagesContext.Provider>,
   );
 }
index 6b445ab9a957050cd7fd7118a379609eb39d0d38..0b2d6e60bce0f4df6e019d36d78d28f81bd8a335 100644 (file)
@@ -110,6 +110,6 @@ function renderMetaTags(overrides: Partial<Parameters<typeof MetaTags>[0]> = {})
   });
 
   return renderComponent(
-    <MetaTags component={component} onComponentChange={jest.fn()} {...overrides} />
+    <MetaTags component={component} onComponentChange={jest.fn()} {...overrides} />,
   );
 }
index cb9c461c5c3a9cf4a33cc967f2d7edaf2f3a8e54..b6882df187e9042bd4d7a7b15e21d9922a618280 100644 (file)
@@ -123,7 +123,7 @@ export default function ProjectBadges(props: ProjectBadgesProps) {
               'overview.badges',
               BadgeType.qualityGate,
               'description',
-              qualifier
+              qualifier,
             )}
           />
         </div>
index 19f5b52275f5c0a4f9233720743aef2ddb037ba1..95d3c44fb637490a36919cff213c2ed56228021b 100644 (file)
@@ -34,7 +34,7 @@ import { BadgeType } from '../utils';
 jest.mock('../../../../helpers/urls', () => ({
   getHostUrl: () => 'host',
   getPathUrlAsString: (l: Location) => l.pathname,
-  getProjectUrl: () => ({ pathname: '/dashboard' } as Location),
+  getProjectUrl: () => ({ pathname: '/dashboard' }) as Location,
 }));
 
 jest.mock('../../../../api/project-badges', () => ({
@@ -68,27 +68,27 @@ it('should renew token', async () => {
   await waitFor(() =>
     expect(screen.getByAltText(`overview.badges.${BadgeType.qualityGate}.alt`)).toHaveAttribute(
       'src',
-      'host/api/project_badges/quality_gate?branch=branch-6.7&project=my-project&token=foo'
-    )
+      'host/api/project_badges/quality_gate?branch=branch-6.7&project=my-project&token=foo',
+    ),
   );
 
   expect(screen.getByAltText(`overview.badges.${BadgeType.measure}.alt`)).toHaveAttribute(
     'src',
-    'host/api/project_badges/measure?branch=branch-6.7&project=my-project&metric=alert_status&token=foo'
+    'host/api/project_badges/measure?branch=branch-6.7&project=my-project&metric=alert_status&token=foo',
   );
 
   await user.click(screen.getByText('overview.badges.renew'));
 
   expect(
-    await screen.findByAltText(`overview.badges.${BadgeType.qualityGate}.alt`)
+    await screen.findByAltText(`overview.badges.${BadgeType.qualityGate}.alt`),
   ).toHaveAttribute(
     'src',
-    'host/api/project_badges/quality_gate?branch=branch-6.7&project=my-project&token=bar'
+    'host/api/project_badges/quality_gate?branch=branch-6.7&project=my-project&token=bar',
   );
 
   expect(screen.getByAltText(`overview.badges.${BadgeType.measure}.alt`)).toHaveAttribute(
     'src',
-    'host/api/project_badges/measure?branch=branch-6.7&project=my-project&metric=alert_status&token=bar'
+    'host/api/project_badges/measure?branch=branch-6.7&project=my-project&metric=alert_status&token=bar',
   );
 });
 
@@ -99,8 +99,8 @@ it('should update params', async () => {
 
   expect(
     await screen.findByText(
-      '[![alert_status](host/api/project_badges/measure?branch=branch-6.7&project=my-project&metric=alert_status&token=foo)](/dashboard)'
-    )
+      '[![alert_status](host/api/project_badges/measure?branch=branch-6.7&project=my-project&metric=alert_status&token=foo)](/dashboard)',
+    ),
   ).toBeInTheDocument();
 
   await selectEvent.select(screen.getByLabelText('overview.badges.format'), [
@@ -109,16 +109,16 @@ it('should update params', async () => {
 
   expect(
     screen.getByText(
-      'host/api/project_badges/measure?branch=branch-6.7&project=my-project&metric=alert_status&token=foo'
-    )
+      'host/api/project_badges/measure?branch=branch-6.7&project=my-project&metric=alert_status&token=foo',
+    ),
   ).toBeInTheDocument();
 
   await selectEvent.select(screen.getByLabelText('overview.badges.metric'), MetricKey.coverage);
 
   expect(
     screen.getByText(
-      `host/api/project_badges/measure?branch=branch-6.7&project=my-project&metric=${MetricKey.coverage}&token=foo`
-    )
+      `host/api/project_badges/measure?branch=branch-6.7&project=my-project&metric=${MetricKey.coverage}&token=foo`,
+    ),
   ).toBeInTheDocument();
 });
 
@@ -128,6 +128,6 @@ function renderProjectBadges(props: Partial<ProjectBadgesProps> = {}) {
       branchLike={mockBranch()}
       component={mockComponent({ key: 'foo', qualifier: ComponentQualifier.Project })}
       {...props}
-    />
+    />,
   );
 }
index 359d288c0aa84002e97668c00f6d07386db94c84..7dca92316ee59d886f8e13f56a922fe69342972b 100644 (file)
@@ -35,25 +35,25 @@ const options: BadgeOptions = {
 describe('#getBadgeUrl', () => {
   it('should generate correct quality gate badge links', () => {
     expect(getBadgeUrl(BadgeType.qualityGate, options, 'foo')).toBe(
-      'host/api/project_badges/quality_gate?branch=master&project=foo&token=foo'
+      'host/api/project_badges/quality_gate?branch=master&project=foo&token=foo',
     );
   });
 
   it('should generate correct measures badge links', () => {
     expect(getBadgeUrl(BadgeType.measure, options, 'foo')).toBe(
-      'host/api/project_badges/measure?branch=master&project=foo&metric=alert_status&token=foo'
+      'host/api/project_badges/measure?branch=master&project=foo&metric=alert_status&token=foo',
     );
   });
 
   it('should ignore undefined parameters', () => {
     expect(getBadgeUrl(BadgeType.measure, { metric: 'alert_status' }, 'foo')).toBe(
-      'host/api/project_badges/measure?metric=alert_status&token=foo'
+      'host/api/project_badges/measure?metric=alert_status&token=foo',
     );
   });
 
   it('should force metric parameters', () => {
     expect(getBadgeUrl(BadgeType.measure, {}, 'foo')).toBe(
-      'host/api/project_badges/measure?metric=alert_status&token=foo'
+      'host/api/project_badges/measure?metric=alert_status&token=foo',
     );
   });
 });
@@ -61,7 +61,7 @@ describe('#getBadgeUrl', () => {
 describe('#getBadgeSnippet', () => {
   it('should generate a correct markdown image', () => {
     expect(getBadgeSnippet(BadgeType.measure, { ...options, format: 'md' }, 'foo')).toBe(
-      '[![alert_status](host/api/project_badges/measure?branch=master&project=foo&metric=alert_status&token=foo)](host/dashboard?id=foo&branch=master)'
+      '[![alert_status](host/api/project_badges/measure?branch=master&project=foo&metric=alert_status&token=foo)](host/dashboard?id=foo&branch=master)',
     );
   });
 });
index c43e9c6acfa146e2ffec141019070fbb92df9690..27ade8350447fddfa0308253bf5d287c5aa7a733 100644 (file)
@@ -69,17 +69,17 @@ export function getBadgeSnippet(type: BadgeType, options: BadgeOptions, token: s
 export function getBadgeUrl(
   type: BadgeType,
   { branch, project, metric = 'alert_status', pullRequest }: BadgeOptions,
-  token: string
+  token: string,
 ) {
   switch (type) {
     case BadgeType.qualityGate:
       return `${getHostUrl()}/api/project_badges/quality_gate?${new URLSearchParams(
-        omitNil({ branch, project, pullRequest, token })
+        omitNil({ branch, project, pullRequest, token }),
       ).toString()}`;
     case BadgeType.measure:
     default:
       return `${getHostUrl()}/api/project_badges/measure?${new URLSearchParams(
-        omitNil({ branch, project, metric, pullRequest, token })
+        omitNil({ branch, project, metric, pullRequest, token }),
       ).toString()}`;
   }
 }
index 837b5ca4149952ec275acaea02666efaf3f01ad6..b2a8d010ee43871d8ac0a3be3cc390074d4444b5 100644 (file)
@@ -65,7 +65,7 @@ export function ProjectNotifications(props: WithNotificationsProps & Props) {
       (notification) =>
         notification.type === type &&
         notification.channel === channel &&
-        notification.project === component.key
+        notification.project === component.key,
     );
   };
 
@@ -91,7 +91,7 @@ export function ProjectNotifications(props: WithNotificationsProps & Props) {
                 className="sw-flex sw-justify-between"
                 label={translateWithParameters(
                   'notification.dispatcher.descrption_x',
-                  getDispatcherLabel(type)
+                  getDispatcherLabel(type),
                 )}
                 checked={isEnabled(type, emailChannel)}
                 id={getCheckboxId(type, emailChannel)}
index 73cd0028e2c1fa0aa7df64af754f71907da70fbb..7d57b5fb55394f53fa278279188689dcd8448a45 100644 (file)
@@ -50,49 +50,49 @@ it('should render correctly', async () => {
   renderProjectNotifications();
 
   expect(
-    await screen.findByText('project_information.project_notifications.title')
+    await screen.findByText('project_information.project_notifications.title'),
   ).toBeInTheDocument();
   expect(
     screen.getByLabelText(
-      'notification.dispatcher.descrption_x.notification.dispatcher.NewAlerts.project'
-    )
+      'notification.dispatcher.descrption_x.notification.dispatcher.NewAlerts.project',
+    ),
   ).toBeChecked();
 
   expect(
     screen.getByLabelText(
-      'notification.dispatcher.descrption_x.notification.dispatcher.NewIssues.project'
-    )
+      'notification.dispatcher.descrption_x.notification.dispatcher.NewIssues.project',
+    ),
   ).not.toBeChecked();
 
   // Toggle New Alerts
   await user.click(
     screen.getByLabelText(
-      'notification.dispatcher.descrption_x.notification.dispatcher.NewAlerts.project'
-    )
+      'notification.dispatcher.descrption_x.notification.dispatcher.NewAlerts.project',
+    ),
   );
 
   expect(
     screen.getByLabelText(
-      'notification.dispatcher.descrption_x.notification.dispatcher.NewAlerts.project'
-    )
+      'notification.dispatcher.descrption_x.notification.dispatcher.NewAlerts.project',
+    ),
   ).not.toBeChecked();
 
   // Toggle New Issues
   await user.click(
     screen.getByLabelText(
-      'notification.dispatcher.descrption_x.notification.dispatcher.NewIssues.project'
-    )
+      'notification.dispatcher.descrption_x.notification.dispatcher.NewIssues.project',
+    ),
   );
 
   expect(
     screen.getByLabelText(
-      'notification.dispatcher.descrption_x.notification.dispatcher.NewIssues.project'
-    )
+      'notification.dispatcher.descrption_x.notification.dispatcher.NewIssues.project',
+    ),
   ).toBeChecked();
 });
 
 function renderProjectNotifications() {
   return renderComponent(
-    <ProjectNotifications component={mockComponent({ key: 'foo', name: 'Foo' })} />
+    <ProjectNotifications component={mockComponent({ key: 'foo', name: 'Foo' })} />,
   );
 }
index da3cbcf6237e35a72180129446a6d74356c9d578..2fc442ddbe0118606bb172deb963acba866b7603 100644 (file)
@@ -58,12 +58,12 @@ export default function RegulatoryReport({ component, branchLike }: Props) {
         const branches = await getBranches(component.key);
 
         const availableBranches = branches.filter(
-          (br) => br.analysisDate && (isMainBranch(br) || br.excludedFromPurge)
+          (br) => br.analysisDate && (isMainBranch(br) || br.excludedFromPurge),
         );
         const mainBranch = availableBranches.find(isMainBranch);
         const otherBranchSorted = orderBy(
           availableBranches.filter((b) => !isMainBranch(b)),
-          (b) => b.name
+          (b) => b.name,
         );
         const sortedBranch = mainBranch ? [mainBranch, ...otherBranchSorted] : otherBranchSorted;
         const options = sortedBranch.map((br) => {
index 45ea0dd508e30f167032dab2a71f069fdab8173d..d14da421862f772755f4eb732d1312ca89a06955 100644 (file)
@@ -90,7 +90,7 @@ describe('RegulatoryReport tests', () => {
     expect(ui.downloadButton.get()).toBeInTheDocument();
     expect(ui.downloadButton.get()).toHaveAttribute(
       'href',
-      `/api/regulatory_reports/download?project=&branch=${compatibleBranch.name}`
+      `/api/regulatory_reports/download?project=&branch=${compatibleBranch.name}`,
     );
   });
 
@@ -109,7 +109,7 @@ describe('RegulatoryReport tests', () => {
     expect(ui.downloadButton.get()).toBeInTheDocument();
     expect(ui.downloadButton.get()).toHaveAttribute(
       'href',
-      `/api/regulatory_reports/download?project=&branch=${mainBranch.name}`
+      `/api/regulatory_reports/download?project=&branch=${mainBranch.name}`,
     );
   });
 });
index 74ac67a5f49ed4a63f1750c4f8cfe93932e31327..dcfa7b3b27248e9e3e377921c2746a6a1dea3bb4 100644 (file)
@@ -71,7 +71,7 @@ function renderProjectKeyApp() {
     'project/key',
     () => <Route path="project/key" element={<ProjectKeyApp />} />,
     {},
-    { component: componentsMock.components[0].component }
+    { component: componentsMock.components[0].component },
   );
 }
 
index 74d55f443f7c8effa89a841951635f089e0e5c67..056d03b166a2f859ef3e2c0398dd3e396903fc48 100644 (file)
@@ -73,7 +73,7 @@ export default class LinkRow extends React.PureComponent<Props> {
         isDestructive
         modalBody={translateWithParameters(
           'project_links.are_you_sure_to_delete_x_link',
-          link.name!
+          link.name!,
         )}
         modalHeader={translate('project_links.delete_project_link')}
         onConfirm={this.props.onDelete}
index e9209cded54f564c13ea0ced2795ebbad236efc1..9ab0eddd0ede34abec2556713bfe7c115a4db2e6 100644 (file)
@@ -71,7 +71,7 @@ export class ProjectLinksApp extends React.PureComponent<Props, State> {
         if (this.mounted) {
           this.setState({ loading: false });
         }
-      }
+      },
     );
   };
 
index 2eb01730c51019101ee4e966eedffb1475189224..932f16b3b7b1032c281a4192e66126a73c5a3f0c 100644 (file)
@@ -63,7 +63,7 @@ function renderProjectLinksApp() {
     'project/links',
     () => <Route path="project/links" element={<ProjectLinksApp />} />,
     {},
-    { component: mockComponent() }
+    { component: mockComponent() },
   );
 }
 
index 74e09875f66eb0b6fe20cdd08b37db5daacb818e..03f39eae6e9198b52d8117f8128aecce93ec92f5 100644 (file)
@@ -99,7 +99,7 @@ export default class BranchAnalysisList extends React.PureComponent<Props, State
         },
         () => {
           this.scrollToSelected();
-        }
+        },
       );
     });
   }
index 420f7f758626c204c2b477d54250c54969fd42e4..d4d0c66530df0460e37455342b65e2198d96fbe2 100644 (file)
@@ -80,8 +80,8 @@ function renderAnalysis(args: {
           ariaLabel={translateWithParameters(
             'baseline.branch_analyses.analysis_for_x',
             `${intl.formatDate(analysis.date, longFormatterOption)}, ${intl.formatTime(
-              analysis.date
-            )}`
+              analysis.date,
+            )}`,
           )}
           onCheck={() => {}}
           value=""
@@ -93,7 +93,7 @@ function renderAnalysis(args: {
 }
 
 function BranchAnalysisListRenderer(
-  props: BranchAnalysisListRendererProps & WrappedComponentProps
+  props: BranchAnalysisListRendererProps & WrappedComponentProps,
 ) {
   const { analyses, loading, range, selectedAnalysisKey, intl } = props;
 
@@ -102,7 +102,7 @@ function BranchAnalysisListRenderer(
       getAnalysesByVersionByDay(analyses, {
         category: '',
       }),
-    [analyses]
+    [analyses],
   );
 
   const hasFilteredData =
@@ -187,7 +187,7 @@ function BranchAnalysisListRenderer(
                                 isFirst: analyses[0].key === analysis.key,
                                 onSelectAnalysis: props.onSelectAnalysis,
                                 intl,
-                              })
+                              }),
                             )}
                           </ul>
                         </li>
index 3d75feda42eb76b54025044016b08c54585829ba..c13ca443188efcb3c027c0ab33c8934b5818d456 100644 (file)
@@ -100,7 +100,7 @@ export default class BranchList extends React.PureComponent<Props, State> {
         });
 
         const previouslyNonCompliantBranchNCDs = newCodePeriods.filter(
-          isPreviouslyNonCompliantDaysNCD
+          isPreviouslyNonCompliantDaysNCD,
         );
 
         this.setState({
@@ -111,7 +111,7 @@ export default class BranchList extends React.PureComponent<Props, State> {
       },
       () => {
         this.setState({ loading: false });
-      }
+      },
     );
   }
 
@@ -134,7 +134,7 @@ export default class BranchList extends React.PureComponent<Props, State> {
       this.setState(({ previouslyNonCompliantBranchNCDs }) => ({
         branches: this.updateBranchNewCodePeriod(branch, newSetting),
         previouslyNonCompliantBranchNCDs: previouslyNonCompliantBranchNCDs?.filter(
-          ({ branchKey }) => branchKey !== branch
+          ({ branchKey }) => branchKey !== branch,
         ),
         editedBranch: undefined,
       }));
index 401c22eac1658fd478082ccb734bff3b82e7be13..0dd21ff8c92a4f2ef4d951ab0b82cee201734258 100644 (file)
@@ -62,7 +62,7 @@ function renderNewCodePeriodSetting(newCodePeriod: NewCodeDefinition) {
 
 function branchInheritsItselfAsReference(
   branch: BranchWithNewCodePeriod,
-  inheritedSetting: NewCodeDefinition
+  inheritedSetting: NewCodeDefinition,
 ) {
   return (
     !branch.newCodePeriod &&
@@ -73,7 +73,7 @@ function branchInheritsItselfAsReference(
 
 function referenceBranchDoesNotExist(
   branch: BranchWithNewCodePeriod,
-  existingBranches: Array<string>
+  existingBranches: Array<string>,
 ) {
   return (
     branch.newCodePeriod &&
@@ -90,12 +90,12 @@ export default function BranchListRow(props: BranchListRowProps) {
   if (branchInheritsItselfAsReference(branch, inheritedSetting)) {
     settingWarning = translateWithParameters(
       'baseline.reference_branch.invalid_branch_setting',
-      branch.name
+      branch.name,
     );
   } else if (referenceBranchDoesNotExist(branch, existingBranches)) {
     settingWarning = translateWithParameters(
       'baseline.reference_branch.does_not_exist',
-      branch.newCodePeriod?.value || ''
+      branch.newCodePeriod?.value || '',
     );
   }
 
index 8da03078843138b7e5d9f64665d558fc516268e9..771303c7a2e601f1859a75f71e41fc29f1dc836d 100644 (file)
@@ -141,7 +141,7 @@ export default class BranchNewCodeDefinitionSettingModal extends React.PureCompo
               saving: false,
             });
           }
-        }
+        },
       );
     }
   };
index bc41738692a50be64b2440abdb5189f931b67a2f..671596a1094b3e83281a85c5ca70dbe62c1c40b8 100644 (file)
@@ -60,7 +60,7 @@ function renderBranchOption(props: OptionProps<BranchOption, false>) {
         <Tooltip
           overlay={translateWithParameters(
             'baseline.reference_branch.does_not_exist',
-            option.value
+            option.value,
           )}
         >
           <span>
@@ -88,7 +88,7 @@ function renderBranchOption(props: OptionProps<BranchOption, false>) {
 }
 
 export default function NewCodeDefinitionSettingReferenceBranch(
-  props: BaselineSettingReferenceBranchProps
+  props: BaselineSettingReferenceBranchProps,
 ) {
   const { branchList, className, disabled, referenceBranch, selected, settingLevel } = props;
 
index 3e30064ba50be5d25b3c4b4a3f621129f1ed9821..07252ba7bc4392b8285c1942c9f493d3950a00a9 100644 (file)
@@ -120,21 +120,21 @@ function ProjectNewCodeDefinitionApp(props: ProjectNewCodeDefinitionAppProps) {
 
   const resetStatesFromProjectNewCodeDefinition = useCallback(() => {
     setIsSpecificNewCodeDefinition(
-      projectNewCodeDefinition === undefined ? undefined : !projectNewCodeDefinition.inherited
+      projectNewCodeDefinition === undefined ? undefined : !projectNewCodeDefinition.inherited,
     );
     setSelectedNewCodeDefinitionType(
-      projectNewCodeDefinition?.type ?? DEFAULT_NEW_CODE_DEFINITION_TYPE
+      projectNewCodeDefinition?.type ?? DEFAULT_NEW_CODE_DEFINITION_TYPE,
     );
     setNumberOfDays(getNumberOfDaysDefaultValue(globalNewCodeDefinition, projectNewCodeDefinition));
     setReferenceBranch(
       projectNewCodeDefinition?.type === NewCodeDefinitionType.ReferenceBranch
         ? projectNewCodeDefinition.value
-        : defaultReferenceBranch
+        : defaultReferenceBranch,
     );
     setSpecificAnalysis(
       projectNewCodeDefinition?.type === NewCodeDefinitionType.SpecificAnalysis
         ? projectNewCodeDefinition.value
-        : undefined
+        : undefined,
     );
   }, [defaultReferenceBranch, globalNewCodeDefinition, projectNewCodeDefinition]);
 
@@ -237,5 +237,5 @@ function ProjectNewCodeDefinitionApp(props: ProjectNewCodeDefinitionAppProps) {
 }
 
 export default withComponentContext(
-  withAvailableFeatures(withAppStateContext(withBranchLikes(ProjectNewCodeDefinitionApp)))
+  withAvailableFeatures(withAppStateContext(withBranchLikes(ProjectNewCodeDefinitionApp))),
 );
index 8acca30f39e0b4d3eddefb8a1e57417d3b04a299..2e271e26ec0507ae475df86759a98440fd1061de 100644 (file)
@@ -191,7 +191,7 @@ it('can set a previous version setting for branch', async () => {
   await ui.setBranchPreviousVersionSetting('main');
 
   expect(
-    within(byRole('table').get()).getByText('new_code_definition.previous_version')
+    within(byRole('table').get()).getByText('new_code_definition.previous_version'),
   ).toBeInTheDocument();
 
   await user.click(await ui.branchActionsButton('main').find());
@@ -200,7 +200,7 @@ it('can set a previous version setting for branch', async () => {
   await user.click(ui.resetToDefaultButton.get());
 
   expect(
-    first(within(byRole('table').get()).getAllByText('branch_list.default_setting'))
+    first(within(byRole('table').get()).getAllByText('branch_list.default_setting')),
   ).toBeInTheDocument();
 });
 
@@ -214,7 +214,7 @@ it('can set a number of days setting for branch', async () => {
   await ui.setBranchNumberOfDaysSetting('main', '15');
 
   expect(
-    within(byRole('table').get()).getByText('new_code_definition.number_days: 15')
+    within(byRole('table').get()).getByText('new_code_definition.number_days: 15'),
   ).toBeInTheDocument();
 });
 
@@ -254,7 +254,7 @@ it('can set a reference branch setting for branch', async () => {
   await ui.setBranchReferenceToBranchSetting('main', 'normal-branch');
 
   expect(
-    byRole('table').byText('baseline.reference_branch: normal-branch').get()
+    byRole('table').byText('baseline.reference_branch: normal-branch').get(),
   ).toBeInTheDocument();
 });
 
@@ -286,7 +286,7 @@ it('should display NCD banner if some branches had their NCD automatically chang
 
   expect(await ui.branchNCDsBanner.find()).toBeInTheDocument();
   expect(
-    ui.branchNCDsBanner.byText('new_code_definition.auto_update.branch.list_itemmaster32150').get()
+    ui.branchNCDsBanner.byText('new_code_definition.auto_update.branch.list_itemmaster32150').get(),
   ).toBeInTheDocument();
 });
 
@@ -369,7 +369,7 @@ function renderProjectNewCodeDefinitionApp(context: RenderContext = {}, params?:
     },
     {
       component: mockComponent(),
-    }
+    },
   );
 }
 
index ed8708a9702b693b489849f09a20907c740c8242..cc621b2486fcb758d643c058b29c6dc3dc35a29f 100644 (file)
@@ -29,25 +29,25 @@ describe('getSettingValue', () => {
 
   it('should work for Days', () => {
     expect(getSettingValue({ ...state, type: NewCodeDefinitionType.NumberOfDays })).toBe(
-      state.numberOfDays
+      state.numberOfDays,
     );
   });
 
   it('should work for Analysis', () => {
     expect(getSettingValue({ ...state, type: NewCodeDefinitionType.SpecificAnalysis })).toBe(
-      state.analysis
+      state.analysis,
     );
   });
 
   it('should work for Previous version', () => {
     expect(
-      getSettingValue({ ...state, type: NewCodeDefinitionType.PreviousVersion })
+      getSettingValue({ ...state, type: NewCodeDefinitionType.PreviousVersion }),
     ).toBeUndefined();
   });
 
   it('should work for Reference branch', () => {
     expect(getSettingValue({ ...state, type: NewCodeDefinitionType.ReferenceBranch })).toBe(
-      state.referenceBranch
+      state.referenceBranch,
     );
   });
 });
@@ -59,60 +59,60 @@ describe('validateSettings', () => {
       validateSetting({
         numberOfDays: '12',
         selectedNewCodeDefinitionType: NewCodeDefinitionType.NumberOfDays,
-      })
+      }),
     ).toEqual(true);
     expect(
       validateSetting({
         numberOfDays: 'nope',
         selectedNewCodeDefinitionType: NewCodeDefinitionType.NumberOfDays,
-      })
+      }),
     ).toEqual(false);
     expect(
       validateSetting({
         numberOfDays: '',
         selectedNewCodeDefinitionType: NewCodeDefinitionType.SpecificAnalysis,
-      })
+      }),
     ).toEqual(false);
     expect(
       validateSetting({
         numberOfDays: '',
         referenceBranch: 'master',
         selectedNewCodeDefinitionType: NewCodeDefinitionType.ReferenceBranch,
-      })
+      }),
     ).toEqual(true);
     expect(
       validateSetting({
         numberOfDays: '',
         referenceBranch: '',
         selectedNewCodeDefinitionType: NewCodeDefinitionType.ReferenceBranch,
-      })
+      }),
     ).toEqual(false);
   });
 
   it('should validate at project level', () => {
     expect(validateSetting({ numberOfDays: '', overrideGlobalNewCodeDefinition: false })).toEqual(
-      true
+      true,
     );
     expect(
       validateSetting({
         selectedNewCodeDefinitionType: NewCodeDefinitionType.PreviousVersion,
         numberOfDays: '',
         overrideGlobalNewCodeDefinition: true,
-      })
+      }),
     ).toEqual(true);
     expect(
       validateSetting({
         selectedNewCodeDefinitionType: NewCodeDefinitionType.NumberOfDays,
         numberOfDays: '',
         overrideGlobalNewCodeDefinition: true,
-      })
+      }),
     ).toEqual(false);
     expect(
       validateSetting({
         selectedNewCodeDefinitionType: NewCodeDefinitionType.NumberOfDays,
         numberOfDays: '12',
         overrideGlobalNewCodeDefinition: true,
-      })
+      }),
     ).toEqual(true);
   });
 });
index 3365b99d6dc6a1b3e2dc51e9ae7bf18bec248c93..f6248b45feb4b1c7af650c0fe5114f3c655f09f1 100644 (file)
@@ -105,7 +105,7 @@ class ProjectQualityGateApp extends React.PureComponent<Props, State> {
       qualitygates.map(async (qg) => {
         const detailedQp = await fetchQualityGate({ name: qg.name }).catch(() => qg);
         return { ...detailedQp, ...qg };
-      })
+      }),
     );
   };
 
index 9e41073b02ccd5f3224cbe94f9c6b5471be2a2fa..3fb1135e10b5216f6205c16d20132246a988f912 100644 (file)
@@ -112,7 +112,7 @@ it('renders nothing and shows alert when any API fails', async () => {
 
 function renderProjectQualityGateApp(
   context?: RenderContext,
-  componentOverrides: Partial<Component> = { configuration: { showQualityGates: true } }
+  componentOverrides: Partial<Component> = { configuration: { showQualityGates: true } },
 ) {
   renderAppWithComponentContext('project/quality_gate', routes, context, {
     component: mockComponent(componentOverrides),
index 6228608f4a73670ce95baa8e7b672975a83f4e50..ee7b7b00ff9ede64fa5246c94cf860ef04af8b5c 100644 (file)
@@ -92,8 +92,8 @@ export class ProjectQualityProfilesApp extends React.PureComponent<Props, State>
             selected: Boolean(results.find((p) => p.key === component.key)?.selected),
             profile,
           }))
-          .catch(() => ({ selected: false, profile }))
-      )
+          .catch(() => ({ selected: false, profile })),
+      ),
     );
 
     const selectedProjectProfiles = projectProfiles
@@ -109,11 +109,11 @@ export class ProjectQualityProfilesApp extends React.PureComponent<Props, State>
     const componentProfiles = differenceBy(
       component.qualityProfiles,
       selectedProjectProfiles.map((p) => p.profile),
-      'key'
+      'key',
     )
       // Discard languages we already have up-to-date info for.
       .filter(
-        ({ language }) => !selectedProjectProfiles.some((p) => p.profile.language === language)
+        ({ language }) => !selectedProjectProfiles.some((p) => p.profile.language === language),
       )
       .map(({ key }) => {
         const profile = allProfiles.find((p) => p.key === key);
@@ -128,7 +128,7 @@ export class ProjectQualityProfilesApp extends React.PureComponent<Props, State>
             // be taken into account after a new analysis. Fetch the
             // default profile.
             const defaultProfile = allProfiles.find(
-              (p) => p.isDefault && p.language === profile.language
+              (p) => p.isDefault && p.language === profile.language,
             );
             return (
               defaultProfile && {
@@ -189,8 +189,8 @@ export class ProjectQualityProfilesApp extends React.PureComponent<Props, State>
           addGlobalSuccessMessage(
             translateWithParameters(
               'project_quality_profile.successfully_updated',
-              newProfile.languageName
-            )
+              newProfile.languageName,
+            ),
           );
         }
       } catch (e) {
@@ -208,7 +208,7 @@ export class ProjectQualityProfilesApp extends React.PureComponent<Props, State>
     const newProfile = newKey && allProfiles.find((p) => p.key === newKey);
     const oldProjectProfile = projectProfiles.find((p) => p.profile.key === oldKey);
     const defaultProfile = allProfiles.find(
-      (p) => p.isDefault && p.language === oldProjectProfile?.profile.language
+      (p) => p.isDefault && p.language === oldProjectProfile?.profile.language,
     );
 
     if (defaultProfile === undefined || oldProjectProfile === undefined) {
@@ -258,8 +258,8 @@ export class ProjectQualityProfilesApp extends React.PureComponent<Props, State>
       addGlobalSuccessMessage(
         translateWithParameters(
           'project_quality_profile.successfully_updated',
-          defaultProfile.languageName
-        )
+          defaultProfile.languageName,
+        ),
       );
     }
   };
index ea59b06c7e97ad3bab46421516d02ac2b70a687c..7294000b9a395f46d6d7dfc5231b22471ccdadbb 100644 (file)
@@ -51,7 +51,7 @@ export interface ProjectQualityProfilesAppRendererProps {
 }
 
 export default function ProjectQualityProfilesAppRenderer(
-  props: ProjectQualityProfilesAppRendererProps
+  props: ProjectQualityProfilesAppRendererProps,
 ) {
   const {
     allProfiles,
index 9d4a2a0bca14081a00e1ec30906bd710f42a42ca..0ff50093a04b974499c56ec98e0f7ae343de489a 100644 (file)
@@ -162,7 +162,7 @@ it('should be able to add and change profile for languages', async () => {
   expect(ui.pageDescription.get()).toBeInTheDocument();
   expect(ui.addLanguageButton.get()).toBeInTheDocument();
   await expect(ui.helpTooltip.get()).toHaveATooltipWithContent(
-    'quality_profiles.list.projects.help'
+    'quality_profiles.list.projects.help',
   );
   expect(ui.profileRows.getAll()).toHaveLength(5);
   expect(ui.cssLanguage.get()).toBeInTheDocument();
@@ -182,10 +182,10 @@ it('should be able to add and change profile for languages', async () => {
   await user.click(ui.buttonSave.get());
   expect(associateProject).toHaveBeenLastCalledWith(
     expect.objectContaining({ key: 'html', name: 'html profile' }),
-    'my-project'
+    'my-project',
   );
   expect(addGlobalSuccessMessage).toHaveBeenCalledWith(
-    'project_quality_profile.successfully_updated.HTML'
+    'project_quality_profile.successfully_updated.HTML',
   );
 
   // Updates the page after API call
@@ -199,12 +199,12 @@ it('should be able to add and change profile for languages', async () => {
   expect(htmlRow.get()).toBeInTheDocument();
   expect(htmlRow.byRole('link', { name: '10' }).get()).toHaveAttribute(
     'href',
-    '/coding_rules?activation=true&qprofile=html'
+    '/coding_rules?activation=true&qprofile=html',
   );
   expect(ui.builtInTag.query()).not.toBeInTheDocument();
 
   await user.click(
-    htmlRow.byRole('button', { name: 'project_quality_profile.change_profile' }).get()
+    htmlRow.byRole('button', { name: 'project_quality_profile.change_profile' }).get(),
   );
 
   //Opens modal to change profile
@@ -217,7 +217,7 @@ it('should be able to add and change profile for languages', async () => {
   await user.click(ui.buttonSave.get());
 
   expect(addGlobalSuccessMessage).toHaveBeenCalledWith(
-    'project_quality_profile.successfully_updated.HTML'
+    'project_quality_profile.successfully_updated.HTML',
   );
 
   // Updates the page after API call
@@ -244,7 +244,7 @@ it('should still show page with add language button when api fails', () => {
 
 function renderProjectQualityProfilesApp(
   context?: RenderContext,
-  componentOverrides: Partial<Component> = { configuration: { showQualityProfiles: true } }
+  componentOverrides: Partial<Component> = { configuration: { showQualityProfiles: true } },
 ) {
   return renderAppWithComponentContext('project/quality_profiles', routes, context, {
     component: mockComponent(componentOverrides),
index 450793fa3b4b8d692d91c0c8a5c5489977af1b0f..d09f755fc04b0043e61a1c66f72c25dc6d28f0f4 100644 (file)
@@ -49,7 +49,7 @@ export function AddLanguageModal(props: AddLanguageModalProps) {
 
   const languageOptions: LabelValueSelectOption[] = difference(
     Object.keys(profilesByLanguage),
-    unavailableLanguages
+    unavailableLanguages,
   ).map((l) => ({ value: l, label: languages[l].name }));
 
   const profileOptions: ProfileOption[] =
@@ -91,7 +91,7 @@ export function AddLanguageModal(props: AddLanguageModalProps) {
                   isDisabled={submitting}
                   id="language"
                   aria-label={translate(
-                    'project_quality_profile.add_language_modal.choose_language'
+                    'project_quality_profile.add_language_modal.choose_language',
                   )}
                   onChange={({ value }: LabelValueSelectOption) => {
                     setSelected({ language: value, key: undefined });
@@ -111,7 +111,7 @@ export function AddLanguageModal(props: AddLanguageModalProps) {
                   isDisabled={submitting || !language}
                   id="profiles"
                   aria-label={translate(
-                    'project_quality_profile.add_language_modal.choose_profile'
+                    'project_quality_profile.add_language_modal.choose_profile',
                   )}
                   onChange={({ value }: ProfileOption) => setSelected({ language, key: value })}
                   options={profileOptions}
index d45c08fcc6ba13129d14333cea96ab9d1159818a..316e48c441f8c12a6193311c9a94ae26daa3b292 100644 (file)
@@ -45,7 +45,7 @@ export default function LanguageProfileSelectOption(props: LanguageProfileSelect
             <>
               <p>
                 {translate(
-                  'project_quality_profile.add_language_modal.profile_unavailable_no_active_rules'
+                  'project_quality_profile.add_language_modal.profile_unavailable_no_active_rules',
                 )}
               </p>
               {option.label && option.language && (
index 2cc134f8482c09aadbf2f5ade25cc7bf60b52cfa..b79bc7c10fc36a477ec7517b5923d1a2390e6f3a 100644 (file)
@@ -42,7 +42,7 @@ export interface SetQualityProfileModalProps {
 export default function SetQualityProfileModal(props: SetQualityProfileModalProps) {
   const { availableProfiles, component, currentProfile, usesDefault } = props;
   const [selected, setSelected] = React.useState(
-    usesDefault ? USE_SYSTEM_DEFAULT : currentProfile.key
+    usesDefault ? USE_SYSTEM_DEFAULT : currentProfile.key,
   );
 
   const defaultProfile = availableProfiles.find((p) => p.isDefault);
@@ -54,7 +54,7 @@ export default function SetQualityProfileModal(props: SetQualityProfileModalProp
 
   const header = translateWithParameters(
     'project_quality_profile.change_lang_X_profile',
-    currentProfile.languageName
+    currentProfile.languageName,
   );
   const profileOptions: ProfileOption[] = availableProfiles.map((p) => ({
     value: p.key,
@@ -65,7 +65,7 @@ export default function SetQualityProfileModal(props: SetQualityProfileModalProp
   const hasSelectedSysDefault = selected === USE_SYSTEM_DEFAULT;
   const hasChanged = usesDefault ? !hasSelectedSysDefault : selected !== currentProfile.key;
   const needsReanalysis = !component.qualityProfiles?.some((p) =>
-    hasSelectedSysDefault ? p.key === defaultProfile.key : p.key === selected
+    hasSelectedSysDefault ? p.key === defaultProfile.key : p.key === selected,
   );
 
   return (
@@ -136,7 +136,7 @@ export default function SetQualityProfileModal(props: SetQualityProfileModalProp
                         value={profileOptions.find(
                           (option) =>
                             option.value ===
-                            (!hasSelectedSysDefault ? selected : currentProfile.key)
+                            (!hasSelectedSysDefault ? selected : currentProfile.key),
                         )}
                       />
                     </div>
index 666cae333100c0fd94ce550d6a5d3fc667e3c8cb..0004e2e6edbc169d6238fad2d95a114e539695ff 100644 (file)
@@ -67,7 +67,7 @@ describe('formatDuration', () => {
 
   it('render years and months only', () => {
     expect(utils.formatDuration(ONE_YEAR * 4 + ONE_MONTH * 2 + ONE_DAY * 10)).toEqual(
-      'duration.years.4 duration.months.2 '
+      'duration.years.4 duration.months.2 ',
     );
   });
 
@@ -77,7 +77,7 @@ describe('formatDuration', () => {
 
   it('render hours and minutes', () => {
     expect(utils.formatDuration(ONE_HOUR * 4 + ONE_MINUTE * 10)).toEqual(
-      'duration.hours.4 duration.minutes.10 '
+      'duration.hours.4 duration.minutes.10 ',
     );
   });
 
@@ -141,7 +141,7 @@ describe('fetchProjects', () => {
             component: Component & {
               measures: { languages?: string; new_coverage?: string };
               isScannable: boolean;
-            }
+            },
           ) => {
             // eslint-disable-next-line jest/no-conditional-in-test
             if (component.key === 'foo') {
@@ -151,7 +151,7 @@ describe('fetchProjects', () => {
             }
             component.isScannable = false;
             return component;
-          }
+          },
         ),
 
         total: 2,
index 4cdcbc29213d0953bfc55cbca947c87969882ef0..9b89b685860eecc88ec849e2730d67067b124490 100644 (file)
@@ -247,7 +247,7 @@ export class AllProjects extends React.PureComponent<Props, State> {
 
               <PageSidebar
                 applicationsEnabled={this.props.appState.qualifiers.includes(
-                  ComponentQualifier.Application
+                  ComponentQualifier.Application,
                 )}
                 facets={this.state.facets}
                 loadSearchResultCount={this.loadSearchResultCount}
@@ -365,7 +365,7 @@ function SetSearchParamsWrapper(props: Props) {
     // eslint-disable-next-line react-hooks/exhaustive-deps
     [
       /* Run once on mount only */
-    ]
+    ],
   );
 
   return <AllProjects {...props} />;
index fae205819dfecf0b6e92e4e11e65018c7550796e..e815eab603af36d36ac9e8abae90904d1fff9fa9 100644 (file)
@@ -86,7 +86,7 @@ export function DefaultPageSelector(props: DefaultPageSelectorProps) {
     // eslint-disable-next-line react-hooks/exhaustive-deps
     [
       /* run only once on mount*/
-    ]
+    ],
   );
 
   if (checking) {
index 664c3a5f569bd9bb263c9345bbfa77239eaadf68..d1ceb400ba9b2d47f5c451e775b842c5a4d05296 100644 (file)
@@ -63,7 +63,7 @@ export default class ProjectsSortingSelect extends React.PureComponent<Props> {
         value: option.value,
         label: translate('projects.sorting', option.value),
         className: option.class,
-      })
+      }),
     );
   };
 
index ce54383237a6471ef045002b114cb76d85c29d0b..5353601104983319c57d5fd1e1e8b42589ecb773 100644 (file)
@@ -84,7 +84,7 @@ it('changes sort and perspective', async () => {
   const projects = ui.projects.getAll();
 
   expect(await within(projects[0]).findByRole('link')).toHaveTextContent(
-    'sonarlint-omnisharp-dotnet'
+    'sonarlint-omnisharp-dotnet',
   );
 
   // Change perspective
index 535a1bcf2f532240ceb4091467b91b2d23aef8a9..45499026bd991472db0818577ee0e9d86c6ecc27 100644 (file)
@@ -76,7 +76,7 @@ it('should be able to create application when user is logged in and has permissi
 
   renderApplicationCreation(
     { router },
-    mockLoggedInUser({ permissions: { global: ['admin', 'applicationcreator'] } })
+    mockLoggedInUser({ permissions: { global: ['admin', 'applicationcreator'] } }),
   );
 
   await user.click(ui.buttonAddApplication.get());
@@ -104,7 +104,7 @@ it('should be able to create application when user is logged in and has permissi
     'app',
     'app description',
     'app-key',
-    Visibility.Private
+    Visibility.Private,
   );
   expect(routerPush).toHaveBeenCalledWith({
     pathname: '/project/admin/extension/developer-server/application-console',
@@ -116,7 +116,7 @@ it('should be able to create application when user is logged in and has permissi
 
 function renderApplicationCreation(
   props: Partial<FCProps<typeof ApplicationCreation>> = {},
-  currentUser: LoggedInUser = mockLoggedInUser()
+  currentUser: LoggedInUser = mockLoggedInUser(),
 ) {
   return renderComponent(
     <ApplicationCreation
@@ -124,6 +124,6 @@ function renderApplicationCreation(
       router={mockRouter()}
       appState={mockAppState({ qualifiers: [ComponentQualifier.Application] })}
       {...props}
-    />
+    />,
   );
 }
index 41e1c15789a60e449afec08f4941ccec75c056bc..1398c5bc111f0907418bafe9d2d0fe36f61cde4d 100644 (file)
@@ -34,7 +34,7 @@ jest.mock(
     // eslint-disable-next-line
     function AllProjects() {
       return <div>All Projects</div>;
-    }
+    },
 );
 
 jest.mock('../../../../helpers/storage', () => ({
@@ -128,6 +128,6 @@ function renderDefaultPageSelector({
           <Route path="*" element={<RouteDisplayer />} />
         </Route>
       </Routes>
-    </MemoryRouter>
+    </MemoryRouter>,
   );
 }
index 5b04906f1d9a3d07f186def3e208db20cec6f7e2..08687ed3a0cd537ee0aca0bef40888fb5a988c9c 100644 (file)
@@ -56,7 +56,7 @@ it.each([
 
     await user.click(screen.getByText(optionTranslationId));
     expect(save).toHaveBeenLastCalledWith('sonarqube.projects.default', localStorageValue);
-  }
+  },
 );
 
 it('does not render for anonymous', () => {
@@ -74,6 +74,6 @@ function renderFavoriteFilter({
       location={location}
       router={mockRouter()}
       params={{}}
-    />
+    />,
   );
 }
index 3ed3aa8d4fc96f8ca3a741c80bbab0f2914f2a38..0b97a5d318c8c861601cf1ceadd978080803a069 100644 (file)
@@ -82,7 +82,7 @@ it('should work correctly for logged in user with edit permission', async () =>
       onPerspectiveChange: onPerspectiveChangeMock,
       onSortChange: onSortChangeMock,
     },
-    mockLoggedInUser({ permissions: { global: ['admin', 'provisioning', 'applicationcreator'] } })
+    mockLoggedInUser({ permissions: { global: ['admin', 'provisioning', 'applicationcreator'] } }),
   );
   expect(getAlmSettings).toHaveBeenCalled();
   expect(ui.buttonAddProject.get()).toBeInTheDocument();
@@ -170,7 +170,7 @@ it('should render alm correctly even with wrong data', async () => {
 
   renderPageHeader(
     {},
-    mockLoggedInUser({ permissions: { global: ['admin', 'provisioning', 'applicationcreator'] } })
+    mockLoggedInUser({ permissions: { global: ['admin', 'provisioning', 'applicationcreator'] } }),
   );
 
   await user.click(ui.buttonAddProject.get());
@@ -179,13 +179,13 @@ it('should render alm correctly even with wrong data', async () => {
   expect(ui.selectOptionBitbucket.get()).toHaveAttribute('href', '/projects/create?mode=bitbucket');
   expect(ui.selectOptionBitbucketCloud.get()).toHaveAttribute(
     'href',
-    '/projects/create?mode=bitbucketcloud'
+    '/projects/create?mode=bitbucketcloud',
   );
 });
 
 function renderPageHeader(
   props: Partial<FCProps<typeof PageHeader>> = {},
-  currentUser: CurrentUser = mockLoggedInUser()
+  currentUser: CurrentUser = mockLoggedInUser(),
 ) {
   return renderComponent(
     <CurrentUserContextProvider currentUser={currentUser}>
@@ -201,6 +201,6 @@ function renderPageHeader(
       />
     </CurrentUserContextProvider>,
     '/',
-    { appState: mockAppState({ qualifiers: [ComponentQualifier.Application] }) }
+    { appState: mockAppState({ qualifiers: [ComponentQualifier.Application] }) },
   );
 }
index 9b7f857ddb2ffabd185c1e86c1b8270e4b0f37f5..5a1f57a95b1d8d757bad821486b7397a9a0937f0 100644 (file)
@@ -94,6 +94,6 @@ function renderPageSidebar(overrides: Partial<PageSidebarProps> = {}, currentUse
         view="overall"
         {...overrides}
       />
-    </CurrentUserContext.Provider>
+    </CurrentUserContext.Provider>,
   ).container;
 }
index a13ee6a354c5306b0ac838bd6dca9a7c0be42e37..6dfa5c127024aabc5aea8358d3a81fb3d45175f1 100644 (file)
@@ -61,7 +61,7 @@ interface Props {
 function renderFirstLine(
   project: Props['project'],
   handleFavorite: Props['handleFavorite'],
-  isNewCode: boolean
+  isNewCode: boolean,
 ) {
   const { analysisDate, isFavorite, key, measures, name, qualifier, tags, visibility } = project;
   const formatted = formatMeasure(measures[MetricKey.alert_status], MetricType.Level);
@@ -194,7 +194,7 @@ function renderFirstLine(
 function renderSecondLine(
   currentUser: Props['currentUser'],
   project: Props['project'],
-  isNewCode: boolean
+  isNewCode: boolean,
 ) {
   const { analysisDate, key, leakPeriodDate, measures, qualifier, isScannable } = project;
 
@@ -234,7 +234,7 @@ export default function ProjectCard(props: Props) {
   return (
     <ProjectCardWrapper
       className={classNames(
-        'it_project_card sw-relative sw-box-border sw-rounded-1 sw-mb-page sw-h-full'
+        'it_project_card sw-relative sw-box-border sw-rounded-1 sw-mb-page sw-h-full',
       )}
       data-key={project.key}
     >
index 69b0e03f3a00df1d74f95a898692a4b40c97790a..761f98d09db1fe0f223b52d49caadc0b15c68f69 100644 (file)
@@ -39,7 +39,7 @@ export function ProjectCardLanguages({ className, distribution, languages }: Pro
 
   const parsedLanguages = distribution.split(';').map((item) => item.split('='));
   const finalLanguages = sortBy(parsedLanguages, (l) => -1 * Number(l[1])).map((l) =>
-    getLanguageName(languages, l[0])
+    getLanguageName(languages, l[0]),
   );
 
   const languagesText =
index 2369702158e0d9f05de865905d83720c09368b85..984f663524eba471dbfb897c0ba0bd2a856c0c56 100644 (file)
@@ -27,7 +27,7 @@ export interface ProjectCardMeasureProps {
 }
 
 export default function ProjectCardMeasure(
-  props: React.PropsWithChildren<ProjectCardMeasureProps>
+  props: React.PropsWithChildren<ProjectCardMeasureProps>,
 ) {
   const { label, metricKey, children, className } = props;
 
index 65881b798d434ed60fb185c0ae1ed75577f4605e..f8569c5154535f1a77fa4bd38691918ce58a472a 100644 (file)
@@ -92,6 +92,6 @@ it('should display 3 aplication', () => {
 
 function renderProjectCard(project: Project, user: CurrentUser = USER_LOGGED_OUT, type?: string) {
   renderComponent(
-    <ProjectCard currentUser={user} handleFavorite={jest.fn()} project={project} type={type} />
+    <ProjectCard currentUser={user} handleFavorite={jest.fn()} project={project} type={type} />,
   );
 }
index 94852659cfea88e2954c1cafdd0f07e3cc046ae9..d83fe04aeba27115802f00df393b4ada9bee225c 100644 (file)
@@ -45,12 +45,12 @@ it('should handle unknown languages', () => {
 it('should handle more then 3 languages', async () => {
   renderProjectCardLanguages('java=137;js=18;cpp=10;c=8;php=4');
   await expect(screen.getByText('Java, JavaScript, ...')).toHaveATooltipWithContent(
-    'JavaJavaScriptcppcphp'
+    'JavaJavaScriptcppcphp',
   );
 });
 
 function renderProjectCardLanguages(distribution?: string) {
   return renderComponent(
-    <ProjectCardLanguages languages={languages} distribution={distribution} />
+    <ProjectCardLanguages languages={languages} distribution={distribution} />,
   );
 }
index 6a71fdb15c9cc8f387ef5cbd6cb907a3d9783e2d..82d0c7378892ec893598ef4db975c61bac6d0800 100644 (file)
@@ -44,7 +44,7 @@ describe('Overall measures', () => {
   it("should be not be rendered if there's no line of code and application", () => {
     renderProjectCardMeasures(
       { [MetricKey.ncloc]: undefined },
-      { componentQualifier: ComponentQualifier.Application }
+      { componentQualifier: ComponentQualifier.Application },
     );
     expect(screen.getByText('portfolio.app.empty')).toBeInTheDocument();
   });
@@ -59,7 +59,7 @@ describe('New code measures', () => {
 
 function renderProjectCardMeasures(
   measuresOverride: Dict<string | undefined> = {},
-  props: Partial<ProjectCardMeasuresProps> = {}
+  props: Partial<ProjectCardMeasuresProps> = {},
 ) {
   const measures = {
     [MetricKey.alert_status]: 'ERROR',
@@ -90,6 +90,6 @@ function renderProjectCardMeasures(
       isNewCode={false}
       measures={measures}
       {...props}
-    />
+    />,
   );
 }
index 9c2e07103ffde8f66f2b2bcb67021b5684b02cd4..a8cbc4316de1cdff8dcee7e48b6ecf2b3a14d590 100644 (file)
@@ -67,7 +67,7 @@ function renderAccessibleLabel(option: number) {
     ? translate('projects.facets.coverage.label', option.toString())
     : translateWithParameters(
         'projects.facets.label_no_data_x',
-        translate('metric_domain.Coverage')
+        translate('metric_domain.Coverage'),
       );
 }
 
index d8b6032a63994d96e0cb5643f89031669645f6d9..f42a00974a50caafc746828250c49c5c6793799e 100644 (file)
@@ -65,7 +65,7 @@ function renderAccessibleLabel(option: number) {
     ? translate('projects.facets.duplication.label', option.toString())
     : translateWithParameters(
         'projects.facets.label_no_data_x',
-        translate('metric_domain.Duplications')
+        translate('metric_domain.Duplications'),
       );
 }
 
index b2a5f56c2ab06bb75acfb03af17b3a1390afebf6..1423a1c78989c87e6cad7e22b6564edfc57fa65c 100644 (file)
@@ -45,7 +45,7 @@ export function LanguagesFilter(props: Props) {
     // and make sure we reference each language only once
     return uniqBy(
       [...Object.values(languages), ...Object.keys(facet ?? {}).map((key) => ({ key, name: key }))],
-      (language) => language.key
+      (language) => language.key,
     );
   }, [languages, facet]);
 
@@ -54,13 +54,13 @@ export function LanguagesFilter(props: Props) {
       const { languages } = newValue;
       onQueryChange({ languages: languages.join(',') });
     },
-    [onQueryChange]
+    [onQueryChange],
   );
 
   const handleSearch = React.useCallback(
     (query: string) => {
       const results = searchOptions.filter((lang) =>
-        lang.name.toLowerCase().includes(query.toLowerCase())
+        lang.name.toLowerCase().includes(query.toLowerCase()),
       );
 
       const paging = { pageIndex: 1, pageSize: results.length, total: results.length };
@@ -70,22 +70,22 @@ export function LanguagesFilter(props: Props) {
         results,
       });
     },
-    [searchOptions]
+    [searchOptions],
   );
 
   const handleSearchResultCount = React.useCallback(
     (languages: Language[]) => {
       return loadSearchResultCount(
         'languages',
-        languages.map((l) => l.key)
+        languages.map((l) => l.key),
       );
     },
-    [loadSearchResultCount]
+    [loadSearchResultCount],
   );
 
   const renderSearchResults = React.useCallback(
     (lang: Language, term: string) => highlightTerm(lang.name, term),
-    []
+    [],
   );
 
   const renderLanguageName = React.useCallback(
@@ -96,7 +96,7 @@ export function LanguagesFilter(props: Props) {
 
       return languages[key]?.name || key;
     },
-    [languages]
+    [languages],
   );
 
   return (
index 61e1ad5d685f20cb38ffa137e7c7d23308da8394..c6eabd7be6227ce7cb7a26753fcc2740bdaa9fbe 100644 (file)
@@ -49,7 +49,7 @@ export default function QualifierFacet(props: QualifierFacetProps) {
         qualifier: active ? '' : itemValue,
       });
     },
-    [onQueryChange, value]
+    [onQueryChange, value],
   );
 
   return (
index b24b8b3469bf9c5eca168b625134971c3adab74c..ea6dd24e963571a39f98e6ef55e45908adb243c3 100644 (file)
@@ -56,7 +56,7 @@ export default function QualityGateFacet(props: Props) {
         });
       }
     },
-    [onQueryChange, value]
+    [onQueryChange, value],
   );
 
   return (
index 99ce03912cb3ba9ad937a1733e526b384175e418..5ff7f65131b1b0b8867e0052a28e1178d07b2eb2 100644 (file)
@@ -44,17 +44,17 @@ export default function RatingFacet(props: Props) {
         return translateWithParameters(
           'projects.facets.rating_label_single_x',
           translate('metric_domain', name),
-          formatMeasure(option, MetricType.Rating)
+          formatMeasure(option, MetricType.Rating),
         );
       }
 
       return translateWithParameters(
         'projects.facets.rating_label_multi_x',
         translate('metric_domain', name),
-        formatMeasure(option, MetricType.Rating)
+        formatMeasure(option, MetricType.Rating),
       );
     },
-    [name]
+    [name],
   );
 
   return (
index bb7dcd1a0c8a9d08e706598479a881620a9a83d6..4f1a5a43f9d22490fe93eac8c1d5dad69d936a14 100644 (file)
@@ -66,14 +66,14 @@ function renderAccessibleLabel(option: number) {
     return translateWithParameters(
       'projects.facets.rating_label_single_x',
       translate('metric_domain.SecurityReview'),
-      formatMeasure(option, MetricType.Rating)
+      formatMeasure(option, MetricType.Rating),
     );
   }
 
   return translateWithParameters(
     'projects.facets.rating_label_multi_x',
     translate('metric_domain.SecurityReview'),
-    formatMeasure(option, MetricType.Rating)
+    formatMeasure(option, MetricType.Rating),
   );
 }
 
index bbb45b3b947372647708843633c42ec8d09f9959..71bb3bdfd9a6b67549462e4d788bac223e58fd48 100644 (file)
@@ -61,6 +61,6 @@ function renderCoverageFilter(props: Partial<ComponentPropsType<typeof CoverageF
         NO_DATA: 4,
       }}
       {...props}
-    />
+    />,
   );
 }
index a8f55537c867e3e3cd9ef83701282aafb6e6dd49..380482c32d570fda70f94aa9a37a10aa2ee23833 100644 (file)
@@ -75,6 +75,6 @@ function renderLanguagesFilter(props: Partial<ComponentPropsType<typeof Language
       facet={{ js: 12, ts: 7, java: 4, xml: 1, '<null>': 1 }}
       value={['js', 'ts']}
       {...props}
-    />
+    />,
   );
 }
index c21ab619191e377fdb5a912e8f071831e5ffee81..67954d7c6d91c6a26f8e186b0b8f2259efb59580 100644 (file)
@@ -64,6 +64,6 @@ function renderQualityGateFilter(props: Partial<ComponentPropsType<typeof Qualit
       onQueryChange={jest.fn()}
       facet={{ OK: 6, ERROR: 3 }}
       {...props}
-    />
+    />,
   );
 }
index e386f20c6d8aae2f6ec4101e89f747693b3f361c..55a72e11b5158944c2d9fc39ab37f60619c76989 100644 (file)
@@ -88,6 +88,6 @@ function renderTagsFacet(props: Partial<TagsFacet['props']> = {}) {
       facet={{ cheese: 5, style: 3, custom1: 1 }}
       value={['custom1']}
       {...props}
-    />
+    />,
   );
 }
index ab922636993e9784fce701ae2e5aee809f3216ce..4cd3b4936b60a5b959df0b5240b6c9ae32245c85 100644 (file)
@@ -85,15 +85,15 @@ export function convertToFilter(query: Query, isFavorite: boolean): string {
   }
 
   ['coverage', 'new_coverage'].forEach((property) =>
-    pushMetricToArray(query, property, conditions, convertCoverage)
+    pushMetricToArray(query, property, conditions, convertCoverage),
   );
 
   ['duplications', 'new_duplications'].forEach((property) =>
-    pushMetricToArray(query, property, conditions, convertDuplications)
+    pushMetricToArray(query, property, conditions, convertDuplications),
   );
 
   ['size', 'new_lines'].forEach((property) =>
-    pushMetricToArray(query, property, conditions, convertSize)
+    pushMetricToArray(query, property, conditions, convertSize),
   );
 
   [
@@ -108,7 +108,7 @@ export function convertToFilter(query: Query, isFavorite: boolean): string {
   ].forEach((property) => pushMetricToArray(query, property, conditions, convertIssuesRating));
 
   ['languages', 'tags', 'qualifier'].forEach((property) =>
-    pushMetricToArray(query, property, conditions, convertArrayMetric)
+    pushMetricToArray(query, property, conditions, convertArrayMetric),
   );
 
   if (query['search'] != null) {
@@ -262,7 +262,7 @@ function pushMetricToArray(
   query: Query,
   property: string,
   conditionsArray: string[],
-  convertFunction: (metric: string, value: any) => string
+  convertFunction: (metric: string, value: any) => string,
 ): void {
   const metric = mapPropertyToMetric(property);
   if (query[property] != null && metric) {
index efa7eb7183e7f2cd38bab82f8057fc3c6d16f300..219a4ab080806eb886dfde398e19c757e5a71d50 100644 (file)
@@ -198,7 +198,7 @@ export function fetchProjects({
         fetchProjectMeasures(response.components, query),
         Promise.resolve(response),
         fetchScannableProjects(),
-      ])
+      ]),
     )
     .then(([measures, { components, facets, paging }, { scannableProjects }]) => {
       return {
index c8b0a57ac34b5d3a3e4bfea4d01df7b04095e597..bde6229adbe2e9e8989e0e44b64d33a35e370966 100644 (file)
@@ -78,7 +78,7 @@ export default class BulkApplyTemplateModal extends React.PureComponent<Props, S
         if (this.mounted) {
           this.setState({ loading: false });
         }
-      }
+      },
     );
   }
 
@@ -111,7 +111,7 @@ export default class BulkApplyTemplateModal extends React.PureComponent<Props, S
           if (this.mounted) {
             this.setState({ submitting: false });
           }
-        }
+        },
       );
     }
   };
@@ -125,11 +125,11 @@ export default class BulkApplyTemplateModal extends React.PureComponent<Props, S
       {this.props.selection.length
         ? translateWithParameters(
             'permission_templates.bulk_apply_permission_template.apply_to_selected',
-            this.props.selection.length
+            this.props.selection.length,
           )
         : translateWithParameters(
             'permission_templates.bulk_apply_permission_template.apply_to_all',
-            this.props.total
+            this.props.total,
           )}
     </Alert>
   );
index 685629bb3bbe95f1213eeb7b276b95a4017342ec..5d922d8e0bb3bf44e5802b6f29e8b87244eff698 100644 (file)
@@ -75,7 +75,7 @@ export default function ChangeDefaultVisibilityForm(props: Props) {
           {translate(
             `settings.projects.change_visibility_form.warning${
               githubProbivisioningEnabled ? '.github' : ''
-            }`
+            }`,
           )}
         </Alert>
       </div>
index c7809034a3d1960b3288638aca427cdd0ca4ea16..02457b473118431a3fcc7d0d626291dc5d4a45ec 100644 (file)
@@ -123,7 +123,7 @@ export default class CreateProjectForm extends React.PureComponent<Props, State>
         if (this.mounted) {
           this.setState({ loading: false });
         }
-      }
+      },
     );
   };
 
@@ -144,7 +144,7 @@ export default class CreateProjectForm extends React.PureComponent<Props, State>
               <Alert variant="success">
                 <FormattedMessage
                   defaultMessage={translate(
-                    'projects_management.project_has_been_successfully_created'
+                    'projects_management.project_has_been_successfully_created',
                   )}
                   id="projects_management.project_has_been_successfully_created"
                   values={{
index d272fa225052db899a9d2ee22f823ca3f634ddc5..26fe9322eb7675fbfc1a37c9c02e81d9bf9baf75 100644 (file)
@@ -75,7 +75,7 @@ export default class DeleteModal extends React.PureComponent<Props, State> {
         if (this.mounted) {
           this.setState({ loading: false });
         }
-      }
+      },
     );
   };
 
@@ -84,7 +84,7 @@ export default class DeleteModal extends React.PureComponent<Props, State> {
       {this.props.selection.length
         ? translateWithParameters(
             'projects_management.delete_selected_warning',
-            this.props.selection.length
+            this.props.selection.length,
           )
         : translateWithParameters('projects_management.delete_all_warning', this.props.total)}
     </Alert>
index 73b876c80d708ff008a82b235db3fe0c3bd3fe56..3ec6239e1b448a40cd2fe9ef493cf9f360180d63 100644 (file)
@@ -144,7 +144,7 @@ class ProjectManagementApp extends React.PureComponent<Props, State> {
   onProvisionedChanged = (provisioned: boolean) => {
     this.setState(
       { ready: false, page: 1, query: '', provisioned, qualifiers: 'TRK', selection: [] },
-      this.requestProjects
+      this.requestProjects,
     );
   };
 
@@ -158,7 +158,7 @@ class ProjectManagementApp extends React.PureComponent<Props, State> {
         qualifiers: newQualifier,
         selection: [],
       },
-      this.requestProjects
+      this.requestProjects,
     );
   };
 
@@ -172,7 +172,7 @@ class ProjectManagementApp extends React.PureComponent<Props, State> {
         visibility: newVisibility === 'all' ? undefined : newVisibility,
         selection: [],
       },
-      this.requestProjects
+      this.requestProjects,
     );
   };
 
index ee64532c43e119ab740db21c23f7d8e2115bf7a1..3161bd87bd5468b8be43b7923174d95cbf543072 100644 (file)
@@ -58,7 +58,7 @@ export default class RestoreAccessModal extends React.PureComponent<Props, State
         if (this.mounted) {
           this.setState({ loading: false });
         }
-      }
+      },
     );
   };
 
index 6cbc90bcb765fa7c250cb6ccb1862b6cd6700c5a..4449078d6cc4310f82880e1a23264ab9c039da5a 100644 (file)
@@ -63,7 +63,7 @@ jest.mock('../../../api/navigation', () => ({
           canBrowseProject: canBrowseProjectResponse.users.length > 0,
           showPermissions: showPermissionsResponse.users.length > 0,
         },
-      })
+      }),
     );
   }),
 }));
@@ -230,7 +230,7 @@ it('should delete projects, but not Portfolios or Applications', async () => {
   await user.click(ui.deleteProjects.get());
   expect(ui.deleteDialog.get()).toBeInTheDocument();
   expect(
-    within(ui.deleteDialog.get()).getByText('projects_management.delete_selected_warning.2')
+    within(ui.deleteDialog.get()).getByText('projects_management.delete_selected_warning.2'),
   ).toBeInTheDocument();
   await user.click(ui.delete.get(ui.deleteDialog.get()));
   expect(ui.row.getAll()).toHaveLength(3);
@@ -239,7 +239,7 @@ it('should delete projects, but not Portfolios or Applications', async () => {
 it('should bulk apply permission templates to projects', async () => {
   const user = userEvent.setup();
   handler.setProjects(
-    Array.from({ length: 11 }, (_, i) => mockProject({ key: i.toString(), name: `Test ${i}` }))
+    Array.from({ length: 11 }, (_, i) => mockProject({ key: i.toString(), name: `Test ${i}` })),
   );
   renderProjectManagementApp();
 
@@ -253,13 +253,13 @@ it('should bulk apply permission templates to projects', async () => {
   expect(await ui.bulkApplyDialog.find()).toBeInTheDocument();
   expect(
     within(ui.bulkApplyDialog.get()).getByText(
-      'permission_templates.bulk_apply_permission_template.apply_to_selected.11'
-    )
+      'permission_templates.bulk_apply_permission_template.apply_to_selected.11',
+    ),
   ).toBeInTheDocument();
 
   await user.click(ui.apply.get(ui.bulkApplyDialog.get()));
   expect(
-    await screen.findByText('bulk apply permission template error message')
+    await screen.findByText('bulk apply permission template error message'),
   ).toBeInTheDocument();
   expect(ui.bulkApplyDialog.get()).toBeInTheDocument();
 
@@ -275,17 +275,17 @@ it('should bulk apply permission templates to projects', async () => {
   expect(await ui.bulkApplyDialog.find()).toBeInTheDocument();
   expect(
     within(ui.bulkApplyDialog.get()).getByText(
-      'permission_templates.bulk_apply_permission_template.apply_to_selected.2'
-    )
+      'permission_templates.bulk_apply_permission_template.apply_to_selected.2',
+    ),
   ).toBeInTheDocument();
   await selectEvent.select(
     ui.selectTemplate.get(ui.bulkApplyDialog.get()),
-    'Permission Template 2'
+    'Permission Template 2',
   );
   await user.click(ui.apply.get(ui.bulkApplyDialog.get()));
 
   expect(
-    await within(ui.bulkApplyDialog.get()).findByText('projects_role.apply_template.success')
+    await within(ui.bulkApplyDialog.get()).findByText('projects_role.apply_template.success'),
   ).toBeInTheDocument();
 });
 
@@ -297,21 +297,21 @@ it('should load more and change the filter without caching old pages', async ()
         key: ComponentQualifier.Project + i.toString(),
         name: `Project ${i}`,
         qualifier: ComponentQualifier.Project,
-      })
+      }),
     ),
     ...Array.from({ length: 60 }, (_, i) =>
       mockProject({
         key: ComponentQualifier.Portfolio + i.toString(),
         name: `Portfolio ${i}`,
         qualifier: ComponentQualifier.Portfolio,
-      })
+      }),
     ),
     ...Array.from({ length: 60 }, (_, i) =>
       mockProject({
         key: ComponentQualifier.Application + i.toString(),
         name: `Application ${i}`,
         qualifier: ComponentQualifier.Application,
-      })
+      }),
     ),
   ]);
   renderProjectManagementApp();
@@ -390,12 +390,12 @@ it('should apply template for single object', async () => {
   expect(ui.applyTemplateDialog.get()).toBeInTheDocument();
   await selectEvent.select(
     ui.selectTemplate.get(ui.applyTemplateDialog.get()),
-    'Permission Template 2'
+    'Permission Template 2',
   );
   await user.click(ui.apply.get(ui.applyTemplateDialog.get()));
 
   expect(
-    await within(ui.applyTemplateDialog.get()).findByText('projects_role.apply_template.success')
+    await within(ui.applyTemplateDialog.get()).findByText('projects_role.apply_template.success'),
   ).toBeInTheDocument();
 });
 
@@ -420,7 +420,7 @@ it('should restore access for github project', async () => {
   renderProjectManagementApp(
     {},
     { login: 'gooduser2', local: true },
-    { featureList: [Feature.GithubProvisioning] }
+    { featureList: [Feature.GithubProvisioning] },
   );
   await waitFor(() => expect(ui.row.getAll()).toHaveLength(5));
   const rows = ui.row.getAll();
@@ -442,7 +442,7 @@ it('should not allow to restore access on github project for GH user', async ()
   renderProjectManagementApp(
     {},
     { login: 'gooduser2', local: false },
-    { featureList: [Feature.GithubProvisioning] }
+    { featureList: [Feature.GithubProvisioning] },
   );
   await waitFor(() => expect(ui.row.getAll()).toHaveLength(5));
   const rows = ui.row.getAll();
@@ -502,7 +502,7 @@ it('should not show local badge if provisioning is not enabled', async () => {
 function renderProjectManagementApp(
   overrides: Partial<AppState> = {},
   user: Partial<LoggedInUser> = {},
-  context: Partial<RenderContext> = {}
+  context: Partial<RenderContext> = {},
 ) {
   login = user?.login ?? 'gooduser1';
   renderAppWithAdminContext('admin/projects_management', routes, {
index 93c76b35343d79946e676d718125ad93c61b8f2e..d00dd4a480a565dd81bb44eac8aaa2f3f05d12f6 100644 (file)
@@ -41,16 +41,19 @@ describe('getLocalizedMetricNameNoDiffMetric', () => {
   it('should return the correct corresponding metric', () => {
     expect(getLocalizedMetricNameNoDiffMetric(mockMetric(), {})).toBe('coverage');
     expect(getLocalizedMetricNameNoDiffMetric(mockMetric({ key: 'new_bugs' }), METRICS)).toBe(
-      'Bugs'
+      'Bugs',
     );
     expect(
       getLocalizedMetricNameNoDiffMetric(
         mockMetric({ key: 'new_custom_metric', name: 'Custom Metric on New Code' }),
-        METRICS
-      )
+        METRICS,
+      ),
     ).toBe('Custom Metric on New Code');
     expect(
-      getLocalizedMetricNameNoDiffMetric(mockMetric({ key: 'new_maintainability_rating' }), METRICS)
+      getLocalizedMetricNameNoDiffMetric(
+        mockMetric({ key: 'new_maintainability_rating' }),
+        METRICS,
+      ),
     ).toBe('Maintainability Rating');
   });
 });
@@ -83,7 +86,7 @@ describe('groupAndSortByPriorityConditions', () => {
 
     expect(result.newCodeConditions.map(conditionsMap)).toEqual(expectedConditionsOrderNewCode);
     expect(result.overallCodeConditions.map(conditionsMap)).toEqual(
-      expectConditionsOrderOverallCode
+      expectConditionsOrderOverallCode,
     );
   });
 });
index 3f4d681d753886f948472766ce8b977786bd7917..1e5ab66ce5a83343d25b5866c6e07d4e137f8e26 100644 (file)
@@ -88,7 +88,7 @@ class App extends React.PureComponent<Props, State> {
         if (this.mounted) {
           this.setState({ loading: false });
         }
-      }
+      },
     );
   };
 
@@ -120,7 +120,7 @@ class App extends React.PureComponent<Props, State> {
           defer={false}
           titleTemplate={translateWithParameters(
             'page_title.template.with_category',
-            translate('quality_gates.page')
+            translate('quality_gates.page'),
           )}
         />
         <div className="layout-page" id="quality-gates-page">
index 39debe2a6946d2490a105cc75c1a5bfec22f854b..2c3e8117c06629f9d03561ef1827b9a167c5cc17 100644 (file)
@@ -89,7 +89,7 @@ export class ConditionComponent extends React.PureComponent<Props, State> {
   removeCondition = (condition: ConditionType) => {
     deleteCondition({ id: condition.id }).then(
       () => this.props.onRemoveCondition(condition),
-      () => {}
+      () => {},
     );
   };
 
@@ -144,7 +144,7 @@ export class ConditionComponent extends React.PureComponent<Props, State> {
                   <EditButton
                     aria-label={translateWithParameters(
                       'quality_gates.condition.edit',
-                      metric.name
+                      metric.name,
                     )}
                     data-test="quality-gates__condition-update"
                     onClick={this.handleOpenUpdate}
@@ -169,7 +169,7 @@ export class ConditionComponent extends React.PureComponent<Props, State> {
                   <DeleteButton
                     aria-label={translateWithParameters(
                       'quality_gates.condition.delete',
-                      metric.name
+                      metric.name,
                     )}
                     data-test="quality-gates__condition-delete"
                     onClick={this.handleDeleteClick}
@@ -185,7 +185,7 @@ export class ConditionComponent extends React.PureComponent<Props, State> {
                     >
                       {translateWithParameters(
                         'quality_gates.delete_condition.confirm.message',
-                        getLocalizedMetricName(this.props.metric)
+                        getLocalizedMetricName(this.props.metric),
                       )}
                     </ConfirmModal>
                   )}
index 70a12743911b7f71a0ba265142ba29d1fed67b89..5865e74e5600f9995aa2016a285eb956851e057e 100644 (file)
@@ -146,7 +146,7 @@ export default class ConditionModal extends React.PureComponent<Props, State> {
             <MetricSelect
               metric={metric}
               metricsArray={metrics.filter((m) =>
-                scope === 'new' ? isDiffMetric(m.key) : !isDiffMetric(m.key)
+                scope === 'new' ? isDiffMetric(m.key) : !isDiffMetric(m.key),
               )}
               onMetricChange={this.handleMetricChange}
             />
index 216f1458d930d3ea53f6387930662b55f3de92ca..d584a8d94c0a5bba973680301dcda0ba47c67e38 100644 (file)
@@ -60,7 +60,7 @@ export default class CaycReviewUpdateConditionsModal extends React.PureComponent
               this.props.onSaveCondition(resultCondition, currentCondition);
             }
           })
-          .catch(() => undefined)
+          .catch(() => undefined),
       );
     });
 
@@ -71,7 +71,7 @@ export default class CaycReviewUpdateConditionsModal extends React.PureComponent
           gateName: qualityGate.name,
         })
           .then((resultCondition) => this.props.onAddCondition(resultCondition))
-          .catch(() => undefined)
+          .catch(() => undefined),
       );
     });
 
@@ -86,19 +86,19 @@ export default class CaycReviewUpdateConditionsModal extends React.PureComponent
     const { weakConditions, missingConditions } = getWeakMissingAndNonCaycConditions(conditions);
     const sortedWeakConditions = sortBy(
       weakConditions,
-      (condition) => metrics[condition.metric] && metrics[condition.metric].name
+      (condition) => metrics[condition.metric] && metrics[condition.metric].name,
     );
 
     const sortedMissingConditions = sortBy(
       missingConditions,
-      (condition) => metrics[condition.metric] && metrics[condition.metric].name
+      (condition) => metrics[condition.metric] && metrics[condition.metric].name,
     );
 
     return (
       <ConfirmModal
         header={translateWithParameters(
           'quality_gates.cayc.review_update_modal.header',
-          qualityGate.name
+          qualityGate.name,
         )}
         confirmButtonText={translate('quality_gates.cayc.review_update_modal.confirm_text')}
         onClose={this.props.onClose}
@@ -125,7 +125,7 @@ export default class CaycReviewUpdateConditionsModal extends React.PureComponent
               <h4 className="big-spacer-top spacer-bottom">
                 {translateWithParameters(
                   'quality_gates.cayc.review_update_modal.add_condition.header',
-                  sortedMissingConditions.length
+                  sortedMissingConditions.length,
                 )}
               </h4>
               <ConditionsTable
@@ -142,7 +142,7 @@ export default class CaycReviewUpdateConditionsModal extends React.PureComponent
               <h4 className="big-spacer-top spacer-bottom">
                 {translateWithParameters(
                   'quality_gates.cayc.review_update_modal.modify_condition.header',
-                  sortedWeakConditions.length
+                  sortedWeakConditions.length,
                 )}
               </h4>
               <ConditionsTable
index 6829c71fe9c435035c81f10c15ba49e56d693bee..73718281fe47724af7c508a3c3bf51a2ffb98d67 100644 (file)
@@ -52,7 +52,7 @@ function ConditionValueDescription({
 }: Props) {
   if (condition.metric === 'new_maintainability_rating') {
     const maintainabilityGrid = getMaintainabilityGrid(
-      settings[GlobalSettingKeys.RatingGrid] ?? ''
+      settings[GlobalSettingKeys.RatingGrid] ?? '',
     );
     const maintainabilityRatingThreshold =
       maintainabilityGrid[Math.floor(Number(condition.error)) - GRID_INDEX_OFFSET];
@@ -64,12 +64,12 @@ function ConditionValueDescription({
         {condition.error === '1'
           ? translateWithParameters(
               'quality_gates.cayc.new_maintainability_rating.A',
-              formatMeasure(maintainabilityGrid[0] * PERCENT_MULTIPLIER, 'PERCENT')
+              formatMeasure(maintainabilityGrid[0] * PERCENT_MULTIPLIER, 'PERCENT'),
             )
           : translateWithParameters(
               'quality_gates.cayc.new_maintainability_rating',
               ratingLetter,
-              formatMeasure(maintainabilityRatingThreshold * PERCENT_MULTIPLIER, 'PERCENT')
+              formatMeasure(maintainabilityRatingThreshold * PERCENT_MULTIPLIER, 'PERCENT'),
             )}
         )
       </span>
@@ -82,7 +82,7 @@ function ConditionValueDescription({
         <>
           (
           {translate(
-            `quality_gates.cayc.${condition.metric}.${formatMeasure(condition.error, metric.type)}`
+            `quality_gates.cayc.${condition.metric}.${formatMeasure(condition.error, metric.type)}`,
           )}
           )
         </>
index f5327e6480fc3b1b78bbe3e176d80a97d8a12b3d..d4b4895b5d33bd26e72faacec93994bffaeb3950 100644 (file)
@@ -96,10 +96,10 @@ export class Conditions extends React.PureComponent<Props, State> {
         (metric) =>
           !metric.hidden &&
           !FORBIDDEN_METRIC_TYPES.includes(metric.type) &&
-          !FORBIDDEN_METRICS.includes(metric.key)
+          !FORBIDDEN_METRICS.includes(metric.key),
       ),
       conditions,
-      (metric, condition) => metric.key === condition.metric
+      (metric, condition) => metric.key === condition.metric,
     );
     return (
       <ConditionModal
@@ -142,14 +142,14 @@ export class Conditions extends React.PureComponent<Props, State> {
     const existingConditions = conditions.filter((condition) => metrics[condition.metric]);
     const { overallCodeConditions, newCodeConditions } = groupAndSortByPriorityConditions(
       existingConditions,
-      metrics
+      metrics,
     );
 
     const duplicates: ConditionType[] = [];
     const savedConditions = existingConditions.filter((condition) => condition.id != null);
     savedConditions.forEach((condition) => {
       const sameCount = savedConditions.filter(
-        (sample) => sample.metric === condition.metric
+        (sample) => sample.metric === condition.metric,
       ).length;
       if (sameCount > 1) {
         duplicates.push(condition);
index af99b17405481c8ad53ec809ecfe73ccb28e0860..b58782e863438b8ad2ee33675a626f0abb505e7e 100644 (file)
@@ -51,7 +51,7 @@ export class DeleteQualityGateForm extends React.PureComponent<Props> {
         isDestructive
         modalBody={translateWithParameters(
           'quality_gates.delete.confirm.message',
-          qualityGate.name
+          qualityGate.name,
         )}
         modalHeader={translate('quality_gates.delete')}
         onConfirm={this.onDelete}
index ebbfcd3de91c8e0e3a2005e8de9d1ae7abf8ef43..ac614d3f48f26f327be36147d589ee0005689660 100644 (file)
@@ -75,7 +75,7 @@ export default class Details extends React.PureComponent<Props, State> {
         if (this.mounted) {
           this.setState({ loading: false });
         }
-      }
+      },
     );
   };
 
index 20ff6b285363ff3c87ba12796c21938ef6585eb4..4aff608825cf653f35a47f053a73daebd2b19be6 100644 (file)
@@ -45,7 +45,7 @@ export default class DetailsHeader extends React.PureComponent<Props> {
     const { refreshItem, refreshList } = this.props;
     return Promise.all([refreshItem(), refreshList()]).then(
       () => {},
-      () => {}
+      () => {},
     );
   };
 
@@ -56,7 +56,7 @@ export default class DetailsHeader extends React.PureComponent<Props> {
       this.props.onSetDefault();
       setQualityGateAsDefault({ name: qualityGate.name }).then(
         this.handleActionRefresh,
-        this.handleActionRefresh
+        this.handleActionRefresh,
       );
     }
   };
index 9b89ba07fbde8771617cfe30422edad55f1eea69..4ec8188e8d73aa393e7f44fb56ea059307a1399e 100644 (file)
@@ -58,7 +58,7 @@ export class MetricSelect extends React.PureComponent<Props> {
         label: getLocalizedMetricNameNoDiffMetric(m, metrics),
         domain: m.domain,
       })),
-      'domain'
+      'domain',
     );
 
     // Use "disabled" property to emulate optgroups.
index d5dfb77954e06483826ec3ccea011d14eeebb27e..c4cbfa9688ab3f408019e8a8fcdc24608c17fc68 100644 (file)
@@ -40,7 +40,7 @@ export interface QualityGatePermissionsAddModalRendererProps {
 }
 
 export default function QualityGatePermissionsAddModalRenderer(
-  props: QualityGatePermissionsAddModalRendererProps
+  props: QualityGatePermissionsAddModalRendererProps,
 ) {
   const { selection, submitting } = props;
 
index c786418b0104a39468b483258793eb6cd1c6f059..1cb05d54ce46f6ca5e23c147cb9790dcbb015148 100644 (file)
@@ -39,7 +39,10 @@ it('should open the default quality gates', async () => {
 
   const defaultQualityGate = handler.getDefaultQualityGate();
   expect(
-    await screen.findByRole('link', { current: 'page', name: `${defaultQualityGate.name} default` })
+    await screen.findByRole('link', {
+      current: 'page',
+      name: `${defaultQualityGate.name} default`,
+    }),
   ).toBeInTheDocument();
 });
 
@@ -49,13 +52,13 @@ it('should list all quality gates', async () => {
   expect(
     await screen.findByRole('link', {
       name: `${handler.getDefaultQualityGate().name} default`,
-    })
+    }),
   ).toBeInTheDocument();
 
   expect(
     screen.getByRole('link', {
       name: `${handler.getBuiltInQualityGate().name} quality_gates.built_in`,
-    })
+    }),
   ).toBeInTheDocument();
 });
 
@@ -223,7 +226,7 @@ it('should be able to add a condition', async () => {
   await user.click(dialog.getByRole('button', { name: 'quality_gates.add_condition' }));
 
   expect(
-    await overallConditions.findByRole('cell', { name: 'Maintainability Rating' })
+    await overallConditions.findByRole('cell', { name: 'Maintainability Rating' }),
   ).toBeInTheDocument();
   expect(await overallConditions.findByRole('cell', { name: 'B' })).toBeInTheDocument();
 });
@@ -236,7 +239,7 @@ it('should be able to edit a condition', async () => {
   const newConditions = within(await screen.findByTestId('quality-gates__conditions-new'));
 
   await user.click(
-    newConditions.getByLabelText('quality_gates.condition.edit.Coverage on New Code')
+    newConditions.getByLabelText('quality_gates.condition.edit.Coverage on New Code'),
   );
   const dialog = within(screen.getByRole('dialog'));
   await user.click(dialog.getByRole('textbox', { name: 'quality_gates.conditions.value' }));
@@ -253,12 +256,12 @@ it('should be able to handle duplicate or deprecated condition', async () => {
 
   await user.click(
     // make it a regexp to ignore badges:
-    await screen.findByRole('link', { name: new RegExp(handler.getCorruptedQualityGateName()) })
+    await screen.findByRole('link', { name: new RegExp(handler.getCorruptedQualityGateName()) }),
   );
 
   expect(await screen.findByText('quality_gates.duplicated_conditions')).toBeInTheDocument();
   expect(
-    await screen.findByRole('cell', { name: 'Complexity / Function deprecated' })
+    await screen.findByRole('cell', { name: 'Complexity / Function deprecated' }),
   ).toBeInTheDocument();
 });
 
@@ -271,7 +274,7 @@ it('should be able to handle delete condition', async () => {
   const newConditions = within(await screen.findByTestId('quality-gates__conditions-new'));
 
   await user.click(
-    newConditions.getByLabelText('quality_gates.condition.delete.Coverage on New Code')
+    newConditions.getByLabelText('quality_gates.condition.delete.Coverage on New Code'),
   );
 
   const dialog = within(screen.getByRole('dialog'));
@@ -286,10 +289,10 @@ it('should explain condition on branch', async () => {
   renderQualityGateApp({ featureList: [Feature.BranchSupport] });
 
   expect(
-    await screen.findByText('quality_gates.conditions.new_code.description')
+    await screen.findByText('quality_gates.conditions.new_code.description'),
   ).toBeInTheDocument();
   expect(
-    await screen.findByText('quality_gates.conditions.overall_code.description')
+    await screen.findByText('quality_gates.conditions.overall_code.description'),
   ).toBeInTheDocument();
 });
 
@@ -305,29 +308,29 @@ it('should show warning banner when CAYC condition is not properly set and shoul
   expect(screen.getByText('quality_gates.cayc_missing.banner.title')).toBeInTheDocument();
   expect(screen.getByText('quality_gates.cayc_missing.banner.description')).toBeInTheDocument();
   expect(
-    screen.getByRole('button', { name: 'quality_gates.cayc_condition.review_update' })
+    screen.getByRole('button', { name: 'quality_gates.cayc_condition.review_update' }),
   ).toBeInTheDocument();
 
   await user.click(
-    screen.getByRole('button', { name: 'quality_gates.cayc_condition.review_update' })
+    screen.getByRole('button', { name: 'quality_gates.cayc_condition.review_update' }),
   );
   expect(
     screen.getByRole('dialog', {
       name: 'quality_gates.cayc.review_update_modal.header.SonarSource way - CFamily',
-    })
+    }),
   ).toBeInTheDocument();
   expect(
-    screen.getByText('quality_gates.cayc.review_update_modal.description1')
+    screen.getByText('quality_gates.cayc.review_update_modal.description1'),
   ).toBeInTheDocument();
   expect(
-    screen.getByText('quality_gates.cayc.review_update_modal.description2')
+    screen.getByText('quality_gates.cayc.review_update_modal.description2'),
   ).toBeInTheDocument();
   expect(
-    screen.getByRole('button', { name: 'quality_gates.cayc.review_update_modal.confirm_text' })
+    screen.getByRole('button', { name: 'quality_gates.cayc.review_update_modal.confirm_text' }),
   ).toBeInTheDocument();
 
   await user.click(
-    screen.getByRole('button', { name: 'quality_gates.cayc.review_update_modal.confirm_text' })
+    screen.getByRole('button', { name: 'quality_gates.cayc.review_update_modal.confirm_text' }),
   );
 
   const conditionsWrapper = within(await screen.findByTestId('quality-gates__conditions-new'));
@@ -339,7 +342,7 @@ it('should show warning banner when CAYC condition is not properly set and shoul
   expect(conditionsWrapper.getByText('Duplicated Lines (%)')).toBeInTheDocument();
 
   const overallConditionsWrapper = within(
-    await screen.findByTestId('quality-gates__conditions-overall')
+    await screen.findByTestId('quality-gates__conditions-overall'),
   );
   expect(overallConditionsWrapper.getByText('Complexity / Function')).toBeInTheDocument();
 });
@@ -366,7 +369,7 @@ it('should warn user when quality gate is not CAYC compliant and user has permis
   await user.click(nonCompliantQualityGate);
 
   expect(await screen.findByRole('alert')).toHaveTextContent(
-    /quality_gates.cayc_missing.banner.title/
+    /quality_gates.cayc_missing.banner.title/,
   );
   expect(screen.getAllByText('quality_gates.cayc.tooltip.message').length).toBeGreaterThan(0);
 });
@@ -382,13 +385,13 @@ it('should show success banner when quality gate is CAYC compliant', async () =>
 
   expect(screen.getByText('quality_gates.cayc.banner.title')).toBeInTheDocument();
   expect(
-    screen.getByText('quality_gates.cayc.banner.description1', { exact: false })
+    screen.getByText('quality_gates.cayc.banner.description1', { exact: false }),
   ).toBeInTheDocument();
   expect(
-    screen.queryByText('quality_gates.cayc_condition.missing_warning.title')
+    screen.queryByText('quality_gates.cayc_condition.missing_warning.title'),
   ).not.toBeInTheDocument();
   expect(
-    screen.queryByRole('button', { name: 'quality_gates.cayc_condition.review_update' })
+    screen.queryByRole('button', { name: 'quality_gates.cayc_condition.review_update' }),
   ).not.toBeInTheDocument();
 
   const conditionsWrapper = within(await screen.findByTestId('quality-gates__conditions-new'));
@@ -412,22 +415,24 @@ it('should unlock editing option for CAYC conditions', async () => {
   expect(
     screen.queryByRole('button', {
       name: 'quality_gates.condition.edit.Security Rating on New Code',
-    })
+    }),
   ).not.toBeInTheDocument();
   expect(
     screen.queryByRole('button', {
       name: 'quality_gates.condition.delete.Security Rating on New Code',
-    })
+    }),
   ).not.toBeInTheDocument();
 
   await user.click(screen.getByText('quality_gates.cayc.unlock_edit'));
   expect(
-    screen.getByRole('button', { name: 'quality_gates.condition.edit.Security Rating on New Code' })
+    screen.getByRole('button', {
+      name: 'quality_gates.condition.edit.Security Rating on New Code',
+    }),
   ).toBeInTheDocument();
   expect(
     screen.getByRole('button', {
       name: 'quality_gates.condition.delete.Security Rating on New Code',
-    })
+    }),
   ).toBeInTheDocument();
 });
 
@@ -528,7 +533,7 @@ describe('The Permissions section', () => {
     expect(
       await screen.findByRole('link', {
         name: `${handler.getDefaultQualityGate().name} default`,
-      })
+      }),
     ).toBeInTheDocument();
 
     expect(screen.queryByText('quality_gates.permissions')).not.toBeInTheDocument();
index df0f6dd6c6eee809bc979bc5b95e30960d5bad15..cc36f6a0b0f53b31ce095c2ca9c93bb948e40cc1 100644 (file)
@@ -132,13 +132,13 @@ export function groupConditionsByMetric(conditions: Condition[]): GroupedByMetri
     {
       overallCodeConditions: [] as Condition[],
       newCodeConditions: [] as Condition[],
-    }
+    },
   );
 }
 
 export function groupAndSortByPriorityConditions(
   conditions: Condition[],
-  metrics: Dict<Metric>
+  metrics: Dict<Metric>,
 ): GroupedByMetricConditions {
   const groupedConditions = groupConditionsByMetric(conditions);
 
@@ -192,7 +192,7 @@ export function deleteCondition(qualityGate: QualityGate, condition: Condition):
 export function replaceCondition(
   qualityGate: QualityGate,
   newCondition: Condition,
-  oldCondition: Condition
+  oldCondition: Condition,
 ): QualityGate {
   const conditions =
     qualityGate.conditions &&
index 8898e911e56822c51ce8dc3fa0238d14ed212fa1..39f2ab60075e30ac7d0e428ff2454d59edf67471 100644 (file)
@@ -107,7 +107,7 @@ describe('Admin or user with permission', () => {
       await user.click(
         ui.permissionSection
           .byRole('button', { name: 'quality_profiles.permissions.remove.user_x.Buzz' })
-          .get()
+          .get(),
       );
       expect(ui.dialog.get()).toBeInTheDocument();
       await user.click(ui.removeButton.get());
@@ -133,7 +133,7 @@ describe('Admin or user with permission', () => {
       await user.click(
         ui.permissionSection
           .byRole('button', { name: 'quality_profiles.permissions.remove.group_x.ACDC' })
-          .get()
+          .get(),
       );
       expect(ui.dialog.get()).toBeInTheDocument();
       await user.click(ui.removeButton.get());
@@ -188,7 +188,7 @@ describe('Admin or user with permission', () => {
       renderQualityProfile('sonar');
       expect(await ui.projectSection.find()).toBeInTheDocument();
       expect(
-        await ui.projectSection.byText('quality_profiles.projects_for_default').get()
+        await ui.projectSection.byText('quality_profiles.projects_for_default').get(),
       ).toBeInTheDocument();
     });
   });
@@ -202,7 +202,7 @@ describe('Admin or user with permission', () => {
       expect(ui.activateMoreLink.get()).toBeInTheDocument();
       expect(ui.activateMoreLink.get()).toHaveAttribute(
         'href',
-        '/coding_rules?qprofile=old-php-qp&activation=false'
+        '/coding_rules?qprofile=old-php-qp&activation=false',
       );
     });
 
@@ -257,7 +257,7 @@ describe('Admin or user with permission', () => {
       expect(ui.activateMoreRulesLink.get()).toBeInTheDocument();
       expect(ui.activateMoreRulesLink.get()).toHaveAttribute(
         'href',
-        '/coding_rules?qprofile=old-php-qp&activation=false'
+        '/coding_rules?qprofile=old-php-qp&activation=false',
       );
     });
 
@@ -356,7 +356,7 @@ describe('Admin or user with permission', () => {
       expect(
         ui.dialog
           .byText(/quality_profiles.are_you_sure_want_delete_profile_x_and_descendants/)
-          .get()
+          .get(),
       ).toBeInTheDocument();
       await act(async () => {
         await user.click(ui.dialog.byRole('button', { name: 'delete' }).get());
@@ -430,7 +430,7 @@ describe('Every Users', () => {
     expect(ui.rulesMissingSonarWayLink.get()).toBeInTheDocument();
     expect(ui.rulesMissingSonarWayLink.get()).toHaveAttribute(
       'href',
-      '/coding_rules?qprofile=old-php-qp&activation=false&languages=php'
+      '/coding_rules?qprofile=old-php-qp&activation=false&languages=php',
     );
   });
 
@@ -441,7 +441,7 @@ describe('Every Users', () => {
     expect(ui.rulesDeprecatedLink.get()).toBeInTheDocument();
     expect(ui.rulesDeprecatedLink.get()).toHaveAttribute(
       'href',
-      '/coding_rules?qprofile=old-php-qp&activation=true&statuses=DEPRECATED'
+      '/coding_rules?qprofile=old-php-qp&activation=true&statuses=DEPRECATED',
     );
   });
 
@@ -467,7 +467,7 @@ describe('Every Users', () => {
     await user.click(await ui.qualityProfileActions.find());
     expect(ui.backUpLink.get()).toHaveAttribute(
       'href',
-      '/api/qualityprofiles/backup?language=php&qualityProfile=Good%20old%20PHP%20quality%20profile'
+      '/api/qualityprofiles/backup?language=php&qualityProfile=Good%20old%20PHP%20quality%20profile',
     );
     expect(ui.backUpLink.get()).toHaveAttribute('download', 'old-php-qp.xml');
   });
@@ -489,7 +489,7 @@ describe('Every Users', () => {
     expect(ui.compareLink.get()).toBeInTheDocument();
     expect(ui.compareLink.get()).toHaveAttribute(
       'href',
-      '/profiles/compare?language=php&name=Good+old+PHP+quality+profile'
+      '/profiles/compare?language=php&name=Good+old+PHP+quality+profile',
     );
   });
 });
index 2366e789002d335c50184be359fc679d80d319bf..8c5a30d4cd97f230a1e3e30fd3627815fd8eb2a3 100644 (file)
@@ -128,10 +128,10 @@ describe('Evolution', () => {
 
     expect(await ui.deprecatedRulesRegion.find()).toBeInTheDocument();
     expect(
-      ui.deprecatedRulesRegion.byRole('link', { name: 'Good old PHP quality profile' }).get()
+      ui.deprecatedRulesRegion.byRole('link', { name: 'Good old PHP quality profile' }).get(),
     ).toBeInTheDocument();
     expect(
-      ui.deprecatedRulesRegion.byRole('link', { name: 'java quality profile #2' }).get()
+      ui.deprecatedRulesRegion.byRole('link', { name: 'java quality profile #2' }).get(),
     ).toBeInTheDocument();
   });
 
@@ -141,7 +141,7 @@ describe('Evolution', () => {
 
     expect(await ui.stagnantProfilesRegion.find()).toBeInTheDocument();
     expect(
-      ui.stagnantProfilesRegion.byRole('link', { name: 'Good old PHP quality profile' }).get()
+      ui.stagnantProfilesRegion.byRole('link', { name: 'Good old PHP quality profile' }).get(),
     ).toBeInTheDocument();
   });
 
index 3d68232d5e36937c85e8d88a0a996f12b6c49460..f5c9c7fac3d1045f349d35bdfcd467599f464719 100644 (file)
@@ -38,7 +38,7 @@ export default function Changelog(props: Props) {
     props.events,
     // sort events by date, rounded to a minute, recent events first
     (e) => -Number(parseDate(e.date)),
-    (e) => e.action
+    (e) => e.action,
   );
 
   const rows = sortedRows.map((event, index) => {
index 53788d0f20f4fd94428522b0936662e976d2ff52..b289c2c799d8d8ec97aed7fd9a86592e8d4cbc95 100644 (file)
@@ -31,7 +31,7 @@ export default function ParameterChange({ name, value }: Props) {
       {value == null
         ? translateWithParameters(
             'quality_profiles.changelog.parameter_reset_to_default_value',
-            name
+            name,
           )
         : translateWithParameters('quality_profiles.parameter_set_to', name, value)}
     </div>
index 19a0cc1d80201c0d27b34344f7b6e830176d0485..7af855cbbfbbd51776cb5dd37f3db54d3bd3b534 100644 (file)
@@ -64,7 +64,7 @@ it('should see the changelog', async () => {
   expect(rows[1]).not.toHaveTextContent('quality_profiles.severity');
   expect(rows[2]).toHaveTextContent('April 23, 2019');
   expect(rows[2]).toHaveTextContent(
-    'Systemquality_profiles.changelog.DEACTIVATEDRule 0quality_profiles.severity_set_to severity.MAJOR'
+    'Systemquality_profiles.changelog.DEACTIVATEDRule 0quality_profiles.severity_set_to severity.MAJOR',
   );
   expect(rows[3]).not.toHaveTextContent('April 23, 2019');
   expect(rows[3]).not.toHaveTextContent('Systemquality_profiles.changelog.DEACTIVATED');
@@ -74,7 +74,7 @@ it('should see the changelog', async () => {
   expect(rows[5]).toHaveTextContent('March 23, 2019');
   expect(rows[5]).toHaveTextContent('John Doequality_profiles.changelog.ACTIVATEDRule 2');
   expect(rows[5]).toHaveTextContent(
-    'quality_profiles.severity_set_to severity.CRITICALquality_profiles.parameter_set_to.credentialWords.foo,bar'
+    'quality_profiles.severity_set_to severity.CRITICALquality_profiles.parameter_set_to.credentialWords.foo,bar',
   );
   await user.click(ui.link.get(rows[1]));
   expect(screen.getByText('/coding_rules?rule_key=c%3Arule0')).toBeInTheDocument();
@@ -103,7 +103,7 @@ it('should load more', async () => {
     mockQualityProfileChangelogEvent({
       ruleKey: `c:rule${i}`,
       ruleName: `Rule ${i}`,
-    })
+    }),
   );
   renderChangeLog();
 
@@ -122,7 +122,7 @@ it('should see short changelog for php', async () => {
   expect(rows).toHaveLength(2);
   expect(rows[1]).toHaveTextContent('May 23, 2019');
   expect(rows[1]).toHaveTextContent(
-    'Systemquality_profiles.changelog.DEACTIVATEDPHP Rulequality_profiles.severity_set_to severity.MAJOR'
+    'Systemquality_profiles.changelog.DEACTIVATEDPHP Rulequality_profiles.severity_set_to severity.MAJOR',
   );
   expect(ui.showMore.query()).not.toBeInTheDocument();
 });
index 3703109b492c250302cb37c131740bafcfd98fbb..77103a126f4143390e47e6e740fcff9f752cb816 100644 (file)
@@ -73,7 +73,7 @@ class ComparisonContainer extends React.PureComponent<Props, State> {
         if (this.mounted) {
           this.setState({ loading: false });
         }
-      }
+      },
     );
   };
 
@@ -81,7 +81,7 @@ class ComparisonContainer extends React.PureComponent<Props, State> {
     const path = getProfileComparePath(
       this.props.profile.name,
       this.props.profile.language,
-      withKey
+      withKey,
     );
     this.props.router.push(path);
   };
index 0dfe95efa0a94f1191274d242c214e4f45c6cbe4..38b80eec7ac48314e6b2d8d3f20ab24fcf4b9029 100644 (file)
@@ -43,7 +43,7 @@ export default class ComparisonForm extends React.PureComponent<Props> {
 
   optionRenderer(
     options: Option[],
-    props: OptionProps<Omit<Option, 'label' | 'isDefault'>, false>
+    props: OptionProps<Omit<Option, 'label' | 'isDefault'>, false>,
   ) {
     const { data } = props;
     return <components.Option {...props}>{renderValue(data, options)}</components.Option>;
@@ -51,7 +51,7 @@ export default class ComparisonForm extends React.PureComponent<Props> {
 
   singleValueRenderer = (
     options: Option[],
-    props: SingleValueProps<Omit<Option, 'label' | 'isDefault'>, false>
+    props: SingleValueProps<Omit<Option, 'label' | 'isDefault'>, false>,
   ) => (
     <components.SingleValue {...props}>{renderValue(props.data, options)}</components.SingleValue>
   );
index 94fbb4e40534eb0e5bfc23fad832600a6fb86fae..f7c559ba0e0f9e735f2ca71f0b0aa1478e62ddaa 100644 (file)
@@ -62,7 +62,7 @@ export default class ComparisonResultActivation extends React.PureComponent<Prop
         if (this.mounted) {
           this.setState({ state: 'closed' });
         }
-      }
+      },
     );
   };
 
@@ -83,14 +83,14 @@ export default class ComparisonResultActivation extends React.PureComponent<Prop
           placement="bottom"
           overlay={translateWithParameters(
             'quality_profiles.comparison.activate_rule',
-            profile.name
+            profile.name,
           )}
         >
           <Button
             disabled={this.state.state !== 'closed'}
             aria-label={translateWithParameters(
               'quality_profiles.comparison.activate_rule',
-              profile.name
+              profile.name,
             )}
             onClick={this.handleButtonClick}
           >
index 9b3c925f815389edd84845751a3f5405dfb18f15..47cf7d8e741136aa2d818b4639ca0e5461e54b64 100644 (file)
@@ -84,7 +84,7 @@ export default class ComparisonResults extends React.PureComponent<Props> {
             <th>
               {translateWithParameters(
                 'quality_profiles.x_rules_only_in',
-                this.props.inLeft.length
+                this.props.inLeft.length,
               )}{' '}
               {this.props.left.name}
             </th>
@@ -133,7 +133,7 @@ export default class ComparisonResults extends React.PureComponent<Props> {
             <th>
               {translateWithParameters(
                 'quality_profiles.x_rules_only_in',
-                this.props.inRight.length
+                this.props.inRight.length,
               )}{' '}
               {this.props.right.name}
             </th>
@@ -171,7 +171,7 @@ export default class ComparisonResults extends React.PureComponent<Props> {
         <caption>
           {translateWithParameters(
             'quality_profiles.x_rules_have_different_configuration',
-            this.props.modified.length
+            this.props.modified.length,
           )}
         </caption>
         <thead>
index fce12b5b54dce4ec2d9b3aa43bde1620f0eefc4a..6c382520b6186093d18d6c5f5b82a2aea2a789f7 100644 (file)
@@ -49,7 +49,7 @@ export default function DeleteProfileForm(props: DeleteProfileFormProps) {
                 {translateWithParameters(
                   'quality_profiles.are_you_sure_want_delete_profile_x_and_descendants',
                   profile.name,
-                  profile.languageName
+                  profile.languageName,
                 )}
               </p>
             </div>
@@ -58,7 +58,7 @@ export default function DeleteProfileForm(props: DeleteProfileFormProps) {
               {translateWithParameters(
                 'quality_profiles.are_you_sure_want_delete_profile_x',
                 profile.name,
-                profile.languageName
+                profile.languageName,
               )}
             </p>
           )}
index c57b616297772ae3ac8aada900de04e3f35bfbc7..3f6553d3f49295d30168d6fee99ac132f35acf18 100644 (file)
@@ -166,7 +166,7 @@ class ProfileActions extends React.PureComponent<Props, State> {
         },
         () => {
           /* noop */
-        }
+        },
       );
     }
   };
@@ -206,7 +206,7 @@ class ProfileActions extends React.PureComponent<Props, State> {
           label={translateWithParameters(
             'quality_profiles.actions',
             profile.name,
-            profile.languageName
+            profile.languageName,
           )}
           disabled={!hasAnyAction}
         >
@@ -244,7 +244,7 @@ class ProfileActions extends React.PureComponent<Props, State> {
                 tooltipPlacement="left"
                 tooltipOverlay={translateWithParameters(
                   'quality_profiles.extend_help',
-                  profile.name
+                  profile.name,
                 )}
                 className="it__quality-profiles__extend"
                 onClick={this.handleExtendClick}
index 77ac4b8d8453133361305267693a0d6b48682903..ae317a7a70b62250202ca17ff65d50b6cd585929 100644 (file)
@@ -64,7 +64,7 @@ export default function ProfileContainer() {
         title={profile.name}
         titleTemplate={translateWithParameters(
           'page_title.template.with_category',
-          translate('quality_profiles.page')
+          translate('quality_profiles.page'),
         )}
       />
       <ProfileHeader
index d3018889a02217b4bf0ab93d09f8c8ca593b2f4e..3f7d208399b6e39d45b9e956bcbc5adbf6b94bac 100644 (file)
@@ -75,7 +75,7 @@ export class QualityProfilesApp extends React.PureComponent<Props, State> {
         if (this.mounted) {
           this.setState({ loading: false });
         }
-      }
+      },
     );
   }
 
index b771e089918a949736f988f943fe0b0dad00f8c2..eb1143a57e3b4bb163e3d4e0ffa34a86211264bd 100644 (file)
@@ -93,6 +93,6 @@ function renderProfileContainer(path: string, overrides: Partial<QualityProfiles
           </Route>
         </Routes>
       </MemoryRouter>
-    </HelmetProvider>
+    </HelmetProvider>,
   );
 }
index 7d94276d0334d513fb26b9da10614b776bd6840a..d622f6ce9de064fc381230fc2ea0918689b58030 100644 (file)
@@ -61,7 +61,7 @@ export default function ProfileHeader(props: Props) {
             isChangeLogPage
               ? 'quality_profiles.page_title_changelog_x'
               : 'quality_profiles.page_title_compare_x',
-            profile.name
+            profile.name,
           )}
         />
       )}
@@ -137,7 +137,7 @@ export default function ProfileHeader(props: Props) {
                     className="little-spacer-left"
                     overlay={translateWithParameters(
                       'quality_profiles.extend_description_help',
-                      profile.parentName
+                      profile.parentName,
                     )}
                   />
                 </>
index c8f0b62b6b672855e9557f19462305f5bc54f0cd..d3f8f987abd53b7ab3dfc625b157f7c1abe5e6f2 100644 (file)
@@ -83,7 +83,7 @@ export default class ProfileInheritance extends React.PureComponent<Props, State
         if (this.mounted) {
           this.setState({ loading: false });
         }
-      }
+      },
     );
   }
 
@@ -100,7 +100,7 @@ export default class ProfileInheritance extends React.PureComponent<Props, State
       () => {
         this.loadData();
       },
-      () => {}
+      () => {},
     );
     this.closeForm();
   };
index ab825d0d1d3c24d04df38235d0185554a25925f6..877b9106f5e8ec6ed731e426262f71430f64052d 100644 (file)
@@ -75,7 +75,7 @@ export default function ProfileInheritanceBox(props: Props) {
           <p>
             {translateWithParameters(
               'quality_profiles.x_overridden_rules',
-              profile.overridingRuleCount
+              profile.overridingRuleCount,
             )}
           </p>
         )}
index 00d35805c0d1835ef4b4669f602ed425f34a332d..527b0bc9b04921fd0d6979d6c1073d4520a81433 100644 (file)
@@ -88,7 +88,7 @@ export default class ProfilePermissions extends React.PureComponent<Props, State
         if (this.mounted) {
           this.setState({ loading: false });
         }
-      }
+      },
     );
   }
 
index 3b9cf80c7de4f51850790dcb9a5984d15cbf6da0..9f8f8c709661f6523046a46071dd8c6dfdbcc512 100644 (file)
@@ -105,7 +105,7 @@ export default class ProfilePermissionsGroup extends React.PureComponent<Props,
         <DeleteButton
           aria-label={translateWithParameters(
             'quality_profiles.permissions.remove.group_x',
-            group.name
+            group.name,
           )}
           className="pull-right spacer-top spacer-left spacer-right button-small"
           onClick={this.handleDeleteClick}
index c12f76e8b4cc1d1bfe712a06b8516b312be1e16c..c3fd75e91378d80f34783998448004ae05ebad15 100644 (file)
@@ -109,7 +109,7 @@ export default class ProfilePermissionsUser extends React.PureComponent<Props, S
         <DeleteButton
           aria-label={translateWithParameters(
             'quality_profiles.permissions.remove.user_x',
-            user.name
+            user.name,
           )}
           className="pull-right spacer-top spacer-left spacer-right button-small"
           onClick={this.handleDeleteClick}
index 18f521e76a497629b22bcbc0431da818248fd5bc..4e8b31886f2de6be977d4298a6d2d0b4e56720ab 100644 (file)
@@ -60,11 +60,11 @@ export default class ProfileRules extends React.PureComponent<Props, State> {
     activatedTotal: null,
     activatedByType: keyBy(
       TYPES.map((t) => ({ val: t, count: null })),
-      'val'
+      'val',
     ),
     allByType: keyBy(
       TYPES.map((t) => ({ val: t, count: null })),
-      'val'
+      'val',
     ),
     compareToSonarWay: null,
     total: null,
@@ -125,7 +125,7 @@ export default class ProfileRules extends React.PureComponent<Props, State> {
             total: allRules.paging.total,
           });
         }
-      }
+      },
     );
   }
 
index 830c1a83113534f1167c1a3fea411f20b3f8642d..4370e6a382b107e713f0ac995db1210547be9c11 100644 (file)
@@ -94,7 +94,7 @@ export default class CreateProfileForm extends React.PureComponent<Props, State>
         if (this.mounted) {
           this.setState({ preloading: false });
         }
-      }
+      },
     );
   }
 
@@ -279,7 +279,7 @@ export default class CreateProfileForm extends React.PureComponent<Props, State>
                   label={translate(
                     action === ProfileActionModals.Copy
                       ? 'quality_profiles.creation.choose_copy_quality_profile'
-                      : 'quality_profiles.creation.choose_parent_quality_profile'
+                      : 'quality_profiles.creation.choose_parent_quality_profile',
                   )}
                   required
                   isInvalid={isValidProflie !== undefined && !isValidProflie}
index c3f583f44b393e2268660088fa66b4b3e8880fd2..5f03e1365d804df9b4c6e9bcbcb6e0130b2de3b9 100644 (file)
@@ -48,7 +48,7 @@ export default class EvolutionDeprecated extends React.PureComponent<Props> {
       if (parentProfile) {
         const parentRules = this.getDeprecatedRulesInheritanceChain(
           parentProfile,
-          profilesWithDeprecations
+          profilesWithDeprecations,
         );
         if (parentRules.length) {
           count -= parentRules.reduce((n, rule) => n + rule.count, 0);
@@ -83,7 +83,7 @@ export default class EvolutionDeprecated extends React.PureComponent<Props> {
                 {translateWithParameters(
                   'coding_rules.filters.inheritance.x_inherited_from_y',
                   rule.count,
-                  rule.from.name
+                  rule.from.name,
                 )}
               </div>
             );
@@ -96,7 +96,7 @@ export default class EvolutionDeprecated extends React.PureComponent<Props> {
 
   render() {
     const profilesWithDeprecations = this.props.profiles.filter(
-      (profile) => profile.activeDeprecatedRuleCount > 0
+      (profile) => profile.activeDeprecatedRuleCount > 0,
     );
 
     if (profilesWithDeprecations.length === 0) {
@@ -114,7 +114,7 @@ export default class EvolutionDeprecated extends React.PureComponent<Props> {
         <div className="spacer-bottom">
           {translateWithParameters(
             'quality_profiles.deprecated_rules_are_still_activated',
-            profilesWithDeprecations.length
+            profilesWithDeprecations.length,
           )}
         </div>
         <ul>
@@ -134,12 +134,12 @@ export default class EvolutionDeprecated extends React.PureComponent<Props> {
                   aria-label={translateWithParameters(
                     'quality_profile.lang_deprecated_x_rules',
                     profile.languageName,
-                    profile.activeDeprecatedRuleCount
+                    profile.activeDeprecatedRuleCount,
                   )}
                 >
                   {translateWithParameters(
                     'quality_profile.x_rules',
-                    profile.activeDeprecatedRuleCount
+                    profile.activeDeprecatedRuleCount,
                   )}
                 </Link>
                 {this.renderInheritedInfo(profile, profilesWithDeprecations)}
index 2386566554a739a726713532d0171393755c62fa..f9437cb79e9bd884182714cf88a894ba1be05baa 100644 (file)
@@ -86,7 +86,7 @@ export default class EvolutionRules extends React.PureComponent<{}, State> {
       },
       () => {
         /*noop*/
-      }
+      },
     );
   }
 
@@ -102,7 +102,7 @@ export default class EvolutionRules extends React.PureComponent<{}, State> {
     const seeAllRulesText = `${translate('see_all')} ${formatMeasure(
       latestRulesTotal,
       'SHORT_INT',
-      null
+      null,
     )}`;
 
     return (
@@ -124,11 +124,11 @@ export default class EvolutionRules extends React.PureComponent<{}, State> {
                     ? translateWithParameters(
                         'quality_profiles.latest_new_rules.activated',
                         rule.langName!,
-                        rule.activations
+                        rule.activations,
                       )
                     : translateWithParameters(
                         'quality_profiles.latest_new_rules.not_activated',
-                        rule.langName!
+                        rule.langName!,
                       )}
                 </div>
               </div>
index e5a1d5e4d266dd892670d37683b0c0a2e92f6ada..bb94d2c456a4292ca0c9ea55fbdf4308947453a6 100644 (file)
@@ -63,7 +63,7 @@ export default function EvolutionStagnant(props: Props) {
                     {translateWithParameters(
                       'quality_profiles.x_updated_on_y',
                       profile.languageName,
-                      formattedDate
+                      formattedDate,
                     )}
                   </div>
                 )}
index f4b155ef058a1bbf23f78184cd137b27863cc25b..6fe50c91189e25cfe9db59faea864fb9e3e97af4 100644 (file)
@@ -58,7 +58,7 @@ export class PageHeader extends React.PureComponent<Props, State> {
       () => {
         this.props.router.push(getProfilePath(profile.name, profile.language));
       },
-      () => {}
+      () => {},
     );
   };
 
index 3feef5e550a8286f862cbd46ccecf32f47335661..2fc20a70c5c8651827b76f8db18103b1b975e0af 100644 (file)
@@ -98,7 +98,7 @@ export default class ProfilesList extends React.PureComponent<Props> {
 
     const profilesIndex: Dict<Profile[]> = groupBy<Profile>(
       profiles,
-      (profile) => profile.language
+      (profile) => profile.language,
     );
 
     const profilesToShow = language ? pick(profilesIndex, language) : profilesIndex;
@@ -121,7 +121,7 @@ export default class ProfilesList extends React.PureComponent<Props> {
         )}
 
         {languagesToShow.map((languageKey) =>
-          this.renderLanguage(languageKey, profilesToShow[languageKey])
+          this.renderLanguage(languageKey, profilesToShow[languageKey]),
         )}
       </div>
     );
index a6b24b8b6f05c426c7f6b5454ae2c4b4eb8f1d13..73c6cac5b5a9b4bc582bc07d8f67ed9a9b21b4ce 100644 (file)
@@ -73,7 +73,7 @@ export default class RestoreProfileForm extends React.PureComponent<Props, State
         if (this.mounted) {
           this.setState({ loading: false });
         }
-      }
+      },
     );
   };
 
@@ -84,7 +84,7 @@ export default class RestoreProfileForm extends React.PureComponent<Props, State
           'quality_profiles.restore_profile.warning',
           profile.name,
           ruleSuccesses,
-          ruleFailures
+          ruleFailures,
         )}
       </Alert>
     ) : (
@@ -92,7 +92,7 @@ export default class RestoreProfileForm extends React.PureComponent<Props, State
         {translateWithParameters(
           'quality_profiles.restore_profile.success',
           profile.name,
-          ruleSuccesses
+          ruleSuccesses,
         )}
       </Alert>
     );
index ea290b2aa9ae6921434143be227ae4513d68c9be..3e17c24bc2b7f8909a44e35a9a9b0b4d9c148a98 100644 (file)
@@ -34,7 +34,7 @@ export interface QualityProfilesContextProps {
 }
 
 export function withQualityProfilesContext<P extends Partial<QualityProfilesContextProps>>(
-  WrappedComponent: React.ComponentType<P>
+  WrappedComponent: React.ComponentType<P>,
 ): React.ComponentType<Omit<P, keyof QualityProfilesContextProps>> {
   function ComponentWithQualityProfilesProps(props: P) {
     const context = useOutletContext<QualityProfilesContextProps>();
@@ -43,7 +43,7 @@ export function withQualityProfilesContext<P extends Partial<QualityProfilesCont
 
   (ComponentWithQualityProfilesProps as React.FC<P>).displayName = getWrappedDisplayName(
     WrappedComponent,
-    'withQualityProfilesContext'
+    'withQualityProfilesContext',
   );
 
   return ComponentWithQualityProfilesProps;
index 9e1d5c4727f3fd0e04242f492cf1d5932f27a05a..f50368fcfc5091e8750067ceae623b0905e0ee4f 100644 (file)
@@ -32,7 +32,7 @@ export function sortProfiles(profiles: BaseProfile[]): Profile[] {
   function retrieveChildren(parent: BaseProfile | null) {
     return sorted.filter(
       (p) =>
-        (parent == null && p.parentKey == null) || (parent != null && p.parentKey === parent.key)
+        (parent == null && p.parentKey == null) || (parent != null && p.parentKey === parent.key),
     );
   }
 
@@ -49,7 +49,7 @@ export function sortProfiles(profiles: BaseProfile[]): Profile[] {
   sorted
     .filter(
       (profile) =>
-        profile.parentKey == null || sorted.find((p) => p.key === profile.parentKey) == null
+        profile.parentKey == null || sorted.find((p) => p.key === profile.parentKey) == null,
     )
     .forEach((profile) => putProfile(profile));
 
@@ -90,7 +90,7 @@ export const getProfileComparePath = (name: string, language: string, withKey?:
 export const getProfileChangelogPath = (
   name: string,
   language: string,
-  filter?: { since?: string; to?: string }
+  filter?: { since?: string; to?: string },
 ) => {
   const query = { language, name };
   if (filter) {
index f72eef42dbf3deadaf6eccf296c966561157addb..52484985071dbe5df41f65df9043193764d1488d 100644 (file)
@@ -252,7 +252,7 @@ export class SecurityHotspotsApp extends React.PureComponent<Props, State> {
   }
 
   constructFiltersFromProps(
-    props: Props
+    props: Props,
   ): Pick<HotspotFilters, 'assignedToMe' | 'inNewCodePeriod'> {
     return {
       assignedToMe: props.location.query.assignedToMe === 'true' && isLoggedIn(props.currentUser),
@@ -371,7 +371,7 @@ export class SecurityHotspotsApp extends React.PureComponent<Props, State> {
         status: HotspotStatus.TO_REVIEW, // we're only interested in unresolved hotspots
         ...getBranchLikeQuery(branchLike),
       },
-      component.needIssueSync
+      component.needIssueSync,
     );
   }
 
@@ -384,7 +384,7 @@ export class SecurityHotspotsApp extends React.PureComponent<Props, State> {
       : undefined;
 
     const standard = SECURITY_STANDARDS.find(
-      (stnd) => stnd !== SecurityStandard.CWE && location.query[stnd] !== undefined
+      (stnd) => stnd !== SecurityStandard.CWE && location.query[stnd] !== undefined,
     );
 
     const filterByCategory = standard
@@ -404,7 +404,7 @@ export class SecurityHotspotsApp extends React.PureComponent<Props, State> {
           projectKey: component.key,
           ...getBranchLikeQuery(branchLike),
         },
-        component.needIssueSync
+        component.needIssueSync,
       );
     }
 
@@ -438,7 +438,7 @@ export class SecurityHotspotsApp extends React.PureComponent<Props, State> {
         status,
         ...getBranchLikeQuery(branchLike),
       },
-      component.needIssueSync
+      component.needIssueSync,
     );
   }
 
@@ -471,7 +471,7 @@ export class SecurityHotspotsApp extends React.PureComponent<Props, State> {
         if (changes.inNewCodePeriod !== undefined) {
           this.fetchSecurityHotspotsReviewed();
         }
-      }
+      },
     );
   };
 
@@ -502,8 +502,8 @@ export class SecurityHotspotsApp extends React.PureComponent<Props, State> {
 
     return Promise.all(
       range(hotspotsPageIndex).map((p) =>
-        this.fetchSecurityHotspots(p + 1 /* pages are 1-indexed */)
-      )
+        this.fetchSecurityHotspots(p + 1 /* pages are 1-indexed */),
+      ),
     )
       .then((hotspotPages) => {
         const allHotspots = flatMap(hotspotPages, 'hotspots');
@@ -588,7 +588,10 @@ export class SecurityHotspotsApp extends React.PureComponent<Props, State> {
         hotspotsReviewedMeasure={hotspotsReviewedMeasure}
         hotspotsTotal={hotspotsTotal}
         isStaticListOfHotspots={Boolean(
-          (hotspotKeys && hotspotKeys.length > 0) || filterByCategory || filterByCWE || filterByFile
+          (hotspotKeys && hotspotKeys.length > 0) ||
+            filterByCategory ||
+            filterByCWE ||
+            filterByFile,
         )}
         loading={loading}
         loadingMeasure={loadingMeasure}
@@ -617,8 +620,8 @@ export default withRouter(
           Component: SecurityHotspotsApp,
           showIndexationMessage: ({ component }) =>
             !!(component.qualifier === ComponentQualifier.Application && component.needIssueSync),
-        })
-      )
-    )
-  )
+        }),
+      ),
+    ),
+  ),
 );
index 68ad9c44b9c36ebfd320a7341120d8eda4595d54..65b41c27c64865655b40cf0abbc18bca850fe0da 100644 (file)
@@ -159,7 +159,7 @@ afterEach(() => {
 describe('rendering', () => {
   it('should render code variants correctly', async () => {
     renderSecurityHotspotsApp(
-      'security_hotspots?id=guillaume-peoch-sonarsource_benflix_AYGpXq2bd8qy4i0eO9ed&hotspots=test-2'
+      'security_hotspots?id=guillaume-peoch-sonarsource_benflix_AYGpXq2bd8qy4i0eO9ed&hotspots=test-2',
     );
 
     expect(await screen.findAllByText('variant 1, variant 2')).toHaveLength(2);
@@ -169,7 +169,7 @@ describe('rendering', () => {
     const user = userEvent.setup();
 
     renderSecurityHotspotsApp(
-      `security_hotspots?id=guillaume-peoch-sonarsource_benflix_AYGpXq2bd8qy4i0eO9ed&files=src%2Findex.js&cwe=foo&inNewCodePeriod=true`
+      `security_hotspots?id=guillaume-peoch-sonarsource_benflix_AYGpXq2bd8qy4i0eO9ed&files=src%2Findex.js&cwe=foo&inNewCodePeriod=true`,
     );
 
     await waitFor(() => {
@@ -360,14 +360,14 @@ describe('navigation', () => {
   it('should navigate when coming from SonarLint', async () => {
     // On main branch
     const rtl = renderSecurityHotspotsApp(
-      'security_hotspots?id=guillaume-peoch-sonarsource_benflix_AYGpXq2bd8qy4i0eO9ed&hotspots=test-1'
+      'security_hotspots?id=guillaume-peoch-sonarsource_benflix_AYGpXq2bd8qy4i0eO9ed&hotspots=test-1',
     );
     expect(await ui.hotspotTitle(/'3' is a magic number./).find()).toBeInTheDocument();
 
     // On specific branch
     rtl.unmount();
     renderSecurityHotspotsApp(
-      'security_hotspots?id=guillaume-peoch-sonarsource_benflix_AYGpXq2bd8qy4i0eO9ed&hotspots=b1-test-1&branch=normal-branch'
+      'security_hotspots?id=guillaume-peoch-sonarsource_benflix_AYGpXq2bd8qy4i0eO9ed&hotspots=b1-test-1&branch=normal-branch',
     );
     expect(await ui.hotspotTitle(/'F' is a magic number./).find()).toBeInTheDocument();
   });
@@ -456,7 +456,7 @@ it('should be able to filter the hotspot list', async () => {
       resolution: undefined,
       status: 'TO_REVIEW',
     },
-    undefined
+    undefined,
   );
 
   await user.click(ui.filterDropdown.get());
@@ -472,7 +472,7 @@ it('should be able to filter the hotspot list', async () => {
       resolution: undefined,
       status: 'TO_REVIEW',
     },
-    undefined
+    undefined,
   );
 
   await user.click(ui.filterDropdown.get());
@@ -486,7 +486,7 @@ it('should disable the "assigned to me" filter if the project is indexing', asyn
 
   renderSecurityHotspotsApp(
     'security_hotspots?id=guillaume-peoch-sonarsource_benflix_AYGpXq2bd8qy4i0eO9ed',
-    { component: { ...mockComponentInstance, needIssueSync: true } }
+    { component: { ...mockComponentInstance, needIssueSync: true } },
   );
 
   await user.click(ui.filterDropdown.get());
@@ -496,7 +496,7 @@ it('should disable the "assigned to me" filter if the project is indexing', asyn
 
 function renderSecurityHotspotsApp(
   navigateTo?: string,
-  component?: Partial<ComponentContextShape>
+  component?: Partial<ComponentContextShape>,
 ) {
   return renderAppWithComponentContext(
     MetricKey.security_hotspots,
@@ -514,6 +514,6 @@ function renderSecurityHotspotsApp(
       onComponentChange: jest.fn(),
       component: mockComponentInstance,
       ...component,
-    }
+    },
   );
 }
index 73eeed4ec548def501a3e23e80d411caf2b32037..99692aee844ee944d789adf3c2e5502552ec5622 100644 (file)
@@ -199,7 +199,7 @@ describe('getHotspotReviewHistory', () => {
         type: ReviewHistoryType.Creation,
         date: hotspot.creationDate,
         user: hotspot.authorUser,
-      })
+      }),
     );
     expect(reviewHistory[2]).toEqual(
       expect.objectContaining({
@@ -207,7 +207,7 @@ describe('getHotspotReviewHistory', () => {
         date: commentElement.createdAt,
         user: commentElement.user,
         html: commentElement.htmlText,
-      })
+      }),
     );
     expect(reviewHistory[1]).toEqual(
       expect.objectContaining({
@@ -215,7 +215,7 @@ describe('getHotspotReviewHistory', () => {
         date: commentElement1.createdAt,
         user: commentElement1.user,
         html: commentElement1.htmlText,
-      })
+      }),
     );
     expect(reviewHistory[0]).toEqual(
       expect.objectContaining({
@@ -227,7 +227,7 @@ describe('getHotspotReviewHistory', () => {
           active: changelogElement.isUserActive,
         },
         diffs: changelogElement.diffs,
-      })
+      }),
     );
   });
 });
@@ -235,16 +235,16 @@ describe('getHotspotReviewHistory', () => {
 describe('getStatusOptionFromStatusAndResolution', () => {
   it('should return the correct values', () => {
     expect(
-      getStatusOptionFromStatusAndResolution(HotspotStatus.REVIEWED, HotspotResolution.FIXED)
+      getStatusOptionFromStatusAndResolution(HotspotStatus.REVIEWED, HotspotResolution.FIXED),
     ).toBe(HotspotStatusOption.FIXED);
     expect(
-      getStatusOptionFromStatusAndResolution(HotspotStatus.REVIEWED, HotspotResolution.SAFE)
+      getStatusOptionFromStatusAndResolution(HotspotStatus.REVIEWED, HotspotResolution.SAFE),
     ).toBe(HotspotStatusOption.SAFE);
     expect(getStatusOptionFromStatusAndResolution(HotspotStatus.REVIEWED)).toBe(
-      HotspotStatusOption.FIXED
+      HotspotStatusOption.FIXED,
     );
     expect(getStatusOptionFromStatusAndResolution(HotspotStatus.TO_REVIEW)).toBe(
-      HotspotStatusOption.TO_REVIEW
+      HotspotStatusOption.TO_REVIEW,
     );
   });
 });
@@ -269,13 +269,13 @@ describe('getStatusAndResolutionFromStatusOption', () => {
 describe('getStatusFilterFromStatusOption', () => {
   it('should return the correct values', () => {
     expect(getStatusFilterFromStatusOption(HotspotStatusOption.TO_REVIEW)).toEqual(
-      HotspotStatusFilter.TO_REVIEW
+      HotspotStatusFilter.TO_REVIEW,
     );
     expect(getStatusFilterFromStatusOption(HotspotStatusOption.SAFE)).toEqual(
-      HotspotStatusFilter.SAFE
+      HotspotStatusFilter.SAFE,
     );
     expect(getStatusFilterFromStatusOption(HotspotStatusOption.FIXED)).toEqual(
-      HotspotStatusFilter.FIXED
+      HotspotStatusFilter.FIXED,
     );
   });
 });
index 7278b51fccdf390001028a1117b795585acd4b53..8b0bd1d189de299d58daf6b540be66a899d48300 100644 (file)
@@ -76,7 +76,7 @@ export default function Assignee(props: Props) {
 
   const handleSearchAssignees = (
     query: string,
-    cb: (options: Options<LabelValueSelectOption<string>>) => void
+    cb: (options: Options<LabelValueSelectOption<string>>) => void,
   ) => {
     getUsers<RestUser>({ q: query })
       .then((result) => {
@@ -104,7 +104,7 @@ export default function Assignee(props: Props) {
           addGlobalSuccessMessage(
             userOption.value
               ? translateWithParameters('hotspots.assign.success', userOption.label)
-              : translate('hotspots.assign.unassign.success')
+              : translate('hotspots.assign.unassign.success'),
           );
         })
         .catch(noop);
index d8f0b5d9261adff36f44e79b2d1429297845c70f..df9f6d14487c6daddce8517c16274401397db89e 100644 (file)
@@ -34,7 +34,7 @@ export default function HotspotCommentModal(props: HotspotCommentPopupProps) {
   return (
     <Modal
       headerTitle={translate(
-        props.value !== undefined ? 'issue.comment.edit' : 'hotspots.status.add_comment'
+        props.value !== undefined ? 'issue.comment.edit' : 'hotspots.status.add_comment',
       )}
       onClose={props.onCancel}
       body={
index 56e20a3c899a747601cab119b2b7369c3697a7a7..0d3d6d013bb9535632758f8932c6f07967ac2b9f 100644 (file)
@@ -80,7 +80,7 @@ export function HotspotHeader(props: HotspotHeaderProps) {
       ...getBranchLikeQuery(branchLike),
       hotspots: key,
     }),
-    false
+    false,
   );
 
   const categoryStandard = standards?.[SecurityStandard.SONARSOURCE][rule.securityCategory]?.title;
index f19f81f7bde59e2a08767433543cab3f8e4c0c03..e47e87f4c22c7c256360241ea60af8fc038434b5 100644 (file)
@@ -78,7 +78,7 @@ export default class HotspotList extends React.Component<Props, State> {
     ) {
       const groupedHotspots = this.groupHotspots(
         this.props.hotspots,
-        this.props.securityCategories
+        this.props.securityCategories,
       );
       this.setState({ groupedHotspots });
     }
index 06688e90d6732ceeff505ed29ad7bf0982eb185d..50f34da549c2242dc18e8c433957331db3a9776f 100644 (file)
@@ -57,7 +57,7 @@ export default function HotspotListItem(props: HotspotListItemProps) {
         });
       }
     },
-    [selected]
+    [selected],
   );
 
   const handleClick = () => {
index 95a5aee9e1032c3444f0535fb8ef4b28c1de48d9..2bb07df0ae42a443c7bda48e404c477563ebb376 100644 (file)
@@ -102,16 +102,16 @@ export default class HotspotSnippetContainer extends React.Component<Props, Stat
       1,
       Math.min(
         ...[textRange, ...secondaryLocations.map((l) => l.textRange)].map(
-          (t) => t.startLine - BUFFER_LINES
-        )
-      )
+          (t) => t.startLine - BUFFER_LINES,
+        ),
+      ),
     );
     // Search for the max endLine within primary and secondary locations
     const to = Math.max(
       ...[textRange, ...secondaryLocations.map((l) => l.textRange)].map(
         // Add 1 to check for end-of-file
-        (t) => t.endLine + BUFFER_LINES + 1
-      )
+        (t) => t.endLine + BUFFER_LINES + 1,
+      ),
     );
 
     this.setState({ loading: true });
@@ -144,7 +144,7 @@ export default class HotspotSnippetContainer extends React.Component<Props, Stat
             text: location.msg,
           })),
         },
-        () => resolve(undefined)
+        () => resolve(undefined),
       );
     });
   }
@@ -181,7 +181,7 @@ export default class HotspotSnippetContainer extends React.Component<Props, Stat
       } else {
         // remove extra sourceline if we didn't reach the end:
         concatSourceLines = sourceLines.concat(
-          lastLine ? additionalLines : additionalLines.slice(0, -1)
+          lastLine ? additionalLines : additionalLines.slice(0, -1),
         );
       }
 
index 0beaee81aa654480a309d87c86ec07bd5d935487..b7dc0f695c2bdb7f4dd558449a327d29288ff55d 100644 (file)
@@ -56,7 +56,7 @@ const EXPAND_ANIMATION_SPEED = 200;
 export async function animateExpansion(
   scrollableRef: React.RefObject<HTMLDivElement>,
   expandBlock: (direction: ExpandDirection) => Promise<void>,
-  direction: ExpandDirection
+  direction: ExpandDirection,
 ) {
   const wrapper = scrollableRef.current?.querySelector<HTMLElement>('.it__source-viewer-code');
   const table = wrapper?.firstChild as HTMLElement;
@@ -104,7 +104,7 @@ export async function animateExpansion(
 }
 
 export default function HotspotSnippetContainerRenderer(
-  props: HotspotSnippetContainerRendererProps
+  props: HotspotSnippetContainerRendererProps,
 ) {
   const {
     highlightedSymbols,
@@ -129,7 +129,7 @@ export default function HotspotSnippetContainerRenderer(
         secondaryLocationSelected={secondaryLocationSelected}
       />
     ),
-    [hotspot, secondaryLocationSelected]
+    [hotspot, secondaryLocationSelected],
   );
 
   const renderHotspotBoxInLine = (line: SourceLine) =>
index 1394845f0858f5c5485906d2bcd5123874b29944..a28ac8bff97826ba78724a76e07135c032cbea93 100644 (file)
@@ -76,7 +76,7 @@ export default function HotspotViewerTabs(props: Props) {
 
   const { isScrolled, isCompressed, resetScrollDownCompress } = useScrollDownCompress(
     STICKY_HEADER_COMPRESS_THRESHOLD,
-    STICKY_HEADER_SHADOW_OFFSET
+    STICKY_HEADER_SHADOW_OFFSET,
   );
 
   const tabs = React.useMemo(() => {
index 53d9637b836f6fb5ab7929b254bea50c733758c9..5eeac12ace8e57a92ff7fd5ec3979f647f5c7e41 100644 (file)
@@ -36,7 +36,7 @@ export default function StatusSelection(props: Props) {
   const { hotspot } = props;
   const initialStatus = React.useMemo(
     () => getStatusOptionFromStatusAndResolution(hotspot.status, hotspot.resolution),
-    [hotspot]
+    [hotspot],
   );
 
   const [loading, setLoading] = React.useState(false);
index 12ce05b1705dae0cd98a15a22b1bf50bbe9f34f5..8d96cd68d0a97f2d83c3cda8eb0af96cccff4c1e 100644 (file)
@@ -25,7 +25,7 @@ const THROTTLE_LONG_DELAY = 100;
 export default function useScrollDownCompress(compressThreshold: number, scrollThreshold: number) {
   const [isCompressed, setIsCompressed] = useState(false);
   const [isScrolled, setIsScrolled] = useState(
-    () => document?.documentElement?.scrollTop > scrollThreshold
+    () => document?.documentElement?.scrollTop > scrollThreshold,
   );
 
   const initialScrollHeightRef = useRef<number | undefined>(undefined);
@@ -54,7 +54,7 @@ export default function useScrollDownCompress(compressThreshold: number, scrollT
       } else if (relativeScrollTop !== scrollTopRef.current) {
         // Compress when scrolling in down direction and we are scrolled more than a threshold
         setIsCompressed(
-          relativeScrollTop > scrollTopRef.current && relativeScrollTop > scrollThreshold
+          relativeScrollTop > scrollTopRef.current && relativeScrollTop > scrollThreshold,
         );
       }
 
index 6e12fe7d629bf81f1324766d3622717f6b6e2e5b..10be89523b46ee7aae90f17c0fdc752a67bf83d7 100644 (file)
@@ -82,7 +82,7 @@ export function mapRules(rules: Array<{ key: string; name: string }>): Dict<stri
 
 export function groupByCategory(
   hotspots: RawHotspot[] = [],
-  securityCategories: StandardSecurityCategories
+  securityCategories: StandardSecurityCategories,
 ) {
   const groups = groupBy(hotspots, (h) => h.securityCategory);
 
@@ -95,7 +95,7 @@ export function groupByCategory(
   return [
     ...sortBy(
       groupList.filter((group) => group.key !== OTHERS_SECURITY_CATEGORY),
-      (group) => group.title
+      (group) => group.title,
     ),
     ...groupList.filter(({ key }) => key === OTHERS_SECURITY_CATEGORY),
   ];
@@ -115,7 +115,7 @@ function getCategoryTitle(key: string, securityCategories: StandardSecurityCateg
 
 export function constructSourceViewerFile(
   { component, project }: Hotspot,
-  lines?: number
+  lines?: number,
 ): SourceViewerFile {
   return {
     key: component.key,
@@ -153,7 +153,7 @@ export function getHotspotReviewHistory(hotspot: Hotspot): ReviewHistoryElement[
           name: log.userName || log.user,
         },
         diffs: log.diffs,
-      }))
+      })),
     );
   }
 
@@ -170,7 +170,7 @@ export function getHotspotReviewHistory(hotspot: Hotspot): ReviewHistoryElement[
         html: comment.htmlText,
         key: comment.key,
         markdown: comment.markdown,
-      }))
+      })),
     );
   }
 
@@ -187,7 +187,7 @@ const STATUS_AND_RESOLUTION_TO_STATUS_OPTION = {
 
 export function getStatusOptionFromStatusAndResolution(
   status: HotspotStatus,
-  resolution?: HotspotResolution
+  resolution?: HotspotResolution,
 ) {
   // Resolution is the most determinist info here, so we use it first to get the matching status option
   // If not provided, we use the status (which will be TO_REVIEW)
@@ -232,7 +232,7 @@ function getSecondaryLocations(flows: RawHotspot['flows']) {
     .map((flow) =>
       flow.map((location) => {
         return { ...location };
-      })
+      }),
     );
 
   const onlySecondaryLocations = parsedFlows.every((flow) => flow.length === 1);
@@ -254,7 +254,7 @@ function orderLocations(locations: FlowLocation[]) {
   return sortBy(
     locations,
     (location) => location.textRange && location.textRange.startLine,
-    (location) => location.textRange && location.textRange.startOffset
+    (location) => location.textRange && location.textRange.startOffset,
   );
 }
 
index 20616db0c01878a144e4f7a1ae9d21f3669b3695..cfa7f6361222316f044b5ea0b147c5b09b43c8af 100644 (file)
@@ -68,7 +68,7 @@ export class LoginContainer extends React.PureComponent<Props, State> {
       },
       () => {
         /* already handled */
-      }
+      },
     );
   }
 
index 69a00857dbddee4c415756c59139026f581997d7..48a13602ed377c42f67a1e352936182edeade348 100644 (file)
@@ -126,7 +126,7 @@ it('should not show any OAuth providers if none are configured', async () => {
 
   // No OAuth providers, login form display by default.
   expect(
-    screen.queryByRole('link', { name: 'login.login_with_x', exact: false })
+    screen.queryByRole('link', { name: 'login.login_with_x', exact: false }),
   ).not.toBeInTheDocument();
   expect(screen.getByLabelText('login')).toBeInTheDocument();
 });
@@ -160,6 +160,6 @@ it('should handle errors', async () => {
 
 function renderLoginContainer(props: Partial<LoginContainer['props']> = {}) {
   return renderComponent(
-    <LoginContainer location={mockLocation({ query: { return_to: '/some/path' } })} {...props} />
+    <LoginContainer location={mockLocation({ query: { return_to: '/some/path' } })} {...props} />,
   );
 }
index c3643ff8af269273170d5477e08ccdc2b858dace..618282c14ed6a029304b811106240542f44cf1d4 100644 (file)
@@ -153,7 +153,7 @@ describe('#getDefaultValue()', () => {
         key: 'test',
       };
       expect(getDefaultValue(setting)).toEqual(expected);
-    }
+    },
   );
 });
 
index 18e8fd10dd31757fc21b258d06e8714ab0e7e31e..9a6fb80de825826fd204fedc81c9812ca3524df3 100644 (file)
@@ -54,9 +54,9 @@ function CategoriesList(props: CategoriesListProps) {
             ? // Project settings
               c.availableForProject
             : // Global settings
-              c.availableGlobally
+              c.availableGlobally,
         )
-        .filter((c) => props.hasFeature(Feature.BranchSupport) || !c.requiresBranchSupport)
+        .filter((c) => props.hasFeature(Feature.BranchSupport) || !c.requiresBranchSupport),
     );
   const sortedCategories = sortBy(categoriesWithName, (category) => category.name.toLowerCase());
 
index e18db13cf0618a2d2206087a69c808976f863c65..ca0a706f05d6bc06eacb6547558fa4ea6f755eda 100644 (file)
@@ -64,7 +64,7 @@ export default class CategoryDefinitionsList extends React.PureComponent<Props,
     const { category, component, definitions } = this.props;
 
     const categoryDefinitions = definitions.filter(
-      (definition) => definition.category.toLowerCase() === category.toLowerCase()
+      (definition) => definition.category.toLowerCase() === category.toLowerCase(),
     );
 
     const keys = categoryDefinitions.map((definition) => definition.key);
index ca7d3221869dabfa5bb0aa97f47664d340908d7a..2e823627ce8aee7a2405f34f3a88f40fa74f627b 100644 (file)
@@ -126,7 +126,7 @@ export default class Definition extends React.PureComponent<Props, State> {
         this.setState({
           validationMessage: translateWithParameters(
             'settings.state.url_not_valid',
-            changedValue ?? ''
+            changedValue ?? '',
           ),
         });
         return false;
index f90f0072f7c500e57cccce01fb66c7b04a35c341..a72e37a629c08064584b733870dd087ac65a4e02 100644 (file)
@@ -104,7 +104,7 @@ export default class DefinitionActions extends React.PureComponent<Props, State>
               className="spacer-right"
               aria-label={translateWithParameters(
                 'settings.definition.reset',
-                getPropertyName(setting.definition)
+                getPropertyName(setting.definition),
               )}
               onClick={this.handleReset}
             >
index e05ce398856b9b7411bd008dd034a2296f18f05d..73f9a8565f6ba5e58353ec1efcfea367b4c73860 100644 (file)
@@ -67,7 +67,7 @@ class SettingsApp extends React.PureComponent<Props, State> {
     const { component } = this.props;
 
     const definitions: ExtendedSettingDefinition[] = await getDefinitions(component?.key).catch(
-      () => []
+      () => [],
     );
 
     if (this.mounted) {
index 7bc291da1a8e6706f8168ab8f7648c33f3a3fa2e..f36e699a10650eba33e4a2e2b116a21ff1193bca 100644 (file)
@@ -46,7 +46,7 @@ function SettingsAppRenderer(props: SettingsAppRendererProps) {
   const categories = React.useMemo(() => {
     return uniqBy(
       definitions.map((definition) => definition.category),
-      (category) => category.toLowerCase()
+      (category) => category.toLowerCase(),
     );
   }, [definitions]);
 
index f9ac9c1b826708048cbd9a12d65d4fa1c4e369f9..6ba890aef1c51911c92d26f93ce46ab04fb0cec2 100644 (file)
@@ -62,7 +62,7 @@ export class SettingsSearch extends React.Component<Props, State> {
     this.handleFocus = debounce(this.handleFocus, DEBOUNCE_DELAY);
 
     const definitions = props.definitions.concat(
-      props.component ? ADDITIONAL_PROJECT_SETTING_DEFINITIONS : ADDITIONAL_SETTING_DEFINITIONS
+      props.component ? ADDITIONAL_PROJECT_SETTING_DEFINITIONS : ADDITIONAL_SETTING_DEFINITIONS,
     );
     this.index = this.buildSearchIndex(definitions);
     this.definitionsByKey = keyBy(definitions, 'key');
@@ -95,7 +95,7 @@ export class SettingsSearch extends React.Component<Props, State> {
         cleanQuery
           .split(/\s+/)
           .map((s) => `${s} *${s}*`)
-          .join(' ')
+          .join(' '),
       )
       .map((match) => this.definitionsByKey[match.ref]);
 
index 68872889c96453ac1dc588181caf176f6960156a..82322e784bceacdd142a13f01a6889ec87f2d128 100644 (file)
@@ -72,7 +72,7 @@ class SubCategoryDefinitionsList extends React.PureComponent<SubCategoryDefiniti
       description: getSubCategoryDescription(bySubCategory[key][0].definition.category, key),
     }));
     const sortedSubCategories = sortBy(subCategories, (subCategory) =>
-      subCategory.name.toLowerCase()
+      subCategory.name.toLowerCase(),
     );
     const filteredSubCategories = subCategory
       ? sortedSubCategories.filter((c) => c.key === subCategory)
index f860ebab0ab75180fafae3ad9aecf076d6974674..dcd217cb50bc52193841beeec9d33b1c7e7ac6c3 100644 (file)
@@ -97,6 +97,6 @@ function renderCategoriesList(props?: Partial<CategoriesListProps>) {
       defaultCategory="general"
       selectedCategory=""
       {...props}
-    />
+    />,
   );
 }
index 9e872e76ef3d8c8d31c723bea5d35da2d6515b1a..276ee1ad5eb025f713151c885c8d4228e01281d7 100644 (file)
@@ -85,7 +85,7 @@ it.each([
     renderDefinition({ type: settingType });
 
     expect(
-      await ui.nameHeading('property.sonar.announcement.message.name').find()
+      await ui.nameHeading('property.sonar.announcement.message.name').find(),
     ).toBeInTheDocument();
 
     // Should see no empty validation message
@@ -111,11 +111,11 @@ it.each([
 
     // Clicking reset opens dialog and reset to default on confirm
     await user.click(
-      ui.resetButton('settings.definition.reset.property.sonar.announcement.message.name').get()
+      ui.resetButton('settings.definition.reset.property.sonar.announcement.message.name').get(),
     );
     await user.click(ui.resetButton().get());
     expect(ui.announcementInput.get()).toHaveValue('');
-  }
+  },
 );
 
 it('renders definition for SettingType = JSON and can do operations', async () => {
@@ -123,7 +123,7 @@ it('renders definition for SettingType = JSON and can do operations', async () =
   renderDefinition({ type: SettingType.JSON });
 
   expect(
-    await ui.nameHeading('property.sonar.announcement.message.name').find()
+    await ui.nameHeading('property.sonar.announcement.message.name').find(),
   ).toBeInTheDocument();
 
   // Should show error message if JSON format is not valid
@@ -149,7 +149,7 @@ it('renders definition for SettingType = BOOLEAN and can do operations', async (
   });
 
   expect(
-    await ui.nameHeading('property.sonar.announcement.message.name').find()
+    await ui.nameHeading('property.sonar.announcement.message.name').find(),
   ).toBeInTheDocument();
 
   // Can toggle
@@ -168,7 +168,7 @@ it('renders definition for SettingType = BOOLEAN and can do operations', async (
 
   // Can reset toggle
   await user.click(
-    ui.resetButton('settings.definition.reset.property.sonar.announcement.message.name').get()
+    ui.resetButton('settings.definition.reset.property.sonar.announcement.message.name').get(),
   );
   await user.click(ui.resetButton().get());
   expect(ui.toggleButton.get()).not.toBeChecked();
@@ -182,7 +182,7 @@ it('renders definition for SettingType = SINGLE_SELECT_LIST and can do operation
   });
 
   expect(
-    await ui.nameHeading('property.sonar.announcement.message.name').find()
+    await ui.nameHeading('property.sonar.announcement.message.name').find(),
   ).toBeInTheDocument();
 
   // Can select option
@@ -201,7 +201,7 @@ it('renders definition for SettingType = SINGLE_SELECT_LIST and can do operation
 
   // Can reset
   await user.click(
-    ui.resetButton('settings.definition.reset.property.sonar.announcement.message.name').get()
+    ui.resetButton('settings.definition.reset.property.sonar.announcement.message.name').get(),
   );
   await user.click(ui.resetButton().get());
   expect(ui.selectOption('Select...').get()).toBeInTheDocument();
@@ -214,7 +214,7 @@ it('renders definition for SettingType = FORMATTED_TEXT and can do operations',
   });
 
   expect(
-    await ui.nameHeading('property.sonar.announcement.message.name').find()
+    await ui.nameHeading('property.sonar.announcement.message.name').find(),
   ).toBeInTheDocument();
 
   // Should see no empty validation message
@@ -243,7 +243,7 @@ it('renders definition for multiValues type and can do operations', async () =>
       key: DEFAULT_DEFINITIONS_MOCK[2].key,
       values: DEFAULT_DEFINITIONS_MOCK[2].defaultValue?.split(','),
     },
-    mockComponent()
+    mockComponent(),
   );
 
   expect(await ui.nameHeading('property.sonar.javascript.globals.name').find()).toBeInTheDocument();
@@ -269,7 +269,7 @@ it('renders definition for multiValues type and can do operations', async () =>
 
   // Can reset to default
   await user.click(
-    ui.resetButton('settings.definition.reset.property.sonar.javascript.globals.name').get()
+    ui.resetButton('settings.definition.reset.property.sonar.javascript.globals.name').get(),
   );
   await user.click(ui.resetButton().get());
   expect(ui.multiValuesInput.getAll()).toHaveLength(4);
@@ -280,7 +280,7 @@ it('renders definition for SettingType = PROPERTY_SET and can do operations', as
   renderDefinition(DEFAULT_DEFINITIONS_MOCK[5]);
 
   expect(
-    await ui.nameHeading('property.sonar.cobol.compilationConstants.name').find()
+    await ui.nameHeading('property.sonar.cobol.compilationConstants.name').find(),
   ).toBeInTheDocument();
   expect(screen.getByRole('columnheader', { name: 'Name' })).toBeInTheDocument();
   expect(screen.getByRole('columnheader', { name: 'Value' })).toBeInTheDocument();
@@ -323,14 +323,14 @@ it('renders secured definition and can do operations', async () => {
     mockDefinition({
       ...DEFAULT_DEFINITIONS_MOCK[0],
       key,
-    })
+    }),
   );
   renderDefinition({
     key,
   });
 
   expect(
-    await ui.nameHeading('property.sonar.announcement.message.secured.name').find()
+    await ui.nameHeading('property.sonar.announcement.message.secured.name').find(),
   ).toBeInTheDocument();
 
   // Can type new value and cancel change
@@ -380,13 +380,13 @@ it('renders correctly for URL kind definition', async () => {
 function renderDefinition(
   definition: Partial<ExtendedSettingDefinition> = {},
   initialSetting?: SettingValue,
-  component?: Component
+  component?: Component,
 ) {
   return renderComponent(
     <Definition
       definition={{ ...DEFAULT_DEFINITIONS_MOCK[0], ...definition }}
       initialSettingValue={initialSetting}
       component={component}
-    />
+    />,
   );
 }
index b2e09b512634717384573bb3114056e390be901b..f45c9cb5c48ef7fe13cd9efd183296145836f2fd 100644 (file)
@@ -115,7 +115,7 @@ it('can save/reset/cancel or see error for custom mocked multi values definition
 
 function renderLanguages(
   overrides: Partial<AdditionalCategoryComponentProps> = {},
-  component = mockComponent()
+  component = mockComponent(),
 ) {
   return renderApp(
     '/',
@@ -125,6 +125,6 @@ function renderLanguages(
       categories={['javascript', 'sjava']}
       selectedCategory=""
       {...overrides}
-    />
+    />,
   );
 }
index cc4622d85d37f981c37eb5dd1ba4b9008aed7895..f842bb820ff8b1aa6d21099a64f2a98acc33cce9 100644 (file)
@@ -88,7 +88,7 @@ describe('Global Settings', () => {
 
     // Visible only for project
     expect(
-      ui.categoryLink('settings.pr_decoration.binding.category').query()
+      ui.categoryLink('settings.pr_decoration.binding.category').query(),
     ).not.toBeInTheDocument();
 
     expect(await ui.announcementHeading.find()).toBeInTheDocument();
index dc188c3cf9f6b2054fd72f85e151515b48da1227..bb626ba2d929cf69610a5ceb6e5cc477afc1d441 100644 (file)
@@ -62,7 +62,7 @@ const STATUS_ICON = {
 
 function getPRDecorationFeatureStatus(
   branchesEnabled: boolean,
-  type: AlmSettingsBindingStatusType.Success | AlmSettingsBindingStatusType.Failure
+  type: AlmSettingsBindingStatusType.Success | AlmSettingsBindingStatusType.Failure,
 ) {
   if (branchesEnabled) {
     return STATUS_ICON[type];
@@ -79,7 +79,7 @@ function getPRDecorationFeatureStatus(
           <FormattedMessage
             id="settings.almintegration.feature.pr_decoration.disabled.no_branches"
             defaultMessage={translate(
-              'settings.almintegration.feature.pr_decoration.disabled.no_branches'
+              'settings.almintegration.feature.pr_decoration.disabled.no_branches',
             )}
             values={{
               link: (
@@ -91,7 +91,7 @@ function getPRDecorationFeatureStatus(
                   target="_blank"
                 >
                   {translate(
-                    'settings.almintegration.feature.pr_decoration.disabled.no_branches.link'
+                    'settings.almintegration.feature.pr_decoration.disabled.no_branches.link',
                   )}
                 </a>
               ),
@@ -106,7 +106,7 @@ function getPRDecorationFeatureStatus(
 function getImportFeatureStatus(
   alm: AlmKeys,
   definition: AlmBindingDefinitionBase,
-  type: AlmSettingsBindingStatusType.Success | AlmSettingsBindingStatusType.Failure
+  type: AlmSettingsBindingStatusType.Success | AlmSettingsBindingStatusType.Failure,
 ) {
   if (!definition.url && alm !== AlmKeys.BitbucketCloud) {
     return (
@@ -131,7 +131,7 @@ function getPrDecoFeatureDescription(alm: AlmKeys) {
       return translate('settings.almintegration.feature.status_reporting.description_mr');
     case AlmKeys.GitHub:
       return translate(
-        'settings.almintegration.feature.status_reporting.description_pr_and_commits'
+        'settings.almintegration.feature.status_reporting.description_pr_and_commits',
       );
     default:
       return translate('settings.almintegration.feature.status_reporting.description_pr');
@@ -147,7 +147,7 @@ export default function AlmBindingDefinitionBox(props: AlmBindingDefinitionBoxPr
         <Button
           aria-label={translateWithParameters(
             'settings.almintegration.edit_configuration',
-            definition.key
+            definition.key,
           )}
           onClick={() => {
             props.onEdit(definition.key);
@@ -159,7 +159,7 @@ export default function AlmBindingDefinitionBox(props: AlmBindingDefinitionBoxPr
         <Button
           aria-label={translateWithParameters(
             'settings.almintegration.delete_configuration',
-            definition.key
+            definition.key,
           )}
           className="button-red spacer-left"
           onClick={() => {
@@ -195,7 +195,7 @@ export default function AlmBindingDefinitionBox(props: AlmBindingDefinitionBoxPr
                 <div>
                   <Tooltip
                     overlay={translate(
-                      'settings.almintegration.feature.alm_repo_import.description'
+                      'settings.almintegration.feature.alm_repo_import.description',
                     )}
                   >
                     <span>
@@ -229,7 +229,7 @@ export default function AlmBindingDefinitionBox(props: AlmBindingDefinitionBoxPr
                     <FormattedMessage
                       id="settings.almintegration.github.additional_permission"
                       defaultMessage={translate(
-                        'settings.almintegration.github.additional_permission'
+                        'settings.almintegration.github.additional_permission',
                       )}
                       values={{
                         link: (
@@ -248,7 +248,7 @@ export default function AlmBindingDefinitionBox(props: AlmBindingDefinitionBoxPr
           <Button
             aria-label={translateWithParameters(
               'settings.almintegration.check_configuration_x',
-              definition.key
+              definition.key,
             )}
             className="big-spacer-top"
             onClick={() => props.onCheck(definition.key)}
index ca8d1557dc2331d27cb32da17d4994ba9caf95c5..c58a2d424337f796a97d4f850d2513030568a445 100644 (file)
@@ -232,7 +232,7 @@ export default class AlmBindingDefinitionForm extends React.PureComponent<
   };
 
   handleBitbucketVariantChange = (
-    bitbucketVariant: AlmKeys.BitbucketServer | AlmKeys.BitbucketCloud
+    bitbucketVariant: AlmKeys.BitbucketServer | AlmKeys.BitbucketCloud,
   ) => {
     this.setState({
       bitbucketVariant,
index f23219298ac302856e6bc08e45b944d3e7fbae04..f513dee195c6081c68c6b6c0cb335422d0d52e75 100644 (file)
@@ -47,7 +47,7 @@ export interface AlmBindingDefinitionFormFieldProps<B extends AlmBindingDefiniti
 }
 
 export function AlmBindingDefinitionFormField<B extends AlmBindingDefinitionBase>(
-  props: AlmBindingDefinitionFormFieldProps<B>
+  props: AlmBindingDefinitionFormFieldProps<B>,
 ) {
   const {
     autoFocus,
@@ -81,7 +81,7 @@ export function AlmBindingDefinitionFormField<B extends AlmBindingDefinitionBase
             <ButtonLink
               aria-label={translateWithParameters(
                 'settings.almintegration.form.secret.update_field_x',
-                translate('settings.almintegration.form', id)
+                translate('settings.almintegration.form', id),
               )}
               onClick={() => {
                 props.onFieldChange(propKey, '');
index 2f2f67442e446463b749efc7ec6c1c7a2477b55b..6c398dd4d262df810d1a067f21af0f2736b50061 100644 (file)
@@ -48,7 +48,7 @@ export interface Props {
   submitting: boolean;
   bitbucketVariant?: AlmKeys.BitbucketServer | AlmKeys.BitbucketCloud;
   onBitbucketVariantChange: (
-    bitbucketVariant: AlmKeys.BitbucketServer | AlmKeys.BitbucketCloud
+    bitbucketVariant: AlmKeys.BitbucketServer | AlmKeys.BitbucketCloud,
   ) => void;
   validationError?: string;
 }
index 086602f12d38f063973847b98628c05d464508fc..786a468c31c55ba3ca9643f99eb1e10d87045218 100644 (file)
@@ -98,7 +98,7 @@ export class AlmIntegration extends React.PureComponent<Props, State> {
           AlmKeys.GitLab,
         ].forEach((alm) => {
           definitions[alm].forEach((def: AlmBindingDefinitionBase) =>
-            this.handleCheck(def.key, false)
+            this.handleCheck(def.key, false),
           );
         });
       }
@@ -196,7 +196,7 @@ export class AlmIntegration extends React.PureComponent<Props, State> {
 
           return { type, failureMessage };
         },
-        () => ({ type: AlmSettingsBindingStatusType.Warning, failureMessage: '' })
+        () => ({ type: AlmSettingsBindingStatusType.Warning, failureMessage: '' }),
       )
       .then(({ type, failureMessage }) => {
         if (this.mounted) {
index d9a492ce7b2f60aeac59e34c9904397a510f77e4..4ac3331a53c506fb43787dcd9a4113e10365e0ba 100644 (file)
@@ -68,7 +68,7 @@ export default function AzureForm(props: AzureFormProps) {
         help={
           <FormattedMessage
             defaultMessage={translate(
-              'settings.almintegration.form.personal_access_token.azure.help'
+              'settings.almintegration.form.personal_access_token.azure.help',
             )}
             id="settings.almintegration.form.personal_access_token.azure.help"
             values={{
index 4f42fe450d9dcaac892e222e2e1e8acb9335f3cf..52c4fc2f4f2daadc41b312d9ef08a22e7d9c7365 100644 (file)
@@ -36,7 +36,7 @@ export interface BitbucketCloudFormProps {
 export default function BitbucketCloudForm(props: BitbucketCloudFormProps) {
   const { formData } = props;
   const workspaceIDIsInvalid = Boolean(
-    formData.workspace && !BITBUCKET_CLOUD_WORKSPACE_ID_FORMAT.test(formData.workspace)
+    formData.workspace && !BITBUCKET_CLOUD_WORKSPACE_ID_FORMAT.test(formData.workspace),
   );
 
   return (
index 52f34d904b9e84ccb8a8372fed2000ebb3a7aac3..cf435061d308e24a5cd3f15733d775e2a9eba394 100644 (file)
@@ -33,7 +33,7 @@ export interface BitbucketFormProps {
   isUpdate: boolean;
   onFieldChange: (
     fieldId: keyof (BitbucketServerBindingDefinition & BitbucketCloudBindingDefinition),
-    value: string
+    value: string,
   ) => void;
   variant?: AlmKeys.BitbucketServer | AlmKeys.BitbucketCloud;
   onVariantChange: (variant: AlmKeys.BitbucketServer | AlmKeys.BitbucketCloud) => void;
index 5b4825113e174c1812d2cb1a793b205ed077ce62..649377183cfe455507becb48621e81184d30170c 100644 (file)
@@ -64,7 +64,7 @@ export default function BitbucketServerForm(props: BitbucketServerFormProps) {
         help={
           <FormattedMessage
             defaultMessage={translate(
-              'settings.almintegration.form.personal_access_token.bitbucket.help'
+              'settings.almintegration.form.personal_access_token.bitbucket.help',
             )}
             id="settings.almintegration.form.personal_access_token.bitbucket.help"
             values={{
@@ -74,7 +74,7 @@ export default function BitbucketServerForm(props: BitbucketServerFormProps) {
                   target="_blank"
                 >
                   {translate(
-                    'settings.almintegration.form.personal_access_token.bitbucket.help.url'
+                    'settings.almintegration.form.personal_access_token.bitbucket.help.url',
                   )}
                 </Link>
               ),
index 5df1cf1f89edff321c31a50b56e4b6fdd2fe69e5..8d7c425d23db56f600ee65554279ef5c7a8d87d7 100644 (file)
@@ -63,7 +63,7 @@ export default function GitlabForm(props: GitlabFormProps) {
         help={
           <FormattedMessage
             defaultMessage={translate(
-              `settings.almintegration.form.personal_access_token.gitlab.help`
+              `settings.almintegration.form.personal_access_token.gitlab.help`,
             )}
             id="settings.almintegration.form.personal_access_token.gitlab.help"
             values={{
index 7bd6b1295d91c3efe67e97c02b603594679b1d86..df963115cc7d51be92326a250d893f434d77bc43 100644 (file)
@@ -75,6 +75,6 @@ function renderAlmBindingDefinitionForm(props: Partial<AlmBindingDefinitionFormP
       enforceValidation
       alm={AlmKeys.GitLab}
       {...props}
-    />
+    />,
   );
 }
index c8b74e853e53ccc046069668cace7ced5267d8da..92c8e1852de2a80c75b4680bf9a986a164692b05 100644 (file)
@@ -126,7 +126,7 @@ describe.each([AlmKeys.GitLab, AlmKeys.Azure])(
       await ui.deleteConfiguration('New Name');
       expect(ui.emptyIntro(almKey).get()).toBeInTheDocument();
     });
-  }
+  },
 );
 
 describe('bitbucket tab', () => {
@@ -146,7 +146,7 @@ describe('bitbucket tab', () => {
         'url.bitbucket': 'https://api.bitbucket.com',
         personal_access_token: 'Access Token',
       },
-      AlmKeys.BitbucketServer
+      AlmKeys.BitbucketServer,
     );
 
     // Create new Bitbucket Cloud configuration
@@ -158,7 +158,7 @@ describe('bitbucket tab', () => {
         'client_id.bitbucketcloud': 'Client ID',
         'client_secret.bitbucketcloud': 'Client Secret',
       },
-      AlmKeys.BitbucketCloud
+      AlmKeys.BitbucketCloud,
     );
 
     // Edit, check delete Bitbucket Server configuration
@@ -166,7 +166,7 @@ describe('bitbucket tab', () => {
       'New Name',
       'Name',
       'personal_access_token',
-      AlmKeys.BitbucketServer
+      AlmKeys.BitbucketServer,
     );
 
     await ui.checkConfiguration('New Name');
@@ -211,7 +211,7 @@ function getPageObjects() {
   async function createConfiguration(
     name: string,
     params: { [key: string]: string },
-    almKey?: AlmKeys.BitbucketCloud | AlmKeys.BitbucketServer
+    almKey?: AlmKeys.BitbucketCloud | AlmKeys.BitbucketServer,
   ) {
     await userEvent.click(ui.createConfigurationButton.get());
     expect(ui.saveConfigurationButton.get()).toBeDisabled();
@@ -235,7 +235,7 @@ function getPageObjects() {
     newName: string,
     currentName: string,
     secretId: string,
-    almKey: AlmKeys
+    almKey: AlmKeys,
   ) {
     almSettings.setDefinitionErrorMessage('Something is wrong');
     await userEvent.click(ui.editConfigurationButton(currentName).get());
@@ -256,7 +256,7 @@ function getPageObjects() {
     almSettings.setDefinitionErrorMessage('');
     await userEvent.click(ui.checkConfigurationButton(name).get());
     expect(
-      ui.validationMessage('settings.almintegration.configuration_valid').getAll()[0]
+      ui.validationMessage('settings.almintegration.configuration_valid').getAll()[0],
     ).toBeInTheDocument();
   }
 
@@ -286,6 +286,6 @@ function renderAlmIntegration(features: Feature[] = []) {
   return renderComponent(
     <AvailableFeaturesContext.Provider value={features}>
       <AlmIntegration />
-    </AvailableFeaturesContext.Provider>
+    </AvailableFeaturesContext.Provider>,
   );
 }
index 1dfd21f949fe3459cf4555b8f0162f5a190d362e..74caf05ff9def11b40eacad32b13f7db12f63394 100644 (file)
@@ -70,7 +70,7 @@ export default function AuthenticationMultiValueField(props: Props) {
                     aria-label={translateWithParameters(
                       'settings.definition.delete_value',
                       getPropertyName(definition),
-                      value
+                      value,
                     )}
                     onClick={() => handleDeleteValue(index)}
                   />
index ed1345b1398cdc4d8e8c8f6722e9e1e0ef3ffd80..1b2f2baa811c49dbffc4803cda35a20d24dd58b5 100644 (file)
@@ -34,7 +34,7 @@ interface SamlToggleFieldProps {
 export default function AuthenticationSecuredField(props: SamlToggleFieldProps) {
   const { settingValue, definition, optional = true, isNotSet } = props;
   const [showSecretField, setShowSecretField] = React.useState(
-    !isNotSet && isSecuredDefinition(definition)
+    !isNotSet && isSecuredDefinition(definition),
   );
 
   useEffect(() => {
index 45370d107347c107a1b88a2c047755abb9cffe0e..fbf3eccdf69ca4623d50d4af867c2fbbe0001223 100644 (file)
@@ -110,7 +110,7 @@ export default function ConfigurationForm(props: Props) {
                 defaultMessage={translate(
                   `settings.authentication.${
                     hasLegacyConfiguration ? `legacy_help.${tab}` : 'help'
-                  }`
+                  }`,
                 )}
                 values={{
                   link: (
index eeef288f1a03a40dd6af02178f3ee92113527ea5..90e210bfd84ce0cf84bce92a1c1cb29ec617a3d3 100644 (file)
@@ -76,7 +76,7 @@ export default function GitHubConfigurationValidity({
     const invalidOrgs =
       isValidApp && data
         ? data.installations.filter(
-            (org) => org[applicationField].status === GitHubProvisioningStatus.Failed
+            (org) => org[applicationField].status === GitHubProvisioningStatus.Failed,
           )
         : [];
 
@@ -84,8 +84,8 @@ export default function GitHubConfigurationValidity({
       translateWithParameters(
         `${intlPrefix}.invalid_org`,
         org.organization,
-        org[applicationField].errorMessage ?? ''
-      )
+        org[applicationField].errorMessage ?? '',
+      ),
     );
 
     if (isValidApp && invalidOrgs.length === 0) {
@@ -93,11 +93,11 @@ export default function GitHubConfigurationValidity({
         translateWithParameters(
           `${intlPrefix}.valid${data.installations.length === 1 ? '_one' : ''}`,
           translate(
-            `settings.authentication.github.form.provisioning_with_github_short.${applicationField}`
+            `settings.authentication.github.form.provisioning_with_github_short.${applicationField}`,
           ),
           data.installations.length === 1
             ? data.installations[0].organization
-            : data.installations.length
+            : data.installations.length,
         ),
       ]);
       setAlertVariant('success');
@@ -108,7 +108,7 @@ export default function GitHubConfigurationValidity({
       setMessages([
         translateWithParameters(
           `${intlPrefix}.invalid`,
-          data?.application[applicationField].errorMessage ?? ''
+          data?.application[applicationField].errorMessage ?? '',
         ),
         ...invalidOrgsMessages,
       ]);
index 19e7d43ceb65c797030db2f974b3d08608980add..7d378000a46f0c4625f04bbcfec2ade8127c8b30 100644 (file)
@@ -236,10 +236,10 @@ export default function GithubAuthenticationTab(props: GithubAuthenticationProps
                     <RadioCard
                       className="spacer-top"
                       label={translate(
-                        'settings.authentication.github.form.provisioning_with_github'
+                        'settings.authentication.github.form.provisioning_with_github',
                       )}
                       title={translate(
-                        'settings.authentication.github.form.provisioning_with_github'
+                        'settings.authentication.github.form.provisioning_with_github',
                       )}
                       selected={newGithubProvisioningStatus ?? githubProvisioningStatus}
                       onClick={() => setNewGithubProvisioningStatus(true)}
@@ -254,7 +254,7 @@ export default function GithubAuthenticationTab(props: GithubAuthenticationProps
                           )}
                           <p className="spacer-bottom">
                             {translate(
-                              'settings.authentication.github.form.provisioning_with_github.description'
+                              'settings.authentication.github.form.provisioning_with_github.description',
                             )}
                           </p>
                           <p className="spacer-bottom">
@@ -291,7 +291,7 @@ export default function GithubAuthenticationTab(props: GithubAuthenticationProps
                           <FormattedMessage
                             id="settings.authentication.github.form.provisioning.disabled"
                             defaultMessage={translate(
-                              'settings.authentication.github.form.provisioning.disabled'
+                              'settings.authentication.github.form.provisioning.disabled',
                             )}
                             values={{
                               documentation: (
@@ -334,7 +334,7 @@ export default function GithubAuthenticationTab(props: GithubAuthenticationProps
                   onConfirm={() => changeProvisioning()}
                   header={translate(
                     'settings.authentication.github.confirm',
-                    newGithubProvisioningStatus ? 'auto' : 'jit'
+                    newGithubProvisioningStatus ? 'auto' : 'jit',
                   )}
                   onClose={() => setShowConfirmProvisioningModal(false)}
                   isDestructive={!newGithubProvisioningStatus}
@@ -343,7 +343,7 @@ export default function GithubAuthenticationTab(props: GithubAuthenticationProps
                   {translate(
                     'settings.authentication.github.confirm',
                     newGithubProvisioningStatus ? 'auto' : 'jit',
-                    'description'
+                    'description',
                   )}
                 </ConfirmModal>
               )}
index 04263974303296399e5d3d69a4d005a1ddcf6792..9a57809d84158789595f5031f2493d83b8c94acd 100644 (file)
@@ -223,19 +223,19 @@ export default function SamlAuthenticationTab(props: SamlAuthenticationProps) {
                           )}
                           <p className="spacer-bottom ">
                             {translate(
-                              'settings.authentication.saml.form.provisioning_with_scim.sub'
+                              'settings.authentication.saml.form.provisioning_with_scim.sub',
                             )}
                           </p>
                           <p className="spacer-bottom ">
                             {translate(
-                              'settings.authentication.saml.form.provisioning_with_scim.description'
+                              'settings.authentication.saml.form.provisioning_with_scim.description',
                             )}
                           </p>
                           <p>
                             <FormattedMessage
                               id="settings.authentication.saml.form.provisioning_with_scim.description.doc"
                               defaultMessage={translate(
-                                'settings.authentication.saml.form.provisioning_with_scim.description.doc'
+                                'settings.authentication.saml.form.provisioning_with_scim.description.doc',
                               )}
                               values={{
                                 documentation: (
@@ -276,7 +276,7 @@ export default function SamlAuthenticationTab(props: SamlAuthenticationProps) {
                   onConfirm={() => handleConfirmChangeProvisioning()}
                   header={translate(
                     'settings.authentication.saml.confirm',
-                    newScimStatus ? 'scim' : 'jit'
+                    newScimStatus ? 'scim' : 'jit',
                   )}
                   onClose={() => setShowConfirmProvisioningModal(false)}
                   isDestructive={!newScimStatus}
@@ -285,7 +285,7 @@ export default function SamlAuthenticationTab(props: SamlAuthenticationProps) {
                   {translate(
                     'settings.authentication.saml.confirm',
                     newScimStatus ? 'scim' : 'jit',
-                    'description'
+                    'description',
                   )}
                 </ConfirmModal>
               )}
index eb65fdf02dc0af9c923046c78448c61ed2b30a4c..3abce50cbf35cc51fcf2442af0434d366b8ef8e0 100644 (file)
@@ -250,7 +250,7 @@ it('should render tabs and allow navigation', async () => {
   expect(screen.getByRole('tab', { name: 'SAML' })).toHaveAttribute('aria-selected', 'false');
   expect(screen.getByRole('tab', { name: 'github GitHub' })).toHaveAttribute(
     'aria-selected',
-    'true'
+    'true',
   );
 });
 
@@ -558,13 +558,13 @@ describe('Github tab', () => {
 
       await act(() => user.click(github.viewConfigValidityDetailsButton.get()));
       expect(github.getConfigDetailsTitle()).toHaveTextContent(
-        'settings.authentication.github.configuration.validation.details.valid_label'
+        'settings.authentication.github.configuration.validation.details.valid_label',
       );
       expect(github.getOrgs()[0]).toHaveTextContent(
-        'settings.authentication.github.configuration.validation.details.valid_labelorg1'
+        'settings.authentication.github.configuration.validation.details.valid_labelorg1',
       );
       expect(github.getOrgs()[1]).toHaveTextContent(
-        'settings.authentication.github.configuration.validation.details.valid_labelorg2'
+        'settings.authentication.github.configuration.validation.details.valid_labelorg2',
       );
     });
 
@@ -594,14 +594,14 @@ describe('Github tab', () => {
 
       await act(() => user.click(github.viewConfigValidityDetailsButton.get()));
       expect(github.getConfigDetailsTitle()).toHaveTextContent(
-        'settings.authentication.github.configuration.validation.details.valid_label'
+        'settings.authentication.github.configuration.validation.details.valid_label',
       );
       expect(github.getOrgs()[0]).toHaveTextContent(
-        'settings.authentication.github.configuration.validation.details.invalid_labelorg1 - Installation suspended'
+        'settings.authentication.github.configuration.validation.details.invalid_labelorg1 - Installation suspended',
       );
 
       await act(() =>
-        user.click(within(github.configDetailsDialog.get()).getByRole('button', { name: 'close' }))
+        user.click(within(github.configDetailsDialog.get()).getByRole('button', { name: 'close' })),
       );
 
       await user.click(github.githubProvisioningButton.get());
@@ -628,13 +628,13 @@ describe('Github tab', () => {
 
       await act(() => user.click(github.viewConfigValidityDetailsButton.get()));
       expect(github.getConfigDetailsTitle()).toHaveTextContent(
-        'settings.authentication.github.configuration.validation.details.valid_label'
+        'settings.authentication.github.configuration.validation.details.valid_label',
       );
       expect(github.getOrgs()[0]).toHaveTextContent(
-        'settings.authentication.github.configuration.validation.details.valid_labelorg1'
+        'settings.authentication.github.configuration.validation.details.valid_labelorg1',
       );
       expect(github.getOrgs()[1]).toHaveTextContent(
-        'settings.authentication.github.configuration.validation.details.org_not_found.organization1'
+        'settings.authentication.github.configuration.validation.details.org_not_found.organization1',
       );
     });
 
@@ -660,7 +660,7 @@ describe('Github tab', () => {
 
       await act(() => user.click(github.viewConfigValidityDetailsButton.get()));
       expect(github.getConfigDetailsTitle()).toHaveTextContent(
-        'settings.authentication.github.configuration.validation.details.invalid_label'
+        'settings.authentication.github.configuration.validation.details.invalid_label',
       );
       expect(github.configDetailsDialog.get()).toHaveTextContent(errorMessage);
     });
@@ -686,10 +686,10 @@ describe('Github tab', () => {
 
       await act(() => user.click(github.viewConfigValidityDetailsButton.get()));
       expect(github.getConfigDetailsTitle()).toHaveTextContent(
-        'settings.authentication.github.configuration.validation.details.valid_label'
+        'settings.authentication.github.configuration.validation.details.valid_label',
       );
       await act(() =>
-        user.click(within(github.configDetailsDialog.get()).getByRole('button', { name: 'close' }))
+        user.click(within(github.configDetailsDialog.get()).getByRole('button', { name: 'close' })),
       );
 
       await act(() => user.click(github.githubProvisioningButton.get()));
@@ -699,7 +699,7 @@ describe('Github tab', () => {
 
       await act(() => user.click(github.viewConfigValidityDetailsButton.get()));
       expect(github.getConfigDetailsTitle()).toHaveTextContent(
-        'settings.authentication.github.configuration.validation.details.invalid_label'
+        'settings.authentication.github.configuration.validation.details.invalid_label',
       );
     });
 
@@ -727,25 +727,25 @@ describe('Github tab', () => {
       await act(() => user.click(github.viewConfigValidityDetailsButton.get()));
 
       expect(github.getOrgs()[0]).toHaveTextContent(
-        'settings.authentication.github.configuration.validation.details.valid_labelorg1'
+        'settings.authentication.github.configuration.validation.details.valid_labelorg1',
       );
       expect(github.getOrgs()[1]).toHaveTextContent(
-        'settings.authentication.github.configuration.validation.details.invalid_labelorg2 - Test error'
+        'settings.authentication.github.configuration.validation.details.invalid_labelorg2 - Test error',
       );
 
       await act(() =>
-        user.click(within(github.configDetailsDialog.get()).getByRole('button', { name: 'close' }))
+        user.click(within(github.configDetailsDialog.get()).getByRole('button', { name: 'close' })),
       );
 
       await act(() => user.click(github.githubProvisioningButton.get()));
 
       expect(github.configurationValidityError.get()).toBeInTheDocument();
       expect(github.configurationValidityError.get()).toHaveTextContent(
-        `settings.authentication.github.configuration.validation.invalid_org.org2.${errorMessage}`
+        `settings.authentication.github.configuration.validation.invalid_org.org2.${errorMessage}`,
       );
       await act(() => user.click(github.viewConfigValidityDetailsButton.get()));
       expect(github.getOrgs()[1]).toHaveTextContent(
-        `settings.authentication.github.configuration.validation.details.invalid_labelorg2 - ${errorMessage}`
+        `settings.authentication.github.configuration.validation.details.invalid_labelorg2 - ${errorMessage}`,
       );
     });
 
@@ -834,6 +834,6 @@ function renderAuthentication(features: Feature[] = []) {
   renderComponent(
     <AvailableFeaturesContext.Provider value={features}>
       <Authentication definitions={definitions} />
-    </AvailableFeaturesContext.Provider>
+    </AvailableFeaturesContext.Provider>,
   );
 }
index b88e1007257c1ca21a8b31f885eab7f4dc18febd..6070c0401fef8769d2845da469fd9feed01b3375 100644 (file)
@@ -46,7 +46,7 @@ export type SettingValue =
 
 export default function useConfiguration(
   definitions: ExtendedSettingDefinition[],
-  optionalFields: string[]
+  optionalFields: string[],
 ) {
   const keys = definitions.map((definition) => definition.key);
   const [values, setValues] = useState<Dict<SettingValue>>({});
@@ -79,8 +79,8 @@ export default function useConfiguration(
               definition,
             };
           }),
-          'key'
-        )
+          'key',
+        ),
       );
     }
   }, [data, definitions]);
@@ -102,18 +102,18 @@ export default function useConfiguration(
     Object.values(values).filter((v) => v.mandatory),
     (v) =>
       (v.newValue !== undefined && !isEmpty(v.newValue)) ||
-      (!v.isNotSet && v.newValue === undefined)
+      (!v.isNotSet && v.newValue === undefined),
   );
 
   const hasConfiguration = every(
     Object.values(values).filter((v) => v.mandatory),
-    (v) => !v.isNotSet
+    (v) => !v.isNotSet,
   );
 
   const deleteMutation = update(
     useResetSettingsMutation(),
     'mutate',
-    (mutate) => () => mutate(Object.keys(values))
+    (mutate) => () => mutate(Object.keys(values)),
   ) as Omit<UseMutationResult<void, unknown, void, unknown>, 'mutateAsync'>;
 
   const isValueChange = useCallback(
@@ -121,7 +121,7 @@ export default function useConfiguration(
       const value = values[setting];
       return value && value.newValue !== undefined && (value.value ?? '') !== value.newValue;
     },
-    [values]
+    [values],
   );
 
   return {
index 01c24408e4b8c94390c00483a1ddb8c28cb5558e..5ad6944dd0d29397f4528080b953771c1a697c24 100644 (file)
@@ -55,7 +55,7 @@ export default function useGithubConfiguration(definitions: ExtendedSettingDefin
   const { values, isValueChange, setNewValue } = config;
 
   const hasGithubProvisioning = useContext(AvailableFeaturesContext).includes(
-    Feature.GithubProvisioning
+    Feature.GithubProvisioning,
   );
   const { data: githubProvisioningStatus } = useGithubProvisioningEnabledQuery();
   const toggleGithubProvisioning = useToggleGithubProvisioningMutation();
index 2fdffa0ebb981342ee14430b1280d449f77f5b8e..b51035e164082264fc184380c151f625b5c20162 100644 (file)
@@ -60,7 +60,7 @@ export default class MultiValueInput extends React.PureComponent<DefaultSpeciali
               aria-label={translateWithParameters(
                 'settings.definition.delete_value',
                 getPropertyName(setting.definition),
-                value
+                value,
               )}
               onClick={() => this.handleDeleteValue(index)}
             />
@@ -77,7 +77,7 @@ export default class MultiValueInput extends React.PureComponent<DefaultSpeciali
       <div>
         <ul>
           {displayedValue.map((value, index) =>
-            this.renderInput(value, index, index === displayedValue.length - 1)
+            this.renderInput(value, index, index === displayedValue.length - 1),
           )}
         </ul>
       </div>
index 39977561d40fae5a6d3e05908decd06f733a7f88..645fef455c903012b70b6d44e03bb0e7f1f9c978 100644 (file)
@@ -80,7 +80,7 @@ export default class PropertySetInput extends React.PureComponent<DefaultSpecial
               aria-label={translateWithParameters(
                 'settings.definitions.delete_fields',
                 getPropertyName(setting.definition),
-                index
+                index,
               )}
               className="js-remove-value"
               onClick={() => this.handleDeleteValue(index)}
@@ -117,7 +117,7 @@ export default class PropertySetInput extends React.PureComponent<DefaultSpecial
           </thead>
           <tbody>
             {displayedValue.map((fieldValues, index) =>
-              this.renderFields(fieldValues, index, index === displayedValue.length - 1)
+              this.renderFields(fieldValues, index, index === displayedValue.length - 1),
             )}
           </tbody>
         </table>
index 0c02ad50e6bdce0bc59abb70ff4f92c9f96fd718..0b97d1129b009095a0ea2e6c8e3ef131fe6a17c6 100644 (file)
@@ -60,7 +60,7 @@ interface CommonFieldProps extends LabelProps {
 function renderFieldWrapper(
   label: React.ReactNode,
   input: React.ReactNode,
-  help?: React.ReactNode
+  help?: React.ReactNode,
 ) {
   return (
     <div className="settings-definition">
@@ -106,7 +106,7 @@ function renderBooleanField(
   props: Omit<CommonFieldProps, 'optional'> & {
     value: boolean;
     inputExtra?: React.ReactNode;
-  }
+  },
 ) {
   const { id, value, onFieldChange, propKey, inputExtra } = props;
   return renderFieldWrapper(
@@ -118,14 +118,14 @@ function renderBooleanField(
       </div>
       {inputExtra}
     </div>,
-    renderHelp(props)
+    renderHelp(props),
   );
 }
 
 function renderField(
   props: CommonFieldProps & {
     value: string;
-  }
+  },
 ) {
   const { id, propKey, value, onFieldChange } = props;
   return renderFieldWrapper(
@@ -139,7 +139,7 @@ function renderField(
       type="text"
       value={value}
     />,
-    renderHelp(props)
+    renderHelp(props),
   );
 }
 
index 2e3510abe2b6435a1695de23bae57d352d6227ff..bda86f6bb05a3d1ae6c45d804345ef3467e41a9c 100644 (file)
@@ -81,7 +81,7 @@ export function PRDecorationBinding(props: Props) {
   const [checkingConfiguration, setCheckingConfiguration] = React.useState(false);
   const { data: originalData } = useProjectBindingQuery(component.key);
   const { mutateAsync: deleteMutation, isLoading: isDeleting } = useDeleteProjectAlmBindingMutation(
-    component.key
+    component.key,
   );
   const { mutateAsync: updateMutation, isLoading: isUpdating } = useSetProjectBindingMutation();
 
@@ -96,7 +96,7 @@ export function PRDecorationBinding(props: Props) {
       }
       return REQUIRED_FIELDS_BY_ALM[selected.alm].reduce(
         (result: boolean, field) => result && Boolean(additionalFields[field]),
-        true
+        true,
       );
     };
 
@@ -111,7 +111,7 @@ export function PRDecorationBinding(props: Props) {
       slug: oSlug = '',
       summaryCommentEnabled: osummaryCommentEnabled = false,
       monorepo: omonorepo = false,
-    }: FormData
+    }: FormData,
   ) => {
     return (
       key === oKey &&
@@ -168,7 +168,7 @@ export function PRDecorationBinding(props: Props) {
   const submitProjectAlmBinding = (
     alm: AlmKeys,
     key: string,
-    almSpecificFields: Omit<FormData, 'key'>
+    almSpecificFields: Omit<FormData, 'key'>,
   ): Promise<void> => {
     const almSetting = key;
     const { repository, slug = '', monorepo = false } = almSpecificFields;
index fbcb870481084d0fa3a97003faa1ffd67075c7af..ece36a858b3ecda6bffec004965c4f6f5c61504b 100644 (file)
@@ -194,13 +194,13 @@ export default function PRDecorationBindingRenderer(props: PRDecorationBindingRe
                   <FormattedMessage
                     id="settings.pr_decoration.binding.check_configuration.failure.check_global_settings"
                     defaultMessage={translate(
-                      'settings.pr_decoration.binding.check_configuration.failure.check_global_settings'
+                      'settings.pr_decoration.binding.check_configuration.failure.check_global_settings',
                     )}
                     values={{
                       link: (
                         <Link to={getGlobalSettingsUrl(ALM_INTEGRATION_CATEGORY, { alm })}>
                           {translate(
-                            'settings.pr_decoration.binding.check_configuration.failure.check_global_settings.link'
+                            'settings.pr_decoration.binding.check_configuration.failure.check_global_settings.link',
                           )}
                         </Link>
                       ),
index bfe7a890fcdbd023d8f478a83461c010477f4218..55984f4ab648bf5bb40a9a72ba1e79907c32bec6 100644 (file)
@@ -99,7 +99,7 @@ it.each([
 
     // Set form data
     await selectEvent.select(ui.input('name', 'combobox').get(), (content) =>
-      content.includes(key)
+      content.includes(key),
     );
 
     const list = inputsList[alm];
@@ -119,24 +119,24 @@ it.each([
     almSettings.setProjectBindingConfigurationErrors(undefined);
     await ui.setInput(
       Object.keys(list).find((key) => key.endsWith('.repository')) as string,
-      'Anything'
+      'Anything',
     );
     await act(() => user.click(ui.saveButton.get()));
     expect(
-      await ui.validationMsg('settings.pr_decoration.binding.check_configuration.success').find()
+      await ui.validationMsg('settings.pr_decoration.binding.check_configuration.success').find(),
     ).toBeInTheDocument();
 
     await act(() => user.click(ui.validateButton.get()));
     expect(
-      ui.validationMsg('settings.pr_decoration.binding.check_configuration.success').get()
+      ui.validationMsg('settings.pr_decoration.binding.check_configuration.success').get(),
     ).toBeInTheDocument();
 
     // Rerender and verify that validation is done for binding
     rerender(
-      <MockedPRDecorationBinding component={mockComponent()} currentUser={mockCurrentUser()} />
+      <MockedPRDecorationBinding component={mockComponent()} currentUser={mockCurrentUser()} />,
     );
     expect(
-      await ui.validationMsg('settings.pr_decoration.binding.check_configuration.success').find()
+      await ui.validationMsg('settings.pr_decoration.binding.check_configuration.success').find(),
     ).toBeInTheDocument();
     expect(ui.saveButton.query()).not.toBeInTheDocument();
 
@@ -144,7 +144,7 @@ it.each([
     await act(() => user.click(ui.resetButton.get()));
     expect(ui.input('', 'textbox').query()).not.toBeInTheDocument();
     expect(ui.input('', 'switch').query()).not.toBeInTheDocument();
-  }
+  },
 );
 
 function getPageObjects() {
@@ -197,9 +197,9 @@ function MockedPRDecorationBinding({
 
 function renderPRDecorationBinding(
   component: Component = mockComponent(),
-  currentUser: CurrentUser = mockCurrentUser()
+  currentUser: CurrentUser = mockCurrentUser(),
 ) {
   return renderComponent(
-    <MockedPRDecorationBinding component={component} currentUser={currentUser} />
+    <MockedPRDecorationBinding component={component} currentUser={currentUser} />,
   );
 }
index 5c9502161a9d0211e3b52ef654f5c9b8a2513416..3e73529f9ef7f70a4a836673a3afbd83e3d73eb9 100644 (file)
@@ -55,7 +55,7 @@ export default class EncryptionApp extends React.PureComponent<{}, State> {
         if (this.mounted) {
           this.setState({ loading: false });
         }
-      }
+      },
     );
   };
 
index c2ba4907837c64515757c5c28195d827c7940978..5fc23d8017481abd9b261479fa2dd8da0329ea8f 100644 (file)
@@ -66,7 +66,7 @@ export default class EncryptionForm extends React.PureComponent<Props, State> {
         if (this.mounted) {
           this.setState({ encrypting: false });
         }
-      }
+      },
     );
   };
 
index 11c7821a2490cebc442c2af235a544089abb1f8a..b3c011caf02c3f450e618bdc242c587fec65d770 100644 (file)
   border-right: none;
   overflow: hidden;
   text-overflow: ellipsis;
-  transition: color 0.3s ease, background-color 0.3s ease;
+  transition:
+    color 0.3s ease,
+    background-color 0.3s ease;
 }
 
 .side-tabs-menu > li > a:hover,
index 514e50acdadbecf075b65002dca5ca121ce02a21..56189e1f3c1d84a3e3fa4c24db124859379b89ea 100644 (file)
@@ -102,7 +102,7 @@ export function getSettingValue(definition: SettingDefinition, settingValue?: Se
 
 export function combineDefinitionAndSettingValue(
   definition: ExtendedSettingDefinition,
-  value?: SettingValue
+  value?: SettingValue,
 ): SettingWithCategory {
   const hasValue = value !== undefined && value.inherited !== true;
   return {
@@ -118,7 +118,7 @@ export function getDefaultCategory(categories: string[]) {
     return DEFAULT_CATEGORY;
   }
   const sortedCategories = sortBy(categories, (category) =>
-    getCategoryName(category).toLowerCase()
+    getCategoryName(category).toLowerCase(),
   );
   return sortedCategories[0];
 }
@@ -226,7 +226,7 @@ export function isRealSettingKey(key: string) {
 
 export function buildSettingLink(
   definition: ExtendedSettingDefinition,
-  component?: Component
+  component?: Component,
 ): Partial<Path> {
   const { category, key } = definition;
 
index 8322576286fac3085949031ca6c4fbb2462662c6..e44dab0d19a0b5385bdcc950ef9e15202881b815 100644 (file)
@@ -58,15 +58,15 @@ describe('getSystemLogsLevel', () => {
       u.getSystemLogsLevel(
         mockClusterSysInfo({
           'Application Nodes': [{ Name: 'App 1' }, { Name: 'App 2' }],
-        })
-      )
+        }),
+      ),
     ).toBe(u.LogsLevels.INFO);
     expect(
       u.getSystemLogsLevel(
         mockClusterSysInfo({
           'Application Nodes': [{ 'Compute Engine Logging': {} }, { Name: 'App 2' }],
-        })
-      )
+        }),
+      ),
     ).toBe(u.LogsLevels.INFO);
     expect(u.getSystemLogsLevel({} as SysInfoStandalone)).toBe(u.LogsLevels.INFO);
   });
@@ -97,10 +97,10 @@ describe('hasLoggingInfo', () => {
 describe('getStandaloneSecondarySections', () => {
   it('should return the correct information', () => {
     expect(Object.keys(u.getStandaloneSecondarySections(mockStandaloneSysInfo()))).toEqual(
-      expect.arrayContaining(['Compute Engine', 'Search Engine', 'Web'])
+      expect.arrayContaining(['Compute Engine', 'Search Engine', 'Web']),
     );
     expect(Object.keys(u.getStandaloneSecondarySections(mockClusterSysInfo()))).toEqual(
-      expect.arrayContaining(['Compute Engine', 'Search Engine', 'Web'])
+      expect.arrayContaining(['Compute Engine', 'Search Engine', 'Web']),
     );
   });
 });
@@ -114,7 +114,7 @@ describe('getStandaloneMainSections', () => {
         'Health',
         'Health Causes',
         'Database',
-      ])
+      ]),
     );
   });
 });
@@ -132,7 +132,7 @@ describe('getClusterMainCardSection', () => {
         'Compute Engine Tasks',
         'Search State',
         'Search Indexes',
-      ])
+      ]),
     );
   });
 });
@@ -143,8 +143,8 @@ describe('getSearchNodes', () => {
       u.getSearchNodes(
         mockClusterSysInfo({
           'Search Nodes': [{ Name: 'searchnode1' }],
-        })
-      )
+        }),
+      ),
     ).toEqual([{ Name: 'searchnode1' }]);
   });
 });
@@ -155,8 +155,8 @@ describe('getAppNodes', () => {
       u.getAppNodes(
         mockClusterSysInfo({
           'Application Nodes': [{ Name: 'appnode1' }],
-        })
-      )
+        }),
+      ),
     ).toEqual([{ Name: 'appnode1' }]);
   });
 });
@@ -182,7 +182,7 @@ describe('getHealth', () => {
 describe('getLogsLevel', () => {
   it('should return the correct information, if available', () => {
     expect(u.getLogsLevel({ 'Compute Engine Logging': { 'Logs Level': 'TRACE' } })).toEqual(
-      'TRACE'
+      'TRACE',
     );
   });
 
@@ -191,7 +191,7 @@ describe('getLogsLevel', () => {
       u.getLogsLevel({
         'Web Logging': mockLogs(u.LogsLevels.DEBUG),
         'Compute Engine Logging': mockLogs(u.LogsLevels.TRACE),
-      })
+      }),
     ).toEqual(u.LogsLevels.TRACE);
   });
 
@@ -203,7 +203,7 @@ describe('getLogsLevel', () => {
 describe('getServerId', () => {
   it('should return the correct information, if available', () => {
     expect(u.getServerId(mockStandaloneSysInfo({ System: { 'Server ID': 'foo-bar' } }))).toEqual(
-      'foo-bar'
+      'foo-bar',
     );
   });
 
@@ -228,22 +228,22 @@ describe('getClusterVersion', () => {
       u.getClusterVersion(
         mockClusterSysInfo({
           'Application Nodes': [{ System: { Version: '1.0' } }],
-        })
-      )
+        }),
+      ),
     ).toEqual('1.0');
   });
 
   it('should return undefined if no information is available', () => {
     expect(
-      u.getClusterVersion(mockClusterSysInfo({ 'Application Nodes': [{ System: {} }] }))
+      u.getClusterVersion(mockClusterSysInfo({ 'Application Nodes': [{ System: {} }] })),
     ).toBeUndefined();
     expect(
       u.getClusterVersion(
         mockClusterSysInfo({
           'Application Nodes': [],
           System: { Version: '1.0' },
-        })
-      )
+        }),
+      ),
     ).toBeUndefined();
   });
 });
index dffee4c1bad6951020b432b673431127b780f420..fb5c5427eb431653e2ca3c16d40619d1a17af3a8 100644 (file)
@@ -50,7 +50,7 @@ export default class ChangeLogLevelForm extends React.PureComponent<Props, State
       this.setState({ updating: true });
       setLogLevel(newLevel).then(
         () => this.props.onChange(),
-        () => this.setState({ updating: false })
+        () => this.setState({ updating: false }),
       );
     }
   };
index 7c427231f86542bb11b20305d59cd8f392182dc2..07d9d6b0ccdc27cbead15baff11d0b52effb755c 100644 (file)
@@ -164,7 +164,7 @@ export default class PageActions extends React.PureComponent<Props, State> {
         {this.state.openLogsLevelForm && (
           <ChangeLogLevelForm
             infoMsg={translate(
-              this.props.cluster ? 'system.cluster_log_level.info' : 'system.log_level.info'
+              this.props.cluster ? 'system.cluster_log_level.info' : 'system.log_level.info',
             )}
             logLevel={this.props.logLevel}
             onChange={this.handleLogsLevelChange}
index d9e135e7b9abf26d70c097223527c445b52a3393..1028de958764fb9263b59875b344b5f551d2326c 100644 (file)
@@ -75,7 +75,7 @@ class SystemApp extends React.PureComponent<Props, State> {
         if (this.mounted) {
           this.setState({ loading: false });
         }
-      }
+      },
     );
   };
 
index f1ec48b95f0e6d739e0a0ef7a933fa5e9a7051e1..e0c4e1dfed8cb0a1e66bcfd47e97323a53d46a80 100644 (file)
@@ -42,7 +42,7 @@ describe('System Info Standalone', () => {
 
     expect(ui.copyIdInformation.get()).toHaveAttribute(
       'data-clipboard-text',
-      expect.stringContaining(`Server ID: asd564-asd54a-5dsfg45`)
+      expect.stringContaining(`Server ID: asd564-asd54a-5dsfg45`),
     );
 
     expect(ui.sectionButton('System').get()).toBeInTheDocument();
@@ -74,7 +74,7 @@ describe('System Info Standalone', () => {
     ['Main Process', 'Compute Engine', 'Search Engine', 'Web Server', 'Access Logs'].forEach(
       (link) => {
         expect(screen.getByRole('link', { name: link })).toBeInTheDocument();
-      }
+      },
     );
     expect(ui.downloadSystemInfoButton.get()).toBeInTheDocument();
   });
@@ -94,7 +94,7 @@ describe('System Info Cluster', () => {
 
     expect(ui.copyIdInformation.get()).toHaveAttribute(
       'data-clipboard-text',
-      expect.stringContaining(`Server ID: asd564-asd54a-5dsfg45`)
+      expect.stringContaining(`Server ID: asd564-asd54a-5dsfg45`),
     );
 
     // Renders health checks
index 69fc7e55d4fe902ef4714f066bb3a5d650ba97e6..295f8ef891e0ae7dc264e6233a4f7a7a7a22c70b 100644 (file)
@@ -100,7 +100,7 @@ export function getLogsLevel(sysInfoObject?: SysInfoValueObject): LogsLevels {
           getLogsLevel(sysInfoObject[WEB_LOGGING_FIELD]),
           getLogsLevel(sysInfoObject[CE_LOGGING_FIELD]),
         ],
-        (logLevel: LogsLevels) => LOGS_LEVELS.indexOf(logLevel)
+        (logLevel: LogsLevels) => LOGS_LEVELS.indexOf(logLevel),
       )[1];
     }
   }
@@ -116,7 +116,7 @@ export function getSearchNodes(sysInfoData: SysInfoCluster): SysInfoSearchNode[]
 }
 
 export function isCluster(
-  sysInfoData: SysInfoCluster | SysInfoStandalone
+  sysInfoData: SysInfoCluster | SysInfoStandalone,
 ): sysInfoData is SysInfoCluster {
   return sysInfoData[SYSTEM_FIELD] && sysInfoData[SYSTEM_FIELD][HA_FIELD] === true;
 }
@@ -126,7 +126,7 @@ export function isLogInfoBlock(sysInfoObject: SysInfoValueObject): sysInfoObject
 }
 
 export function hasLoggingInfo(
-  sysInfoObject: SysInfoValueObject
+  sysInfoObject: SysInfoValueObject,
 ): sysInfoObject is SysInfoStandalone | SysInfoAppNode {
   return Boolean(sysInfoObject[WEB_LOGGING_FIELD] || sysInfoObject[CE_LOGGING_FIELD]);
 }
@@ -147,7 +147,7 @@ export function getClusterVersion(sysInfoData: SysInfoCluster): string | undefin
 export function getSystemLogsLevel(sysInfoData: SysInfoCluster | SysInfoStandalone): string {
   if (isCluster(sysInfoData)) {
     const logLevels = sortBy(getAppNodes(sysInfoData).map(getLogsLevel), (logLevel: LogsLevels) =>
-      LOGS_LEVELS.indexOf(logLevel)
+      LOGS_LEVELS.indexOf(logLevel),
     );
     return logLevels.length > 0 ? logLevels[logLevels.length - 1] : DEFAULT_LOG_LEVEL;
   }
@@ -192,7 +192,7 @@ export function getStandaloneMainSections(sysInfoData: SysInfoBase): SysInfoValu
         [PLUGINS_FIELD, SETTINGS_FIELD, STATS_FIELD, SYSTEM_FIELD].includes(key) ||
         key.startsWith(CE_FIELD_PREFIX) ||
         key.startsWith(SEARCH_PREFIX) ||
-        key.startsWith(WEB_PREFIX)
+        key.startsWith(WEB_PREFIX),
     ) as SysInfoValueObject),
   };
 }
@@ -201,10 +201,10 @@ export function getStandaloneSecondarySections(sysInfoData: SysInfoBase): SysInf
   return {
     Web: pickBy(sysInfoData, (_, key) => key.startsWith(WEB_PREFIX)) as SysInfoValueObject,
     'Compute Engine': pickBy(sysInfoData, (_, key) =>
-      key.startsWith(CE_FIELD_PREFIX)
+      key.startsWith(CE_FIELD_PREFIX),
     ) as SysInfoValueObject,
     'Search Engine': pickBy(sysInfoData, (_, key) =>
-      key.startsWith(SEARCH_PREFIX)
+      key.startsWith(SEARCH_PREFIX),
     ) as SysInfoValueObject,
   };
 }
@@ -234,12 +234,12 @@ export function groupSections(sysInfoData: SysInfoValueObject) {
 export const parseQuery = memoize(
   (urlQuery: RawQuery): Query => ({
     expandedCards: parseAsArray(urlQuery.expand, parseAsString),
-  })
+  }),
 );
 
 export const serializeQuery = memoize(
   (query: Query): RawQuery =>
     cleanQuery({
       expand: serializeStringArray(query.expandedCards),
-    })
+    }),
 );
index 91d942a63254ddb46abf2fbc7fbaeb047fb790b7..77b93e30b67a199f79130fb018118a7690460c3b 100644 (file)
@@ -77,7 +77,7 @@ export default function UsersApp() {
       managed,
       ...usersActivityParams,
     },
-    numberOfPages
+    numberOfPages,
   );
 
   const manageProvider = useManageProvider();
index 33ce5102cd8eed32de938d89034e9c766afadd7f..5420e2c3a80d32fa3b03a98dc1c1e090c3c86b95 100644 (file)
@@ -57,7 +57,7 @@ export default function UsersList({ identityProviders, users, manageProvider }:
           {users.map((user) => (
             <UserListItem
               identityProvider={identityProviders.find(
-                (provider) => user.externalProvider === provider.key
+                (provider) => user.externalProvider === provider.key,
               )}
               key={user.login}
               user={user}
index e2659be46bfe646df8157062e2e41abb74018b2c..6f2fbe3eade6056e8a15684f26b276e4a3c54bbe 100644 (file)
@@ -79,7 +79,7 @@ const ui = {
   aliceRowWithLocalBadge: byRole('row', {
     name: (accessibleName) =>
       accessibleName.startsWith(
-        'AM Alice Merveille alice.merveille alice.merveille@wonderland.com local '
+        'AM Alice Merveille alice.merveille alice.merveille@wonderland.com local ',
       ),
   }),
   bobRow: byRole('row', {
@@ -178,7 +178,7 @@ describe('different filters combinations', () => {
     await act(async () => {
       await selectEvent.select(
         ui.activityFilter.get(),
-        'users.activity_filter.active_sonarlint_users'
+        'users.activity_filter.active_sonarlint_users',
       );
     });
 
@@ -194,7 +194,7 @@ describe('different filters combinations', () => {
     await act(async () => {
       await selectEvent.select(
         ui.activityFilter.get(),
-        'users.activity_filter.active_sonarqube_users'
+        'users.activity_filter.active_sonarqube_users',
       );
     });
 
@@ -246,7 +246,7 @@ describe('in non managed mode', () => {
     await act(() => user.click(ui.createUserDialogButton.get()));
     expect(ui.dialogCreateUser.get()).toBeInTheDocument();
     expect(
-      await within(ui.dialogCreateUser.get()).findByText('Error: Empty SCM')
+      await within(ui.dialogCreateUser.get()).findByText('Error: Empty SCM'),
     ).toBeInTheDocument();
     // Remove SCM account
     await user.click(ui.deleteSCMButton().get());
@@ -329,7 +329,7 @@ describe('in non managed mode', () => {
 
     await act(async () => user.click(await ui.aliceUpdateButton.find()));
     await user.click(
-      await within(ui.aliceRow.get()).findByRole('button', { name: 'update_details' })
+      await within(ui.aliceRow.get()).findByRole('button', { name: 'update_details' }),
     );
     expect(await ui.dialogUpdateUser.find()).toBeInTheDocument();
 
@@ -350,7 +350,7 @@ describe('in non managed mode', () => {
 
     await act(async () => user.click(await ui.aliceUpdateButton.find()));
     await user.click(
-      await within(ui.aliceRow.get()).findByRole('button', { name: 'users.deactivate' })
+      await within(ui.aliceRow.get()).findByRole('button', { name: 'users.deactivate' }),
     );
     expect(await ui.dialogDeactivateUser.find()).toBeInTheDocument();
     expect(ui.deleteUserAlert.query()).not.toBeInTheDocument();
@@ -359,8 +359,8 @@ describe('in non managed mode', () => {
 
     await act(() =>
       user.click(
-        within(ui.dialogDeactivateUser.get()).getByRole('button', { name: 'users.deactivate' })
-      )
+        within(ui.dialogDeactivateUser.get()).getByRole('button', { name: 'users.deactivate' }),
+      ),
     );
     expect(ui.aliceRow.query()).not.toBeInTheDocument();
   });
@@ -372,7 +372,7 @@ describe('in non managed mode', () => {
 
     await act(async () => user.click(await ui.aliceUpdateButton.find()));
     await user.click(
-      await within(ui.aliceRow.get()).findByRole('button', { name: 'my_profile.password.title' })
+      await within(ui.aliceRow.get()).findByRole('button', { name: 'my_profile.password.title' }),
     );
     expect(await ui.dialogPasswords.find()).toBeInTheDocument();
 
@@ -386,13 +386,13 @@ describe('in non managed mode', () => {
 
     expect(ui.changeButton.get()).toBeEnabled();
     expect(
-      screen.queryByText(`user.${ChangePasswordResults.OldPasswordIncorrect}`)
+      screen.queryByText(`user.${ChangePasswordResults.OldPasswordIncorrect}`),
     ).not.toBeInTheDocument();
     await act(() => user.click(ui.changeButton.get()));
     expect(
       await within(ui.dialogPasswords.get()).findByText(
-        `user.${ChangePasswordResults.OldPasswordIncorrect}`
-      )
+        `user.${ChangePasswordResults.OldPasswordIncorrect}`,
+      ),
     ).toBeInTheDocument();
 
     await user.clear(ui.oldPassword.get());
@@ -403,11 +403,11 @@ describe('in non managed mode', () => {
     await user.type(ui.confirmPassword.get(), 'test');
 
     expect(
-      screen.queryByText(`user.${ChangePasswordResults.NewPasswordSameAsOld}`)
+      screen.queryByText(`user.${ChangePasswordResults.NewPasswordSameAsOld}`),
     ).not.toBeInTheDocument();
     await act(() => user.click(ui.changeButton.get()));
     expect(
-      await screen.findByText(`user.${ChangePasswordResults.NewPasswordSameAsOld}`)
+      await screen.findByText(`user.${ChangePasswordResults.NewPasswordSameAsOld}`),
     ).toBeInTheDocument();
 
     await user.clear(ui.newPassword.get());
@@ -453,10 +453,10 @@ describe('in manage mode', () => {
     await user.click(ui.bobUpdateButton.get());
 
     expect(
-      ui.bobRow.byRole('button', { name: 'users.deactivate' }).query()
+      ui.bobRow.byRole('button', { name: 'users.deactivate' }).query(),
     ).not.toBeInTheDocument();
     expect(
-      ui.bobRow.byRole('button', { name: 'my_profile.password.title' }).query()
+      ui.bobRow.byRole('button', { name: 'my_profile.password.title' }).query(),
     ).not.toBeInTheDocument();
 
     await user.click(await ui.bobRow.byRole('button', { name: 'update_scm' }).get());
@@ -521,8 +521,8 @@ describe('in manage mode', () => {
       user.click(
         await within(await ui.aliceRow.find()).findByRole('button', {
           name: 'users.update_tokens_for_x.Alice Merveille',
-        })
-      )
+        }),
+      ),
     );
     expect(await ui.dialogTokens.find()).toBeInTheDocument();
 
@@ -667,7 +667,7 @@ it('accessibility', async () => {
       .byRole('button', {
         name: 'users.update_tokens_for_x.Alice Merveille',
       })
-      .find()
+      .find(),
   );
   expect(await ui.dialogTokens.find()).toBeInTheDocument();
   await expect(await ui.dialogTokens.find()).toHaveNoA11yViolations();
@@ -676,7 +676,7 @@ it('accessibility', async () => {
   // user password dialog should be accessible
   await user.click(await ui.aliceUpdateButton.find());
   await user.click(
-    await ui.aliceRow.byRole('button', { name: 'my_profile.password.title' }).find()
+    await ui.aliceRow.byRole('button', { name: 'my_profile.password.title' }).find(),
   );
   expect(await ui.dialogPasswords.find()).toBeInTheDocument();
   await expect(await ui.dialogPasswords.find()).toHaveNoA11yViolations();
index b7fbf2077bf4c5bc7897cd2ded6415aa37185edb..daaee9d7f35a3e5af3ab0aa671f32b8f95f72de2 100644 (file)
@@ -45,7 +45,7 @@ export default function DeactivateForm(props: Props) {
       { login: user.login, anonymize },
       {
         onSuccess: props.onClose,
-      }
+      },
     );
   };
 
index 6e9a17d32375288a2dc60b8fa22ec0b52c8403c3..b57a08afff683b745ca9d941dbd461d43310abbf 100644 (file)
@@ -38,7 +38,7 @@ export default function PasswordForm(props: Props) {
   const { user } = props;
   const [confirmPassword, setConfirmPassword] = React.useState('');
   const [errorTranslationKey, setErrorTranslationKey] = React.useState<string | undefined>(
-    undefined
+    undefined,
   );
   const [newPassword, setNewPassword] = React.useState('');
   const [oldPassword, setOldPassword] = React.useState('');
index 626ecb118e80e96bdf080bed160ca3739d543afb..d6198ed5d1e998e10b0b39d0c6f63b75da38aea4 100644 (file)
@@ -54,7 +54,7 @@ export function TokensForm(props: Props) {
   const [projects, setProjects] = React.useState<LabelValueSelectOption[]>([]);
   const [selectedProject, setSelectedProject] = React.useState<LabelValueSelectOption>();
   const [newTokenExpiration, setNewTokenExpiration] = React.useState<TokenExpiration>(
-    TokenExpiration.OneMonth
+    TokenExpiration.OneMonth,
   );
   const [tokenExpirationOptions, setTokenExpirationOptions] =
     React.useState<{ value: TokenExpiration; label: string }[]>(EXPIRATION_OPTIONS);
index cc7866c0d591cbbde1df44712c728ee0b2c4e38d..9a74b5ae74596370a1e5d00c39502506af0bed21 100644 (file)
@@ -69,7 +69,7 @@ export default function UserForm(props: Props) {
         password,
         scmAccounts,
       },
-      { onSuccess: props.onClose, onError: handleError }
+      { onSuccess: props.onClose, onError: handleError },
     );
   };
 
@@ -85,7 +85,7 @@ export default function UserForm(props: Props) {
             name: user?.local ? name : undefined,
             scmAccount: scmAccounts,
           },
-      { onSuccess: props.onClose, onError: handleError }
+      { onSuccess: props.onClose, onError: handleError },
     );
   };
 
index c3ceb0cc5b47f31f702370231897ccb177eb3070..10b7987a71ad57137d8e2684e8d53655ba4916c4 100644 (file)
@@ -30,7 +30,7 @@ export const parseQuery = memoize(
   (urlQuery: RawQuery): Query => ({
     search: parseAsString(urlQuery['search']),
     managed: urlQuery['managed'] !== undefined ? urlQuery['managed'] === 'true' : undefined,
-  })
+  }),
 );
 
 export const serializeQuery = memoize(
@@ -38,5 +38,5 @@ export const serializeQuery = memoize(
     cleanQuery({
       search: query.search ? serializeString(query.search) : undefined,
       managed: query.managed,
-    })
+    }),
 );
index cce9a665dd3b476f8ee3d11f04e3c449a675a7b9..efc3b6a1d36874f4f51a19502c2baf452c68fd3e 100644 (file)
@@ -42,10 +42,10 @@ export default function WebApiApp() {
       (acc, [name, methods]) => [
         ...acc,
         ...Object.entries(
-          omit(methods, 'summary', '$ref', 'description', 'servers', 'parameters') ?? {}
+          omit(methods, 'summary', '$ref', 'description', 'servers', 'parameters') ?? {},
         ).map(([method, info]) => ({ name, method, info })),
       ],
-      []
+      [],
     );
   }, [data]);
 
index e3a795cfd6d6cb1e98f66fd68bbc8e43ace265bd..2ab10d3d5bda69711314636cb5d7b699c2be851b 100644 (file)
@@ -38,13 +38,13 @@ const ui = {
   apiSidebarItem: byTestId('js-subnavigation-item'),
   requestBody: byText('api_documentation.v2.request_subheader.request_body'),
   queryParameter: byRole('list', { name: 'api_documentation.v2.request_subheader.query' }).byRole(
-    'listitem'
+    'listitem',
   ),
   pathParameter: byRole('list', { name: 'api_documentation.v2.request_subheader.path' }).byRole(
-    'listitem'
+    'listitem',
   ),
   requestHeader: byRole('list', { name: 'api_documentation.v2.request_subheader.header' }).byRole(
-    'listitem'
+    'listitem',
   ),
   response: byRole('list', { name: 'api_documentation.v2.response_header' }).byRole('listitem'),
 };
@@ -147,7 +147,7 @@ it('should show About page', async () => {
   expect(
     screen.getByText('This is a sample Pet Store Server based on the OpenAPI 3.0 specification.', {
       exact: false,
-    })
+    }),
   ).toBeInTheDocument();
   await user.click(ui.apiScopePet.get());
   await user.click(ui.apiSidebarItem.getAt(0));
index de2113ecb77f6a57b5fd76cb356e4bb627cc63d3..5ffd0aa7bfb2fd31b6d8ee449ae1b18f99feb179 100644 (file)
@@ -97,7 +97,7 @@ it('should dereference schema', () => {
           },
         },
       },
-    })
+    }),
   ).toStrictEqual({
     openapi: '3.0.1',
     info: {
@@ -213,7 +213,7 @@ it('should map open api response schema', () => {
           type: 'boolean',
         },
       },
-    })
+    }),
   ).toStrictEqual({
     str: 'string',
     int: 'integer (int32)',
@@ -227,13 +227,13 @@ it('should map open api response schema', () => {
       items: {
         type: 'string',
       },
-    })
+    }),
   ).toStrictEqual(['string']);
 
   expect(
     mapOpenAPISchema({
       type: 'string',
       enum: ['GREEN', 'YELLOW', 'RED'],
-    })
+    }),
   ).toStrictEqual(['GREEN', 'YELLOW', 'RED']);
 });
index 5d20aca8cc80bcf91d07124e891d2e476c08708a..b17dc6112a3d686aa053ef848e1500fd024ff115 100644 (file)
@@ -54,7 +54,7 @@ export default function ApiSidebar({ apisList, docInfo }: Props) {
           (api) =>
             api.name.toLowerCase().includes(lowerCaseSearch) ||
             api.method.toLowerCase().includes(lowerCaseSearch) ||
-            api.info.summary?.toLowerCase().includes(lowerCaseSearch)
+            api.info.summary?.toLowerCase().includes(lowerCaseSearch),
         )
         .reduce<Record<string, Api[]>>((acc, api) => {
           const subgroup = api.name.split('/')[1];
@@ -63,7 +63,7 @@ export default function ApiSidebar({ apisList, docInfo }: Props) {
             [subgroup]: [...(acc[subgroup] ?? []), api],
           };
         }, {}),
-    [lowerCaseSearch, apisList]
+    [lowerCaseSearch, apisList],
   );
 
   return (
@@ -85,7 +85,7 @@ export default function ApiSidebar({ apisList, docInfo }: Props) {
       {Object.entries(groupedList).map(([group, apis]) => (
         <SubnavigationAccordion
           initExpanded={apis.some(
-            ({ name, method }) => name === activeApi[0] && method === activeApi[1]
+            ({ name, method }) => name === activeApi[0] && method === activeApi[1],
           )}
           className="sw-mt-2"
           header={group}
index 768b1b8605b25ce3bf747eafffe75d33df0b1900..e6f877306256bc8b7fd17f05d956a29751bb92cb 100644 (file)
@@ -27,7 +27,7 @@ export const URL_DIVIDER = '-';
 type ConvertedSchema = string | { [Key: string]: ConvertedSchema } | ConvertedSchema[];
 
 export const mapOpenAPISchema = (
-  schema: ExcludeReferences<OpenAPIV3.SchemaObject>
+  schema: ExcludeReferences<OpenAPIV3.SchemaObject>,
 ): ConvertedSchema => {
   if (schema.type === 'object') {
     const result = { ...schema.properties };
@@ -46,7 +46,7 @@ export const mapOpenAPISchema = (
 };
 
 export const dereferenceSchema = (
-  document: OpenAPIV3.Document
+  document: OpenAPIV3.Document,
 ): ExcludeReferences<OpenAPIV3.Document> => {
   const dereference = (ref: string) => {
     const path = ref.replace('#/', '').split('/');
index 130cf6ae11f43b66dbc868381870666e6c48a00f..8fd5a3b1fff82f9a31d451da4b58f1070a79bb52 100644 (file)
@@ -144,7 +144,7 @@ export default class Action extends React.PureComponent<Props, State> {
                 serializeQuery({
                   deprecated: Boolean(action.deprecatedSince),
                   internal: Boolean(action.internal),
-                })
+                }),
               ),
             }}
           >
index 5c815bc8cd6637bddffcfa2f503a02e6dde07d95..5dee5c6fc99254f53ae2783b162c614930e7db03 100644 (file)
@@ -37,7 +37,7 @@ export default function Menu(props: Props) {
   const filteredDomains = (domains || [])
     .map((domain) => {
       const filteredActions = domain.actions.filter((action) =>
-        actionsFilter(query, domain, action)
+        actionsFilter(query, domain, action),
       );
       return { ...domain, filteredActions };
     })
index f54a977e8f63fc05bff3760e1a7d377e5849f0c5..70e2e3a6f9c81283cd04ed996fbc5ccb2ecc940b 100644 (file)
@@ -53,7 +53,7 @@ export default class ResponseExample extends React.PureComponent<Props, State> {
     const { domain, action } = this.props;
     fetchResponseExampleApi(domain.path, action.key).then(
       (responseExample) => this.setState({ responseExample }),
-      () => {}
+      () => {},
     );
   }
 
index 0392524410d3bbede09aac92edcde413670dc4cb..81751fd980b7be7193d7a5b73a918ef2851670c5 100644 (file)
@@ -80,7 +80,7 @@ export class WebApiApp extends React.PureComponent<Props, State> {
           this.setState({ domains: this.parseDomains(domains) });
         }
       },
-      () => {}
+      () => {},
     );
   }
 
@@ -113,11 +113,11 @@ export class WebApiApp extends React.PureComponent<Props, State> {
     const domain = domains.find((domain) => splat.startsWith(domain.path));
     if (domain) {
       const action = domain.actions.find(
-        (action) => getActionKey(domain.path, action.key) === splat
+        (action) => getActionKey(domain.path, action.key) === splat,
       );
       const internal = Boolean(!query.internal && (domain.internal || (action && action.internal)));
       const deprecated = Boolean(
-        !query.deprecated && (domain.deprecatedSince || (action && action.deprecatedSince))
+        !query.deprecated && (domain.deprecatedSince || (action && action.deprecatedSince)),
       );
       if (internal || deprecated) {
         this.updateQuery({ internal, deprecated });
@@ -214,7 +214,7 @@ export default withRouter(WebApiAppWithParams);
 function getLatestDeprecatedAction(domain: Pick<WebApi.Domain, 'actions'>) {
   const noVersion = { major: 0, minor: 0 };
   const allActionsDeprecated = domain.actions.every(
-    ({ deprecatedSince }) => deprecatedSince !== undefined
+    ({ deprecatedSince }) => deprecatedSince !== undefined,
   );
   const latestDeprecation =
     allActionsDeprecated &&
index 1c1eaa5d107fac7a5ff0de548db249b6aa8a5f31..b4782b7afa8c74c839404096e24fbab67b19eb7d 100644 (file)
@@ -93,7 +93,7 @@ function renderAction(props: Partial<Action['props']> = {}) {
       showDeprecated={false}
       showInternal={false}
       {...props}
-    />
+    />,
   );
 }
 
index 62c3aa91eed81d0d33cc6e3213fd9be406e71ac6..ff1e0481bb38339fde584ccb654463c127f5b9eb 100644 (file)
@@ -68,7 +68,7 @@ export const parseQuery = memoize(
     search: parseAsString(urlQuery['query']),
     deprecated: parseAsOptionalBoolean(urlQuery['deprecated']) || false,
     internal: parseAsOptionalBoolean(urlQuery['internal']) || false,
-  })
+  }),
 );
 
 export const serializeQuery = memoize(
@@ -77,7 +77,7 @@ export const serializeQuery = memoize(
       query: query.search ? serializeString(query.search) : undefined,
       deprecated: query.deprecated || undefined,
       internal: query.internal || undefined,
-    })
+    }),
 );
 
 export function parseVersion(version: string) {
index cb046dfdd0a031771f04f90a9b48b1c484c561c6..d67b027aec9ea3b678554535f55d1a4e44414fb6 100644 (file)
@@ -42,7 +42,7 @@ export function App({ component }: AppProps) {
     () => ({
       project: component?.key,
     }),
-    [component?.key]
+    [component?.key],
   );
 
   const fetchWebhooks = useCallback(async () => {
@@ -91,8 +91,8 @@ export function App({ component }: AppProps) {
               hasSecret: data.secret === undefined ? webhook.hasSecret : Boolean(data.secret),
               url: data.url,
             }
-          : webhook
-      )
+          : webhook,
+      ),
     );
   }
 
index 35ee6b3628b67b697f5b81c38e324fbe90c2d23d..2e820ece5d56d6c0ddceb8dc0afbcd8173be5c47 100644 (file)
@@ -38,13 +38,13 @@ export default function DeliveryItem({ className, delivery, loading, payload }:
       <p className="spacer-bottom">
         {translateWithParameters(
           'webhooks.delivery.response_x',
-          delivery.httpStatus || translate('webhooks.delivery.server_unreachable')
+          delivery.httpStatus || translate('webhooks.delivery.server_unreachable'),
         )}
       </p>
       <p className="spacer-bottom">
         {translateWithParameters(
           'webhooks.delivery.duration_x',
-          formatMeasure(delivery.durationMs, 'MILLISEC')
+          formatMeasure(delivery.durationMs, 'MILLISEC'),
         )}
       </p>
       <p className="spacer-bottom">{translate('webhooks.delivery.payload')}</p>
index 65b7f120e3811110d64804c4a0f6e84a6ea1e549..757d7223f5e4ac7c65f8fc98a545079caef4f7bb 100644 (file)
@@ -92,14 +92,14 @@ describe('webhook CRUD', () => {
   it('should not allow webhook creation when too many', async () => {
     const { ui } = getPageObject();
     webhookService.addWebhook(
-      ...Array.from({ length: 8 }).map((_, i) => mockWebhook({ key: `newwebhook${i}` }))
+      ...Array.from({ length: 8 }).map((_, i) => mockWebhook({ key: `newwebhook${i}` })),
     );
     renderWebhooksApp();
     await ui.waitForWebhooksLoaded();
 
     expect(ui.webhookCreateButton.get()).toBeDisabled();
     await expect(ui.webhookCreateButton.get()).toHaveATooltipWithContent(
-      `webhooks.maximum_reached.${WEBHOOKS_LIMIT}`
+      `webhooks.maximum_reached.${WEBHOOKS_LIMIT}`,
     );
   });
 
@@ -216,7 +216,7 @@ describe('should properly show deliveries', () => {
       await ui.toggleDeliveryRow(2);
     });
     expect(
-      screen.getByText('webhooks.delivery.response_x.webhooks.delivery.server_unreachable')
+      screen.getByText('webhooks.delivery.response_x.webhooks.delivery.server_unreachable'),
     ).toBeInTheDocument();
     expect(screen.getByText('webhooks.delivery.duration_x.1s')).toBeInTheDocument();
     expect(screen.getByText('{ "id": "global-webhook-1-delivery-1" }')).toBeInTheDocument();
@@ -287,7 +287,7 @@ function getPageObject() {
       const row = ui.getWebhookRow(rowIndex);
       await act(async () => {
         await user.click(
-          within(row).getByRole('button', { name: `webhooks.show_actions.${webhookName}` })
+          within(row).getByRole('button', { name: `webhooks.show_actions.${webhookName}` }),
         );
         await user.click(within(row).getByRole('button', { name: actionName }));
       });
@@ -298,13 +298,13 @@ function getPageObject() {
         await user.click(
           within(row).getByRole('button', {
             name: `webhooks.last_execution.open_for_x.${webhookName}`,
-          })
+          }),
         );
       });
     },
     checkWebhookRow: (
       index: number,
-      expected: { name: string; url: string; secret: boolean; lastDeliveryDate?: string }
+      expected: { name: string; url: string; secret: boolean; lastDeliveryDate?: string },
     ) => {
       const row = ui.getWebhookRow(index);
       const [name, url, secret, lastDelivery] = within(row).getAllByRole('cell');
@@ -314,7 +314,7 @@ function getPageObject() {
       expect(lastDelivery).toHaveTextContent(
         expected.lastDeliveryDate
           ? new RegExp(expected.lastDeliveryDate)
-          : 'webhooks.last_execution.none'
+          : 'webhooks.last_execution.none',
       );
     },
 
index 052ca8605c4fb92fce53772079494731d53efe4e..6138a38c886fd59af53426bf3153d444c6298b03 100644 (file)
@@ -179,7 +179,7 @@ export class SourceViewerClass extends React.PureComponent<Props, State> {
             if (this.props.onLoaded && this.state.component && this.state.issues) {
               this.props.onLoaded(this.state.component, finalSources, this.state.issues);
             }
-          }
+          },
         );
       }
     }
@@ -203,7 +203,7 @@ export class SourceViewerClass extends React.PureComponent<Props, State> {
     key: string,
     from: number | undefined,
     to: number | undefined,
-    branchLike: BranchLike | undefined
+    branchLike: BranchLike | undefined,
   ) {
     return getSources({ key, from, to, ...getBranchLikeQuery(branchLike) });
   }
@@ -257,13 +257,13 @@ export class SourceViewerClass extends React.PureComponent<Props, State> {
                 if (this.props.onLoaded) {
                   this.props.onLoaded(component, finalSources, issues);
                 }
-              }
+              },
             );
           }
         },
         () => {
           /* no op */
-        }
+        },
       );
     };
 
@@ -295,13 +295,13 @@ export class SourceViewerClass extends React.PureComponent<Props, State> {
 
       sourcesRequest.then(
         (sources) => loadIssuesCallback(component, sources),
-        (response) => onFailLoadSources(response, component)
+        (response) => onFailLoadSources(response, component),
       );
     };
 
     this.loadComponent(this.props.component, this.props.branchLike).then(
       onResolve,
-      onFailLoadComponent
+      onFailLoadComponent,
     );
   }
 
@@ -354,7 +354,7 @@ export class SourceViewerClass extends React.PureComponent<Props, State> {
       this.props.component,
       from,
       firstSourceLine.line - 1,
-      this.props.branchLike
+      this.props.branchLike,
     ).then(
       (sources) => {
         if (this.mounted) {
@@ -369,7 +369,7 @@ export class SourceViewerClass extends React.PureComponent<Props, State> {
       },
       () => {
         /* no op */
-      }
+      },
     );
   };
 
@@ -409,7 +409,7 @@ export class SourceViewerClass extends React.PureComponent<Props, State> {
       },
       () => {
         /* no op */
-      }
+      },
     );
   };
 
@@ -429,7 +429,7 @@ export class SourceViewerClass extends React.PureComponent<Props, State> {
       },
       () => {
         /* no op */
-      }
+      },
     );
   };
 
@@ -488,7 +488,7 @@ export class SourceViewerClass extends React.PureComponent<Props, State> {
   handleIssueChange = (issue: Issue) => {
     this.setState(({ issues = [] }) => {
       const newIssues = issues.map((candidate) =>
-        candidate.key === issue.key ? issue : candidate
+        candidate.key === issue.key ? issue : candidate,
       );
 
       return { issues: newIssues, issuesByLine: issuesByLine(newIssues) };
index 0f965bccc3e675c3a1126cb4f691226fe8505fc7..753429a42f61ae600805248ebe083bb45ff268d4 100644 (file)
@@ -219,11 +219,11 @@ export default class SourceViewerCode extends React.PureComponent<Props, State>
         highlighted={line.line === highlightedLine}
         highlightedLocationMessage={optimizeLocationMessage(
           highlightedLocationMessage,
-          secondaryIssueLocations
+          secondaryIssueLocations,
         )}
         highlightedSymbols={optimizeHighlightedSymbols(
           symbolsByLine[line.line],
-          highlightedSymbols
+          highlightedSymbols,
         )}
         issueLocations={this.getIssueLocationsForLine(line)}
         issues={issuesForLine}
@@ -317,7 +317,7 @@ export default class SourceViewerCode extends React.PureComponent<Props, State>
                   displayIssues,
                   index,
                   line: decoratedLinesMap[line.line] || line,
-                })
+                }),
               )}
             </tbody>
           </table>
index 63cad19a21352b7e7914b7520ff912a189c1b5a6..0685021f2056ebc39c8b9c848855c742b26ac846 100644 (file)
@@ -94,7 +94,7 @@ export default class SourceViewerHeader extends React.PureComponent<Props> {
               };
 
               const measure = componentMeasures.find(
-                (m) => m.metric === ISSUETYPE_METRIC_KEYS_MAP[type].metric
+                (m) => m.metric === ISSUETYPE_METRIC_KEYS_MAP[type].metric,
               );
 
               const linkUrl =
@@ -128,7 +128,7 @@ export default class SourceViewerHeader extends React.PureComponent<Props> {
     const unitTestsOrLines = q === ComponentQualifier.TestFile ? MetricKey.tests : MetricKey.lines;
 
     const query = new URLSearchParams(
-      omitNil({ key, ...getBranchLikeQuery(this.props.branchLike) })
+      omitNil({ key, ...getBranchLikeQuery(this.props.branchLike) }),
     ).toString();
 
     const rawSourcesLink = `${getBaseUrl()}/api/sources/raw?${query}`;
index 00c831f6a0472e87bab7652d5f3bcad2ccbba65d..d4977597d6caf4201de2316598bf79d380f8269e 100644 (file)
@@ -69,7 +69,7 @@ it('should show a permalink on line number', async () => {
   await user.click(
     rowScreen.getByRole('button', {
       name: 'source_viewer.line_X.1',
-    })
+    }),
   );
 
   expect(
@@ -77,8 +77,8 @@ it('should show a permalink on line number', async () => {
     queryHelpers.queryByAttribute(
       'data-clipboard-text',
       row,
-      'http://localhost/code?id=foo&selected=foo%3Atest1.js&line=1'
-    )
+      'http://localhost/code?id=foo&selected=foo%3Atest1.js&line=1',
+    ),
   ).toBeInTheDocument();
 
   await act(async () => {
@@ -90,8 +90,8 @@ it('should show a permalink on line number', async () => {
     queryHelpers.queryByAttribute(
       'data-clipboard-text',
       row,
-      'http://localhost/code?id=foo&selected=foo%3Atest1.js&line=1'
-    )
+      'http://localhost/code?id=foo&selected=foo%3Atest1.js&line=1',
+    ),
   ).not.toBeInTheDocument();
 
   row = await screen.findByRole('row', { name: / \* 6$/ });
@@ -102,14 +102,14 @@ it('should show a permalink on line number', async () => {
     await user.click(
       lowerRowScreen.getByRole('button', {
         name: 'source_viewer.line_X.6',
-      })
+      }),
     );
   });
 
   expect(
     lowerRowScreen.getByRole('menuitem', {
       name: 'source_viewer.copy_permalink',
-    })
+    }),
   ).toBeInTheDocument();
 });
 
@@ -148,7 +148,7 @@ it('should be able to interact with issue action', async () => {
   // Assign issue to a different user
   await act(async () => {
     await user.click(
-      await screen.findByRole('combobox', { name: 'issue.assign.unassigned_click_to_assign' })
+      await screen.findByRole('combobox', { name: 'issue.assign.unassigned_click_to_assign' }),
     );
     await user.click(screen.getByLabelText('search.search_for_users'));
     await user.keyboard('luke');
@@ -176,13 +176,13 @@ it('should show SCM information', async () => {
   const firstRowScreen = within(row);
 
   expect(
-    firstRowScreen.getByRole('cell', { name: 'stas.vilchik@sonarsource.com' })
+    firstRowScreen.getByRole('cell', { name: 'stas.vilchik@sonarsource.com' }),
   ).toBeInTheDocument();
 
   await user.click(
     firstRowScreen.getByRole('button', {
       name: 'source_viewer.author_X.stas.vilchik@sonarsource.com, source_viewer.click_for_scm_info.1',
-    })
+    }),
   );
 
   // After using miui component the tooltip is appearing outside of the row
@@ -195,7 +195,7 @@ it('should show SCM information', async () => {
   const secondRowScreen = within(row);
 
   expect(
-    secondRowScreen.queryByRole('cell', { name: 'stas.vilchik@sonarsource.com' })
+    secondRowScreen.queryByRole('cell', { name: 'stas.vilchik@sonarsource.com' }),
   ).not.toBeInTheDocument();
 
   // SCM with no date
@@ -207,7 +207,7 @@ it('should show SCM information', async () => {
     await user.click(
       fourthRowScreen.getByRole('button', {
         name: 'source_viewer.author_X.stas.vilchik@sonarsource.com, source_viewer.click_for_scm_info.4',
-      })
+      }),
     );
   });
 
@@ -221,7 +221,7 @@ it('should show SCM information', async () => {
     await user.click(
       fithRowScreen.getByRole('button', {
         name: 'source_viewer.click_for_scm_info.5',
-      })
+      }),
     );
   });
 
@@ -265,7 +265,7 @@ it('should show issue indicator', async () => {
   await user.click(
     issueRow.getByRole('button', {
       name: 'source_viewer.issues_on_line.X_issues_of_type_Y.source_viewer.issues_on_line.show.2.issue.type.BUG.plural',
-    })
+    }),
   );
 });
 
@@ -273,44 +273,44 @@ it('should show coverage information', async () => {
   renderSourceViewer();
 
   const coverdLine = within(
-    await screen.findByRole('row', { name: /\* mailto:info AT sonarsource DOT com$/ })
+    await screen.findByRole('row', { name: /\* mailto:info AT sonarsource DOT com$/ }),
   );
 
   expect(
-    coverdLine.getByLabelText('source_viewer.tooltip.covered.conditions.1')
+    coverdLine.getByLabelText('source_viewer.tooltip.covered.conditions.1'),
   ).toBeInTheDocument();
 
   const partialyCoveredWithConditionLine = within(
-    await screen.findByRole('row', { name: / \* 5$/ })
+    await screen.findByRole('row', { name: / \* 5$/ }),
   );
 
   expect(
     partialyCoveredWithConditionLine.getByLabelText(
-      'source_viewer.tooltip.partially-covered.conditions.1.2'
-    )
+      'source_viewer.tooltip.partially-covered.conditions.1.2',
+    ),
   ).toBeInTheDocument();
 
   const partialyCoveredLine = within(await screen.findByRole('row', { name: /\/\*$/ }));
 
   expect(
-    partialyCoveredLine.getByLabelText('source_viewer.tooltip.partially-covered')
+    partialyCoveredLine.getByLabelText('source_viewer.tooltip.partially-covered'),
   ).toBeInTheDocument();
 
   const uncoveredLine = within(await screen.findByRole('row', { name: / \* 6$/ }));
   expect(uncoveredLine.getByLabelText('source_viewer.tooltip.uncovered')).toBeInTheDocument();
 
   const uncoveredWithConditionLine = within(
-    await screen.findByRole('row', { name: / \* SonarQube$/ })
+    await screen.findByRole('row', { name: / \* SonarQube$/ }),
   );
 
   expect(
-    uncoveredWithConditionLine.getByLabelText('source_viewer.tooltip.uncovered.conditions.1')
+    uncoveredWithConditionLine.getByLabelText('source_viewer.tooltip.uncovered.conditions.1'),
   ).toBeInTheDocument();
 
   const coveredWithNoCondition = within(await screen.findByRole('row', { name: /\* Copyright$/ }));
 
   expect(
-    coveredWithNoCondition.getByLabelText('source_viewer.tooltip.covered')
+    coveredWithNoCondition.getByLabelText('source_viewer.tooltip.covered'),
   ).toBeInTheDocument();
 });
 
@@ -320,12 +320,12 @@ it('should show duplication block', async () => {
   const duplicateLine = within(await screen.findByRole('row', { name: /\* 7$/ }));
 
   expect(
-    duplicateLine.getByLabelText('source_viewer.tooltip.duplicated_block')
+    duplicateLine.getByLabelText('source_viewer.tooltip.duplicated_block'),
   ).toBeInTheDocument();
 
   await act(async () => {
     await user.click(
-      duplicateLine.getByRole('button', { name: 'source_viewer.tooltip.duplicated_block' })
+      duplicateLine.getByRole('button', { name: 'source_viewer.tooltip.duplicated_block' }),
     );
   });
 
@@ -355,7 +355,7 @@ it('should show correct message when component is not asscessible', async () =>
   renderSourceViewer();
 
   expect(
-    await screen.findByText('code_viewer.no_source_code_displayed_due_to_security')
+    await screen.findByText('code_viewer.no_source_code_displayed_due_to_security'),
   ).toBeInTheDocument();
 });
 
@@ -377,7 +377,7 @@ function renderSourceViewer(override?: Partial<Props>) {
       onLoaded={jest.fn()}
       onLocationSelect={jest.fn()}
       {...override}
-    />
+    />,
   );
 
   return function (reoverride?: Partial<Props>) {
@@ -393,7 +393,7 @@ function renderSourceViewer(override?: Partial<Props>) {
         onLocationSelect={jest.fn()}
         {...override}
         {...reoverride}
-      />
+      />,
     );
   };
 }
index a7f72048b05e3e247f07ae8f8c4fae10294b5a30..3497e9a8f30a16bfe00eb5eb11c0047ed3b4b550 100644 (file)
@@ -81,6 +81,6 @@ function shallowRender(props: Partial<SourceViewerCode['props']> = {}) {
       sources={[mockSourceLine(), mockSourceLine(), mockSourceLine()]}
       symbolsByLine={{}}
       {...props}
-    />
+    />,
   );
 }
index 0c821a572f36dec70c7d442217de8170e953b736..b2f5a009a67a23f21935818f024b3273e7d7b392 100644 (file)
@@ -106,7 +106,7 @@ export default class DuplicationPopup extends PureComponent<Props> {
     duplications = sortBy(
       duplications,
       (d) => d.file.projectName !== sourceViewerFile.projectName,
-      (d) => d.file.key !== sourceViewerFile.key
+      (d) => d.file.key !== sourceViewerFile.key,
     );
 
     return (
@@ -146,7 +146,7 @@ export default class DuplicationPopup extends PureComponent<Props> {
                         >
                           <span>{collapsedDirFromPath(duplication.file.name)}</span>
                           <span>{fileFromPath(duplication.file.name)}</span>
-                        </span>
+                        </span>,
                       )}
                     </div>
                   )}
@@ -162,7 +162,7 @@ export default class DuplicationPopup extends PureComponent<Props> {
                             {' – '}
                             {block.from + block.size - 1}
                           </>,
-                          block.from
+                          block.from,
                         )}
                         {index < duplication.blocks.length - 1 && ', '}
                       </Fragment>
index 9a725c5523a0e922fa0352f1ca6d6a3768f5d96a..3b81c333c6da222f29a5d94f37e6a9674aa1c1ea 100644 (file)
@@ -118,18 +118,18 @@ export default function Line(props: LineProps) {
 
   const handleLineMouseEnter = React.useCallback(
     () => onLineMouseEnter(line.line),
-    [line.line, onLineMouseEnter]
+    [line.line, onLineMouseEnter],
   );
 
   const handleLineMouseLeave = React.useCallback(
     () => onLineMouseLeave(line.line),
-    [line.line, onLineMouseLeave]
+    [line.line, onLineMouseLeave],
   );
 
   const { branchLike, file } = useSourceViewerContext();
   const permalink = getPathUrlAsString(
     getCodeUrl(file.project, branchLike, file.key, line.line),
-    false
+    false,
   );
 
   const getStatusTooltip = (line: SourceLine) => {
@@ -147,7 +147,7 @@ export default function Line(props: LineProps) {
           ? translateWithParameters(
               'source_viewer.tooltip.partially-covered.conditions',
               line.coveredConditions ?? 0,
-              line.conditions
+              line.conditions,
             )
           : translate('source_viewer.tooltip.partially-covered');
       default:
index 57c790a82fc5ed229890f1b348f828645c81097a..ad50b8e4e9d681580a11117fd186bdf91962aab9 100644 (file)
@@ -225,7 +225,7 @@ export class LineCode extends PureComponent<React.PropsWithChildren<Props>> {
                 highlightedSymbols,
                 issueLocations,
                 secondaryIssueLocations,
-              })
+              }),
             )}
           </LineCodePreFormatted>
           <div ref={this.findingNode}>{children}</div>
index 6a6bdcfaa0acbbe55f581083fb4f796b534fceb0..7081c7dd666ac285b7f4f412a3de2bfef8ed8b4a 100644 (file)
@@ -50,20 +50,20 @@ export function LineIssuesIndicator(props: LineIssuesIndicatorProps) {
   if (issueTypes.length > 1) {
     tooltipContent = translateWithParameters(
       'source_viewer.issues_on_line.multiple_issues',
-      tooltipShowHide
+      tooltipShowHide,
     );
   } else if (issues.length === 1) {
     tooltipContent = translateWithParameters(
       'source_viewer.issues_on_line.issue_of_type_X',
       tooltipShowHide,
-      translate('issue.type', mostImportantIssue.type)
+      translate('issue.type', mostImportantIssue.type),
     );
   } else {
     tooltipContent = translateWithParameters(
       'source_viewer.issues_on_line.X_issues_of_type_Y',
       tooltipShowHide,
       issues.length,
-      translate('issue.type', mostImportantIssue.type, 'plural')
+      translate('issue.type', mostImportantIssue.type, 'plural'),
     );
   }
 
index aab1b9cc56c5aba50e7ffa519104b448d0f53487..1945381f3adf98ce44ed4319e3beea472f257c88 100644 (file)
@@ -58,7 +58,7 @@ function LineSCM({ line, previousLine }: Props) {
   if (line.scmAuthor) {
     ariaLabel = `${translateWithParameters(
       'source_viewer.author_X',
-      line.scmAuthor
+      line.scmAuthor,
     )}, ${ariaLabel}`;
   }
 
index eec00a0a1b56cbec22958d1ebe88c853d56bd255..5264464bbb5261792eb6b195b3f02b00b04bc522 100644 (file)
@@ -90,7 +90,7 @@ export default class MeasuresOverlay extends React.PureComponent<Props, State> {
         if (this.mounted) {
           this.setState({ loading: false });
         }
-      }
+      },
     );
   };
 
@@ -105,7 +105,7 @@ export default class MeasuresOverlay extends React.PureComponent<Props, State> {
         ...getBranchLikeQuery(this.props.branchLike),
       }).then((measures) => {
         const withMetrics = enhanceMeasuresWithMetrics(measures, metrics).filter(
-          (measure) => measure.metric
+          (measure) => measure.metric,
         );
         return keyBy(withMetrics, (measure) => measure.metric.key);
       });
@@ -119,7 +119,7 @@ export default class MeasuresOverlay extends React.PureComponent<Props, State> {
         resolved: 'false',
         ...getBranchLikeQuery(this.props.branchLike),
       },
-      ['types', 'severities', 'tags']
+      ['types', 'severities', 'tags'],
     ).then(({ facets }) => {
       const severitiesFacet = facets.find((f) => f.property === 'severities');
       const tagsFacet = facets.find((f) => f.property === 'tags');
@@ -204,7 +204,7 @@ export default class MeasuresOverlay extends React.PureComponent<Props, State> {
                           {formatMeasure(f.count, MetricType.ShortInteger)}
                         </span>
                       </div>
-                    )
+                    ),
                   )}
                 </div>
               )}
@@ -220,7 +220,7 @@ export default class MeasuresOverlay extends React.PureComponent<Props, State> {
                           {formatMeasure(f.count, MetricType.ShortInteger)}
                         </span>
                       </div>
-                    )
+                    ),
                   )}
                 </div>
               )}
@@ -349,7 +349,7 @@ export default class MeasuresOverlay extends React.PureComponent<Props, State> {
           </div>
           {sortBy(
             measures.filter((measure) => measure.value !== undefined),
-            (measure) => getLocalizedMetricName(measure.metric)
+            (measure) => getLocalizedMetricName(measure.metric),
           ).map((measure) => this.renderMeasure(measure))}
         </div>
       </div>
index 82cb88fbc2616565c3843444ba1923e54523142b..55aac3df130affa58777f355279822399ae81100 100644 (file)
@@ -43,7 +43,7 @@ export default function MeasuresOverlayMeasure({ measure }: Props) {
       <span className="measure-name">
         {isMetricKey(measure.metric.key) &&
           [MetricKey.bugs, MetricKey.vulnerabilities, MetricKey.code_smells].includes(
-            measure.metric.key
+            measure.metric.key,
           ) && <IssueTypeIcon className="little-spacer-right" query={measure.metric.key} />}
         {getLocalizedMetricName(measure.metric)}
       </span>
index f44f503ef16c8e252fc46c0fbcb36c6cbe10734b..62a97ff3b6a45b135d4ea0e03401e770dee5f209 100644 (file)
@@ -49,6 +49,6 @@ function shallowRender(props: Partial<LineIssuesListProps> = {}) {
       issuePopup={undefined}
       issuesForLine={[]}
       {...props}
-    />
+    />,
   );
 }
index 081678a041812af341daaef92362984a90cd5e7d..fb355868c6679afbf02c3fb41ed2f3bbc7ce3e1c 100644 (file)
@@ -177,6 +177,6 @@ function shallowRender(props: Partial<MeasuresOverlay['props']> = {}) {
       onClose={jest.fn()}
       sourceViewerFile={sourceViewerFile}
       {...props}
-    />
+    />,
   );
 }
index 59bd180ec2d9ec0abcaf393db0fba5ea1f4c72c4..8e11917aadf9780e202e57bda98252535fc8087d 100644 (file)
@@ -29,8 +29,8 @@ it('should render', () => {
           metric: { id: '1', key: 'coverage', name: 'Coverage', type: 'PERCENT' },
           value: '72',
         }}
-      />
-    )
+      />,
+    ),
   ).toMatchSnapshot();
 });
 
@@ -42,7 +42,7 @@ it('should render issues icon', () => {
           metric: { id: '1', key: 'bugs', name: 'Bugs', type: 'INT' },
           value: '2',
         }}
-      />
-    )
+      />,
+    ),
   ).toMatchSnapshot();
 });
index 8dad22392c2200e3cce1463faeb699b0b3c7bd45..f8c76b99f6678a3cc7f908d4ddee58eb73ee284b 100644 (file)
@@ -37,13 +37,13 @@ describe('isDuplicationBlockInRemovedComponent', () => {
       isDuplicationBlockInRemovedComponent([
         { _ref: '0', from: 2, size: 2 },
         { _ref: '0', from: 3, size: 1 },
-      ])
+      ]),
     ).toBe(false);
     expect(
       isDuplicationBlockInRemovedComponent([
         { _ref: undefined, from: 2, size: 2 },
         { _ref: '0', from: 3, size: 1 },
-      ])
+      ]),
     ).toBe(true);
   });
 });
index 72fd91f44bf1a05d57c406d97ebe5a31f3af7793..d035509b48bc3b30069abe0d69063fbc0a95cdd8 100644 (file)
@@ -38,10 +38,10 @@ describe('getLinearLocations', () => {
         { from: 3, line: 6, to: 999999 },
         { from: 0, line: 7, to: 999999 },
         { from: 0, line: 8, to: 56 },
-      ]
+      ],
     );
     expect(getLinearLocations({ startLine: 6, startOffset: 0, endLine: 6, endOffset: 42 })).toEqual(
-      [{ from: 0, line: 6, to: 42 }]
+      [{ from: 0, line: 6, to: 42 }],
     );
   });
 });
index cc475705e6e138ca0a062e8cebfecaee989240cc..ad07c4a725184ce078fd6753876b0b9fd80e1a16 100644 (file)
@@ -39,7 +39,7 @@ export function filterDuplicationBlocksByLine(blocks: DuplicationBlock[], line:
 
 export function getDuplicationBlocksForIndex(
   duplications: Duplication[] | undefined,
-  index: number
+  index: number,
 ) {
   return (duplications && duplications[index] && duplications[index].blocks) || [];
 }
index 0dcfdc73e210b1f7903d7697b43cd8abe0caa42c..53426ef3872c602f9510e29d48fff57ffdab1b39 100644 (file)
@@ -58,7 +58,7 @@ export function highlightSymbol(tokens: Token[], symbol: string): Token[] {
   return tokens.map((token) =>
     symbolRegExp.test(token.className)
       ? { ...token, className: `${token.className} highlighted` }
-      : token
+      : token,
   );
 }
 
@@ -92,7 +92,7 @@ export function highlightIssueLocations(
   tokens: Token[],
   issueLocations: LinearIssueLocation[],
   modifier: keyof TokenModifiers,
-  rootClassName: string = ISSUE_LOCATION_CLASS
+  rootClassName: string = ISSUE_LOCATION_CLASS,
 ): Token[] {
   issueLocations.forEach((location) => {
     const nextTokens: Token[] = [];
@@ -169,12 +169,12 @@ export const getHighlightedTokens = (params: {
       tokens,
       secondaryIssueLocations,
       'isLocation',
-      'issue-location'
+      'issue-location',
     );
 
     if (highlightedLocationMessage) {
       const location = secondaryIssueLocations.find(
-        (location) => location.index === highlightedLocationMessage.index
+        (location) => location.index === highlightedLocationMessage.index,
       );
       if (location) {
         tokens = highlightIssueLocations(tokens, [location], 'isSelected', 'selected');
index 14af7c8850629574ea2c641a28a2ab94c55222ab..12ef974ffb242fc283b22e1e8aba5f1d4553052f 100644 (file)
@@ -93,7 +93,7 @@ export function symbolsByLine(sources: SourceLine[]) {
       tokens.map((token) => {
         const keys = token.className.match(/sym-\d+/g);
         return keys != null ? keys : [];
-      })
+      }),
     );
     index[line.line] = symbols.filter((key) => key);
   });
index c1300c06aa15e228adbc54e5d6fa2e154f6d136a..aebe97b98d7fb214cd6fa5b54eea73c0de1f5022 100644 (file)
@@ -37,7 +37,7 @@ export function getLinearLocations(textRange: TextRange | undefined): LinearIssu
 
 export function getSecondaryIssueLocationsForLine(
   line: SourceLine,
-  highlightedLocations: (FlowLocation | undefined)[] | undefined
+  highlightedLocations: (FlowLocation | undefined)[] | undefined,
 ): LinearIssueLocation[] {
   if (!highlightedLocations) {
     return [];
index b2d66dbe1a66c03767148e6c32021db057ec6127..0021dd60fcb477b1e7921f3d993c4cfb917fd8e5 100644 (file)
@@ -24,7 +24,7 @@ export const LINES_TO_LOAD = 1000;
 
 export function optimizeHighlightedSymbols(
   symbolsForLine: string[] = [],
-  highlightedSymbols: string[] = []
+  highlightedSymbols: string[] = [],
 ): string[] | undefined {
   const symbols = intersection(symbolsForLine, highlightedSymbols);
 
@@ -33,11 +33,11 @@ export function optimizeHighlightedSymbols(
 
 export function optimizeLocationMessage(
   highlightedLocationMessage: { index: number; text: string | undefined } | undefined,
-  optimizedSecondaryIssueLocations: LinearIssueLocation[]
+  optimizedSecondaryIssueLocations: LinearIssueLocation[],
 ) {
   return highlightedLocationMessage != null &&
     optimizedSecondaryIssueLocations.some(
-      (location) => location.index === highlightedLocationMessage.index
+      (location) => location.index === highlightedLocationMessage.index,
     )
     ? highlightedLocationMessage
     : undefined;
index 7ed620c4009e7d42e0e6cb86c040df3bf46842b4..cc9656f1ef139d8a8918c5441912e2c910ebcdcf 100644 (file)
@@ -61,7 +61,7 @@ function loadSearchPage(query: RawQuery, page: number, pageSize = PAGE_SIZE): Pr
     p: page,
     ps: pageSize,
   }).then((r) =>
-    r.issues.map((issue) => parseIssueFromResponse(issue, r.components, r.users, r.rules))
+    r.issues.map((issue) => parseIssueFromResponse(issue, r.components, r.users, r.rules)),
   );
 }
 
@@ -69,7 +69,7 @@ async function loadPageAndNext(
   query: RawQuery,
   needIssueSync = false,
   page = 1,
-  pageSize = PAGE_SIZE
+  pageSize = PAGE_SIZE,
 ): Promise<Issue[]> {
   const issues = needIssueSync
     ? await loadListPage(query, page)
@@ -91,7 +91,7 @@ async function loadPageAndNext(
 export default function loadIssues(
   component: string,
   branchLike: BranchLike | undefined,
-  needIssueSync = false
+  needIssueSync = false,
 ): Promise<Issue[]> {
   const query = needIssueSync
     ? buildListQuery(component, branchLike)
index 65842ac4fa356a43e29d2c025287b08ddec45293..d90fac4b41a135399b9cf22fef518234cf31eae4 100644 (file)
@@ -64,6 +64,6 @@ function shallowRender() {
   return shallow<A11yProvider>(
     <A11yProvider>
       <div />
-    </A11yProvider>
+    </A11yProvider>,
   );
 }
index 4ada9cae2b1c4ee57b1a5a1a5aa729f4ac05e8f2..4aebc7f17fbd5a92ececbe07792de99d44ea1bd6 100644 (file)
@@ -31,7 +31,7 @@ it('should render correctly, and (un)register the link when (un)mounted', () =>
       anchor={link.key}
       label={link.label}
       removeA11ySkipLink={removeA11ySkipLink}
-    />
+    />,
   );
 
   expect(wrapper).toMatchSnapshot();
index 57c72a6dc34573613b5d1bd935f17a969663127e..cfe4c6b5bffd8fd5727c29b6339d3f5a0b63115e 100644 (file)
@@ -49,13 +49,13 @@ export default class AddGraphMetric extends React.PureComponent<Props, State> {
 
   filterSelected = (query: string, selectedElements: string[]) => {
     return selectedElements.filter((element) =>
-      this.getLocalizedMetricNameFromKey(element).toLowerCase().includes(query.toLowerCase())
+      this.getLocalizedMetricNameFromKey(element).toLowerCase().includes(query.toLowerCase()),
     );
   };
 
   filterMetricsElements = (
     { metricsTypeFilter, metrics, selectedMetrics }: Props,
-    query: string
+    query: string,
   ) => {
     return metrics
       .filter((metric) => {
@@ -117,7 +117,7 @@ export default class AddGraphMetric extends React.PureComponent<Props, State> {
     const filteredMetrics = this.filterMetricsElements(this.props, query);
     const selectedMetrics = this.getSelectedMetricsElements(
       this.props.metrics,
-      this.props.selectedMetrics
+      this.props.selectedMetrics,
     );
 
     return (
index a704df6ce52fcad881b119ed344c8a3f8b74ebea..31102b35ebd7cad5a4b05130de7001327ccd852b 100644 (file)
@@ -54,7 +54,7 @@ export default function AddGraphMetricPopup({
           metricsTypeFilter
             .map((type: string) => translate('metric.type', type))
             .sort((a, b) => a.localeCompare(b))
-            .join(', ')
+            .join(', '),
         )}
       </FlagMessage>
     );
index b885681c1ecf8bb3ddb6e92d2a6c8e665b29c349..1737c6d9a9f8055cc04e6a9ca5304549cdf1eb75 100644 (file)
@@ -50,46 +50,49 @@ export default function DataTableModal(props: DataTableModalProps) {
       props,
       <FlagMessage variant="warning">
         {translate('project_activity.graphs.data_table.no_data_warning')}
-      </FlagMessage>
+      </FlagMessage>,
     );
   }
 
-  const tableData = series.reduce((acc, serie) => {
-    const data = filter(
-      serie.data,
-      // Make sure we respect the date filtering. On the graph, this is done by dynamically
-      // "zooming" on the series. Here, we actually have to "cut off" part of the serie's
-      // data points.
-      ({ x }) => {
-        if (graphEndDate && x > graphEndDate) {
-          return false;
+  const tableData = series.reduce(
+    (acc, serie) => {
+      const data = filter(
+        serie.data,
+        // Make sure we respect the date filtering. On the graph, this is done by dynamically
+        // "zooming" on the series. Here, we actually have to "cut off" part of the serie's
+        // data points.
+        ({ x }) => {
+          if (graphEndDate && x > graphEndDate) {
+            return false;
+          }
+          if (graphStartDate && x < graphStartDate) {
+            return false;
+          }
+          return true;
+        },
+      );
+
+      data.forEach(({ x, y }) => {
+        const key = x.getTime();
+        if (acc[key] === undefined) {
+          acc[key] = { date: x } as DataTableEntry;
         }
-        if (graphStartDate && x < graphStartDate) {
-          return false;
-        }
-        return true;
-      }
-    );
-
-    data.forEach(({ x, y }) => {
-      const key = x.getTime();
-      if (acc[key] === undefined) {
-        acc[key] = { date: x } as DataTableEntry;
-      }
 
-      if (y !== undefined && !(typeof y === 'number' && isNaN(y))) {
-        acc[key][serie.name] = formatMeasure(y, serie.type);
-      }
-    });
+        if (y !== undefined && !(typeof y === 'number' && isNaN(y))) {
+          acc[key][serie.name] = formatMeasure(y, serie.type);
+        }
+      });
 
-    return acc;
-  }, {} as { [x: number]: DataTableEntry });
+      return acc;
+    },
+    {} as { [x: number]: DataTableEntry },
+  );
 
   const metrics = series.map(({ name }) => name);
   const rows = slice(
     sortBy(Object.values(tableData), ({ date }) => -date),
     0,
-    MAX_DATA_TABLE_ROWS
+    MAX_DATA_TABLE_ROWS,
   ).map(({ date, ...values }) => (
     <tr key={date.getTime()}>
       <td className="sw-whitespace-nowrap">
@@ -133,12 +136,12 @@ export default function DataTableModal(props: DataTableModalProps) {
       <FlagMessage variant="warning">
         <FormattedMessage
           defaultMessage={translate(
-            `project_activity.graphs.data_table.no_data_warning_check_dates${suffix}`
+            `project_activity.graphs.data_table.no_data_warning_check_dates${suffix}`,
           )}
           id={`project_activity.graphs.data_table.no_data_warning_check_dates${suffix}`}
           values={{ start, end }}
         />
-      </FlagMessage>
+      </FlagMessage>,
     );
   }
 
@@ -149,7 +152,7 @@ export default function DataTableModal(props: DataTableModalProps) {
         <FlagMessage variant="warning">
           {translateWithParameters(
             'project_activity.graphs.data_table.max_lines_warning',
-            MAX_DATA_TABLE_ROWS
+            MAX_DATA_TABLE_ROWS,
           )}
         </FlagMessage>
       )}
@@ -167,7 +170,7 @@ export default function DataTableModal(props: DataTableModalProps) {
         </thead>
         <tbody>{rows}</tbody>
       </StyledTable>
-    </>
+    </>,
   );
 }
 
index fb4f216d370b7458a3290dc7a50b3b0d11227ea3..f8e856db795edf03c5fa0a541e9610552d0f4a50 100644 (file)
@@ -61,7 +61,7 @@ export default function GraphsHeader(props: Props) {
         onUpdateGraph(value);
       }
     },
-    [graph, onUpdateGraph]
+    [graph, onUpdateGraph],
   );
 
   const noCustomGraph =
index 1bc44e8fea6c8262963e1ff03d2f5b61295ecb3a..9d060022255aa86c7f8fe1ba2a7521ca717650e0 100644 (file)
@@ -86,7 +86,7 @@ export default class GraphsHistory extends React.PureComponent<Props, State> {
             {translate(
               isCustom
                 ? 'project_activity.graphs.custom.no_history'
-                : 'component_measures.no_history'
+                : 'component_measures.no_history',
             )}
           </LightLabel>
         </div>
@@ -117,7 +117,7 @@ export default class GraphsHistory extends React.PureComponent<Props, State> {
                   'project_activity.graphs.explanation_x',
                   uniqBy(graphSeries, 'name')
                     .map(({ translatedName }) => translatedName)
-                    .join(', ')
+                    .join(', '),
                 )
               }
               showAreas={showAreas}
index e590e2775acc153497165bec672d45d2b158e1fa..9fd04e580a589e3e545fee2e401627e4b3a0fa2e 100644 (file)
@@ -30,11 +30,11 @@ export interface GraphsTooltipsContentDuplicationProps {
 }
 
 export default function GraphsTooltipsContentDuplication(
-  props: GraphsTooltipsContentDuplicationProps
+  props: GraphsTooltipsContentDuplicationProps,
 ) {
   const { addSeparator, measuresHistory, tooltipIdx } = props;
   const duplicationDensity = measuresHistory.find(
-    (measure) => measure.metric === MetricKey.duplicated_lines_density
+    (measure) => measure.metric === MetricKey.duplicated_lines_density,
   );
   if (!duplicationDensity?.history[tooltipIdx]) {
     return null;
index a75b385edc1862e54ec38dc2e14ccff053c61a4a..6a366358dc411479d3ccf95944566d2fdd099c0d 100644 (file)
@@ -238,7 +238,7 @@ function getPageObject() {
 
 function renderActivityGraph(
   graphsHistoryProps: Partial<GraphsHistory['props']> = {},
-  graphsHeaderProps: Partial<ComponentPropsType<typeof GraphsHeader>> = {}
+  graphsHeaderProps: Partial<ComponentPropsType<typeof GraphsHeader>> = {},
 ) {
   function ActivityGraph() {
     const [selectedMetrics, setSelectedMetrics] = React.useState<string[]>([]);
@@ -265,21 +265,21 @@ function renderActivityGraph(
       });
       history.push(
         mockHistoryItem({ date: parseDate('2018-10-27T12:21:15+0200') }),
-        mockHistoryItem({ date: parseDate('2020-10-27T16:33:50+0200') })
+        mockHistoryItem({ date: parseDate('2020-10-27T16:33:50+0200') }),
       );
       measuresHistory.push(mockMeasureHistory({ metric, history }));
       metrics.push(
         mockMetric({
           key: metric,
           type: metric.includes('_density') || metric === MetricKey.coverage ? 'PERCENT' : 'INT',
-        })
+        }),
       );
     });
 
     // The following should be filtered out, and not be suggested as options.
     metrics.push(
       mockMetric({ key: MetricKey.new_bugs, type: 'INT' }),
-      mockMetric({ key: MetricKey.burned_budget, type: 'DATA' })
+      mockMetric({ key: MetricKey.burned_budget, type: 'DATA' }),
     );
 
     // The following will not be filtered out, but has no values.
@@ -292,14 +292,14 @@ function renderActivityGraph(
           date.setDate(date.getDate() + i);
           return mockHistoryItem({ date, value: undefined });
         }),
-      })
+      }),
     );
 
     const series = generateSeries(
       measuresHistory,
       graph,
       metrics,
-      getDisplayedHistoryMetrics(graph, selectedMetrics)
+      getDisplayedHistoryMetrics(graph, selectedMetrics),
     );
     const graphs = splitSeriesInGraphs(series, MAX_GRAPHS, MAX_SERIES_PER_GRAPH);
     const metricsTypeFilter =
index b5b234a9275c750190ac27e34b2bf9044a597ed4..c8f6596dae212ebf740de4cc7a7724512c03d788 100644 (file)
@@ -42,7 +42,7 @@ import { generateSeries, getDisplayedHistoryMetrics } from '../utils';
 it('should render correctly if there are no series', () => {
   renderDataTableModal({ series: [] });
   expect(
-    screen.getByText('project_activity.graphs.data_table.no_data_warning')
+    screen.getByText('project_activity.graphs.data_table.no_data_warning'),
   ).toBeInTheDocument();
 });
 
@@ -63,7 +63,7 @@ it('should render correctly if there are events', () => {
 it('should render correctly if there is too much data', () => {
   renderDataTableModal({ series: mockSeries(MAX_DATA_TABLE_ROWS + 1) });
   expect(
-    screen.getByText(`project_activity.graphs.data_table.max_lines_warning.${MAX_DATA_TABLE_ROWS}`)
+    screen.getByText(`project_activity.graphs.data_table.max_lines_warning.${MAX_DATA_TABLE_ROWS}`),
   ).toBeInTheDocument();
 });
 
@@ -72,7 +72,7 @@ it('should render correctly if there is no data and we have a start date', () =>
   expect(
     screen.getByText('project_activity.graphs.data_table.no_data_warning_check_dates_x', {
       exact: false,
-    })
+    }),
   ).toBeInTheDocument();
 });
 
@@ -81,7 +81,7 @@ it('should render correctly if there is no data and we have an end date', () =>
   expect(
     screen.getByText('project_activity.graphs.data_table.no_data_warning_check_dates_y', {
       exact: false,
-    })
+    }),
   ).toBeInTheDocument();
 });
 
@@ -93,13 +93,13 @@ it('should render correctly if there is no data and we have a date range', () =>
   expect(
     screen.getByText('project_activity.graphs.data_table.no_data_warning_check_dates_x_y', {
       exact: false,
-    })
+    }),
   ).toBeInTheDocument();
 });
 
 function renderDataTableModal(props: Partial<DataTableModalProps> = {}) {
   return renderComponent(
-    <DataTableModal analyses={[]} series={mockSeries()} onClose={jest.fn()} {...props} />
+    <DataTableModal analyses={[]} series={mockSeries()} onClose={jest.fn()} {...props} />,
   );
 }
 
@@ -118,7 +118,7 @@ function mockSeries(n = 10) {
         key: metric,
         name: metric,
         type: 'INT',
-      })
+      }),
     );
   });
 
@@ -130,6 +130,6 @@ function mockSeries(n = 10) {
       MetricKey.bugs,
       MetricKey.code_smells,
       MetricKey.vulnerabilities,
-    ])
+    ]),
   );
 }
index 3ba9228a84ab29c105d9360ff843337e9e11cb32..3fe3361a4784d7ab2659cc85b5aa095abf5341aa 100644 (file)
@@ -85,7 +85,7 @@ describe('DEFINITION_CHANGE events', () => {
             },
           }),
         },
-        `branch=${branchLike.name}&id=my-project`
+        `branch=${branchLike.name}&id=my-project`,
       );
 
       expect(await ui.definitionChangeLabel.find()).toBeInTheDocument();
@@ -95,7 +95,7 @@ describe('DEFINITION_CHANGE events', () => {
       expect(await ui.projectAddedTxt(branchLike).find()).toBeInTheDocument();
       expect(ui.projectLink('Foo').get()).toBeInTheDocument();
       expect(screen.getByText('master-foo')).toBeInTheDocument();
-    }
+    },
   );
 
   it.each([mockMainBranch(), mockBranch()])(
@@ -119,7 +119,7 @@ describe('DEFINITION_CHANGE events', () => {
             },
           }),
         },
-        `branch=${branchLike.name}&id=my-project`
+        `branch=${branchLike.name}&id=my-project`,
       );
 
       expect(ui.definitionChangeLabel.get()).toBeInTheDocument();
@@ -129,7 +129,7 @@ describe('DEFINITION_CHANGE events', () => {
       expect(await ui.projectRemovedTxt(branchLike).find()).toBeInTheDocument();
       expect(ui.projectLink('Bar').get()).toBeInTheDocument();
       expect(screen.getByText('master-bar')).toBeInTheDocument();
-    }
+    },
   );
 
   it('should render correctly for "BRANCH_CHANGED" events', async () => {
@@ -240,6 +240,6 @@ function renderEventInner(props: Partial<EventInnerProps> = {}, params?: string)
   return renderAppWithComponentContext(
     '/',
     () => <Route path="*" element={<EventInner event={mockAnalysisEvent()} {...props} />} />,
-    { navigateTo: params ? `/?id=my-project&${params}` : '/?id=my-project' }
+    { navigateTo: params ? `/?id=my-project&${params}` : '/?id=my-project' },
   );
 }
index 6ac2c03d8c53e18161a7b58eac7a81803afba9af..e9a46c4a7fef55be33d5112601a4cc457e48ceb7 100644 (file)
@@ -66,10 +66,10 @@ it.each([
         screen.getByRole('row', {
           // eslint-disable-next-line jest/no-conditional-in-test
           name: rating ? `${n} ${key} ${rating}` : `${n} ${key}`,
-        })
+        }),
       ).toBeInTheDocument();
     });
-  }
+  },
 );
 
 function renderGraphsTooltips(props: Partial<Props> = {}) {
@@ -94,14 +94,14 @@ function renderGraphsTooltips(props: Partial<Props> = {}) {
       mockMeasureHistory({
         metric,
         history: [mockHistoryItem({ date, value })],
-      })
+      }),
     );
 
     metrics.push(
       mockMetric({
         key: metric,
         type: metric.includes('_density') || metric === MetricKey.coverage ? 'PERCENT' : 'INT',
-      })
+      }),
     );
   });
 
@@ -109,7 +109,7 @@ function renderGraphsTooltips(props: Partial<Props> = {}) {
     measuresHistory,
     graph,
     metrics,
-    getDisplayedHistoryMetrics(graph, graph === GraphType.custom ? [MetricKey.bugs] : [])
+    getDisplayedHistoryMetrics(graph, graph === GraphType.custom ? [MetricKey.bugs] : []),
   );
 
   return renderComponent(
@@ -124,6 +124,6 @@ function renderGraphsTooltips(props: Partial<Props> = {}) {
       tooltipPos={0}
       formatValue={(n: number | string) => String(n)}
       {...props}
-    />
+    />,
   );
 }
index 83cf694261eaf10e7193417e2f4c305769addc5c..5747b0f830b501dc5fc7bd8de0459a8cec9a434f 100644 (file)
@@ -81,7 +81,7 @@ describe('generateSeries', () => {
       utils.generateSeries(HISTORY, GraphType.coverage, METRICS, [
         MetricKey.uncovered_lines,
         MetricKey.lines_to_cover,
-      ])
+      ]),
     ).toMatchSnapshot();
   });
   it('should correctly handle non-existent data', () => {
@@ -104,7 +104,7 @@ describe('getDisplayedHistoryMetrics', () => {
   });
   it('should return all custom metrics for the custom graph', () => {
     expect(utils.getDisplayedHistoryMetrics(GraphType.custom, customMetrics)).toEqual(
-      customMetrics
+      customMetrics,
     );
   });
 });
@@ -141,7 +141,7 @@ describe('hasHistoryData', () => {
           name: 'bar',
           translatedName: 'bar',
         }),
-      ])
+      ]),
     ).toBe(true);
     expect(
       utils.hasHistoryData([
@@ -150,7 +150,7 @@ describe('hasHistoryData', () => {
           translatedName: 'bar',
           data: [{ x: dates.parseDate('2017-04-27T08:21:32.000Z'), y: 2 }],
         }),
-      ])
+      ]),
     ).toBe(false);
   });
 });
@@ -196,7 +196,7 @@ describe('saveActivityGraph', () => {
       expect(save).toHaveBeenCalledWith('foo', GraphType.custom, 'bar');
       // eslint-disable-next-line jest/no-conditional-in-test
       expect(save).toHaveBeenCalledWith('foo.custom', metrics.join(','), 'bar');
-    }
+    },
   );
 });
 
@@ -232,7 +232,7 @@ describe('getActivityGraph', () => {
         // eslint-disable-next-line jest/no-conditional-in-test
         customGraphs: data ? [MetricKey.bugs, MetricKey.code_smells] : [],
       });
-    }
+    },
   );
 
   it('should correctly retrieve data for unknown graphs', () => {
index d7628fab4f6cd85d300c94d51e79bb117c8bc023..f45050ac30e8f3e1b4060f33ee9e8da82cc3b13e 100644 (file)
@@ -84,16 +84,16 @@ export function hasHistoryDataValue(series: Serie[]) {
 export function splitSeriesInGraphs(series: Serie[], maxGraph: number, maxSeries: number) {
   return flatMap(
     groupBy(series, (serie) => serie.type),
-    (type) => chunk(type, maxSeries)
+    (type) => chunk(type, maxSeries),
   ).slice(0, maxGraph);
 }
 
 export function generateCoveredLinesMetric(
   uncoveredLines: MeasureHistory,
-  measuresHistory: MeasureHistory[]
+  measuresHistory: MeasureHistory[],
 ): Serie {
   const linesToCover = measuresHistory.find(
-    (measure) => measure.metric === MetricKey.lines_to_cover
+    (measure) => measure.metric === MetricKey.lines_to_cover,
   );
 
   return {
@@ -113,7 +113,7 @@ export function generateSeries(
   measuresHistory: MeasureHistory[],
   graph: GraphType,
   metrics: Metric[],
-  displayedMetrics: string[]
+  displayedMetrics: string[],
 ): Serie[] {
   if (displayedMetrics.length <= 0 || measuresHistory === undefined) {
     return [];
@@ -139,8 +139,8 @@ export function generateSeries(
       }),
     (serie) =>
       displayedMetrics.indexOf(
-        serie.name === 'covered_lines' ? MetricKey.uncovered_lines : serie.name
-      )
+        serie.name === 'covered_lines' ? MetricKey.uncovered_lines : serie.name,
+      ),
   );
 }
 
@@ -148,7 +148,7 @@ export function saveActivityGraph(
   namespace: string,
   project: string,
   graph: GraphType,
-  metrics?: string[]
+  metrics?: string[],
 ) {
   save(namespace, graph, project);
 
@@ -159,7 +159,7 @@ export function saveActivityGraph(
 
 export function getActivityGraph(
   namespace: string,
-  project: string
+  project: string,
 ): { graph: GraphType; customGraphs: string[] } {
   const customGraphs = get(`${namespace}.custom`, project);
 
index 7de3a2fbe96cf3c2f2ae24a1f5408b81fe41e819..e57418d9c6fa4f90835a0863c4b7182386f75fa8 100644 (file)
@@ -134,7 +134,7 @@ export class AdvancedTimelineClass extends React.PureComponent<Props, State> {
         this.props.updateTooltip(
           selectedDatePos.selectedDate,
           selectedDatePos.selectedDateXPos,
-          selectedDatePos.selectedDateIdx
+          selectedDatePos.selectedDateIdx,
         );
       }
     }
@@ -151,7 +151,7 @@ export class AdvancedTimelineClass extends React.PureComponent<Props, State> {
   getYScale = (
     props: PropsWithDefaults,
     availableHeight: number,
-    flatData: Chart.Point[]
+    flatData: Chart.Point[],
   ): YScale => {
     if (props.metricType === MetricType.Rating) {
       return this.getRatingScale(availableHeight);
@@ -172,7 +172,7 @@ export class AdvancedTimelineClass extends React.PureComponent<Props, State> {
   getXScale = (
     { startDate, endDate }: PropsWithDefaults,
     availableWidth: number,
-    flatData: Chart.Point[]
+    flatData: Chart.Point[],
   ) => {
     const dateRange = extent(flatData, (d) => d.x) as [Date, Date];
     const start = startDate && startDate > dateRange[0] ? startDate : dateRange[0];
@@ -484,7 +484,7 @@ export class AdvancedTimelineClass extends React.PureComponent<Props, State> {
                     cx={xScale(point.x)}
                     cy={yScale(point.y as YPoint)}
                     fill={themeColor(
-                      `graphLineColor.${serieIdx}` as Parameters<typeof themeColor>[0]
+                      `graphLineColor.${serieIdx}` as Parameters<typeof themeColor>[0],
                     )({
                       theme,
                     })}
@@ -495,7 +495,7 @@ export class AdvancedTimelineClass extends React.PureComponent<Props, State> {
                   />
                 );
               })
-              .filter(isDefined)
+              .filter(isDefined),
           )
           .filter((dots) => dots.length > 0)}
       </g>
index c6dca8b8bc6f88ed48ac94f183cf6d73f00e0802..b1d5376f64d36332953474e4dcc4a0666cc83d76 100644 (file)
@@ -47,7 +47,7 @@ export function LanguageDistribution(props: LanguageDistributionProps) {
     .map((d) => getLanguageName(languages, d.language))
     .map(cutLanguageName);
   const yTooltips = parsedDistribution.map((d) =>
-    d.lines > NUMBER_FORMAT_THRESHOLD ? formatMeasure(d.lines, MetricType.Integer) : ''
+    d.lines > NUMBER_FORMAT_THRESHOLD ? formatMeasure(d.lines, MetricType.Integer) : '',
   );
   const yValues = parsedDistribution.map((d) => formatMeasure(d.lines, MetricType.ShortInteger));
 
index 9462ee13b5b3632affaa66551cec04d877457046..f2fe0532fca999958da0c0ad603e8b19706fab0d 100644 (file)
@@ -142,7 +142,7 @@ export class ZoomTimeLine extends React.PureComponent<Props, State> {
     if (newZoomStart != null && overlayLeftPos != null && data.deltaX) {
       this.handleZoomUpdate(
         xScale,
-        sortBy([newZoomStart, Math.max(xDim[0], Math.min(data.x - overlayLeftPos, xDim[1]))])
+        sortBy([newZoomStart, Math.max(xDim[0], Math.min(data.x - overlayLeftPos, xDim[1]))]),
       );
     }
   };
@@ -261,13 +261,13 @@ export class ZoomTimeLine extends React.PureComponent<Props, State> {
         options.fixedPos,
         options.xDim,
         options.direction,
-        true
+        true,
       )}
       onStop={this.handleSelectionHandleDrag(
         options.xScale,
         options.fixedPos,
         options.xDim,
-        options.direction
+        options.direction,
       )}
       position={{ x: options.xPos, y: 0 }}
     >
index 4a2be3cf36fd9bd366601fd3c035ad36a6588c80..e064e550870df353bf8b5fa0182e071d33acf1e9 100644 (file)
@@ -100,6 +100,6 @@ function renderComponent(props?: Partial<PropsWithoutTheme>) {
       width={100}
       zoomSpeed={1}
       {...props}
-    />
+    />,
   );
 }
index aaa60695d526ea99420bae379e902d60ee08fc45..83b5bc2a22db8fcf896637c27b5fb41eaf420098 100644 (file)
@@ -39,7 +39,7 @@ it('should display ticks', () => {
   ];
   const ticks = ['A', 'B', 'C'];
   const chart = shallow(
-    <BarChart barsWidth={20} data={data} height={100} width={100} xTicks={ticks} />
+    <BarChart barsWidth={20} data={data} height={100} width={100} xTicks={ticks} />,
   );
   expect(chart.find('.bar-chart-tick').length).toBe(3);
 });
@@ -52,7 +52,7 @@ it('should display values', () => {
   ];
   const values = ['A', 'B', 'C'];
   const chart = shallow(
-    <BarChart barsWidth={20} data={data} height={100} width={100} xValues={values} />
+    <BarChart barsWidth={20} data={data} height={100} width={100} xValues={values} />,
   );
   expect(chart.find('.bar-chart-tick').length).toBe(3);
 });
@@ -66,7 +66,14 @@ it('should display bars, ticks and values', () => {
   const ticks = ['A', 'B', 'C'];
   const values = ['A', 'B', 'C'];
   const chart = shallow(
-    <BarChart barsWidth={20} data={data} height={100} width={100} xTicks={ticks} xValues={values} />
+    <BarChart
+      barsWidth={20}
+      data={data}
+      height={100}
+      width={100}
+      xTicks={ticks}
+      xValues={values}
+    />,
   );
   expect(chart.find('.bar-chart-bar').length).toBe(3);
   expect(chart.find('.bar-chart-tick').length).toBe(6);
index 119369fff4781d41571b222b8de1ab9536214a37..d31efbc5099acff8a0789bfcb1f33e1979f803d7 100644 (file)
@@ -34,7 +34,7 @@ it('should render properly', () => {
       showColorNA
       height={20}
       width={200}
-    />
+    />,
   );
   expect(wrapper).toMatchSnapshot();
 });
index d44736a010971ea2628852c6bf752110f9c2babd..f5351a2edfe38fc5994154663ef63121061f999d 100644 (file)
@@ -42,6 +42,6 @@ function shallowRender(props: Partial<DonutChartProps> = {}) {
       thickness={2}
       width={20}
       {...props}
-    />
+    />,
   );
 }
index 3466cbef9a8cee1af6bb6d8fdbae9de517af5049..96256a6520ad609ebfc0a333ade15bcc38a28a6c 100644 (file)
@@ -33,6 +33,6 @@ function renderLanguageDistribution(props: Partial<LanguageDistributionProps> =
       distribution="java=1734;js=845;cpp=73;<null>=15"
       languages={{ java: { key: 'java', name: 'Java' }, js: { key: 'js', name: 'JavaScript' } }}
       {...props}
-    />
+    />,
   );
 }
index 3ea9e7b7bea1c2a4561eb4df75cbfd078023ed61..3b1ad662f5025937d8ab6faca968b2c1ff33493b 100644 (file)
@@ -33,7 +33,7 @@ export default function FormattingTips({ className }: FormattingTipsProps) {
     window.open(
       `${getBaseUrl()}${getFormattingHelpUrl()}`,
       'Formatting',
-      'height=300,width=600,scrollbars=1,resizable=1'
+      'height=300,width=600,scrollbars=1,resizable=1',
     );
   }, []);
 
index a00dd1b5afbf904e160670586e25a65ec9c18fd9..0faa3fa5e4a3dd9e473581d691012149c1701fc9 100644 (file)
@@ -32,7 +32,7 @@ export default class FormattingTipsWithLink extends React.PureComponent<Props> {
     window.open(
       getFormattingHelpUrl(),
       'Formatting',
-      'height=300,width=600,scrollbars=1,resizable=1'
+      'height=300,width=600,scrollbars=1,resizable=1',
     );
   }
 
index 2e59c3affca4b3377ff1ccffba7046151fec8b49..82d8bda8d7554094869b8aebe8c027ac4d1bfb88 100644 (file)
@@ -88,8 +88,8 @@ export default class MultiSelect extends React.PureComponent<PropsWithDefault, S
       !isEmpty(
         xor(
           [...prevProps.selectedElements, ...prevProps.elements],
-          [...this.props.selectedElements, ...this.props.elements]
-        )
+          [...this.props.selectedElements, ...this.props.elements],
+        ),
       )
     ) {
       this.computeElements();
@@ -142,7 +142,7 @@ export default class MultiSelect extends React.PureComponent<PropsWithDefault, S
   handleSelectChange = (selected: boolean, item: string) => {
     this.setState(({ elements }) => {
       const newElements = elements.map((e) =>
-        e.value === item ? { value: e.value, selected } : e
+        e.value === item ? { value: e.value, selected } : e,
       );
       return { elements: newElements };
     });
index f19dbf01842f0d832ac0e5d3c7a7e8a1c6f68f8f..7dc54810c084b46a630948893e5ea14e5f97505c 100644 (file)
@@ -69,7 +69,7 @@ export default class SelectListItem extends React.PureComponent<Props, State> {
               active: this.props.active === this.props.item,
               hover: selected,
             },
-            this.props.className
+            this.props.className,
           )}
           onClick={this.handleSelect}
           onFocus={this.handleHover}
index 23e6572a4ee9db494ca464761d0c7a4e8a429bd1..08d11f9e7ea3ac56d67ab41e109cd8b1e66bf2d9 100644 (file)
@@ -41,7 +41,7 @@ export default function StatusIndicator({ className, color, size }: StatusIndica
             'small-status-indicator': size === 'small',
             'big-status-indicator': size === 'big',
           },
-          className
+          className,
         )}
       />
     </>
index c8bd5e4898e1b498905ed87df0a20d4e6bcb4683..c711b41f75098749b5bc5b2f2ec1a52407baf6b4 100644 (file)
@@ -50,7 +50,7 @@ it('renders correctly with graph and metric', () => {
   expect(anchorElement).toBeInTheDocument();
   expect(anchorElement).toHaveAttribute(
     'href',
-    '/project/activity?id=foo&graph=custom&custom_metrics=new_bugs%2Cbugs'
+    '/project/activity?id=foo&graph=custom&custom_metrics=new_bugs%2Cbugs',
   );
 });
 
index ae64ae53f60c14924a7dc4ee821ece5c14e6c7a4..4d62e16b1474d91410fc7ccffc9d6d3a72c51728 100644 (file)
@@ -62,7 +62,7 @@ describe('should render correctly', () => {
 });
 
 function renderAnalysisWarningsModal(
-  props: Partial<ComponentPropsType<typeof AnalysisWarningsModal>> = {}
+  props: Partial<ComponentPropsType<typeof AnalysisWarningsModal>> = {},
 ) {
   return renderComponent(
     <AnalysisWarningsModal
@@ -74,6 +74,6 @@ function renderAnalysisWarningsModal(
         mockTaskWarning({ message: 'warning 2' }),
       ]}
       {...props}
-    />
+    />,
   );
 }
index 74b1619e08f5f0cc780e13fbb784ea68ad801be2..d8d9f98db7ec45fe44783019de752d33851ca99b 100644 (file)
@@ -28,7 +28,7 @@ it('renders correctly', () => {
   expect(shallowRender({ noCopy: true })).toMatchSnapshot('no copy');
   expect(shallowRender({ snippet: ['foo', 'bar'] })).toMatchSnapshot('array snippet');
   expect(shallowRender({ isOneLine: true, snippet: ['foo', 'bar'] })).toMatchSnapshot(
-    'single line with array snippet'
+    'single line with array snippet',
   );
 });
 
index 82c868737e8401af01f990bfdc18fb1f2f275d61..100f837935451322a12a4b6b5e9f5db820680b8c 100644 (file)
@@ -25,13 +25,13 @@ it('should render correctly', () => {
   expect(shallowRender()).toMatchSnapshot('default');
   expect(shallowRender({ option: { value: 'baz' } })).toMatchSnapshot('no label');
   expect(
-    shallowRender({ option: { label: 'Bar', value: 'bar', isDisabled: true } })
+    shallowRender({ option: { label: 'Bar', value: 'bar', isDisabled: true } }),
   ).toMatchSnapshot('disabled');
   expect(
     shallowRender({
       option: { label: 'Bar', value: 'bar', isDisabled: true },
       disabledReason: 'bar baz',
-    })
+    }),
   ).toMatchSnapshot('disabled, with explanation');
 });
 
@@ -41,6 +41,6 @@ function shallowRender(props: Partial<DisableableSelectOptionProps> = {}) {
       option={{ label: 'Foo', value: 'foo' }}
       disableTooltipOverlay={() => 'foo bar'}
       {...props}
-    />
+    />,
   );
 }
index d0523e9096378028ff9fc3267ccc3e1ace75ad53..be9bf3e6df1796e8d8df9ffa31d7b72b8402655c 100644 (file)
@@ -90,6 +90,6 @@ function renderDocumentationTooltip(props: Partial<DocumentationTooltipProps> =
       <Link to="/" target="_blank">
         Interactive element after
       </Link>
-    </>
+    </>,
   );
 }
index 3ef294e727db06b67f65895221e49eb0bc17d458..b223dc80b151dd1e59d39d835cfec6485fdc1e2c 100644 (file)
@@ -45,7 +45,7 @@ it('should return the same message', () => {
 function shallowRender(
   children: (msg: string) => React.ReactChild,
   message: string,
-  onSonarCloud = false
+  onSonarCloud = false,
 ) {
   (getInstance as jest.Mock).mockImplementation(() => (onSonarCloud ? 'SonarCloud' : 'SonarQube'));
   return shallow(<InstanceMessage message={message}>{children}</InstanceMessage>);
index b4078004879f66e8d0ceef7b786b8cf3bbd2bfa5..18a072f4c80ff0c52af4321bb76a902e5723fed4 100644 (file)
@@ -37,7 +37,7 @@ it('should correctly render an external link', () => {
   renderLink({ target: '_blank', to: 'http://example.com' });
   expect(screen.getByRole('link', { name: 'opens_in_new_window click me' })).toHaveAttribute(
     'rel',
-    'noopener noreferrer'
+    'noopener noreferrer',
   );
 });
 
@@ -45,6 +45,6 @@ function renderLink(props: Partial<LinkProps> = {}) {
   return renderComponent(
     <Link to={{ pathname: 'to' }} {...props}>
       click me
-    </Link>
+    </Link>,
   );
 }
index 2905a4a8fd09a5f3fb7d1f76c15bd3e489d4c740..69275013760292e2f8444e0b74549e2dce42b3c7 100644 (file)
@@ -28,6 +28,6 @@ it('should render correctly', () => {
 
 function shallowRender(props: Partial<PageCounterProps> = {}) {
   return shallow<PageCounterProps>(
-    <PageCounter label="label" current={123} total={1234} {...props} />
+    <PageCounter label="label" current={123} total={1234} {...props} />,
   );
 }
index 58579fadd0d7d65426d83c75b9ecb606d57324c7..914e7b3f512f7f9bf9278811a87e18d5fc8f677d 100644 (file)
@@ -36,6 +36,6 @@ function getWrapper(props = {}) {
       qualifier={ComponentQualifier.Project}
       visibility={Visibility.Private}
       {...props}
-    />
+    />,
   );
 }
index 17ecccfb957f73f89df9a11fcac4fbff3bbf6ed2..456fd04a47d27a3942928221ae092928fffbabd2 100644 (file)
@@ -26,7 +26,7 @@ it('should render correctly', () => {
   expect(shallowRender()).toMatchSnapshot('default');
   expect(shallowRender({ projectKey: 'foo' })).toMatchSnapshot('with value');
   expect(
-    shallowRender({ help: 'foo.help', label: 'foo.label', placeholder: 'foo.placeholder' })
+    shallowRender({ help: 'foo.help', label: 'foo.label', placeholder: 'foo.placeholder' }),
   ).toMatchSnapshot('with label, help, and placeholder');
   expect(shallowRender({ touched: true })).toMatchSnapshot('valid');
   expect(shallowRender({ touched: true, error: 'bar.baz' })).toMatchSnapshot('invalid');
@@ -43,6 +43,6 @@ it('should not display any status when the key is not defined', () => {
 
 function shallowRender(props: Partial<ProjectKeyInputProps> = {}) {
   return shallow<ProjectKeyInputProps>(
-    <ProjectKeyInput onProjectKeyChange={jest.fn()} touched={false} {...props} />
+    <ProjectKeyInput onProjectKeyChange={jest.fn()} touched={false} {...props} />,
   );
 }
index d713d4e0b887e03410183ce713a3f68c894878fe..cebedabc51f4fd46bacea197f05d1a3a76309749 100644 (file)
@@ -48,6 +48,6 @@ function shallowRender(props: Partial<SelectList['props']> = {}, children?: Reac
       {...props}
     >
       {children}
-    </SelectList>
+    </SelectList>,
   );
 }
index d9b7d0051b25514398a32b98ee4e5fd5ab61ef09..a4f27dea4d2e11cb34f5e02482117d6464601c89 100644 (file)
@@ -31,8 +31,8 @@ it('should render correctly with children', () => {
       <SelectListItem active="myitem" item="seconditem">
         <i className="custom-icon" />
         <p>seconditem</p>
-      </SelectListItem>
-    )
+      </SelectListItem>,
+    ),
   ).toMatchSnapshot();
 });
 
index 831ce8309d6cd1f69c849e431d8c175abb2803a9..f12e2b88895e502bd4a1bf52910a2f9f301365fe 100644 (file)
@@ -59,7 +59,7 @@ export default class BackButton extends React.PureComponent<Props> {
           className={classNames(
             'link-no-underline',
             { 'cursor-not-allowed': this.props.disabled },
-            this.props.className
+            this.props.className,
           )}
           href="#"
           onClick={this.handleClick}
index 33dd4c4ae24ecf1d8ece2fa00f6d2a8e8144fce0..a27c0023fbe18f26f49cc0534c88b99ce56c6b63 100644 (file)
@@ -40,7 +40,10 @@ a.icon-checkbox {
   height: 10px;
   border: 1px solid var(--darkBlue);
   border-radius: 2px;
-  transition: border-color 0.2s ease, background-color 0.2s ease, background-image 0.2s ease,
+  transition:
+    border-color 0.2s ease,
+    background-color 0.2s ease,
+    background-image 0.2s ease,
     box-shadow 0.4s ease;
 }
 
index b6ae69db5ccfa48794488be96de6b94de679ded3..d62658300685b3f4fe998b81262572277747e308 100644 (file)
@@ -82,12 +82,12 @@ export class ComponentReportActions extends React.PureComponent<Props, State> {
       : 'component_report.unsubscribe_x_success';
     const frequencyTranslation = translate(
       'report.frequency',
-      status?.componentFrequency || status?.globalFrequency || ''
+      status?.componentFrequency || status?.globalFrequency || '',
     ).toLowerCase();
     const qualifierTranslation = translate('qualifier', component.qualifier).toLowerCase();
 
     addGlobalSuccessMessage(
-      translateWithParameters(translationKey, frequencyTranslation, qualifierTranslation)
+      translateWithParameters(translationKey, frequencyTranslation, qualifierTranslation),
     );
 
     this.loadReportStatus();
index b480336677079bb63fa1289d45773fdd285fecdd..5671daf5cbd50ee804f06a6aa6ac04404cb6a169 100644 (file)
@@ -96,7 +96,7 @@ export default function ComponentReportActionsRenderer(props: ComponentReportAct
       <ButtonSecondary>
         {translateWithParameters(
           'component_report.report',
-          translate('qualifier', component.qualifier)
+          translate('qualifier', component.qualifier),
         )}
         <ChevronDownIcon className="sw-ml-1" />
       </ButtonSecondary>
@@ -105,7 +105,7 @@ export default function ComponentReportActionsRenderer(props: ComponentReportAct
     <a download={downloadName} href={reportUrl} target="_blank" rel="noopener noreferrer">
       {translateWithParameters(
         'component_report.download',
-        translate('qualifier', component.qualifier).toLowerCase()
+        translate('qualifier', component.qualifier).toLowerCase(),
       )}
     </a>
   );
index 4705effa33999296d9b1acf3de9509e46417b622..9f273bfe1411368e0ea2816299d5375aace42c1b 100644 (file)
@@ -62,7 +62,7 @@ export default class ConfirmModal<T = string> extends React.PureComponent<Props<
         },
         () => {
           /* noop */
-        }
+        },
       );
     }
     this.props.onClose();
index 5c45f98ec7cd0c1a45612146386fd9d88228b2c4..54ca95786bcce16f50dceafbdc7b8a63e48c24d9 100644 (file)
@@ -110,7 +110,7 @@ export default class Dropdown extends React.PureComponent<Props, State> {
     return React.createElement(
       this.props.tagName || 'div',
       { className: classNames('dropdown', this.props.className) },
-      toggler
+      toggler,
     );
   }
 }
index 979aa1853783a13a6c312395436c2229a5c3adf9..6beca698d10e2be32b8d4542e45cc5b1ad8d333d 100644 (file)
@@ -52,7 +52,7 @@ export default function IdentityProviderLink({
       className={classNames(
         'identity-provider-link',
         { 'dark-text': !isDarkColor(backgroundColor), small },
-        className
+        className,
       )}
       href={url}
       onClick={onClick}
index 55a4284165991cadfc31fe7a939e60db3ab18c85..40c7be0741db484edb3b5580ddd6b3d2fe01245c 100644 (file)
@@ -84,7 +84,7 @@ export default function ListFooter(props: ListFooterProps) {
         disabled: loading,
         onClick: props.reload,
       } as Button['props'],
-      translate('reload')
+      translate('reload'),
     );
   } else if (hasMore && props.loadMore) {
     button = React.createElement(
@@ -96,7 +96,7 @@ export default function ListFooter(props: ListFooterProps) {
         disabled: loading,
         onClick: onLoadMore,
       } as Button['props'],
-      translate('show_more')
+      translate('show_more'),
     );
   }
 
@@ -108,7 +108,7 @@ export default function ListFooter(props: ListFooterProps) {
         'list-footer', // .list-footer is only used by Selenium tests; we should find a way to remove it.
         'sw-body-sm sw-mt-4 sw-flex sw-items-center sw-justify-center',
         { 'sw-opacity-50 sw-duration-500 sw-ease-in-out': !ready },
-        className
+        className,
       )}
     >
       <span aria-live="polite" aria-busy={loading}>
@@ -116,7 +116,7 @@ export default function ListFooter(props: ListFooterProps) {
           ? translateWithParameters(
               'x_of_y_shown',
               formatMeasure(count, MetricType.Integer, null),
-              formatMeasure(total, MetricType.Integer, null)
+              formatMeasure(total, MetricType.Integer, null),
             )
           : translateWithParameters('x_show', formatMeasure(count, MetricType.Integer, null))}
       </span>
index f94f074fe12df462383142f13b60eb852fb6db14..9c38e35d9cf1d86035bde75bec7e9d0ea8da794a 100644 (file)
@@ -50,7 +50,7 @@ export default class Radio extends React.PureComponent<Props> {
           alignLabel ? 'display-inline-flex-start' : 'display-inline-flex-center',
           'link-radio',
           className,
-          { disabled }
+          { disabled },
         )}
         href="#"
         onClick={this.handleClick}
index 2bacb63dade9424d5bdd021d12b150374dc85d50..edff2a73e18e0689e3db0cc9d752e78cdf573f2f 100644 (file)
@@ -66,7 +66,7 @@ export default function RadioCard(props: Props) {
           disabled,
           selected,
         },
-        className
+        className,
       )}
       onClick={isActionable && !disabled && !selected ? onClick : undefined}
       role="radio"
index ad0ad0d9fa83b962c2971da1a4221dfcb8c6e0eb..aa45bffda896862fea41fcdb5dee6222be8e2c33 100644 (file)
@@ -94,7 +94,9 @@
 }
 
 .search-box-clear.button:focus {
-  box-shadow: 0 0 0 1px white, 0 0 0 4px rgba(35, 106, 151, 0.5);
+  box-shadow:
+    0 0 0 1px white,
+    0 0 0 4px rgba(35, 106, 151, 0.5);
 }
 
 .search-box-input-note {
index 898b6f2d33c94a16064349a261d21faf935b853e..0a519dd212c06064d7fbd56a6d6ad61a307cb2af 100644 (file)
@@ -57,7 +57,7 @@ interface StyleExtensionProps {
 export function dropdownIndicator<
   Option = LabelValueSelectOption,
   IsMulti extends boolean = boolean,
-  Group extends GroupBase<Option> = GroupBase<Option>
+  Group extends GroupBase<Option> = GroupBase<Option>,
 >({ innerProps }: DropdownIndicatorProps<Option, IsMulti, Group>) {
   return <ArrowSpan {...innerProps} />;
 }
@@ -65,7 +65,7 @@ export function dropdownIndicator<
 export function clearIndicator<
   Option = LabelValueSelectOption,
   IsMulti extends boolean = boolean,
-  Group extends GroupBase<Option> = GroupBase<Option>
+  Group extends GroupBase<Option> = GroupBase<Option>,
 >(props: ClearIndicatorProps<Option, IsMulti, Group>) {
   const { innerProps } = props;
   return (
@@ -80,7 +80,7 @@ export function clearIndicator<
 export function loadingIndicator<
   Option = LabelValueSelectOption,
   IsMulti extends boolean = boolean,
-  Group extends GroupBase<Option> = GroupBase<Option>
+  Group extends GroupBase<Option> = GroupBase<Option>,
 >({ innerProps }: LoadingIndicatorProps<Option, IsMulti, Group>) {
   return <i className={classNames('spinner spacer-left spacer-right', innerProps.className)} />;
 }
@@ -88,7 +88,7 @@ export function loadingIndicator<
 export function multiValueRemove<
   Option = LabelValueSelectOption,
   IsMulti extends boolean = boolean,
-  Group extends GroupBase<Option> = GroupBase<Option>
+  Group extends GroupBase<Option> = GroupBase<Option>,
 >(props: MultiValueRemoveProps<Option, IsMulti, Group>) {
   return <components.MultiValueRemove {...props}>&times;</components.MultiValueRemove>;
 }
@@ -97,7 +97,7 @@ export function multiValueRemove<
 export default class Select<
   Option = LabelValueSelectOption,
   IsMulti extends boolean = boolean,
-  Group extends GroupBase<Option> = GroupBase<Option>
+  Group extends GroupBase<Option> = GroupBase<Option>,
 > extends React.Component<NamedProps<Option, IsMulti, Group> & StyleExtensionProps> {
   render() {
     return (
@@ -120,7 +120,7 @@ export default class Select<
 export function CreatableSelect<
   Option = LabelValueSelectOption,
   IsMulti extends boolean = boolean,
-  Group extends GroupBase<Option> = GroupBase<Option>
+  Group extends GroupBase<Option> = GroupBase<Option>,
 >(props: AsyncCreatableProps<Option, IsMulti, Group>) {
   return (
     <AsyncCreatableReactSelect<Option, IsMulti, Group>
@@ -140,11 +140,11 @@ export function CreatableSelect<
 export function SearchSelect<
   Option = LabelValueSelectOption,
   IsMulti extends boolean = boolean,
-  Group extends GroupBase<Option> = GroupBase<Option>
+  Group extends GroupBase<Option> = GroupBase<Option>,
 >(
   props: NamedProps<Option, IsMulti, Group> &
     AsyncProps<Option, IsMulti, Group> &
-    StyleExtensionProps
+    StyleExtensionProps,
 ) {
   return (
     <AsyncReactSelect<Option, IsMulti, Group>
@@ -166,11 +166,11 @@ export function SearchSelect<
 export function selectStyle<
   Option = LabelValueSelectOption,
   IsMulti extends boolean = boolean,
-  Group extends GroupBase<Option> = GroupBase<Option>
+  Group extends GroupBase<Option> = GroupBase<Option>,
 >(
   props?: NamedProps<Option, IsMulti, Group> &
     AsyncProps<Option, IsMulti, Group> &
-    StyleExtensionProps
+    StyleExtensionProps,
 ): StylesConfig<Option, IsMulti, Group> {
   return {
     container: () => ({
index 42454b8076a9e950ffeb935ca666ef85148ce2d1..3fa5ac1133671eb7ea395f5b9df2e51c256f154d 100644 (file)
@@ -118,7 +118,7 @@ export default class SelectList extends React.PureComponent<Props, State> {
           })
           .then(this.stopLoading)
           .catch(this.stopLoading);
-      }
+      },
     );
 
   changeFilter = (filter: SelectListFilter) => this.search({ filter, page: 1 });
index 8679c7c546ee3f83040e29572dfda599942f4fa0..9efb0ad962dfe8c589411ca8e909509ca130e742 100644 (file)
@@ -50,7 +50,9 @@
   border-radius: 22px;
   box-sizing: border-box;
   background-color: #f6f6f6;
-  transition: transform 0.3s cubic-bezier(0.87, -0.41, 0.19, 1.44), border 0.3s ease;
+  transition:
+    transform 0.3s cubic-bezier(0.87, -0.41, 0.19, 1.44),
+    border 0.3s ease;
 }
 
 .boolean-toggle-handle > * {
index 0cf6d91509149af224f96dedbabd51d65e695e50..d688d56bbed66f25282a7fd427d29cc1656a4e56 100644 (file)
@@ -176,7 +176,7 @@ export class TooltipInner extends React.Component<TooltipProps, State> {
 
   adjustArrowPosition = (
     placement: Placement,
-    { leftFix, topFix }: { leftFix: number; topFix: number }
+    { leftFix, topFix }: { leftFix: number; topFix: number },
   ) => {
     switch (placement) {
       case 'left':
@@ -246,18 +246,21 @@ export class TooltipInner extends React.Component<TooltipProps, State> {
   };
 
   handleMouseEnter = () => {
-    this.mouseEnterTimeout = window.setTimeout(() => {
-      // For some reason, even after the `this.mouseEnterTimeout` is cleared, it still
-      // triggers. To workaround this issue, check that its value is not `undefined`
-      // (if it's `undefined`, it means the timer has been reset).
-      if (
-        this.mounted &&
-        this.props.visible === undefined &&
-        this.mouseEnterTimeout !== undefined
-      ) {
-        this.setState({ visible: true });
-      }
-    }, (this.props.mouseEnterDelay || 0) * 1000);
+    this.mouseEnterTimeout = window.setTimeout(
+      () => {
+        // For some reason, even after the `this.mouseEnterTimeout` is cleared, it still
+        // triggers. To workaround this issue, check that its value is not `undefined`
+        // (if it's `undefined`, it means the timer has been reset).
+        if (
+          this.mounted &&
+          this.props.visible === undefined &&
+          this.mouseEnterTimeout !== undefined
+        ) {
+          this.setState({ visible: true });
+        }
+      },
+      (this.props.mouseEnterDelay || 0) * 1000,
+    );
 
     if (this.props.onShow) {
       this.props.onShow();
@@ -271,14 +274,17 @@ export class TooltipInner extends React.Component<TooltipProps, State> {
     }
 
     if (!this.mouseIn) {
-      this.mouseLeaveTimeout = window.setTimeout(() => {
-        if (this.mounted && this.props.visible === undefined && !this.mouseIn) {
-          this.setState({ visible: false });
-        }
-        if (this.props.onHide && !this.mouseIn) {
-          this.props.onHide();
-        }
-      }, (this.props.mouseLeaveDelay || 0) * 1000);
+      this.mouseLeaveTimeout = window.setTimeout(
+        () => {
+          if (this.mounted && this.props.visible === undefined && !this.mouseIn) {
+            this.setState({ visible: false });
+          }
+          if (this.props.onHide && !this.mouseIn) {
+            this.props.onHide();
+          }
+        },
+        (this.props.mouseLeaveDelay || 0) * 1000,
+      );
     }
   };
 
@@ -354,7 +360,7 @@ export class TooltipInner extends React.Component<TooltipProps, State> {
               // position (which is no longer correct).
               this.positionTooltip();
             }
-          }
+          },
         );
       }, 1);
       return null;
index d513658b2eca953c4f0c5c73f8c8e326344fa36e..d72ae50bf91f064942c4ca6aa4a29dd87fa8b2c2 100644 (file)
@@ -45,7 +45,7 @@ describe('ActionsDropdown', () => {
         {...props}
       >
         <span>Hello world</span>
-      </ActionsDropdown>
+      </ActionsDropdown>,
     );
   }
 });
index 458b29db14a481792e3f0c280c45aac4b05f2925..6e4834a6a6e80f241e0b34245542d809e603da11 100644 (file)
@@ -60,6 +60,6 @@ function render(props?: Partial<ButtonToggleProps>) {
       ]}
       value="two"
       {...props}
-    />
+    />,
   );
 }
index 9528bc4f3516c808dfd32d7655157a5edab26ca5..9ecb24b98a50d1e3394051ecb947e1b0c60f046c 100644 (file)
@@ -44,6 +44,6 @@ function shallowRender(parentProps = {}, childProps = {}) {
           Click me
         </button>
       </ClickEventBoundary>
-    </div>
+    </div>,
   );
 }
index 51b125058420d54e171b3a656bcd4ed20ecd4fb2..bd05487420851cf1b729fa3e442bda386dcb0b01 100644 (file)
@@ -38,7 +38,7 @@ jest.mock('../../../api/component-report', () => ({
   getReportStatus: jest
     .fn()
     .mockResolvedValue(
-      jest.requireActual('../../../helpers/mocks/component-report').mockComponentReportStatus()
+      jest.requireActual('../../../helpers/mocks/component-report').mockComponentReportStatus(),
     ),
   subscribeToEmailReport: jest.fn().mockResolvedValue(undefined),
   unsubscribeFromEmailReport: jest.fn().mockResolvedValue(undefined),
@@ -88,7 +88,7 @@ it('should allow user to (un)subscribe', async () => {
     .mocked(getReportStatus)
     .mockResolvedValueOnce(mockComponentReportStatus({ globalFrequency: 'monthly' }))
     .mockResolvedValueOnce(
-      mockComponentReportStatus({ subscribed: true, globalFrequency: 'monthly' })
+      mockComponentReportStatus({ subscribed: true, globalFrequency: 'monthly' }),
     );
 
   const user = userEvent.setup();
@@ -126,7 +126,7 @@ it('should allow user to (un)subscribe', async () => {
   await user.click(button);
 
   const unsubscribeButton = screen.getByText(
-    'component_report.unsubscribe_x.report.frequency.monthly'
+    'component_report.unsubscribe_x.report.frequency.monthly',
   );
   expect(unsubscribeButton).toBeInTheDocument();
 
@@ -134,7 +134,7 @@ it('should allow user to (un)subscribe', async () => {
 
   expect(unsubscribeFromEmailReport).toHaveBeenCalledWith(component.key, branch.name);
   expect(screen.getByRole('status')).toHaveTextContent(
-    'component_report.subscribe_x_s...component_report.unsubscribe_x...'
+    'component_report.subscribe_x_s...component_report.unsubscribe_x...',
   );
 });
 
@@ -148,7 +148,7 @@ it('should prevent user to subscribe if no email', async () => {
   await user.click(
     await screen.findByRole('button', {
       name: 'component_report.report.qualifier.TRK',
-    })
+    }),
   );
 
   const subscribeButton = screen.getByText('component_report.no_email_to_subscribe');
@@ -164,6 +164,6 @@ function renderComponentReportActions(props: Partial<ComponentReportActions['pro
       component={mockComponent()}
       currentUser={mockCurrentUser()}
       {...props}
-    />
+    />,
   );
 }
index dd8f55588da55ae56e640c75d15611bb42d19004..799ffba68e45ead47d292d834c6797bd220b65d9 100644 (file)
@@ -27,7 +27,7 @@ it('should display a modal button', () => {
 
 it('should display a confirm modal', () => {
   expect(
-    shallowRender().find('ModalButton').prop<Function>('modal')({ onClose: jest.fn() })
+    shallowRender().find('ModalButton').prop<Function>('modal')({ onClose: jest.fn() }),
   ).toMatchSnapshot();
 });
 
@@ -40,6 +40,6 @@ function shallowRender() {
       onConfirm={jest.fn()}
     >
       {() => 'Confirm button'}
-    </ConfirmButton>
+    </ConfirmButton>,
   );
 }
index c053f70f8289169b44287ca65204ade8f022bd7e..c88cc82389f2caa4e10cd0774706490361cc86a4 100644 (file)
@@ -32,7 +32,7 @@ it('should render correctly', () => {
       onConfirm={jest.fn()}
     >
       <p>My confirm message</p>
-    </ConfirmModal>
+    </ConfirmModal>,
   );
   expect(wrapper).toMatchSnapshot();
   expect(wrapper.find('SimpleModal').dive()).toMatchSnapshot();
@@ -50,7 +50,7 @@ it('should confirm and close after confirm', async () => {
       onConfirm={onConfirm}
     >
       <p>My confirm message</p>
-    </ConfirmModal>
+    </ConfirmModal>,
   );
   const modalContent = wrapper.find('SimpleModal').dive();
   submit(modalContent.find('form'));
index 5294c660a2fbf55e1648a326c3f2358384a07969..a2d1a96be4c63d702002c925853132d387a6c007 100644 (file)
@@ -94,7 +94,7 @@ function shallowRender(props?: Partial<DateInput['props']>) {
       onChange={jest.fn()}
       placeholder="placeholder"
       {...props}
-    />
+    />,
   );
   const instance = wrapper.instance();
   return { wrapper, instance };
index 29b4f8083ef6ff3cd5b4d86ba5e77bf33871baa5..160a01fdcae92fbfee2e439ffc96bbeaf6de6844 100644 (file)
@@ -27,11 +27,11 @@ const dateB = parseDate('2018-02-05T00:00:00.000Z');
 
 it('should render', () => {
   expect(
-    shallow(<DateRangeInput onChange={jest.fn()} value={{ from: dateA, to: dateB }} />)
+    shallow(<DateRangeInput onChange={jest.fn()} value={{ from: dateA, to: dateB }} />),
   ).toMatchSnapshot();
 
   expect(
-    shallow(<DateRangeInput onChange={jest.fn()} minDate={dateA} maxDate={dateB} />)
+    shallow(<DateRangeInput onChange={jest.fn()} minDate={dateA} maxDate={dateB} />),
   ).toMatchSnapshot('with min/max');
 
   expect(
@@ -41,8 +41,8 @@ it('should render', () => {
         minDate={dateA}
         maxDate={dateB}
         value={{ from: dateA, to: dateB }}
-      />
-    )
+      />,
+    ),
   ).toMatchSnapshot('with min/max and value');
 });
 
index 0104c4749ae51361316523e896aefb254019589f..d8fc4295858a9af101e7663a3c1fcd857be3f038 100644 (file)
@@ -32,7 +32,7 @@ describe('Dropdown', () => {
     expect(
       shallow(<Dropdown overlay={<div id="overlay" />}>{() => <div />}</Dropdown>)
         .find('div')
-        .exists()
+        .exists(),
     ).toBe(true);
   });
 
@@ -41,17 +41,17 @@ describe('Dropdown', () => {
       shallow(
         <Dropdown overlay={<div id="overlay" />}>
           <Button />
-        </Dropdown>
-      )
+        </Dropdown>,
+      ),
     );
 
     checkToggle(
       shallow(
         <Dropdown overlay={<div id="overlay" />}>
           <a href="#">click me!</a>
-        </Dropdown>
+        </Dropdown>,
       ),
-      'a'
+      'a',
     );
   });
 
@@ -60,8 +60,8 @@ describe('Dropdown', () => {
       shallow(
         <Dropdown overlay={<div id="overlay" />}>
           {({ onToggleClick }) => <Button onClick={onToggleClick} />}
-        </Dropdown>
-      )
+        </Dropdown>,
+      ),
     );
   });
 
@@ -70,7 +70,7 @@ describe('Dropdown', () => {
     const wrapper = mount(
       <Dropdown onOpen={onOpen} overlay={<div id="overlay" />}>
         <Button />
-      </Dropdown>
+      </Dropdown>,
     );
     expect(onOpen).not.toHaveBeenCalled();
     click(wrapper.find('Button'));
@@ -95,7 +95,7 @@ describe('DropdownOverlay', () => {
         <div />
       </DropdownOverlay>,
       // disable ScreenPositionFixer positioning
-      { disableLifecycleMethods: true }
+      { disableLifecycleMethods: true },
     );
 
     expect(wrapper.is(ScreenPositionFixer)).toBe(true);
@@ -106,7 +106,7 @@ describe('DropdownOverlay', () => {
     const wrapper = shallow(
       <DropdownOverlay placement={PopupPlacement.BottomRight}>
         <div />
-      </DropdownOverlay>
+      </DropdownOverlay>,
     );
     expect(wrapper.is('Popup')).toBe(true);
   });
index 483cd8cffd1e93f0eafea92f7380f0f7dee1aa5d..856ea92b99b302eedcd712266cfe001c2395ca7e 100644 (file)
@@ -66,6 +66,6 @@ it('correctly calls handleFavorite if passed', async () => {
 
 function renderFavorite(props: Partial<Favorite['props']> = {}) {
   return renderComponent(
-    <Favorite component="foo" favorite qualifier={ComponentQualifier.Project} {...props} />
+    <Favorite component="foo" favorite qualifier={ComponentQualifier.Project} {...props} />,
   );
 }
index 77128773d2070659e1d55342c37709d1ac5769b0..e5b32316a2b7e50da466845bb9299ac4c86989cf 100644 (file)
@@ -63,6 +63,6 @@ function renderHomePageSelect(props: Partial<HomePageSelect['props']> = {}) {
       currentUser={mockLoggedInUser()}
       updateCurrentUserHomepage={jest.fn()}
       {...props}
-    />
+    />,
   );
 }
index 2f8ca8a2d888da64979d092b264924d07a435606..ddc7e15e003b9bdd3e5f258e0b98de65904dc759 100644 (file)
@@ -38,7 +38,7 @@ it('should render correctly', () => {
         url="/url/foo/bar"
       >
         Link text
-      </IdentityProviderLink>
-    )
+      </IdentityProviderLink>,
+    ),
   ).toMatchSnapshot();
 });
index 0d5126fabbc89cdeae638f3c6953fb1b4c5d7c1e..097ff2b94959972dc999fe5f05d09652d4fae546 100644 (file)
@@ -39,6 +39,6 @@ function getWrapper(props = {}) {
       touched
       value="foo"
       {...props}
-    />
+    />,
   );
 }
index 709658d78f9881174431c51adb041c538270996e..36cea85021a3503f756579c057a53f52fda37c26 100644 (file)
@@ -54,7 +54,7 @@ describe('ListFooter', () => {
         }
         /* eslint-enable jest/no-conditional-in-test */
         /* eslint-enable jest/no-conditional-expect */
-      }
+      },
     );
   });
 
@@ -113,7 +113,7 @@ describe('ListFooter using MIUI buttons', () => {
         }
         /* eslint-enable jest/no-conditional-in-test */
         /* eslint-enable jest/no-conditional-expect */
-      }
+      },
     );
   });
 
@@ -137,7 +137,7 @@ describe('ListFooter using MIUI buttons', () => {
 
   function renderListFooter(props: Partial<ListFooterProps> = {}) {
     return renderComponent(
-      <ListFooter count={3} loadMore={jest.fn()} total={5} useMIUIButtons {...props} />
+      <ListFooter count={3} loadMore={jest.fn()} total={5} useMIUIButtons {...props} />,
     );
   }
 });
index 8ea2bdca7853c7fbfbc4b307f6259cb86afabd76..335fdbba4c6a4783644d231a418ea76e886f593a 100644 (file)
@@ -28,7 +28,7 @@ it('should open/close modal', () => {
   const wrapper = shallow(
     <ModalButton modal={({ onClose }) => <button id="js-close" onClick={onClose} type="button" />}>
       {({ onClick }) => <button id="js-open" onClick={onClick} type="button" />}
-    </ModalButton>
+    </ModalButton>,
   );
 
   expect(wrapper.find('#js-open').exists()).toBe(true);
index 9d8aff6dbd793c85847bd84b1e577832e6bd0d26..a711272469510baf0847513781a346eec29a8d81 100644 (file)
@@ -45,6 +45,6 @@ function getWrapper(props = {}) {
       {...props}
     >
       {({ className }) => <input className={className} type="text" />}
-    </ModalValidationField>
+    </ModalValidationField>,
   );
 }
index 2c0d97673dde9b33c0f905830f390793a5490254..671a62bbd8089faa24a89b5715018d1b71d9f2b2 100644 (file)
@@ -27,8 +27,8 @@ it('should render correctly', () => {
     shallow(
       <RadioCard recommended="Recommended for you" title="Radio Card" titleInfo="info">
         <div>content</div>
-      </RadioCard>
-    )
+      </RadioCard>,
+    ),
   ).toMatchSnapshot();
 
   expect(
@@ -40,8 +40,8 @@ it('should render correctly', () => {
         vertical
       >
         <div>content</div>
-      </RadioCard>
-    )
+      </RadioCard>,
+    ),
   ).toMatchSnapshot();
 });
 
@@ -50,7 +50,7 @@ it('should be actionable', () => {
   const wrapper = shallow(
     <RadioCard onClick={onClick} title="Radio Card">
       <div>content</div>
-    </RadioCard>
+    </RadioCard>,
   );
 
   expect(wrapper).toMatchSnapshot();
index 4d522ca046cfc0e5220c0516cf6d92365a04b023..b1d0ce16ee47f807b4e1c578f00bf36430ade80a 100644 (file)
@@ -40,14 +40,14 @@ it('renders', () => {
       onChange={jest.fn()}
       placeholder="placeholder"
       value="foo"
-    />
+    />,
   );
   expect(wrapper).toMatchSnapshot();
 });
 
 it('warns when input is too short', () => {
   const wrapper = shallow(
-    <SearchBox minLength={2} onChange={jest.fn()} placeholder="placeholder" value="f" />
+    <SearchBox minLength={2} onChange={jest.fn()} placeholder="placeholder" value="f" />,
   );
   expect(wrapper.find('.search-box-note').exists()).toBe(true);
 });
@@ -83,7 +83,7 @@ it('changes', () => {
 it('does not change when value is too short', () => {
   const onChange = jest.fn();
   const wrapper = shallow(
-    <SearchBox minLength={3} onChange={onChange} placeholder="placeholder" value="" />
+    <SearchBox minLength={3} onChange={onChange} placeholder="placeholder" value="" />,
   );
   change(wrapper.find('.search-box-input'), 'fo');
   expect(onChange).not.toHaveBeenCalled();
index 33ce945bec82c152290498fbbca247652e4780bd..65a589e2841e5f49e5712b82513b94dfc83a2a6b 100644 (file)
@@ -57,7 +57,7 @@ describe('Select', () => {
         components: {
           Input: inputRenderer,
         },
-      })
+      }),
     ).toMatchSnapshot('other props');
   });
 
@@ -67,7 +67,7 @@ describe('Select', () => {
 
   it('should render dropdownIndicator correctly', () => {
     expect(
-      dropdownIndicator(mockReactSelectDropdownIndicatorProps({ value: '' }))
+      dropdownIndicator(mockReactSelectDropdownIndicatorProps({ value: '' })),
     ).toMatchSnapshot();
   });
 
@@ -76,7 +76,7 @@ describe('Select', () => {
       loadingIndicator({ innerProps: { className: 'additional-class' } } as LoadingIndicatorProps<
         {},
         false
-      >)
+      >),
     ).toMatchSnapshot();
   });
 
@@ -87,7 +87,7 @@ describe('Select', () => {
   function shallowRender<
     Option = unknown,
     IsMulti extends boolean = boolean,
-    Group extends GroupBase<Option> = GroupBase<Option>
+    Group extends GroupBase<Option> = GroupBase<Option>,
   >(props: Partial<ReactSelectProps<Option, IsMulti, Group>> = {}) {
     return shallow<ReactSelectProps<Option, IsMulti, Group>>(<Select {...props} />);
   }
@@ -100,6 +100,6 @@ it.each([
   expect(
     shallow(<Component />)
       .dive()
-      .dive()
+      .dive(),
   ).toMatchSnapshot();
 });
index 83c3a69c7d446476078cb289a00a1e4b935cf994..3e65b6b427edb78c04825f65d45cf16052237607 100644 (file)
@@ -143,6 +143,6 @@ function shallowRender(props: Partial<SelectList['props']> = {}) {
       renderElement={(foo: string) => foo}
       selectedElements={selectedElements}
       {...props}
-    />
+    />,
   );
 }
index c416090bcdf24b5559edc7599e6272d0d76413e7..b88467f062e3a103697edf7d1bc2e5c803a1460f 100644 (file)
@@ -39,6 +39,6 @@ function shallowRender(props: Partial<SelectListListContainer['props']> = {}) {
       renderElement={(foo: string) => foo}
       selectedElements={['foo']}
       {...props}
-    />
+    />,
   );
 }
index 1bfc09dd1661499725c294d229875ea12f574ec9..d3dbbe72807bfe24548f1a381a2b51cae9f6863e 100644 (file)
@@ -52,6 +52,6 @@ function shallowRender(props: Partial<SelectListListElement['props']> = {}) {
       renderElement={(foo: string) => foo}
       selected={false}
       {...props}
-    />
+    />,
   );
 }
index c532f09fbb1aa7582b4df35b1e9bcdfe6a597a8c..f1a43dc75791f3c2a2ff97c7a4051485f430a518 100644 (file)
@@ -60,6 +60,6 @@ function shallowRender({ children = () => <div />, ...props }: Partial<SimpleMod
   return shallow<SimpleModal>(
     <SimpleModal header="" onClose={jest.fn()} onSubmit={jest.fn()} {...props}>
       {children}
-    </SimpleModal>
+    </SimpleModal>,
   );
 }
index f29b18a9c697b788db0d8232f9bb6473a8b16cab..d113e3e247424eb47032970ace367a97a5c9cb27 100644 (file)
@@ -63,7 +63,7 @@ it('should handle key up/down', async () => {
     <>
       <textarea name="test-area" />
       <button type="button">last</button>
-    </>
+    </>,
   );
 
   await openToggler(user);
index aef69447e0e63f1be3a6e8e30a561e6cf80db8a4..a98c3d43db01bbac3ae773b616daf3f1d38e6232 100644 (file)
@@ -52,8 +52,8 @@ it('should render', () => {
       <TooltipInner overlay={<span id="overlay" />} visible>
         <div id="tooltip" />
       </TooltipInner>,
-      { disableLifecycleMethods: true }
-    )
+      { disableLifecycleMethods: true },
+    ),
   ).toMatchSnapshot();
 });
 
@@ -113,7 +113,7 @@ function shallowRenderTooltip() {
   return shallow<TooltipProps>(
     <Tooltip overlay={undefined}>
       <div id="tooltip" />
-    </Tooltip>
+    </Tooltip>,
   );
 }
 
@@ -121,6 +121,6 @@ function shallowRenderTooltipInner(props?: Partial<TooltipProps>) {
   return shallow<TooltipInner>(
     <TooltipInner overlay={<span id="overlay" />} {...props}>
       <div id="tooltip" />
-    </TooltipInner>
+    </TooltipInner>,
   );
 }
index 5630a63cb4c327641636c016f470199407500f4a..1e752abe3eaba6b9c574c7b16b25f9c30f4a23b6 100644 (file)
@@ -28,12 +28,12 @@ it('should render and submit', async () => {
   const wrapper = shallow(
     <ValidationForm initialValues={{ foo: 'bar' }} onSubmit={onSubmit} validate={jest.fn()}>
       {render}
-    </ValidationForm>
+    </ValidationForm>,
   );
   expect(wrapper).toMatchSnapshot();
   wrapper.dive();
   expect(render).toHaveBeenCalledWith(
-    expect.objectContaining({ dirty: false, errors: {}, values: { foo: 'bar' } })
+    expect.objectContaining({ dirty: false, errors: {}, values: { foo: 'bar' } }),
   );
 
   onSubmit.mockResolvedValue(undefined).mockClear();
index 2979ed0a3aab5db3e74c4f4f45d9d51151c8bc5f..a4758e648ec930d433a54a91de72f52995ac34b4 100644 (file)
@@ -34,7 +34,7 @@ it('should render correctly', () => {
       isInvalid: true,
       isValid: false,
       required: false,
-    })
+    }),
   ).toMatchSnapshot('with error');
   expect(
     shallowRender({
@@ -42,7 +42,7 @@ it('should render correctly', () => {
       errorPlacement: ValidationInputErrorPlacement.Bottom,
       isInvalid: true,
       isValid: false,
-    })
+    }),
   ).toMatchSnapshot('error under the input');
   expect(shallowRender({ labelHtmlFor: undefined, label: undefined })).toMatchSnapshot('no label');
 });
@@ -60,6 +60,6 @@ function shallowRender(props: Partial<ValidationInputProps> = {}) {
       {...props}
     >
       <div />
-    </ValidationInput>
+    </ValidationInput>,
   );
 }
index 308aeb9d1c6a04155e516d31c8cf5038afad4bb1..adda3d7d33413ab021e0015ed29318efb5acb7cf 100644 (file)
@@ -63,6 +63,6 @@ function shallowRender(props: Partial<ValidationModal<{ field: string }>['props'
           value={props.values.field}
         />
       )}
-    </ValidationModal>
+    </ValidationModal>,
   );
 }
index 2fc5b71b2de6a5c39a1c957787c41bacae048d1e..f42c2055934ccf661e8ee88dc51c10b487e6ffbb 100644 (file)
@@ -71,7 +71,7 @@ describe('ButtonIcon', () => {
     return shallow(
       <ButtonIcon tooltip="my tooltip" tooltipProps={{ visible: true }} {...props}>
         <i />
-      </ButtonIcon>
+      </ButtonIcon>,
     );
   }
 });
index b52d288fbc9af79b815c92716c7eba6bc14e0810..38fafd1a42d8b77c114eb7a39a8bdb5546c15f29 100644 (file)
@@ -63,7 +63,7 @@ describe('ClipboardBase', () => {
             {copySuccess ? 'copied' : 'click to copy'}
           </span>
         )}
-      </ClipboardBase>
+      </ClipboardBase>,
     );
   }
 });
index e303d1dc024faa909098550a244412d784d8c64e..842df114592bee2c42e2ebeedd032a4c8a2e68df 100644 (file)
   font-size: var(--smallFontSize);
   text-decoration: none;
   cursor: pointer;
-  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
+  transition:
+    border-color 0.2s ease,
+    box-shadow 0.2s ease,
+    background-color 0.2s ease;
 }
 
 .button:hover,
   border-bottom: 1px solid var(--primarya40);
   font-weight: 400;
   font-size: inherit;
-  transition: border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, border-bottom 0.2s ease;
+  transition:
+    border-color 0.2s ease,
+    box-shadow 0.2s ease,
+    color 0.2s ease,
+    border-bottom 0.2s ease;
 }
 
 .dropdown .button-link {
index 19c7539dbd0b0d03398c35190e9aaeaca76a2dc1..2c99c9e90f77f742666dff9c9de79b55ebf4e055 100644 (file)
@@ -29,7 +29,7 @@ function optionRenderer(props: OptionProps<LabelValueSelectOption<AlmSettingsIns
 }
 
 function singleValueRenderer(
-  props: SingleValueProps<LabelValueSelectOption<AlmSettingsInstance>, false>
+  props: SingleValueProps<LabelValueSelectOption<AlmSettingsInstance>, false>,
 ) {
   return (
     <components.SingleValue {...props}>{customOptions(props.data.value)}</components.SingleValue>
index 0dffb3296afff253582c3155ec1b173d79b41676..46eb6c56cde072c2bfd72532e53d74fd46d003f3 100644 (file)
@@ -140,7 +140,7 @@ export default class ListStyleFacet<S> extends React.Component<Props<S>, State<S
       const { values } = this.props;
       if (multiple) {
         const newValue = sortBy(
-          values.includes(itemValue) ? without(values, itemValue) : [...values, itemValue]
+          values.includes(itemValue) ? without(values, itemValue) : [...values, itemValue],
         );
         this.props.onChange({ [this.props.property]: newValue });
       } else {
@@ -263,7 +263,7 @@ export default class ListStyleFacet<S> extends React.Component<Props<S>, State<S
       : sortBy(
           Object.keys(stats),
           (key) => -stats[key],
-          (key) => this.props.getFacetItemText(key)
+          (key) => this.props.getFacetItemText(key),
         );
 
     const limitedList = this.state.showFullList
index 1288fe050b62179e3133e8adaa033ae99005e98e..5dd1733d76f7988a205b19373408871485a40796 100644 (file)
@@ -40,7 +40,7 @@ export default function MultipleSelectionHint({ options, values }: MultipleSelec
         {translate(
           isOnMac()
             ? 'shortcuts.section.global.facets.multiselection.mac'
-            : 'shortcuts.section.global.facets.multiselection'
+            : 'shortcuts.section.global.facets.multiselection',
         )}
       </div>
     </div>
index 5e7382fa9aba20d54dcba40714972c0e1d1aa82d..e41d8894070d07a904a4cd3cdfbf4549c41d75be 100644 (file)
@@ -58,7 +58,7 @@ it('should render and function correctly', () => {
 it('should correctly render a header with helper text', async () => {
   renderFacet(undefined, { helper: 'Help text' });
   await expect(screen.getByRole('img', { description: 'Help text' })).toHaveATooltipWithContent(
-    'Help text'
+    'Help text',
   );
 });
 
@@ -77,7 +77,7 @@ it('should correctly render a disabled header', () => {
 function renderFacet(
   facetBoxProps: Partial<FacetBoxProps> = {},
   facetHeaderProps: Partial<FacetHeader['props']> = {},
-  facetItemProps: Partial<FacetItem['props']> = {}
+  facetItemProps: Partial<FacetItem['props']> = {},
 ) {
   function Facet() {
     const [open, setOpen] = React.useState(facetHeaderProps.open ?? false);
index 2967a5546c332912d24f3451144eede7b56d170d..6a40051be8e6847aa0698d4f7238133a39f58b1d 100644 (file)
@@ -204,7 +204,7 @@ function shallowRender(props: Partial<Props<string>> = {}) {
       stats={{ a: 10, b: 8, c: 1 }}
       values={[]}
       {...props}
-    />
+    />,
   );
 }
 
index f32eb36347fdf5b2cc482e12d121972797c0bb83..e69cb0ef2ec571023ae04c1e54dd67a9da76c07a 100644 (file)
@@ -25,14 +25,14 @@ import ListStyleFacetFooter from '../ListStyleFacetFooter';
 
 it('should not render "show more"', () => {
   expect(
-    shallow(<ListStyleFacetFooter count={3} showLess={undefined} showMore={jest.fn()} total={3} />)
+    shallow(<ListStyleFacetFooter count={3} showLess={undefined} showMore={jest.fn()} total={3} />),
   ).toMatchSnapshot();
 });
 
 it('should show more', () => {
   const showMore = jest.fn();
   const wrapper = shallow(
-    <ListStyleFacetFooter count={3} showLess={undefined} showMore={showMore} total={15} />
+    <ListStyleFacetFooter count={3} showLess={undefined} showMore={showMore} total={15} />,
   );
   expect(wrapper).toMatchSnapshot();
   click(wrapper.find(ButtonLink));
@@ -42,7 +42,7 @@ it('should show more', () => {
 it('should show less', () => {
   const showLess = jest.fn();
   const wrapper = shallow(
-    <ListStyleFacetFooter count={15} showLess={showLess} showMore={jest.fn()} total={15} />
+    <ListStyleFacetFooter count={15} showLess={showLess} showMore={jest.fn()} total={15} />,
   );
   expect(wrapper).toMatchSnapshot();
   click(wrapper.find(ButtonLink));
@@ -51,7 +51,7 @@ it('should show less', () => {
 
 it('should not render "show less"', () => {
   const wrapper = shallow(
-    <ListStyleFacetFooter count={15} showLess={undefined} showMore={jest.fn()} total={15} />
+    <ListStyleFacetFooter count={15} showLess={undefined} showMore={jest.fn()} total={15} />,
   );
   expect(wrapper).toMatchSnapshot();
 });
index f3326b47f1569701091725cb030a7f2e3bf65dcb..d5abb40e2b0661f774f825e995bf8ccdd36c72b7 100644 (file)
@@ -57,6 +57,6 @@ function shallowRender(isLoggedIn = true) {
       }}
     >
       <UnderTest />
-    </CurrentUserContext.Provider>
+    </CurrentUserContext.Provider>,
   );
 }
index eac8a9679c90977cf7486e2815ef10022d1c5afd..8937df1a5b75ec74381f1e6d059969f540b66c9e 100644 (file)
@@ -43,7 +43,7 @@ function mountRender(indexationContext?: Partial<IndexationContextInterface>) {
       }}
     >
       <TestComponentWithIndexationContext />
-    </IndexationContext.Provider>
+    </IndexationContext.Provider>,
   );
 }
 
index 518176becb9eb09b22706eeab1f19a5ffc00a107..c13800aabbf4e8a376afb547dd7c3d3a0c83a0ba 100644 (file)
@@ -27,7 +27,7 @@ describe('withIndexationGuard', () => {
   it('should render indexation message when showIndexationMessage returns true', () => {
     renderComponentWithIndexationGuard(() => true);
     expect(
-      screen.getByText(/indexation\.page_unavailable\.description\.additional_information/)
+      screen.getByText(/indexation\.page_unavailable\.description\.additional_information/),
     ).toBeInTheDocument();
   });
 
@@ -50,7 +50,7 @@ function renderComponentWithIndexationGuard(showIndexationMessage: () => boolean
       }}
     >
       <TestComponentWithGuard />
-    </IndexationContext.Provider>
+    </IndexationContext.Provider>,
   );
 }
 
index 55caeafc4c381222e5deddb4b5bae982aeabf3c7..9de538471da73fb7da05d44ad8cc98582b6f36c5 100644 (file)
@@ -61,7 +61,7 @@ it('should correctly bind key events for component navigation', () => {
       onHighlight,
       onSelect,
       selected: COMPONENTS[1],
-    })
+    }),
   );
 
   keydown({ key: KeyboardKeys.DownArrow });
@@ -103,7 +103,7 @@ it('should support not cycling through elements, and triggering a callback on re
     applyProps({
       onEndOfList,
       onHighlight,
-    })
+    }),
   );
 
   keydown({ key: KeyboardKeys.DownArrow });
@@ -133,7 +133,7 @@ it('should correctly bind key events for codeview navigation', () => {
       onHighlight,
       onSelect,
       selected: COMPONENTS[1],
-    })
+    }),
   );
 
   expect(onHighlight).not.toHaveBeenCalled();
index 646724fa565a3f690bb815b44474b634c705ba4a..1259e1cf8fe58dc3f53a833a4590efae5e53346f 100644 (file)
@@ -50,7 +50,7 @@ jest.mock('../../../api/notifications', () => ({
         },
       ],
       perProjectTypes: ['type-common'],
-    })
+    }),
   ),
   removeNotification: jest.fn().mockResolvedValue({}),
 }));
index ce211c3244a8b0b6425bad8f994aaa8b3418c971..b36966d78bda2225389e74abe5a96460488ab9cd 100644 (file)
@@ -19,7 +19,7 @@
  */
 export function getWrappedDisplayName<P>(
   WrappedComponent: React.ComponentType<P>,
-  hocName: string
+  hocName: string,
 ) {
   const wrappedDisplayName = WrappedComponent.displayName ?? WrappedComponent.name ?? 'Component';
   return `${hocName}(${wrappedDisplayName})`;
index edef9524ea00f55e8d48b68e8a987b53c68d2d20..df6fa13659cb548330c22268692fb6572d5f95b5 100644 (file)
@@ -22,7 +22,7 @@ import { LanguagesContext } from '../../app/components/languages/LanguagesContex
 import { getWrappedDisplayName } from './utils';
 
 export function withCLanguageFeature<P>(
-  WrappedComponent: React.ComponentType<P & { hasCLanguageFeature: boolean }>
+  WrappedComponent: React.ComponentType<P & { hasCLanguageFeature: boolean }>,
 ) {
   class Wrapper extends React.Component<Omit<P, 'hasCLanguageFeature'>> {
     static displayName = getWrappedDisplayName(WrappedComponent, 'withCLanguageFeature');
index ccb1155c391dab9d62d5a2204c114cc9f72e6489..9d9625c65ec7cd296c20a96f3fb230f0ae2115ad 100644 (file)
@@ -27,7 +27,7 @@ export interface WithIndexationContextProps {
 }
 
 export default function withIndexationContext<P>(
-  WrappedComponent: React.ComponentType<P & WithIndexationContextProps>
+  WrappedComponent: React.ComponentType<P & WithIndexationContextProps>,
 ) {
   return class WithIndexationContext extends React.PureComponent<
     Omit<P, keyof WithIndexationContextProps>
index bfa7081d27d8e6f3bbd8da532cd38fce6e35a96e..0a1e1f0a3316cc60228fe09c222dc3d7c395c79e 100644 (file)
@@ -36,7 +36,7 @@ export interface WithKeyboardNavigationProps {
 }
 
 export default function withKeyboardNavigation<P>(
-  WrappedComponent: React.ComponentType<P & Partial<WithKeyboardNavigationProps>>
+  WrappedComponent: React.ComponentType<P & Partial<WithKeyboardNavigationProps>>,
 ) {
   return class Wrapper extends React.Component<P & WithKeyboardNavigationProps> {
     static displayName = getWrappedDisplayName(WrappedComponent, 'withKeyboardNavigation');
@@ -70,7 +70,7 @@ export default function withKeyboardNavigation<P>(
       return selected
         ? components.findIndex(
             (component) =>
-              getComponentMeasureUniqueKey(component) === getComponentMeasureUniqueKey(selected)
+              getComponentMeasureUniqueKey(component) === getComponentMeasureUniqueKey(selected),
           )
         : -1;
     };
@@ -93,7 +93,7 @@ export default function withKeyboardNavigation<P>(
       const first = cycle ? 0 : index;
 
       this.props.onHighlight(
-        index < components.length - 1 ? components[index + 1] : components[first]
+        index < components.length - 1 ? components[index + 1] : components[first],
       );
 
       if (index + 1 === components.length - 1 && this.props.onEndOfList) {
index df9c67cdaebcb9e66b0f9ab914096178c896d642..ea155eca671e3f9e697e88e6eed0acd11be99521 100644 (file)
@@ -21,7 +21,7 @@ import * as React from 'react';
 import { Location, useLocation } from 'react-router-dom';
 
 export default function withLocation<P>(
-  WrappedComponent: React.ComponentType<P & { location: Location }>
+  WrappedComponent: React.ComponentType<P & { location: Location }>,
 ) {
   return function WithLocation(props: Omit<P, 'location'>) {
     const location = useLocation();
index a19bcec6c0971ddc36cded8e14a25a56b0785876..310a2ab2c85a7ac384d8111124aaa451b99f8213 100644 (file)
@@ -46,7 +46,7 @@ export interface WithNotificationsProps {
 }
 
 export function withNotifications<P>(
-  WrappedComponent: React.ComponentType<P & WithNotificationsProps>
+  WrappedComponent: React.ComponentType<P & WithNotificationsProps>,
 ) {
   class Wrapper extends React.Component<P, State> {
     mounted = false;
@@ -86,7 +86,7 @@ export function withNotifications<P>(
           if (this.mounted) {
             this.setState({ loading: false });
           }
-        }
+        },
       );
     };
 
@@ -100,7 +100,7 @@ export function withNotifications<P>(
     removeNotificationFromState = (removed: Notification) => {
       this.setState((state) => {
         const notifications = state.notifications.filter(
-          (notification) => !this.areNotificationsEqual(notification, removed)
+          (notification) => !this.areNotificationsEqual(notification, removed),
         );
         return { notifications };
       });
index f8752daf8692252d8728383272708fad4e8ac829..90b9a5fdfdbd17412421ca82919156783fb63550 100644 (file)
@@ -46,7 +46,7 @@ export interface WithRouterProps {
 }
 
 export function withRouter<P extends Partial<WithRouterProps>>(
-  WrappedComponent: React.ComponentType<P>
+  WrappedComponent: React.ComponentType<P>,
 ): React.ComponentType<Omit<P, keyof WithRouterProps>> {
   function ComponentWithRouterProp(props: P) {
     const locationRouter = useLocationRouter();
@@ -69,7 +69,7 @@ export function withRouter<P extends Partial<WithRouterProps>>(
           navigate(path);
         },
       }),
-      [navigate]
+      [navigate],
     );
 
     const location = {
@@ -82,7 +82,7 @@ export function withRouter<P extends Partial<WithRouterProps>>(
 
   (ComponentWithRouterProp as React.FC<P>).displayName = getWrappedDisplayName(
     WrappedComponent,
-    'withRouter'
+    'withRouter',
   );
 
   return ComponentWithRouterProp;
index 4863731e28492228f887756c033c930d66f3cbf7..6a9a1f1aacf2d5afde9d839bb2196ea76f78cd8a 100644 (file)
@@ -69,7 +69,7 @@ export function IssueTypeCircleIcon({ className, type, ...iconProps }: Props) {
     <CircleIconContainer
       className={classNames(
         'sw-inline-flex sw-items-center sw-justify-center sw-shrink-0 sw-w-6 sw-h-6',
-        className
+        className,
       )}
     >
       <IssueTypeIcon fill={themeContrast('issueTypeIcon')({ theme })} type={type} {...iconProps} />
index b4078cbe036367778050d37e2814b1a84175d190..e6b13c30e81153b9919f268623d10e7d2915e9b0 100644 (file)
@@ -30,6 +30,6 @@ function renderIcon(props: Partial<IconProps> = {}) {
   return render(
     <Icon {...props}>
       <path d="test-path" />
-    </Icon>
+    </Icon>,
   );
 }
index bd752e1a9bd4cad9254f17c4a177fa389f5c895e..816541a9b1746c2af2140905c9c953da42cd687d 100644 (file)
@@ -32,11 +32,11 @@ it('should render correctly', () => {
 
 function renderDateFormatter(
   overrides: Partial<DateFormatterProps> = {},
-  children?: (d: string) => React.ReactNode
+  children?: (d: string) => React.ReactNode,
 ) {
   return renderComponent(
     <DateFormatter date={new Date('2020-02-20T20:20:20Z')} {...overrides}>
       {children}
-    </DateFormatter>
+    </DateFormatter>,
   );
 }
index e0eef0da53aedd59228a62c9972352ab8fdbfb02..4fc40bcbb3ac11674e514ddb1fbd4138a56b72ff 100644 (file)
@@ -55,11 +55,11 @@ it('should render correctly when the date is less than one hour in the past', ()
 
 function renderDateFromNow(
   overrides: Partial<DateFromNowProps> = {},
-  children: jest.Mock = jest.fn((d) => <>{d}</>)
+  children: jest.Mock = jest.fn((d) => <>{d}</>),
 ) {
   return renderComponent(
     <DateFromNow date={date} {...overrides}>
       {children}
-    </DateFromNow>
+    </DateFromNow>,
   );
 }
index aebe6b1a3a465bb7e4ef436f96f7fb790015f25c..e6f4eb581848e7503a8d08236642c5adde1589c0 100644 (file)
@@ -34,6 +34,6 @@ function renderDateTimeFormatter(children?: (d: string) => React.ReactNode) {
   return renderComponent(
     <DateTimeFormatter date={new Date('2020-02-20T20:20:20Z')} timeZone="UTC">
       {children}
-    </DateTimeFormatter>
+    </DateTimeFormatter>,
   );
 }
index 8557b317c94db40fdc1a1ff09cc9164077d68282..8b4ce13b1efcfcaa753c3634faab0069d889f86e 100644 (file)
@@ -32,11 +32,11 @@ it('should render correctly', () => {
 
 function renderTimeFormatter(
   overrides: Partial<TimeFormatterProps> = {},
-  children?: (d: string) => React.ReactNode
+  children?: (d: string) => React.ReactNode,
 ) {
   return renderComponent(
     <TimeFormatter date={new Date('2020-02-20T20:20:20Z')} timeZone="UTC" {...overrides}>
       {children}
-    </TimeFormatter>
+    </TimeFormatter>,
   );
 }
index 513a423fb900c83d5b4a8b923914e6b26ceea490..18657fd38effbf7b862dfcde0f0c0b7584d38bfb 100644 (file)
@@ -30,7 +30,7 @@ import { ParsableDate } from '../../types/dates';
 const UPDATE_INTERVAL_IN_SECONDS = 10;
 
 export function getRelativeTimeProps(
-  parsableDate: ParsableDate
+  parsableDate: ParsableDate,
 ): Pick<FormattedRelativeTimeProps, 'unit' | 'value' | 'updateIntervalInSeconds'> {
   const date = parseDate(parsableDate);
   const y = differenceInYears(date, Date.now());
index 760025788b6afa05f5c606b4bd4084795f14474b..916ffedb98e00293331c4ee94f25a2ed539180a8 100644 (file)
@@ -64,7 +64,7 @@ export default function Issue(props: Props) {
     (popupName: string, open?: boolean) => {
       onPopupToggle(issue.key, popupName, open);
     },
-    [issue.key, onPopupToggle]
+    [issue.key, onPopupToggle],
   );
 
   const handleAssignement = useCallback(
@@ -74,7 +74,7 @@ export default function Issue(props: Props) {
       }
       togglePopup('assign', false);
     },
-    [issue.assignee, issue.key, onChange, togglePopup]
+    [issue.assignee, issue.key, onChange, togglePopup],
   );
 
   const handleKeyDown = useCallback(
@@ -107,7 +107,7 @@ export default function Issue(props: Props) {
       }
       return true;
     },
-    [issue.actions, issue.key, togglePopup, handleAssignement, onCheck]
+    [issue.actions, issue.key, togglePopup, handleAssignement, onCheck],
   );
 
   React.useEffect(() => {
index f6d0752ed531f6aeb921024a9d55132e8374d353..4527ef3e43ba9c07766c05e58c2c71ad588bdf3b 100644 (file)
@@ -58,7 +58,7 @@ describe('rendering', () => {
     expect(ui.effort('2 days').get()).toBeInTheDocument();
     expect(ui.issueMessageLink.get()).toHaveAttribute(
       'href',
-      '/issues?scopes=MAIN&impactSeverities=LOW&types=VULNERABILITY&open=AVsae-CQS-9G3txfbFN2'
+      '/issues?scopes=MAIN&impactSeverities=LOW&types=VULNERABILITY&open=AVsae-CQS-9G3txfbFN2',
     );
 
     await ui.clickIssueMessage();
@@ -73,7 +73,7 @@ describe('rendering', () => {
   it('should render the SonarLint icon correctly', async () => {
     renderIssue({ issue: mockIssue(false, { quickFixAvailable: true }) });
     await expect(
-      screen.getByText('issue.quick_fix_available_with_sonarlint_no_link')
+      screen.getByText('issue.quick_fix_available_with_sonarlint_no_link'),
     ).toHaveATooltipWithContent('issue.quick_fix_available_with_sonarlint');
   });
 
@@ -199,7 +199,7 @@ function getPageObject() {
     changelogRow: (key: string, oldValue: string, newValue: string) =>
       byRole('row', {
         name: new RegExp(
-          `issue\\.changelog\\.changed_to\\.issue\\.changelog\\.field\\.${key}\\.${newValue} \\(issue\\.changelog\\.was\\.${oldValue}\\)`
+          `issue\\.changelog\\.changed_to\\.issue\\.changelog\\.field\\.${key}\\.${newValue} \\(issue\\.changelog\\.was\\.${oldValue}\\)`,
         ),
       }),
 
@@ -377,10 +377,10 @@ function getPageObject() {
 }
 
 function renderIssue(
-  props: Partial<Omit<ComponentPropsType<typeof Issue>, 'onChange' | 'onPopupToggle'>> = {}
+  props: Partial<Omit<ComponentPropsType<typeof Issue>, 'onChange' | 'onPopupToggle'>> = {},
 ) {
   function Wrapper(
-    wrapperProps: Omit<ComponentPropsType<typeof Issue>, 'onChange' | 'onPopupToggle'>
+    wrapperProps: Omit<ComponentPropsType<typeof Issue>, 'onChange' | 'onPopupToggle'>,
   ) {
     const [issue, setIssue] = React.useState(wrapperProps.issue);
     const [openPopup, setOpenPopup] = React.useState<string | undefined>();
@@ -409,6 +409,6 @@ function renderIssue(
     ),
     {
       currentUser: mockLoggedInUser({ login: 'leia', name: 'Organa' }),
-    }
+    },
   );
 }
index cd882eadf4c3e41825bc1d3d0f35174feec6b911..65952a7af1a568f916ffcf033624b16b48593bcf 100644 (file)
@@ -26,7 +26,7 @@ export const updateIssue = (
   onChange: (issue: Issue) => void,
   resultPromise: Promise<IssueResponse>,
   oldIssue?: Issue,
-  newIssue?: Issue
+  newIssue?: Issue,
 ) => {
   const optimisticUpdate = oldIssue !== undefined && newIssue !== undefined;
   if (optimisticUpdate) {
@@ -40,7 +40,7 @@ export const updateIssue = (
           response.issue,
           response.components,
           response.users,
-          response.rules
+          response.rules,
         );
         onChange(issue);
       }
@@ -50,6 +50,6 @@ export const updateIssue = (
         onChange(oldIssue!);
       }
       throwGlobalError(param);
-    }
+    },
   );
 };
index 752163d452c672ce6a88c1a76d8027b367ef6b6d..ca3de9fff1b5917c91a6bbfa6fb0aaea4737da0b 100644 (file)
@@ -83,7 +83,7 @@ export default function IssueAssignee(props: Props) {
 
   const handleSearchAssignees = (
     query: string,
-    cb: (options: Options<LabelValueSelectOption<string>>) => void
+    cb: (options: Options<LabelValueSelectOption<string>>) => void,
   ) => {
     getUsers<RestUser>({ q: query })
       .then((result) => {
index 0807942f0415151e4fd4a834068f1e98e87f37ae..1b129c2c25066b9c49cc78cf5b145f03db731e8c 100644 (file)
@@ -55,7 +55,7 @@ function IssueChangelog(props: IssueChangelogProps) {
           aria-expanded={isOpen}
           aria-label={translateWithParameters(
             'issue.changelog.found_on_x_show_more',
-            formatDate(creationDate, formatterOption)
+            formatDate(creationDate, formatterOption),
           )}
           className="issue-action issue-action-with-options js-issue-show-changelog"
           onClick={() => {
index fdb0c7a6d2d0c1e19a2728d5dda06611115644ef..165008932099f16e3ea3249db9273119c5a6b685 100644 (file)
@@ -33,7 +33,7 @@ export default function IssueChangelogDiff({ diff }: IssueChangelogDiffProps) {
         {translateWithParameters(
           'issue.change.file_move',
           diff.oldValue ?? '',
-          diff.newValue ?? ''
+          diff.newValue ?? '',
         )}
       </p>
     );
@@ -43,7 +43,7 @@ export default function IssueChangelogDiff({ diff }: IssueChangelogDiffProps) {
         {translateWithParameters(
           'issue.change.from_branch',
           diff.oldValue ?? '',
-          diff.newValue ?? ''
+          diff.newValue ?? '',
         )}
       </p>
     );
@@ -54,7 +54,7 @@ export default function IssueChangelogDiff({ diff }: IssueChangelogDiffProps) {
         {translateWithParameters(
           'issue.change.from_non_branch',
           diff.oldValue ?? '',
-          diff.newValue ?? ''
+          diff.newValue ?? '',
         )}
       </p>
     );
@@ -71,12 +71,12 @@ export default function IssueChangelogDiff({ diff }: IssueChangelogDiffProps) {
     message = translateWithParameters(
       'issue.changelog.changed_to',
       translate('issue.changelog.field', diff.key),
-      newValue
+      newValue,
     );
   } else {
     message = translateWithParameters(
       'issue.changelog.removed',
-      translate('issue.changelog.field', diff.key)
+      translate('issue.changelog.field', diff.key),
     );
   }
 
index 51d01c81c92678cf36cf849e8e6e9144c805facb..987a663f9e8ab4f15e8437ee29936492f0f96b0f 100644 (file)
@@ -51,7 +51,7 @@ export class IssueTags extends React.PureComponent<Props> {
       this.props.onChange,
       setIssueTags({ issue: issue.key, tags: tags.join(',') }),
       issue as Issue,
-      newIssue as Issue
+      newIssue as Issue,
     );
   };
 
index 5336602d2acfcb67876183414fe6df21b1ce2d2b..357c30479581ffe9940b0a1b588fa8703e1d4f9a 100644 (file)
@@ -42,7 +42,7 @@ function SingleValueFactory(issue: Props['issue']) {
     V,
     Option extends LabelValueSelectOption<V>,
     IsMulti extends boolean = false,
-    Group extends GroupBase<Option> = GroupBase<Option>
+    Group extends GroupBase<Option> = GroupBase<Option>,
   >(props: OptionProps<Option, IsMulti, Group>) {
     return (
       <components.SingleValue {...props}>
@@ -60,7 +60,7 @@ export default class IssueTransition extends React.PureComponent<Props> {
   setTransition = ({ value }: { value: string }) => {
     updateIssue(
       this.props.onChange,
-      setIssueTransition({ issue: this.props.issue.key, transition: value })
+      setIssueTransition({ issue: this.props.issue.key, transition: value }),
     );
 
     this.toggleSetTransition(false);
@@ -88,7 +88,7 @@ export default class IssueTransition extends React.PureComponent<Props> {
         <DiscreetSelect
           aria-label={translateWithParameters(
             'issue.transition.status_x_click_to_change',
-            translate('issue.status', issue.status)
+            translate('issue.status', issue.status),
           )}
           size="medium"
           className="it__issue-transition"
index 34826ec9fb4b9bb378dc4afc364cb5e8e755e101..7b5c75f6913b0515d2d15842350307304fc96a1a 100644 (file)
@@ -87,7 +87,7 @@ export default class IssueView extends React.PureComponent<Props> {
       {
         'no-click': this.props.onClick === undefined,
         selected: this.props.selected,
-      }
+      },
     );
 
     return (
index 179ecf35bf556d8b440577b8c78064567b43a34e..73d5b1c3dca277c6fbf005b9a8562e2942852090 100644 (file)
@@ -64,7 +64,7 @@ it.each([
       diff: mockIssueChangelogDiff({ key, newValue: 'newValue', oldValue: 'oldValue', ...diff }),
     });
     expect(screen.getByText(expected)).toBeInTheDocument();
-  }
+  },
 );
 
 function renderIssueChangelogDiff(props: Partial<IssueChangelogDiffProps> = {}) {
index eb4e580156cef19699cc33e2ff3ded99f5070543..37e937cf28583b840ababbb9adb37f748dd5a03f 100644 (file)
@@ -55,7 +55,7 @@ export default class ChangelogPopup extends React.PureComponent<Props, State> {
           this.setState({ changelog });
         }
       },
-      () => {}
+      () => {},
     );
   }
 
@@ -102,7 +102,7 @@ export default class ChangelogPopup extends React.PureComponent<Props, State> {
                         {item.webhookSource &&
                           translateWithParameters(
                             'issue.changelog.webhook_source',
-                            item.webhookSource
+                            item.webhookSource,
                           )}
                       </div>
                       {item.diffs.map((diff) => (
index 753aac23e77ef7107938d09513dfb41d573ae2c2..8ae05b458019b4ab4a66700de8c12cfbf7a3fabb 100644 (file)
@@ -39,7 +39,7 @@ export default function CommentList(props: CommentListProps) {
   // sorting comment i.e showing newest on top
   const sortedComments = [...comments]?.sort(
     (com1, com2) =>
-      new Date(com2.createdAt || '').getTime() - new Date(com1.createdAt || '').getTime()
+      new Date(com2.createdAt || '').getTime() - new Date(com1.createdAt || '').getTime(),
   );
   return (
     <div className="issue-comment-list-wrapper spacer-bottom">
index 8392db04f29ef0a31a6e33df98b6b7979d905860..1a751736e5e8709327a1f8536aec9832765e66ea 100644 (file)
@@ -109,7 +109,7 @@ export default class CrossFileLocationNavigator extends React.PureComponent<Prop
   renderLocation = (
     index: number,
     message: string | undefined,
-    messageFormattings: MessageFormatting[] | undefined
+    messageFormattings: MessageFormatting[] | undefined,
   ) => {
     return (
       <SingleFileLocationNavigator
@@ -126,7 +126,7 @@ export default class CrossFileLocationNavigator extends React.PureComponent<Prop
   renderGroup = (
     group: LocationGroup,
     groupIndex: number,
-    { onlyFirst = false, onlyLast = false } = {}
+    { onlyFirst = false, onlyLast = false } = {},
   ) => {
     const { firstLocationIndex } = group;
     const lastLocationIndex = group.locations.length - 1;
@@ -142,14 +142,14 @@ export default class CrossFileLocationNavigator extends React.PureComponent<Prop
               this.renderLocation(
                 firstLocationIndex,
                 group.locations[0].msg,
-                group.locations[0].msgFormattings
+                group.locations[0].msgFormattings,
               )}
 
             {onlyLast &&
               this.renderLocation(
                 firstLocationIndex + lastLocationIndex,
                 group.locations[lastLocationIndex].msg,
-                group.locations[lastLocationIndex].msgFormattings
+                group.locations[lastLocationIndex].msgFormattings,
               )}
 
             {!onlyFirst &&
@@ -158,8 +158,8 @@ export default class CrossFileLocationNavigator extends React.PureComponent<Prop
                 this.renderLocation(
                   firstLocationIndex + index,
                   location.msg,
-                  location.msgFormattings
-                )
+                  location.msgFormattings,
+                ),
               )}
           </div>
         )}
@@ -189,7 +189,7 @@ export default class CrossFileLocationNavigator extends React.PureComponent<Prop
               <a className="location-file-more" href="#" onClick={this.handleMoreLocationsClick}>
                 {translateWithParameters(
                   'issues.x_more_locations',
-                  locations.length - nbLocationsAlwaysDisplayed
+                  locations.length - nbLocationsAlwaysDisplayed,
                 )}
               </a>
             </div>
index 495143e3d645efc4940064430d67951366ea4093..fe2e5edc8630fba159da091e001e5a26db6f1409 100644 (file)
@@ -91,6 +91,6 @@ function shallowRender(props: Partial<CrossFileLocationsNavigator['props']> = {}
       onLocationSelect={jest.fn()}
       selectedLocationIndex={undefined}
       {...props}
-    />
+    />,
   );
 }
index 68cd12dd5e27c6b14bfb132f40b5d3bdf927d458..683c94949ba6eb0b6eff835e5d988364e44451a4 100644 (file)
@@ -55,6 +55,6 @@ function shallowRender(overrides: Partial<LocationsList['props']> = {}) {
       onLocationSelect={jest.fn()}
       selectedLocationIndex={undefined}
       {...overrides}
-    />
+    />,
   );
 }
index 019ab6550ee3eb60cad72ac1083e31b070d1cfa9..c9eb0c6c779d0a9d1b7f8b68d9d56b72dab489f8 100644 (file)
@@ -71,12 +71,12 @@ export function RatingTooltipContent(props: RatingTooltipContentProps) {
       {rating === 1
         ? translateWithParameters(
             'metric.sqale_rating.tooltip.A',
-            formatMeasure(maintainabilityGrid[0] * PERCENT_MULTIPLIER, 'PERCENT')
+            formatMeasure(maintainabilityGrid[0] * PERCENT_MULTIPLIER, 'PERCENT'),
           )
         : translateWithParameters(
             'metric.sqale_rating.tooltip',
             ratingLetter,
-            formatMeasure(maintainabilityRatingThreshold * PERCENT_MULTIPLIER, 'PERCENT')
+            formatMeasure(maintainabilityRatingThreshold * PERCENT_MULTIPLIER, 'PERCENT'),
           )}
     </>
   );
index fc861029843f010cea982813151aa14ef67b4829..a3d30b183efa97e4780fb17a943eb5a0ac35a69c 100644 (file)
@@ -23,30 +23,30 @@ import Measure from '../Measure';
 
 it('renders trivial measure', () => {
   expect(
-    shallow(<Measure metricKey="coverage" metricType="PERCENT" value="73.0" />)
+    shallow(<Measure metricKey="coverage" metricType="PERCENT" value="73.0" />),
   ).toMatchSnapshot();
 });
 
 it('renders leak measure', () => {
   expect(
-    shallow(<Measure metricKey="new_coverage" metricType="PERCENT" value="36.0" />)
+    shallow(<Measure metricKey="new_coverage" metricType="PERCENT" value="36.0" />),
   ).toMatchSnapshot();
 });
 
 it('renders LEVEL', () => {
   expect(
-    shallow(<Measure metricKey="quality_gate_status" metricType="LEVEL" value="ERROR" />)
+    shallow(<Measure metricKey="quality_gate_status" metricType="LEVEL" value="ERROR" />),
   ).toMatchSnapshot();
 });
 
 it('renders RATING', () => {
   expect(
-    shallow(<Measure metricKey="sqale_rating" metricType="RATING" value="3" />)
+    shallow(<Measure metricKey="sqale_rating" metricType="RATING" value="3" />),
   ).toMatchSnapshot();
 });
 
 it('renders undefined measure', () => {
   expect(
-    shallow(<Measure metricKey="foo" metricType="PERCENT" value={undefined} />)
+    shallow(<Measure metricKey="foo" metricType="PERCENT" value={undefined} />),
   ).toMatchSnapshot();
 });
index e135ad32ffef3697ff929537144afbe50e6a92a2..782eab215c3a20bedd42246381e51c8d99dde9a2 100644 (file)
@@ -24,7 +24,11 @@ import MeasureIndicator from '../MeasureIndicator';
 
 it('renders correctly for coverage', () => {
   render(
-    <MeasureIndicator metricKey={MetricKey.coverage} metricType={MetricType.Percent} value="73.0" />
+    <MeasureIndicator
+      metricKey={MetricKey.coverage}
+      metricType={MetricType.Percent}
+      value="73.0"
+    />,
   );
   expect(screen.getByRole('img')).toMatchSnapshot();
 });
index 394f32e803ae2b37b51beb07550441d616a0a704..53a0c30caea3c7ab8b4e324d3793997fd1a32323 100644 (file)
@@ -28,21 +28,21 @@ it('should render maintainability correctly', () => {
   expect(shallowRender()).toMatchSnapshot('sqale rating');
   expect(shallowRender({ value: 1 })).toMatchSnapshot('sqale rating A');
   expect(shallowRender({ appState: mockAppState({ settings: {} }) })).toMatchSnapshot(
-    'sqale rating default grid'
+    'sqale rating default grid',
   );
   expect(
     shallowRender({
       appState: mockAppState({ settings: { [GlobalSettingKeys.RatingGrid]: '0,0.1' } }),
-    })
+    }),
   ).toMatchSnapshot('sqale rating wrong grid');
 });
 
 it('should render other ratings correctly', () => {
   expect(shallowRender({ metricKey: MetricKey.security_rating })).toMatchSnapshot(
-    'security rating'
+    'security rating',
   );
   expect(shallowRender({ metricKey: MetricKey.new_security_rating })).toMatchSnapshot(
-    'new security rating'
+    'new security rating',
   );
 });
 
@@ -57,6 +57,6 @@ function shallowRender(overrides: Partial<RatingTooltipContentProps> = {}) {
       metricKey={MetricKey.sqale_rating}
       value={2}
       {...overrides}
-    />
+    />,
   );
 }
index 22958df2264851daf08a401740c0a5ad9740f389..7c9661494c6279ad93b250bad5500eba8fc0dfcc 100644 (file)
@@ -32,7 +32,7 @@ export default function GlobalNewCodeDefinitionDescription({ globalNcd }: Props)
   if (globalNcd.type === NewCodeDefinitionType.NumberOfDays) {
     setting = `${translate('new_code_definition.number_days')} (${translateWithParameters(
       'duration.days',
-      globalNcd.value ?? '?'
+      globalNcd.value ?? '?',
     )})`;
     description = translate('new_code_definition.number_days.description');
     useCase = translate('new_code_definition.number_days.usecase');
index f4cd199ae0afa56131fe22e155ef6e2e65463588..b6e23f8d22dec639fc407879ae4b85bbcfa34b48 100644 (file)
@@ -71,14 +71,14 @@ function NCDAutoUpdateMessage(props: NCDAutoUpdateMessageProps) {
               id: component.key,
             }),
           },
-    [component, isGlobalBanner]
+    [component, isGlobalBanner],
   );
 
   const handleBannerDismiss = useCallback(async () => {
     await setMessageDismissed(
       isGlobalBanner
         ? { messageType: MessageTypes.GlobalNcd90 }
-        : { messageType: MessageTypes.ProjectNcd90, projectKey: component.key }
+        : { messageType: MessageTypes.ProjectNcd90, projectKey: component.key },
     );
     setDismissed(true);
   }, [component, isGlobalBanner]);
@@ -93,7 +93,7 @@ function NCDAutoUpdateMessage(props: NCDAutoUpdateMessageProps) {
           : {
               messageType: MessageTypes.ProjectNcd90,
               projectKey: component.key,
-            }
+            },
       );
 
       setDismissed(messageStatus.dismissed);
index fad3f8e72820fe01e1fd0ab32530693d39ffa7c6..8befaddb8ce32d4f685c57812dbcfad40f193e28 100644 (file)
@@ -79,7 +79,7 @@ export default function NewCodeDefinitionDaysOption(props: Props) {
             }
           : {
               messageType: MessageTypes.GlobalNcdPage90,
-            }
+            },
       );
       setNcdAutoUpdateBannerDismissed(messageStatus.dismissed);
     }
@@ -141,7 +141,7 @@ export default function NewCodeDefinitionDaysOption(props: Props) {
               {translateWithParameters(
                 'new_code_definition.number_days.invalid',
                 NUMBER_OF_DAYS_MIN_VALUE,
-                NUMBER_OF_DAYS_MAX_VALUE
+                NUMBER_OF_DAYS_MAX_VALUE,
               )}
             </Note>
 
index 329a84c2d53200f306378664a0e8bbc7c9d8ccdd..78f310ae0f2b2aec87a9dc34dab89ab24b88567f 100644 (file)
@@ -67,7 +67,7 @@ export default function NewCodeDefinitionSelector(props: Props) {
         type: selectedNcdType,
         value: days,
       }),
-    [selectedNcdType, days]
+    [selectedNcdType, days],
   );
 
   const handleNcdChanged = React.useCallback(
@@ -77,7 +77,7 @@ export default function NewCodeDefinitionSelector(props: Props) {
         setIsChanged(true);
       }
     },
-    [selectedNcdType]
+    [selectedNcdType],
   );
 
   React.useEffect(() => {
@@ -137,7 +137,7 @@ export default function NewCodeDefinitionSelector(props: Props) {
       <div className="sw-flex sw-flex-col sw-my-4 sw-mr-4 sw-gap-4" role="radiogroup">
         <NewCodeDefinitionPreviousVersionOption
           disabled={Boolean(
-            !selectedNcdType || selectedNcdType === NewCodeDefinitionType.Inherited
+            !selectedNcdType || selectedNcdType === NewCodeDefinitionType.Inherited,
           )}
           onSelect={handleNcdChanged}
           selected={selectedNcdType === NewCodeDefinitionType.PreviousVersion}
@@ -146,7 +146,7 @@ export default function NewCodeDefinitionSelector(props: Props) {
         <NewCodeDefinitionDaysOption
           days={days}
           disabled={Boolean(
-            !selectedNcdType || selectedNcdType === NewCodeDefinitionType.Inherited
+            !selectedNcdType || selectedNcdType === NewCodeDefinitionType.Inherited,
           )}
           isChanged={isChanged}
           isValid={isCompliant}
@@ -158,7 +158,7 @@ export default function NewCodeDefinitionSelector(props: Props) {
 
         <SelectionCard
           disabled={Boolean(
-            !selectedNcdType || selectedNcdType === NewCodeDefinitionType.Inherited
+            !selectedNcdType || selectedNcdType === NewCodeDefinitionType.Inherited,
           )}
           onClick={() => handleNcdChanged(NewCodeDefinitionType.ReferenceBranch)}
           selected={selectedNcdType === NewCodeDefinitionType.ReferenceBranch}
index d8d89f1694311e0821d502fe420cce6922bb3aa3..aad1103dec64f4f0c445e3030d07db718a3c68c6 100644 (file)
@@ -37,7 +37,7 @@ let messagesMock: MessagesServiceMock;
 
 describe('Global NCD update notification banner', () => {
   function renderGlobalMessage(
-    currentUser = mockLoggedInUser({ permissions: { global: ['admin'] } })
+    currentUser = mockLoggedInUser({ permissions: { global: ['admin'] } }),
   ) {
     return renderAppRoutes(
       '/',
@@ -49,7 +49,7 @@ describe('Global NCD update notification banner', () => {
       ),
       {
         currentUser,
-      }
+      },
     );
   }
 
@@ -138,7 +138,7 @@ describe('Project NCD update notification banner', () => {
       ),
       {
         currentUser,
-      }
+      },
     );
   }
 
@@ -173,7 +173,7 @@ describe('Project NCD update notification banner', () => {
 
   it('renders no project banner if user is not project admin', () => {
     const { container } = renderProjectMessage(
-      mockComponent({ configuration: { showSettings: false } })
+      mockComponent({ configuration: { showSettings: false } }),
     );
     expect(container).toBeEmptyDOMElement();
   });
index 3dc273cb7c40decc2271bdb24eeb083bd8d3a62d..1379204d6f7abc839371272dfb640ed73f4c6b62 100644 (file)
@@ -41,13 +41,13 @@ export type PreviouslyNonCompliantNCD = NewCodeDefinition &
 export type PreviouslyNonCompliantBranchNCD = PreviouslyNonCompliantNCD & NewCodeDefinitionBranch;
 
 export function isPreviouslyNonCompliantDaysNCD(
-  newCodeDefinition: NewCodeDefinition
+  newCodeDefinition: NewCodeDefinition,
 ): newCodeDefinition is PreviouslyNonCompliantNCD;
 export function isPreviouslyNonCompliantDaysNCD(
-  newCodeDefinition: NewCodeDefinitionBranch
+  newCodeDefinition: NewCodeDefinitionBranch,
 ): newCodeDefinition is PreviouslyNonCompliantBranchNCD;
 export function isPreviouslyNonCompliantDaysNCD(
-  newCodeDefinition: NewCodeDefinition | NewCodeDefinitionBranch
+  newCodeDefinition: NewCodeDefinition | NewCodeDefinitionBranch,
 ): newCodeDefinition is PreviouslyNonCompliantNCD | PreviouslyNonCompliantBranchNCD {
   return (
     newCodeDefinition.type === NewCodeDefinitionType.NumberOfDays &&
index d286e741890c0d727512b51b708742b5c2dc75de..27b9f619d04a126f594971728923efa069df26aa 100644 (file)
@@ -146,7 +146,7 @@ export default class HoldersList extends React.PureComponent<Props, State> {
     const { permissions, users, groups, loading, children, selectedPermission } = this.props;
     const items = [...groups, ...users];
     const [itemWithPermissions, itemWithoutPermissions] = partition(items, (item) =>
-      this.getItemInitialPermissionsCount(item)
+      this.getItemInitialPermissionsCount(item),
     );
 
     return (
index 3154a8d7c632e41294b2b3afe7df9bf1172de50b..06b0ac10018dac4f721087155cad20cc12874604 100644 (file)
@@ -59,7 +59,7 @@ export default function PermissionCell(props: PermissionCellProps) {
                 label={translateWithParameters(
                   'permission.assign_x_to_y',
                   permissionDefinition.name,
-                  permissionItem.name
+                  permissionItem.name,
                 )}
                 onCheck={onCheck}
               >
@@ -88,7 +88,7 @@ export default function PermissionCell(props: PermissionCellProps) {
         label={translateWithParameters(
           'permission.assign_x_to_y',
           permission.name,
-          permissionItem.name
+          permissionItem.name,
         )}
         onCheck={onCheck}
       />
index fcea8718533bd424d4f28bf087dc66e98e816e07..d1689a96a4a4026ae0bb336f920d4674f7f632d8 100644 (file)
@@ -68,7 +68,7 @@ export default class PermissionHeader extends React.PureComponent<Props> {
         <Tooltip
           overlay={translateWithParameters(
             'global_permissions.filter_by_x_permission',
-            permission.name
+            permission.name,
           )}
         >
           <a href="#" onClick={this.handlePermissionClick}>
index 4d92a8ce09cf0884dc038cbfdc764e684e71a347..c5c876e0597f0280e055cac8877a9dc17c1b5037 100644 (file)
@@ -38,12 +38,12 @@ interface Props<T extends PermissionGroup | PermissionUser> {
 }
 
 export default function usePermissionChange<T extends PermissionGroup | PermissionUser>(
-  props: Props<T>
+  props: Props<T>,
 ) {
   const { holder, removeOnly, permissions } = props;
   const [loading, setLoading] = React.useState<string[]>([]);
   const [confirmPermission, setConfirmPermission] = React.useState<PermissionDefinition | null>(
-    null
+    null,
   );
 
   const stopLoading = (permission: string) => {
@@ -55,7 +55,7 @@ export default function usePermissionChange<T extends PermissionGroup | Permissi
       if (removeOnly) {
         const flatPermissions = permissions.reduce<PermissionDefinition[]>(
           (acc, p) => (isPermissionDefinitionGroup(p) ? [...acc, ...p.permissions] : [...acc, p]),
-          []
+          [],
         );
         setConfirmPermission(flatPermissions.find((p) => p.key === permissionKey) ?? null);
       } else {
@@ -68,7 +68,7 @@ export default function usePermissionChange<T extends PermissionGroup | Permissi
     setLoading((prevState) => [...prevState, permission]);
     return props.onToggle(holder, permission).then(
       () => stopLoading(permission),
-      () => stopLoading(permission)
+      () => stopLoading(permission),
     );
   };
 
index 656ca0cf6803bf2923bff35a457457967a18b699..ea900c78f60f58e6f65575e8cee3f3b5948906cf 100644 (file)
@@ -93,7 +93,7 @@ export class IssueTabViewer extends React.PureComponent<IssueTabViewerProps, Sta
 
     this.checkIfEducationPrinciplesAreVisible = debounce(
       this.checkIfEducationPrinciplesAreVisible,
-      DEBOUNCE_FOR_SCROLL
+      DEBOUNCE_FOR_SCROLL,
     );
   }
 
@@ -138,8 +138,8 @@ export class IssueTabViewer extends React.PureComponent<IssueTabViewerProps, Sta
           prevProps.ruleDetails !== ruleDetails ||
             (prevProps.issue && issue && prevProps.issue.key !== issue.key) ||
             prevProps.selectedFlowIndex !== selectedFlowIndex ||
-            prevProps.selectedLocationIndex !== selectedLocationIndex
-        )
+            prevProps.selectedLocationIndex !== selectedLocationIndex,
+        ),
       );
     }
 
@@ -193,7 +193,7 @@ export class IssueTabViewer extends React.PureComponent<IssueTabViewerProps, Sta
 
     // As we might tamper with the description later on, we clone to avoid any side effect
     const descriptionSectionsByKey = cloneDeep(
-      groupBy(descriptionSections, (section) => section.key)
+      groupBy(descriptionSections, (section) => section.key),
     );
 
     if (extendedDescription) {
index ce3f33ab3082adfe3b9588576d5d2635440fea64..6b6c4d807b56919bf3dc8720c2cf7eb13c26578e 100644 (file)
@@ -75,9 +75,9 @@ export default class RuleDescription extends React.PureComponent<Props, State> {
     const contexts = sections
       .filter(
         (
-          section
+          section,
         ): section is RuleDescriptionSection & Required<Pick<RuleDescriptionSection, 'context'>> =>
-          section.context != null
+          section.context != null,
       )
       .map((section) => ({
         displayName: section.context.displayName || section.context.key,
@@ -142,7 +142,7 @@ export default class RuleDescription extends React.PureComponent<Props, State> {
             <FlagMessage variant="info" className="sw-mb-4">
               {translateWithParameters(
                 'coding_rules.description_context.default_information',
-                defaultContext.displayName
+                defaultContext.displayName,
               )}
             </FlagMessage>
           )}
@@ -159,7 +159,7 @@ export default class RuleDescription extends React.PureComponent<Props, State> {
               <h2>
                 {translateWithParameters(
                   'coding_rules.description_context.subtitle',
-                  selectedContext.displayName
+                  selectedContext.displayName,
                 )}
               </h2>
             )}
index fa7ea48c6b9401acbc48db01d05ec3e592345fb8..a6f04251be1961348dce8d4d3b61cf7b6a98ce37 100644 (file)
@@ -88,7 +88,7 @@ export class RuleTabViewer extends React.PureComponent<RuleTabViewerProps, State
 
     this.checkIfEducationPrinciplesAreVisible = debounce(
       this.checkIfEducationPrinciplesAreVisible,
-      DEBOUNCE_FOR_SCROLL
+      DEBOUNCE_FOR_SCROLL,
     );
   }
 
@@ -133,8 +133,8 @@ export class RuleTabViewer extends React.PureComponent<RuleTabViewerProps, State
           prevProps.ruleDetails !== ruleDetails ||
             (prevProps.issue && issue && prevProps.issue.key !== issue.key) ||
             prevProps.selectedFlowIndex !== selectedFlowIndex ||
-            prevProps.selectedLocationIndex !== selectedLocationIndex
-        )
+            prevProps.selectedLocationIndex !== selectedLocationIndex,
+        ),
       );
     }
 
@@ -187,7 +187,7 @@ export class RuleTabViewer extends React.PureComponent<RuleTabViewerProps, State
 
     // As we might tamper with the description later on, we clone to avoid any side effect
     const descriptionSectionsByKey = cloneDeep(
-      groupBy(descriptionSections, (section) => section.key)
+      groupBy(descriptionSections, (section) => section.key),
     );
 
     if (extendedDescription) {
index 56f0f6d2fb9a80e1e5cead2874c9a64e25b08bd0..c1c7883a8adcd19a0d62b787b6bc9e9fa4a5282a 100644 (file)
@@ -43,7 +43,7 @@ export function CleanCodeAttributePill(props: Props) {
               type,
               cleanCodeAttribute ? 'clean_code_attribute' : 'clean_code_attribute_category',
               cleanCodeAttribute ?? cleanCodeAttributeCategory,
-              'title'
+              'title',
             )}
           </p>
           <p>
@@ -51,7 +51,7 @@ export function CleanCodeAttributePill(props: Props) {
               'issue',
               cleanCodeAttribute ? 'clean_code_attribute' : 'clean_code_attribute_category',
               cleanCodeAttribute ?? cleanCodeAttributeCategory,
-              'advice'
+              'advice',
             )}
           </p>
         </>
@@ -69,7 +69,7 @@ export function CleanCodeAttributePill(props: Props) {
             type,
             'clean_code_attribute_category',
             cleanCodeAttributeCategory,
-            'title_short'
+            'title_short',
           )}
         </span>
         {cleanCodeAttribute && (
index d1b1ea0b78742e62296ebb1c55a4e9794ce0ec3d..4347ad4fc7e0745ad257c0f9b52c21cadd0c3868 100644 (file)
@@ -34,6 +34,6 @@ const shallowRender = (props: Partial<DrilldownLink['props']> = {}, label = 'lab
   return shallow<DrilldownLink>(
     <DrilldownLink component="project123" metric="other" {...props}>
       {label}
-    </DrilldownLink>
+    </DrilldownLink>,
   );
 };
index a3d6ad33432666356139256eae9aee27cf556704..2c78e3da34ddecc8063c12025f7d5dac30772a4f 100644 (file)
@@ -148,7 +148,7 @@ export default function TutorialSelectionRenderer(props: TutorialSelectionRender
                   alt="" // Should be ignored by screen readers
                   className="sw-h-4 sw-w-4"
                   src={`${getBaseUrl()}/images/tutorials/jenkins.svg`}
-                />
+                />,
               )}
 
             {showGitHubActions &&
@@ -159,7 +159,7 @@ export default function TutorialSelectionRenderer(props: TutorialSelectionRender
                   alt="" // Should be ignored by screen readers
                   className="sw-h-4 sw-w-4"
                   src={`${getBaseUrl()}/images/tutorials/github-actions.svg`}
-                />
+                />,
               )}
 
             {showBitbucketPipelines &&
@@ -170,7 +170,7 @@ export default function TutorialSelectionRenderer(props: TutorialSelectionRender
                   alt="" // Should be ignored by screen readers
                   className="sw-h-4 sw-w-4"
                   src={`${getBaseUrl()}/images/alm/bitbucket.svg`}
-                />
+                />,
               )}
 
             {showGitLabCICD &&
@@ -181,7 +181,7 @@ export default function TutorialSelectionRenderer(props: TutorialSelectionRender
                   alt="" // Should be ignored by screen readers
                   className="sw-h-4 sw-w-4"
                   src={`${getBaseUrl()}/images/alm/gitlab.svg`}
-                />
+                />,
               )}
 
             {showAzurePipelines &&
@@ -192,7 +192,7 @@ export default function TutorialSelectionRenderer(props: TutorialSelectionRender
                   alt="" // Should be ignored by screen readers
                   className="sw-h-4 sw-w-4"
                   src={`${getBaseUrl()}/images/tutorials/azure-pipelines.svg`}
-                />
+                />,
               )}
 
             {renderAlm(TutorialModes.OtherCI, component.key)}
index 016d2b4398d881fc6df9f9a6cec0ae5124194db9..c8a296e6bbb5a14f249f418e8cd1a361f2005632 100644 (file)
@@ -143,7 +143,7 @@ it('should correctly fetch the instance URL', async () => {
 
   await startLocalTutorial(user);
   expect(
-    screen.getByText('-Dsonar.host.url=http://sq.example.com', { exact: false })
+    screen.getByText('-Dsonar.host.url=http://sq.example.com', { exact: false }),
   ).toBeInTheDocument();
 });
 
@@ -154,7 +154,7 @@ it('should fallback on the host URL', async () => {
 
   await startLocalTutorial(user);
   expect(
-    screen.getByText('-Dsonar.host.url=http://host.url', { exact: false })
+    screen.getByText('-Dsonar.host.url=http://host.url', { exact: false }),
   ).toBeInTheDocument();
 });
 
@@ -190,7 +190,7 @@ async function startLocalTutorial(user: UserEvent) {
 
 function renderTutorialSelection(
   props: Partial<ComponentPropsType<typeof TutorialSelection>> = {},
-  navigateTo: string = 'tutorials?id=bar'
+  navigateTo: string = 'tutorials?id=bar',
 ) {
   return renderApp(
     '/tutorials',
@@ -199,6 +199,6 @@ function renderTutorialSelection(
       currentUser={mockLoggedInUser({ permissions: { global: [Permissions.Scan] } })}
       {...props}
     />,
-    { featureList: [Feature.BranchSupport], navigateTo }
+    { featureList: [Feature.BranchSupport], navigateTo },
   );
 }
index ff79611c3a79bba1de435310938c4727910673c8..baf13846c0d27b516b6d29dc2430d22a045dfaf7 100644 (file)
@@ -37,7 +37,7 @@ describe('getUniqueTokenName', () => {
 
   it('should generate a token with the given name', () => {
     expect(
-      getUniqueTokenName([mockUserToken({ name: initialTokenName })], 'Analyze "project"')
+      getUniqueTokenName([mockUserToken({ name: initialTokenName })], 'Analyze "project"'),
     ).toBe('Analyze "project"');
   });
 
@@ -58,14 +58,14 @@ describe('buildGithubLink', () => {
     expect(
       buildGithubLink(
         mockAlmSettingsInstance({ url: 'https://github.company.com/api/v3' }),
-        projectBinding
-      )
+        projectBinding,
+      ),
     ).toBe('https://github.company.com/owner/reponame');
   });
 
   it('should work for github.com', () => {
     expect(
-      buildGithubLink(mockAlmSettingsInstance({ url: 'http://api.github.com/' }), projectBinding)
+      buildGithubLink(mockAlmSettingsInstance({ url: 'http://api.github.com/' }), projectBinding),
     ).toBe('https://github.com/owner/reponame');
   });
 
@@ -81,20 +81,20 @@ describe('buildBitbucketCloudLink', () => {
     expect(
       buildBitbucketCloudLink(
         mockAlmSettingsInstance({ url: 'http://bitbucket.org/workspace/' }),
-        projectBinding
-      )
+        projectBinding,
+      ),
     ).toBe('http://bitbucket.org/workspace/reponame');
   });
 
   it('should return null if there is no url defined', () => {
     expect(
-      buildBitbucketCloudLink(mockAlmSettingsInstance({ url: undefined }), projectBinding)
+      buildBitbucketCloudLink(mockAlmSettingsInstance({ url: undefined }), projectBinding),
     ).toBeNull();
     expect(
       buildBitbucketCloudLink(
         mockAlmSettingsInstance(),
-        mockProjectBitbucketCloudBindingResponse({ repository: undefined })
-      )
+        mockProjectBitbucketCloudBindingResponse({ repository: undefined }),
+      ),
     ).toBeNull();
   });
 });
index 56b3845c41e3123d901fae827300dccd8d10c2e9..66a56d23e277e8e853b68f238d2741cf22fccc99 100644 (file)
@@ -53,7 +53,7 @@ export default function AzurePipelinesTutorial(props: AzurePipelinesTutorialProp
       <TutorialStepList className="sw-mb-10">
         <TutorialStep
           title={translate(
-            `onboarding.tutorial.with.azure_pipelines.${Steps.ExtensionInstallation}.title`
+            `onboarding.tutorial.with.azure_pipelines.${Steps.ExtensionInstallation}.title`,
           )}
         >
           <ExtensionInstallationStepContent />
@@ -61,7 +61,7 @@ export default function AzurePipelinesTutorial(props: AzurePipelinesTutorialProp
 
         <TutorialStep
           title={translate(
-            `onboarding.tutorial.with.azure_pipelines.${Steps.ServiceEndpoint}.title`
+            `onboarding.tutorial.with.azure_pipelines.${Steps.ServiceEndpoint}.title`,
           )}
         >
           <ServiceEndpointStepContent
@@ -73,7 +73,7 @@ export default function AzurePipelinesTutorial(props: AzurePipelinesTutorialProp
 
         <TutorialStep
           title={translate(
-            `onboarding.tutorial.with.azure_pipelines.${Steps.BranchAnalysis}.title`
+            `onboarding.tutorial.with.azure_pipelines.${Steps.BranchAnalysis}.title`,
           )}
         >
           <BranchAnalysisStepContent component={component} onDone={setDone} />
index 9eddb35881663870921347e75af4bcfd5fa41695..02d50c6c1c6ddae80a57a0f200d20732403cf84c 100644 (file)
@@ -27,21 +27,21 @@ export default function ExtensionInstallationStepContent() {
     <span>
       <FormattedMessage
         defaultMessage={translate(
-          'onboarding.tutorial.with.azure_pipelines.ExtensionInstallation.sentence'
+          'onboarding.tutorial.with.azure_pipelines.ExtensionInstallation.sentence',
         )}
         id="onboarding.tutorial.with.azure_pipelines.ExtensionInstallation.sentence"
         values={{
           link: (
             <Link to="https://marketplace.visualstudio.com/items?itemName=SonarSource.sonarqube">
               {translate(
-                'onboarding.tutorial.with.azure_pipelines.ExtensionInstallation.sentence.link'
+                'onboarding.tutorial.with.azure_pipelines.ExtensionInstallation.sentence.link',
               )}
             </Link>
           ),
           button: (
             <strong>
               {translate(
-                'onboarding.tutorial.with.azure_pipelines.ExtensionInstallation.sentence.button'
+                'onboarding.tutorial.with.azure_pipelines.ExtensionInstallation.sentence.button',
               )}
             </strong>
           ),
index e00a2b835e4a2b287ead3ddc16aa7efebf1ee2a2..f6dd69ea6952ce8dcd02ab504fd0255dc4495e7d 100644 (file)
@@ -31,7 +31,7 @@ function renderSentenceWithFieldAndValue(props: {
     <FormattedMessage
       id="onboarding.tutorial.with.azure_pipelines.BranchAnalysis.java_installer.sentence"
       defaultMessage={translate(
-        'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.java_installer.sentence'
+        'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.java_installer.sentence',
       )}
       values={{
         field: <b className="sw-font-semibold">{field}</b>,
@@ -49,19 +49,19 @@ export default function JavaToolInstallation() {
         <ListItem>
           {renderSentenceWithFieldAndValue({
             field: translate(
-              'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.java_installer.java_version'
+              'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.java_installer.java_version',
             ),
             value: '17',
           })}
           {' ' /* explicit space between the two strings */}
           {translate(
-            'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.java_installer.or_higher'
+            'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.java_installer.or_higher',
           )}
         </ListItem>
         <ListItem>
           {renderSentenceWithFieldAndValue({
             field: translate(
-              'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.java_installer.java_architecture'
+              'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.java_installer.java_architecture',
             ),
             value: 'x64',
           })}
@@ -69,10 +69,10 @@ export default function JavaToolInstallation() {
         <ListItem>
           {renderSentenceWithFieldAndValue({
             field: translate(
-              'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.java_installer.java_source'
+              'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.java_installer.java_source',
             ),
             value: translate(
-              'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.java_installer.pre-installed'
+              'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.java_installer.pre-installed',
             ),
           })}
         </ListItem>
index af583bf3a0c2c9ac0a4a785553e0d7148667b28e..04fc9ea08e5977888586c0b54a70c6df6abb34ae 100644 (file)
@@ -62,7 +62,7 @@ export default function ServiceEndpointStepContent(props: ServiceEndpointStepPro
         <NumberedListItem className="sw-flex sw-items-center">
           <FormattedMessage
             defaultMessage={translate(
-              'onboarding.tutorial.with.azure_pipelines.ServiceEndpoint.step3.sentence'
+              'onboarding.tutorial.with.azure_pipelines.ServiceEndpoint.step3.sentence',
             )}
             id="onboarding.tutorial.with.azure_pipelines.ServiceEndpoint.step3.sentence"
             values={{
index 96c63ab7eb9e3d92a1c1baaf7ce3881090262c1a..c5f2fe19608e8cbcf52fc6e2db53b1ab5826335a 100644 (file)
@@ -52,7 +52,7 @@ it('should render correctly and allow token generation', async () => {
   const user = userEvent.setup();
 
   expect(
-    screen.getByRole('heading', { name: 'onboarding.tutorial.with.azure_pipelines.title' })
+    screen.getByRole('heading', { name: 'onboarding.tutorial.with.azure_pipelines.title' }),
   ).toBeInTheDocument();
 
   //// Default step.
@@ -71,7 +71,7 @@ it('should render correctly and allow token generation', async () => {
 
   expect(lastToken!.type).toBe(TokenType.Global);
   expect(
-    within(modal).getByText(`users.tokens.new_token_created.${lastToken!.token}`)
+    within(modal).getByText(`users.tokens.new_token_created.${lastToken!.token}`),
   ).toBeInTheDocument();
   await clickButton(user, 'continue', modal);
 
@@ -119,7 +119,7 @@ function assertDefaultStepIsCorrectlyRendered() {
   expect(
     screen.getByRole('heading', {
       name: 'onboarding.tutorial.with.azure_pipelines.ExtensionInstallation.title',
-    })
+    }),
   ).toBeInTheDocument();
 }
 
@@ -127,11 +127,11 @@ function assertServiceEndpointStepIsCorrectlyRendered() {
   expect(
     screen.getByRole('heading', {
       name: 'onboarding.tutorial.with.azure_pipelines.ServiceEndpoint.title',
-    })
+    }),
   ).toBeInTheDocument();
   expect(getCopyToClipboardValue(0, 'Copy to clipboard')).toBe('https://sonarqube.example.com/');
   expect(
-    screen.getByRole('button', { name: 'onboarding.token.generate.long' })
+    screen.getByRole('button', { name: 'onboarding.token.generate.long' }),
   ).toBeInTheDocument();
 }
 
@@ -139,7 +139,7 @@ function assertDotNetStepIsCorrectlyRendered() {
   expect(
     screen.getByRole('heading', {
       name: 'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.title',
-    })
+    }),
   ).toBeInTheDocument();
 
   expect(getCopyToClipboardValue(1, 'Copy to clipboard')).toBe('foo');
@@ -157,10 +157,10 @@ function assertCFamilyStepIsCorrectlyRendered(os: string) {
   expect(getCopyToClipboardValue(0, 'Copy')).toMatchSnapshot(`cfamily ${os}, copy shell script`);
   expect(getCopyToClipboardValue(1, 'Copy to clipboard')).toBe('foo');
   expect(getCopyToClipboardValue(2, 'Copy to clipboard')).toMatchSnapshot(
-    `cfamily ${os}, copy additional properties`
+    `cfamily ${os}, copy additional properties`,
   );
   expect(getCopyToClipboardValue(1, 'Copy')).toMatchSnapshot(
-    `cfamily ${os}, copy build-wrapper command`
+    `cfamily ${os}, copy build-wrapper command`,
   );
 }
 
@@ -172,13 +172,13 @@ function assertFinishStepIsCorrectlyRendered() {
   expect(
     screen.getByRole('heading', {
       name: 'onboarding.tutorial.ci_outro.done',
-    })
+    }),
   ).toBeInTheDocument();
 }
 
 function renderAzurePipelinesTutorial(
   props: Partial<AzurePipelinesTutorialProps> = {},
-  { languages = { c: mockLanguage({ key: 'c' }) } }: RenderContext = {}
+  { languages = { c: mockLanguage({ key: 'c' }) } }: RenderContext = {},
 ) {
   return renderApp(
     '/',
@@ -189,7 +189,7 @@ function renderAzurePipelinesTutorial(
       willRefreshAutomatically
       {...props}
     />,
-    { languages }
+    { languages },
   );
 }
 
index 00978ad4fdbcd10ef05522c428a379c6946f848e..7a27f0f725b61f7300e8f8c1275920b5031f7960 100644 (file)
@@ -57,7 +57,7 @@ export default function JavaGradle(props: JavaGradleProps) {
         <NumberedListItem>
           {translateWithParameters(
             'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.java',
-            translate('onboarding.build', BuildTools.Gradle)
+            translate('onboarding.build', BuildTools.Gradle),
           )}
           <UnorderedList ticks className="sw-ml-12 sw-mb-4">
             <ListItem>
index ffcc3a7d7a2ee716500830192e791310b0a24c6f..a15ab912c83015bc9cac1cb13ad8c47eb6f3b9da 100644 (file)
@@ -56,7 +56,7 @@ export default function JavaMaven(props: JavaMavenProps) {
         <NumberedListItem>
           {translateWithParameters(
             'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.java',
-            translate('onboarding.build', BuildTools.Maven)
+            translate('onboarding.build', BuildTools.Maven),
           )}
           <UnorderedList ticks className="sw-ml-12 sw-mb-4">
             <ListItem>
index 6273b1c90e700c0c3e53ca2253537869ef0f70d0..52e19dc0462f783e60ba3e1f6f3b7406b9b221cd 100644 (file)
@@ -62,13 +62,13 @@ sonar.projectName=${projectName}
         <FormattedMessage
           id="onboarding.tutorial.with.azure_pipelines.BranchAnalysis.prepare.run_analysis"
           defaultMessage={translate(
-            'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.prepare.run_analysis'
+            'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.prepare.run_analysis',
           )}
           values={{
             section: (
               <b className="sw-font-semibold">
                 {translate(
-                  'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.prepare.run_analysis.section'
+                  'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.prepare.run_analysis.section',
                 )}
               </b>
             ),
@@ -76,7 +76,7 @@ sonar.projectName=${projectName}
               <b className="sw-font-semibold">
                 {translate(
                   'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.prepare.run_analysis.values',
-                  buildTool
+                  buildTool,
                 )}
               </b>
             ),
@@ -98,13 +98,13 @@ sonar.projectName=${projectName}
               <FormattedMessage
                 id="onboarding.tutorial.with.azure_pipelines.BranchAnalysis.run.key.sentence"
                 defaultMessage={translate(
-                  'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.run.key.sentence'
+                  'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.run.key.sentence',
                 )}
                 values={{
                   project_key: (
                     <b className="sw-font-semibold sw-mx-1">
                       {translate(
-                        'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.run.key.sentence.project_key'
+                        'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.run.key.sentence.project_key',
                       )}
                     </b>
                   ),
@@ -124,20 +124,20 @@ sonar.projectName=${projectName}
                 <FormattedMessage
                   id="onboarding.tutorial.with.azure_pipelines.BranchAnalysis.prepare_additional.ccpp"
                   defaultMessage={translate(
-                    'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.prepare_additional.ccpp'
+                    'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.prepare_additional.ccpp',
                   )}
                   values={{
                     advanced: (
                       <b className="sw-font-semibold sw-mx-1">
                         {translate(
-                          'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.prepare_additional.ccpp.advanced'
+                          'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.prepare_additional.ccpp.advanced',
                         )}
                       </b>
                     ),
                     additional: (
                       <b className="sw-font-semibold sw-mx-1">
                         {translate(
-                          'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.prepare_additional.ccpp.additional'
+                          'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.prepare_additional.ccpp.additional',
                         )}
                       </b>
                     ),
@@ -177,13 +177,13 @@ sonar.projectName=${projectName}
             <FormattedMessage
               id="onboarding.tutorial.with.azure_pipelines.BranchAnalysis.run.key.sentence"
               defaultMessage={translate(
-                'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.run.key.sentence'
+                'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.run.key.sentence',
               )}
               values={{
                 project_key: (
                   <b className="sw-font-semibold sw-mx-1">
                     {translate(
-                      'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.run.key.sentence.project_key'
+                      'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.run.key.sentence.project_key',
                     )}
                   </b>
                 ),
index 98088edb4d3b73a97b3ec2e68693248e18d6f564..b8cdf1c9dd60bf0d7ac696556c8347875daa4fe5 100644 (file)
@@ -46,7 +46,7 @@ export function PublishSteps(props: PublishStepsProps) {
         />
         <FlagMessage variant="info" className="sw-mt-2">
           {translate(
-            'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.publish_qg.info.sentence1'
+            'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.publish_qg.info.sentence1',
           )}
         </FlagMessage>
       </NumberedListItem>
@@ -67,13 +67,13 @@ export function PublishSteps(props: PublishStepsProps) {
             <FormattedMessage
               id="onboarding.tutorial.with.azure_pipelines.BranchAnalysis.branch_protection"
               defaultMessage={translate(
-                'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.branch_protection'
+                'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.branch_protection',
               )}
               values={{
                 link: (
                   <Link to={docUrl(ALM_DOCUMENTATION_PATHS[AlmKeys.Azure])}>
                     {translate(
-                      'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.branch_protection.link'
+                      'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.branch_protection.link',
                     )}
                   </Link>
                 ),
index 684de937492431f00fa5eda7f393ad5feef3e754..2fc85704e76d8c645dd43b6a00424ffb0236988b 100644 (file)
@@ -45,7 +45,7 @@ const YamlTemplate: Dictionary<
     branchesEnabled?: boolean,
     mainBranchName?: string,
     projectKey?: string,
-    projectName?: string
+    projectName?: string,
   ) => string
 > = {
   [BuildTools.Gradle]: gradleExample,
@@ -63,7 +63,7 @@ export function AnalysisCommand(props: AnalysisCommandProps) {
     branchSupportEnabled,
     mainBranchName,
     component.key,
-    component.name
+    component.name,
   );
 
   return (
index c13825a10caf9064acfcaa672a29623802e97498..d7f63d310f20cf012bf30c0118a282ba3db4fc87 100644 (file)
@@ -57,7 +57,7 @@ export default function RepositoryVariables(props: RepositoryVariablesProps) {
               <StandoutLink
                 to={`${buildBitbucketCloudLink(
                   almBinding,
-                  projectBinding
+                  projectBinding,
                 )}/admin/addon/admin/pipelines/repository-variables`}
                 target="_blank"
                 rel="noopener noreferrer"
index c89e422b868a966a9f6ce98e32e927f08e8ed915..9b98664c4a05ccc5d42866e1f4164646bc34f943 100644 (file)
@@ -70,7 +70,7 @@ it('should follow and complete all steps', async () => {
   expect(getCopyToClipboardValue(0, 'Copy to clipboard')).toMatchSnapshot('sonar token key');
   expect(getCopyToClipboardValue(1, 'Copy to clipboard')).toMatchSnapshot('sonarqube host url key');
   expect(getCopyToClipboardValue(2, 'Copy to clipboard')).toMatchSnapshot(
-    'sonarqube host url value'
+    'sonarqube host url value',
   );
 
   // Create/update configuration file step
@@ -152,7 +152,7 @@ it('navigates between steps', async () => {
 
 function renderBitbucketPipelinesTutorial(
   overrides: Partial<BitbucketPipelinesTutorialProps> = {},
-  { languages = { c: mockLanguage({ key: 'c' }) } }: RenderContext = {}
+  { languages = { c: mockLanguage({ key: 'c' }) } }: RenderContext = {},
 ) {
   return renderApp(
     '/',
@@ -163,6 +163,6 @@ function renderBitbucketPipelinesTutorial(
       currentUser={mockLoggedInUser()}
       {...overrides}
     />,
-    { languages, featureList: [Feature.BranchSupport] }
+    { languages, featureList: [Feature.BranchSupport] },
   );
 }
index 07d88a53f5ba9379e44767e31a996bfb54a7c634..a01c8699dd0f847ed9838cb302cacb5c42f74afa 100644 (file)
@@ -20,7 +20,7 @@
 export default function dotNetExample(
   branchesEnabled: boolean,
   mainBranchName: string,
-  projectKey: string
+  projectKey: string,
 ) {
   return `image: mcr.microsoft.com/dotnet/sdk:7.0
 
index 23c48fc8ef18acc9c1ed12ff6557b02d2bfbe09e..92c02d3025ac7a863937f8636e668d2070c6f087 100644 (file)
@@ -21,7 +21,7 @@ export default function mavenExample(
   branchesEnabled: boolean,
   mainBranchName: string,
   projectKey: string,
-  projectName: string
+  projectName: string,
 ) {
   return `image: maven:3-eclipse-temurin-17
 
index 466d63dc05d04b91d9ea8be2dfa288b83b61288f..c38cf9da1ddeea68c1eb10644e30a39a9d70e959 100644 (file)
@@ -231,7 +231,7 @@ export default class EditTokenModal extends React.PureComponent<Props, State> {
                       }
                       options={tokenExpirationOptions}
                       value={tokenExpirationOptions.find(
-                        (option) => option.value === tokenExpiration
+                        (option) => option.value === tokenExpiration,
                       )}
                     />
                     <ButtonSecondary
index b6fc67871abb549aab065ab800ffaa07208c2a09..919ff943e6487e07c15881b6501448887afe8942 100644 (file)
@@ -47,7 +47,7 @@ const CI_SEARCH_MAP = {
 };
 
 export default function GithubCFamilyExampleRepositories(
-  props: GithubCFamilyExampleRepositoriesProps
+  props: GithubCFamilyExampleRepositoriesProps,
 ) {
   const { className, os, ci } = props;
   const queryParams = ['sq', os ? OS_SEARCH_MAP[os] : undefined, ci ? CI_SEARCH_MAP[ci] : undefined]
index 6e0ea60e41f1ef220957d7d964e0950b6c54be39..0526f6ae83c3d54689cd5a55599d7052cedf4d25 100644 (file)
@@ -53,7 +53,7 @@ it('should behave correctly', async () => {
   const user = userEvent.setup();
 
   expect(
-    screen.getByRole('heading', { name: 'onboarding.token.generate.PROJECT_ANALYSIS_TOKEN' })
+    screen.getByRole('heading', { name: 'onboarding.token.generate.PROJECT_ANALYSIS_TOKEN' }),
   ).toBeInTheDocument();
   expect(screen.getByText('onboarding.token.text.PROJECT_ANALYSIS_TOKEN')).toBeInTheDocument();
 
@@ -92,7 +92,7 @@ it('should behave correctly', async () => {
   await typeInField(
     user,
     screen.getByLabelText('onboarding.token.name.label'),
-    'another token name'
+    'another token name',
   );
   await clickButton(user, 'onboarding.token.generate');
 
@@ -145,7 +145,7 @@ function renderEditTokenModal(props: Partial<EditTokenModal['props']> = {}) {
       currentUser={mockLoggedInUser()}
       onClose={jest.fn()}
       {...props}
-    />
+    />,
   );
 }
 
index afd7e458101143a7062820a8931001ac633371d2..0f5dbf719123ce8c91319b68ed05dd1e401c21f1 100644 (file)
@@ -38,15 +38,15 @@ it.each([
     renderGithubCFamilyExampleRepositories({ os, ci });
     expect(await ui.cfamilyExamplesLink.find()).toHaveAttribute(
       'href',
-      `https://github.com/orgs/sonarsource-cfamily-examples/repositories?q=sq+${formattedOS}+${formattedCI}`
+      `https://github.com/orgs/sonarsource-cfamily-examples/repositories?q=sq+${formattedOS}+${formattedCI}`,
     );
-  }
+  },
 );
 
 function renderGithubCFamilyExampleRepositories(
-  overrides: Partial<GithubCFamilyExampleRepositoriesProps> = {}
+  overrides: Partial<GithubCFamilyExampleRepositoriesProps> = {},
 ) {
   return renderComponent(
-    <GithubCFamilyExampleRepositories className="test-class" {...overrides} />
+    <GithubCFamilyExampleRepositories className="test-class" {...overrides} />,
   );
 }
index dff47e4a85e1bbc8b033e01884dfbcc0ca338eee..1e2c5c3cd7d231170b8526e30aacadca403727a1 100644 (file)
@@ -68,7 +68,7 @@ it('should follow and complete all steps', async () => {
   expect(getCopyToClipboardValue(0, 'Copy to clipboard')).toMatchSnapshot('sonar token key');
   expect(getCopyToClipboardValue(1, 'Copy to clipboard')).toMatchSnapshot('sonarqube host url key');
   expect(getCopyToClipboardValue(2, 'Copy to clipboard')).toMatchSnapshot(
-    'sonarqube host url value'
+    'sonarqube host url value',
   );
 
   // Create/update configuration file step
@@ -92,15 +92,15 @@ it('should follow and complete all steps', async () => {
   expect(getCopyToClipboardValue(0, 'Copy')).toMatchSnapshot('CFamily: sonar-project.properties');
   await user.click(ui.linuxButton.get());
   expect(getCopyToClipboardValue(1, 'Copy')).toMatchSnapshot(
-    'CFamily Linux: .github/workflows/build.yml'
+    'CFamily Linux: .github/workflows/build.yml',
   );
   await user.click(ui.windowsButton.get());
   expect(getCopyToClipboardValue(1, 'Copy')).toMatchSnapshot(
-    'CFamily Windows: .github/workflows/build.yml'
+    'CFamily Windows: .github/workflows/build.yml',
   );
   await user.click(ui.macosButton.get());
   expect(getCopyToClipboardValue(1, 'Copy')).toMatchSnapshot(
-    'CFamily MacOS: .github/workflows/build.yml'
+    'CFamily MacOS: .github/workflows/build.yml',
   );
 
   // Other
@@ -161,7 +161,7 @@ it('navigates between steps', async () => {
 
 function renderGithubActionTutorial(
   overrides: Partial<GitHubActionTutorialProps> = {},
-  { languages = { c: mockLanguage({ key: 'c' }) } }: RenderContext = {}
+  { languages = { c: mockLanguage({ key: 'c' }) } }: RenderContext = {},
 ) {
   return renderApp(
     '/',
@@ -172,6 +172,6 @@ function renderGithubActionTutorial(
       currentUser={mockLoggedInUser()}
       {...overrides}
     />,
-    { languages, featureList: [Feature.BranchSupport] }
+    { languages, featureList: [Feature.BranchSupport] },
   );
 }
index ed1ed9d4283fb46834d3038a4053aa3cf75d73c2..8ddeeeecc002066000e04458959c3e2163056585 100644 (file)
@@ -147,7 +147,7 @@ export default function CFamily(props: CFamilyProps) {
               mainBranchName,
               !!branchesEnabled,
               '<image ready for your build toolchain>',
-              STEPS[os]
+              STEPS[os],
             )}
           />
           <CompilationInfo />
index ddeb410a8d6b81107498ed1978a0846488aa599b..998cec200f334c980334d58ee10730dc992a525a 100644 (file)
@@ -72,7 +72,7 @@ export default function DotNet(props: DotNetProps) {
         mainBranchName,
         !!branchesEnabled,
         GITHUB_ACTIONS_RUNS_ON_WINDOWS,
-        dotnetYamlSteps(component.key)
+        dotnetYamlSteps(component.key),
       )}
     />
   );
index a189a7d4f23e00e0f862cc4d8f804ac7ff33cc42..7ddac76728af0a0ef4042bc905ae6378e445d443 100644 (file)
@@ -65,7 +65,7 @@ export default function Gradle(props: GradleProps) {
           mainBranchName,
           !!branchesEnabled,
           GITHUB_ACTIONS_RUNS_ON_LINUX,
-          GRADLE_YAML_STEPS
+          GRADLE_YAML_STEPS,
         )}
       />
     </>
index 27704458624c368448d1c0d85b1da32c27b48465..65ee380e8865319ee4ff09d7ec7b1444fc71965d 100644 (file)
@@ -63,7 +63,7 @@ export default function JavaMaven(props: JavaMavenProps) {
         mainBranchName,
         !!branchesEnabled,
         GITHUB_ACTIONS_RUNS_ON_LINUX,
-        mavenYamlSteps(component.key, component.name)
+        mavenYamlSteps(component.key, component.name),
       )}
     />
   );
index d3633fce33cd9af3d5112253a3676fe0d644cd05..d09f2384faedc43e6ba33501b3e676be3031ddc3 100644 (file)
@@ -65,7 +65,7 @@ export default function Others(props: OthersProps) {
           mainBranchName,
           !!branchesEnabled,
           GITHUB_ACTIONS_RUNS_ON_LINUX,
-          otherYamlSteps(!!branchesEnabled)
+          otherYamlSteps(!!branchesEnabled),
         )}
       />
     </>
index 4e1e5a70723969e8d4f96fef60bc065201c8598c..2977fce40369ea5cd4c4c1b2d996bce7c4b2c40a 100644 (file)
@@ -21,7 +21,7 @@ export function generateGitHubActionsYaml(
   mainBranchName: string,
   branchesEnabled: boolean,
   runsOn: string,
-  steps: string
+  steps: string,
 ) {
   return `name: Build
 
index f0e7a9ba77bf1a5b6afa1729d4d3aaf45738fa2a..a21adb9259f4584f39f928e7a553b0640f5ab45b 100644 (file)
@@ -41,7 +41,7 @@ export interface EnvironmentVariablesStepProps {
 }
 
 const pipelineDescriptionLinkLabel = translate(
-  'onboarding.tutorial.with.gitlab_ci.variables.description.link'
+  'onboarding.tutorial.with.gitlab_ci.variables.description.link',
 );
 
 export default function EnvironmentVariablesStep(props: EnvironmentVariablesStepProps) {
@@ -56,7 +56,7 @@ export default function EnvironmentVariablesStep(props: EnvironmentVariablesStep
 
         <FormattedMessage
           defaultMessage={translate(
-            'onboarding.tutorial.with.gitlab_ci.variables.section.description'
+            'onboarding.tutorial.with.gitlab_ci.variables.section.description',
           )}
           id="onboarding.tutorial.with.gitlab_ci.variables.section.description"
           values={{
@@ -102,7 +102,7 @@ export default function EnvironmentVariablesStep(props: EnvironmentVariablesStep
           <ListItem>
             <FormattedMessage
               defaultMessage={translate(
-                'onboarding.tutorial.with.gitlab_ci.variables.section.step4'
+                'onboarding.tutorial.with.gitlab_ci.variables.section.step4',
               )}
               id="onboarding.tutorial.with.gitlab_ci.variables.section.step4"
               values={{
@@ -122,7 +122,7 @@ export default function EnvironmentVariablesStep(props: EnvironmentVariablesStep
 
         <FormattedMessage
           defaultMessage={translate(
-            'onboarding.tutorial.with.gitlab_ci.variables.section2.description'
+            'onboarding.tutorial.with.gitlab_ci.variables.section2.description',
           )}
           id="onboarding.tutorial.with.gitlab_ci.variables.section2.description"
           values={{
@@ -183,7 +183,7 @@ export default function EnvironmentVariablesStep(props: EnvironmentVariablesStep
           <ListItem>
             <FormattedMessage
               defaultMessage={translate(
-                'onboarding.tutorial.with.gitlab_ci.variables.section2.step4'
+                'onboarding.tutorial.with.gitlab_ci.variables.section2.step4',
               )}
               id="onboarding.tutorial.with.gitlab_ci.variables.section2.step4"
               values={{
index 3210a06b3fbdf6fe25cdd1629d345d314f537fe3..c3b23b405e338b52457d2898a70db8c0fc9ff2ce 100644 (file)
@@ -148,7 +148,7 @@ export function YmlFileStep(props: YmlFileStepProps) {
           <NumberedListItem>
             <FormattedMessage
               defaultMessage={translate(
-                `onboarding.tutorial.with.gitlab_ci.project_key.${buildTool}.step2`
+                `onboarding.tutorial.with.gitlab_ci.project_key.${buildTool}.step2`,
               )}
               id={`onboarding.tutorial.with.gitlab_ci.project_key.${buildTool}.step2`}
               values={Object.assign(
@@ -177,7 +177,7 @@ export function YmlFileStep(props: YmlFileStepProps) {
                         </>
                       ),
                     }
-                  : {}
+                  : {},
               )}
             />
             {buildTool === BuildTools.Gradle ? (
index 254cee6a35ef9c98b0c4bd5841eeddecfc59b645..d770389339b345634d836f28abc5ee97626d947c 100644 (file)
@@ -62,7 +62,7 @@ it('should follow and complete all steps', async () => {
   expect(getCopyToClipboardValue(0, 'Copy to clipboard')).toMatchSnapshot('sonar token key');
   expect(getCopyToClipboardValue(1, 'Copy to clipboard')).toMatchSnapshot('sonarqube host url key');
   expect(getCopyToClipboardValue(2, 'Copy to clipboard')).toMatchSnapshot(
-    'sonarqube host url value'
+    'sonarqube host url value',
   );
 
   // Create/update configuration file step
@@ -113,7 +113,7 @@ it('should generate/delete a new token or use existing one', async () => {
 
 function renderGitLabTutorial(
   overrides: Partial<GitLabCITutorialProps> = {},
-  { languages = { c: mockLanguage({ key: 'c' }) } }: RenderContext = {}
+  { languages = { c: mockLanguage({ key: 'c' }) } }: RenderContext = {},
 ) {
   return renderApp(
     '/',
@@ -123,6 +123,6 @@ function renderGitLabTutorial(
       currentUser={mockLoggedInUser()}
       {...overrides}
     />,
-    { languages }
+    { languages },
   );
 }
index 11a1e848230c46d1e4d445194b2d1f9f6a68f062..898a20f86ee577037a66a4eadf37d245953e2a76 100644 (file)
@@ -177,7 +177,7 @@ export default function MultiBranchPipelineStep(props: MultiBranchPipelineStepPr
             <ListItem>
               <strong>
                 {translate(
-                  'onboarding.tutorial.with.jenkins.multi_branch_pipeline.step2.behaviors.label'
+                  'onboarding.tutorial.with.jenkins.multi_branch_pipeline.step2.behaviors.label',
                 )}
                 :
               </strong>
@@ -199,7 +199,7 @@ export default function MultiBranchPipelineStep(props: MultiBranchPipelineStepPr
                 <ListItem>
                   <strong>
                     {translate(
-                      'onboarding.tutorial.with.jenkins.multi_branch_pipeline.step2.behaviors.ref_specs.label'
+                      'onboarding.tutorial.with.jenkins.multi_branch_pipeline.step2.behaviors.ref_specs.label',
                     )}
                     :
                   </strong>
@@ -230,7 +230,7 @@ export default function MultiBranchPipelineStep(props: MultiBranchPipelineStepPr
           </UnorderedList>
           <p className="sw-ml-12">
             {translate(
-              'onboarding.tutorial.with.jenkins.multi_branch_pipeline.step2.leave_defaults'
+              'onboarding.tutorial.with.jenkins.multi_branch_pipeline.step2.leave_defaults',
             )}
           </p>
         </NumberedListItem>
index 43349200275b0554a9cb2fe479be37812cbcee98..a9c47217d64afe5cfc9c0649ae53bf32a394680a 100644 (file)
@@ -42,7 +42,7 @@ export interface WebhookStepBitbucketProps {
 function buildUrlSnippet(
   branchesEnabled: boolean,
   isBitbucketcloud: boolean,
-  ownUrl = '***BITBUCKET_URL***'
+  ownUrl = '***BITBUCKET_URL***',
 ) {
   if (!branchesEnabled) {
     return '***JENKINS_SERVER_URL***/job/***JENKINS_JOB_NAME***/build?token=***JENKINS_BUILD_TRIGGER_TOKEN***';
@@ -62,7 +62,7 @@ export default function WebhookStepBitbucket(props: WebhookStepBitbucketProps) {
     if (isBitbucketCloud && projectBinding?.repository) {
       linkUrl = `${buildBitbucketCloudLink(
         almBinding,
-        projectBinding
+        projectBinding,
       )}/admin/addon/admin/bitbucket-webhooks/bb-webhooks-repo-admin`;
     } else if (projectBinding.slug) {
       linkUrl = `${stripTrailingSlash(almBinding.url)}/plugins/servlet/webhooks/projects/${
index 6801ae72acd6df8ccad7753c68d01327d4ed94bb..9c7ef8cda9da2acd3a6f9e867abad4c5254b8984 100644 (file)
@@ -127,7 +127,7 @@ it.each([AlmKeys.BitbucketCloud, AlmKeys.BitbucketServer, AlmKeys.GitHub, AlmKey
 
     await user.click(ui.windowsDotnetFrameworkButton.get());
     expect(getCopyToClipboardValue(2, 'Copy')).toMatchSnapshot(
-      `windows dotnet framework jenkinsfile`
+      `windows dotnet framework jenkinsfile`,
     );
 
     await user.click(ui.linuxDotnetCoreButton.get());
@@ -149,12 +149,12 @@ it.each([AlmKeys.BitbucketCloud, AlmKeys.BitbucketServer, AlmKeys.GitHub, AlmKey
     // Other
     await user.click(ui.otherBuildButton.get());
     expect(getCopyToClipboardValue(2, 'Copy')).toMatchSnapshot(
-      `other build tools sonar-project.properties code`
+      `other build tools sonar-project.properties code`,
     );
     expect(getCopyToClipboardValue(3, 'Copy')).toMatchSnapshot(`other build tools jenkinsfile`);
 
     expect(ui.allSetSentence.get()).toBeInTheDocument();
-  }
+  },
 );
 
 it.each([AlmKeys.GitHub, AlmKeys.GitLab, AlmKeys.BitbucketCloud])(
@@ -166,7 +166,7 @@ it.each([AlmKeys.GitHub, AlmKeys.GitLab, AlmKeys.BitbucketCloud])(
     expect(await ui.devopsPlatformTitle.find()).toBeInTheDocument();
     await user.click(ui.devopsPlatformButton(alm).get());
     expect(ui.pipelineIntroText.get()).toBeInTheDocument();
-  }
+  },
 );
 
 it.each([AlmKeys.GitHub, AlmKeys.BitbucketCloud])(
@@ -192,7 +192,7 @@ it.each([AlmKeys.GitHub, AlmKeys.BitbucketCloud])(
     expect(ui.webhookAlmLink(alm).get()).toBeInTheDocument();
     await user.click(ui.mavenBuildButton.get());
     expect(ui.allSetSentence.get()).toBeInTheDocument();
-  }
+  },
 );
 
 it('navigates between steps', async () => {
@@ -224,11 +224,11 @@ function renderJenkinsTutorial(
   {
     featureList = [Feature.BranchSupport],
     languages = { c: mockLanguage({ key: 'c' }) },
-  }: RenderContext = {}
+  }: RenderContext = {},
 ) {
   return renderApp(
     '/',
     <JenkinsTutorial baseUrl="http://localhost:9000" component={mockComponent()} {...overrides} />,
-    { featureList, languages }
+    { featureList, languages },
   );
 }
index 662256ee14cdfe41447a37776e1325868bc76ee3..1f50448688139bf060535dbb98a14f7725f35ae5 100644 (file)
@@ -49,7 +49,7 @@ export default function Gradle(props: LanguageProps) {
           <FormattedMessage
             defaultMessage={translate(
               'onboarding.tutorial.with.jenkins.jenkinsfile.gradle.step2',
-              'sentence'
+              'sentence',
             )}
             id="onboarding.tutorial.with.jenkins.jenkinsfile.gradle.step2.sentence"
             values={{
index 171bbaeb09aa6c7b08f794889859eda37310bc61..8d1d1412a6281f7ef02a93fee18dd6620b3d8163 100644 (file)
@@ -59,7 +59,7 @@ export class BuildToolForm extends React.PureComponent<Props, State> {
       ({ config }) => ({ config: { buildTool: config.buildTool, os } }),
       () => {
         this.props.onDone(this.state.config);
-      }
+      },
     );
   };
 
index 4f9c5069055f69363a35168e47581686f4b5288d..fed2dfcf8b25cd641d47975b9b402139acb2cb10 100644 (file)
@@ -65,7 +65,7 @@ export default function DoneNextSteps({ component }: DoneNextStepsProps) {
         <p className="sw-mt-4">
           {isProjectAdmin
             ? translate(
-                'onboarding.analysis.auto_refresh_after_analysis.set_up_pr_deco_and_ci.admin'
+                'onboarding.analysis.auto_refresh_after_analysis.set_up_pr_deco_and_ci.admin',
               )
             : translate('onboarding.analysis.auto_refresh_after_analysis.set_up_pr_deco_and_ci')}
         </p>
@@ -77,7 +77,7 @@ export default function DoneNextSteps({ component }: DoneNextStepsProps) {
             <li>
               <Link to={docUrl('/analyzing-source-code/branches/branch-analysis/')}>
                 {translate(
-                  'onboarding.analysis.auto_refresh_after_analysis.check_these_links.branches'
+                  'onboarding.analysis.auto_refresh_after_analysis.check_these_links.branches',
                 )}
               </Link>
             </li>
@@ -85,7 +85,7 @@ export default function DoneNextSteps({ component }: DoneNextStepsProps) {
             <li>
               <Link to={docUrl('/analyzing-source-code/pull-request-analysis')}>
                 {translate(
-                  'onboarding.analysis.auto_refresh_after_analysis.check_these_links.pr_analysis'
+                  'onboarding.analysis.auto_refresh_after_analysis.check_these_links.pr_analysis',
                 )}
               </Link>
             </li>
index 1e0a5e4ffa6f8854ae8f56aaf03ef2fcdb0fe565..47eac23bc8477595122ba5eb11b297f219455f0a 100644 (file)
@@ -259,7 +259,7 @@ export default class TokenStep extends React.PureComponent<Props, State> {
                     options={tokenExpirationOptions}
                     size="full"
                     value={tokenExpirationOptions.find(
-                      (option) => option.value === tokenExpiration
+                      (option) => option.value === tokenExpiration,
                     )}
                   />
 
index 9a95eb678aa7fbd1fc82495fffbc3a3d74d3d697..7b69fde3d6cde51e222bc26e3662bec810846346 100644 (file)
@@ -112,7 +112,7 @@ it('can choose build tools and copy provided settings', async () => {
   // Dotnet - Core
   await user.click(ui.dotnetBuildButton.get());
   expect(getCopyToClipboardValue(0, 'Copy')).toMatchSnapshot(
-    'dotnet core: install scanner globally'
+    'dotnet core: install scanner globally',
   );
   expect(getCopyToClipboardValue(1, 'Copy')).toMatchSnapshot('dotnet core: execute command 1');
   expect(getCopyToClipboardValue(2, 'Copy')).toMatchSnapshot('dotnet core: execute command 2');
@@ -128,21 +128,21 @@ it('can choose build tools and copy provided settings', async () => {
   await user.click(ui.cFamilyBuildButton.get());
   await user.click(ui.linuxButton.get());
   expect(getCopyToClipboardValue(0, 'Copy')).toMatchSnapshot(
-    'cfamily linux: execute build wrapper'
+    'cfamily linux: execute build wrapper',
   );
   expect(getCopyToClipboardValue(1, 'Copy')).toMatchSnapshot('cfamily linux: execute scanner');
 
   // C Family - Windows
   await user.click(ui.windowsButton.get());
   expect(getCopyToClipboardValue(0, 'Copy')).toMatchSnapshot(
-    'cfamily windows: execute build wrapper'
+    'cfamily windows: execute build wrapper',
   );
   expect(getCopyToClipboardValue(1, 'Copy')).toMatchSnapshot('cfamily windows: execute scanner');
 
   // C Family - MacOS
   await user.click(ui.macosButton.get());
   expect(getCopyToClipboardValue(0, 'Copy')).toMatchSnapshot(
-    'cfamily macos: execute build wrapper'
+    'cfamily macos: execute build wrapper',
   );
   expect(getCopyToClipboardValue(1, 'Copy')).toMatchSnapshot('cfamily macos: execute scanner');
 
@@ -170,6 +170,6 @@ function renderOtherTutorial({
       component={mockComponent()}
       currentUser={mockLoggedInUser()}
     />,
-    { languages }
+    { languages },
   );
 }
index 4be52b108968809cb3489064ac7d6789a60c25bc..fb3617af3c6a893a132aaef71781830442947d77 100644 (file)
@@ -49,7 +49,7 @@ export default function ExecBuildWrapper(props: ExecBuildWrapperProps) {
         className="sw-px-4"
         isOneLine
         snippet={`${executables[os]} --out-dir bw-output ${translate(
-          'onboarding.analysis.build_wrapper.execute_build_command'
+          'onboarding.analysis.build_wrapper.execute_build_command',
         )}`}
       />
       <p className="sw-mt-4">
index e35657317d06a00014c94f2f7bbbac5a0f844d7a..832ed65e6b11d9ae26478be27ff9bc185aa5df9f 100644 (file)
@@ -69,7 +69,7 @@ export function getUniqueTokenName(tokens: UserToken[], initialTokenName: string
 
 export function buildGithubLink(
   almBinding: AlmSettingsInstance,
-  projectBinding: ProjectAlmBindingResponse
+  projectBinding: ProjectAlmBindingResponse,
 ) {
   if (almBinding.url === undefined) {
     return null;
@@ -83,7 +83,7 @@ export function buildGithubLink(
 
 export function buildBitbucketCloudLink(
   almBinding: AlmSettingsInstance,
-  projectBinding: ProjectAlmBindingResponse
+  projectBinding: ProjectAlmBindingResponse,
 ) {
   if (almBinding.url === undefined || projectBinding.repository === undefined) {
     return null;
index 57183ec8bbb9f008cc5a4e84195050d25f65392a..5125c51090839a9ab263028a4fbd983cdc6f1053 100644 (file)
@@ -22,7 +22,7 @@ import * as React from 'react';
 
 type EllipsisPredicate = (
   node: HTMLElement,
-  props: Omit<AutoEllipsisProps, 'customShouldEllipsis'>
+  props: Omit<AutoEllipsisProps, 'customShouldEllipsis'>,
 ) => boolean;
 
 interface AutoEllipsisProps {
@@ -67,7 +67,7 @@ export function useAutoEllipsis(props: AutoEllipsisProps): [boolean, (node: HTML
     },
     // We don't want to apply this effect when ellipsis state change, only this effect can change it
     // eslint-disable-next-line react-hooks/exhaustive-deps
-    [props.customShouldEllipsis, props.maxHeight, props.maxWidth, props.useParent]
+    [props.customShouldEllipsis, props.maxHeight, props.maxWidth, props.useParent],
   );
 
   return [autoEllipsis, ref];
@@ -75,7 +75,7 @@ export function useAutoEllipsis(props: AutoEllipsisProps): [boolean, (node: HTML
 
 export const defaultShouldEllipsis: EllipsisPredicate = (
   node,
-  { useParent = true, maxWidth, maxHeight }
+  { useParent = true, maxWidth, maxHeight },
 ) => {
   if (node.parentElement && useParent) {
     maxWidth = maxWidth ?? node.parentElement.clientWidth;
index f20849b055a5452949ec3147bd19f2afb4db75a7..d939bfa21b5b675b257ff19d2c5fc3bc686e0b5f 100644 (file)
@@ -94,7 +94,7 @@ export default function PageShortcutsTooltip(props: PageShortcutsTooltipProps) {
       `}
         className={classNames(
           className,
-          'page-shortcuts-tooltip note text-center display-inline-block'
+          'page-shortcuts-tooltip note text-center display-inline-block',
         )}
       >
         <div aria-hidden>
index f53d6a61fa1caa400b0f8b5b23612cfb2ab0e905..55c991ab96c0140dd7b25adab99b9b1a54ff18b2 100644 (file)
@@ -35,13 +35,13 @@ it('verification of all variants of alert', () => {
 
 it('should render inline alert', () => {
   expect(shallowRender({ display: 'inline' }).find('Styled(div)[isInline=true]').exists()).toBe(
-    true
+    true,
   );
 });
 
 it('should render banner alert', () => {
   expect(shallowRender({ display: 'banner' }).find('Styled(div)[isBanner=true]').exists()).toBe(
-    true
+    true,
   );
 });
 
@@ -53,6 +53,6 @@ function shallowRender(props: Partial<AlertProps>) {
   return shallow(
     <Alert className="alert-test" id="error-message" variant="error" {...props}>
       This is an error!
-    </Alert>
+    </Alert>,
   );
 }
index f08e6f09b4d3d8ccd7fc8c1890ca65c531e3338c..c636e036ce2f4b425ed3312622c4ac9a8469ef57 100644 (file)
@@ -25,7 +25,7 @@ it('should render', () => {
   const wrapper = shallow(
     <AutoEllipsis maxWidth={5} useParent={false}>
       <span className="medium">my test text</span>
-    </AutoEllipsis>
+    </AutoEllipsis>,
   );
 
   expect(wrapper).toMatchSnapshot();
@@ -35,7 +35,7 @@ it('should render with text-ellipsis class', () => {
   const wrapper = mount(
     <AutoEllipsis customShouldEllipsis={() => true} maxWidth={5} useParent={false}>
       <span className="medium">my test text</span>
-    </AutoEllipsis>
+    </AutoEllipsis>,
   );
 
   expect(wrapper.find('span').hasClass('medium')).toBe(true);
@@ -52,10 +52,10 @@ it('should correctly compute the auto-ellipsis', () => {
   expect(defaultShouldEllipsis(node10, { maxHeight: 5, useParent: false })).toBe(true);
   expect(defaultShouldEllipsis(node10, { maxWidth: 5, maxHeight: 5, useParent: false })).toBe(true);
   expect(defaultShouldEllipsis(node10, { maxWidth: 5, maxHeight: 10, useParent: false })).toBe(
-    true
+    true,
   );
   expect(defaultShouldEllipsis(node10, { maxWidth: 10, maxHeight: 5, useParent: false })).toBe(
-    true
+    true,
   );
   expect(defaultShouldEllipsis(node10, { maxWidth: 10, useParent: false })).toBe(false);
   expect(defaultShouldEllipsis(node10, { maxHeight: 10, useParent: false })).toBe(false);
index 85eb05fe99f222540fbda6f7d7de32bad936c724..ba56087943fd64bf2b404d0362ab14962441c723 100644 (file)
@@ -66,6 +66,6 @@ function shallowRender(props: Partial<DismissableAlertProps> = {}) {
   return shallow<DismissableAlertProps>(
     <DismissableAlert alertKey="foo" variant="info" {...props}>
       <div>My content</div>
-    </DismissableAlert>
+    </DismissableAlert>,
   );
 }
index ab1917c5fb360e9e01057bd8b1903e38d99fbc42..f715435af03e72f86020d378353efd115143190f 100644 (file)
@@ -42,6 +42,6 @@ function render(props: Partial<DismissableAlertComponentProps> = {}) {
   return renderComponent(
     <DismissableAlertComponent onDismiss={jest.fn()} variant="info" {...props}>
       testing
-    </DismissableAlertComponent>
+    </DismissableAlertComponent>,
   );
 }
index 46337a62294459c6caa6a46cdf3971516fa8939a..9c386ad5d6da09d19296eb667a72d702973d25c9 100644 (file)
@@ -37,21 +37,21 @@ it('should be able to render with hash only', () => {
       hash="7daf6c79d4802916d83f6266e24850af"
       name="Foo"
       size={30}
-    />
+    />,
   );
   expect(avatar).toMatchSnapshot();
 });
 
 it('falls back to dummy avatar', () => {
   const avatar = shallow(
-    <LegacyAvatar appState={mockAppState({ settings: {} })} name="Foo Bar" size={30} />
+    <LegacyAvatar appState={mockAppState({ settings: {} })} name="Foo Bar" size={30} />,
   );
   expect(avatar).toMatchSnapshot();
 });
 
 it('do not fail when name is missing', () => {
   const avatar = shallow(
-    <LegacyAvatar appState={mockAppState({ settings: {} })} name={undefined} size={30} />
+    <LegacyAvatar appState={mockAppState({ settings: {} })} name={undefined} size={30} />,
   );
   expect(avatar.getElement()).toBeNull();
 });
index c46c9742e802ab1390a0b957ad5e86f848a6cab7..7cfa7d63aefe229ea9b259a99c1725171ee9b862 100644 (file)
@@ -27,7 +27,7 @@ it('should render correctly', () => {
   expect(shallowRender({ muted: true, small: true })).toMatchSnapshot('muted and small');
   expect(shallowRender({ 'aria-label': 'ARIA Label' })).toMatchSnapshot('with aria-label');
   expect(shallowRender({ 'aria-labelledby': 'element-id' })).toMatchSnapshot(
-    'with aria-labelledby'
+    'with aria-labelledby',
   );
 });
 
index 9c77279461b555a47046dc505f891dd28ecdb6a8..e0af00cf22fdfb925a6ce7c8998efa7eaf265db8 100644 (file)
@@ -35,6 +35,6 @@ function shallowRender(props: Partial<NavBarProps> = {}) {
   return shallow(
     <NavBar height={42} {...props}>
       <div className="my-navbar-content" />
-    </NavBar>
+    </NavBar>,
   );
 }
index e4fe0fd9600b6990b581f25c62fc4eb9ac874462..c8c9772618dda035e62022167477ca134b51df83 100644 (file)
@@ -38,6 +38,6 @@ function shallowRender(props: Partial<Props> = {}) {
   return shallow(
     <NewsBox onClose={jest.fn()} title="title" {...props}>
       <div>description</div>
-    </NewsBox>
+    </NewsBox>,
   );
 }
index 44abd4428af32af2a38bd9e2f1fd4f779334475d..c914b71dd88509808e272ef2f87ecd4e60fbb13e 100644 (file)
@@ -40,8 +40,8 @@ it('should render all the labels', async () => {
 
   await user.hover(
     screen.getByLabelText(
-      'shortcuts.on_page.intro shortcuts.on_page.up_down_x.up & down shortcuts.on_page.left_right_x.left & right shortcuts.on_page.left_x.left shortcuts.on_page.meta_x.meta'
-    )
+      'shortcuts.on_page.intro shortcuts.on_page.up_down_x.up & down shortcuts.on_page.left_right_x.left & right shortcuts.on_page.left_x.left shortcuts.on_page.meta_x.meta',
+    ),
   );
 
   expect(await screen.findByText(leftAndRightLabel)).toBeInTheDocument();
@@ -60,8 +60,8 @@ it('should render left & right labels without up&down', async () => {
 
   await user.hover(
     screen.getByLabelText(
-      'shortcuts.on_page.intro shortcuts.on_page.left_right_x.left & right shortcuts.on_page.left_x.left'
-    )
+      'shortcuts.on_page.intro shortcuts.on_page.left_right_x.left & right shortcuts.on_page.left_x.left',
+    ),
   );
 
   expect(await screen.findByText(leftAndRightLabel)).toBeInTheDocument();
index 754ea99984528498df6e916a85990c4346419865..0873c3d62332d9de40387c68bc7adcb250dedd68 100644 (file)
@@ -36,6 +36,6 @@ it('renders undefined value', () => {
 it('renders with a custom aria-label', () => {
   expect(shallow(<Rating aria-label="custom" aria-hidden={false} value="2.0" />)).toMatchSnapshot();
   expect(
-    shallow(<Rating aria-label="custom" aria-hidden={false} value={undefined} />)
+    shallow(<Rating aria-label="custom" aria-hidden={false} value={undefined} />),
   ).toMatchSnapshot();
 });
index d0af14d05a927fd77bd578b672f7e5de25128d7e..969b4eef1e11b7e21b4262786de8b80779fdc22a 100644 (file)
@@ -37,8 +37,8 @@ describe('Popup', () => {
           className="foo"
           placement={PopupPlacement.LeftTop}
           style={{ left: -5 }}
-        />
-      )
+        />,
+      ),
     ).toMatchSnapshot();
   });
 
@@ -106,13 +106,15 @@ describe('PortalPopup', () => {
     const wrapper = shallowRender({ arrowOffset: -2 });
 
     expect(
-      wrapper.instance().adjustArrowPosition(PopupPlacement.BottomLeft, { leftFix: 10, topFix: 10 })
+      wrapper
+        .instance()
+        .adjustArrowPosition(PopupPlacement.BottomLeft, { leftFix: 10, topFix: 10 }),
     ).toEqual({ marginLeft: -12 });
 
     expect(
       wrapper
         .instance()
-        .adjustArrowPosition(PopupPlacement.RightBottom, { leftFix: 10, topFix: 10 })
+        .adjustArrowPosition(PopupPlacement.RightBottom, { leftFix: 10, topFix: 10 }),
     ).toEqual({ marginTop: -12 });
   });
 
@@ -120,7 +122,7 @@ describe('PortalPopup', () => {
     return shallow<PortalPopup>(
       <PortalPopup overlay={<span id="overlay" />} {...props}>
         <div id="popup-trigger" />
-      </PortalPopup>
+      </PortalPopup>,
     );
   }
 });
index 55580b338c45c9379a0b9933610cc327b402ef6e..b32dc36f650d58b54f1c608e1268e2f3296d5404 100644 (file)
@@ -66,7 +66,7 @@ function PopupBase(props: PopupProps, ref: React.Ref<HTMLDivElement>) {
         'popup',
         `is-${placement}`,
         { 'no-padding': props.noPadding },
-        props.className
+        props.className,
       )}
       ref={ref || React.createRef()}
       style={props.style}
@@ -157,7 +157,7 @@ export class PortalPopup extends React.Component<PortalPopupProps, State> {
 
   adjustArrowPosition = (
     placement: PopupPlacement,
-    { leftFix, topFix }: { leftFix: number; topFix: number }
+    { leftFix, topFix }: { leftFix: number; topFix: number },
   ) => {
     const { arrowOffset = 0 } = this.props;
     switch (placement) {
index c44bca713fbd4e7278b80e51a4b70bda3d12bd5c..ea4159f0b66c19c73883d106b8decc53e8d4305d 100644 (file)
@@ -76,7 +76,7 @@ export default function MetaDataVersion(props: MetaDataVersionProps) {
                       {advancedDownloadUrl.label}
                     </a>
                   </span>
-                )
+                ),
             )}
 
           {changeLogUrl && (
@@ -93,7 +93,7 @@ export default function MetaDataVersion(props: MetaDataVersionProps) {
 }
 
 function isAdvancedDownloadUrlArray(
-  downloadUrl: string | AdvancedDownloadUrl[] | undefined
+  downloadUrl: string | AdvancedDownloadUrl[] | undefined,
 ): downloadUrl is AdvancedDownloadUrl[] {
   return !!downloadUrl && typeof downloadUrl !== 'string';
 }
index 8a30addb2f24f86bdfd3b4372c16753a20b6f77c..c126cd5c33c55ea1912cd5a0ddc6e895bd10419a 100644 (file)
@@ -29,17 +29,17 @@ it('should render correctly', () => {
       versionInformation: mockMetaDataVersionInformation({
         downloadURL: [{ label: 'macos 64 bits', url: '' }],
       }),
-    })
+    }),
   ).toMatchSnapshot('with advanced downloadUrl');
   expect(
     shallowRender({
       versionInformation: { version: '2.0' },
-    })
+    }),
   ).toMatchSnapshot('with very few info');
 });
 
 function shallowRender(props?: Partial<MetaDataVersionProps>) {
   return shallow(
-    <MetaDataVersion versionInformation={mockMetaDataVersionInformation()} {...props} />
+    <MetaDataVersion versionInformation={mockMetaDataVersionInformation()} {...props} />,
   );
 }
index ced3a4266b73e3503fe07a4576e72acdde8fcd10..ad7b4d683c51b8834a6439438b1cf63556a151f0 100644 (file)
@@ -46,6 +46,6 @@ function shallowRender(props?: Partial<MetaDataVersions['props']>) {
         mockMetaDataVersionInformation({ version: '1.0', archived: true }),
       ]}
       {...props}
-    />
+    />,
   );
 }
index e472f67f5339ed3c29ed0ff600d2943ae5da99aa..fe3f07a904a70a8d9fa7c1b6ec57a15e94506582 100644 (file)
@@ -20,7 +20,7 @@
 import { MetaDataInformation, MetaDataVersionInformation } from '../update-center-metadata';
 
 export function mockMetaDataVersionInformation(
-  overrides?: Partial<MetaDataVersionInformation>
+  overrides?: Partial<MetaDataVersionInformation>,
 ): MetaDataVersionInformation {
   return {
     version: '5.13',
@@ -34,7 +34,7 @@ export function mockMetaDataVersionInformation(
 }
 
 export function mockMetaDataInformation(
-  overrides?: Partial<MetaDataInformation>
+  overrides?: Partial<MetaDataInformation>,
 ): MetaDataInformation {
   return {
     name: 'SonarJava',
index 54a8e5bbee7efb57466db3edbc0e9b263b8b9753..7aa73124320fcb5b6fbdc1ceda782d64f2c2c22d 100644 (file)
@@ -65,11 +65,11 @@ export class SystemUpgradeForm extends React.PureComponent<Props, State> {
       const [, major, minor] = parsedVersion;
       const majoMinorVersion = `${major}.${minor}`;
       patches = flatMap(systemUpgrades, (upgrades) =>
-        filter(upgrades, (upgrade) => upgrade.version.startsWith(majoMinorVersion))
+        filter(upgrades, (upgrade) => upgrade.version.startsWith(majoMinorVersion)),
       );
       systemUpgradesWithPatch = systemUpgrades
         .map((upgrades) =>
-          upgrades.filter((upgrade) => !upgrade.version.startsWith(majoMinorVersion))
+          upgrades.filter((upgrade) => !upgrade.version.startsWith(majoMinorVersion)),
         )
         .filter(negate(isEmpty));
       systemUpgradesWithPatch.push(patches);
index 8e55c1de0a3b44c88385d95e621ced60a0995d7d..8266aab26494c80fc435cbce4b08563e9781a905 100644 (file)
@@ -44,7 +44,7 @@ export default function SystemUpgradeItem(props: SystemUpgradeItemProps) {
   const lastUpgrade = systemUpgrades[0];
   const downloadUrl = getEditionDownloadUrl(
     getEdition(edition || EditionKey.community),
-    lastUpgrade
+    lastUpgrade,
   );
   let header = translate('system.latest_version');
   if (isLTSVersion) {
index 1071274703b7d6e0ae1dcf22625837f050bb1fcb..07b6ece20cbd53129090132d0b169e445f9c67aa 100644 (file)
@@ -33,6 +33,6 @@ it('should open modal correctly', () => {
 
 function shallowRender(props: Partial<SystemUpgradeButton['props']> = {}) {
   return shallow<SystemUpgradeButton['props']>(
-    <SystemUpgradeButton systemUpgrades={[]} latestLTS="9.2" {...props} />
+    <SystemUpgradeButton systemUpgrades={[]} latestLTS="9.2" {...props} />,
   );
 }
index c053739d36101e86ea9ca757d6ef35fba91f8173..638514c4086f99a06a8987d226d52c20afbc4cef 100644 (file)
@@ -82,8 +82,8 @@ it.each([...Object.values(UpdateUseCase), undefined])(
           systemUpgrades={UPGRADES}
           latestLTS="9.1"
           updateUseCase={updateUseCase}
-        />
-      )
+        />,
+      ),
     ).toMatchSnapshot();
-  }
+  },
 );
index e5bc0afb67e563999834a065c7e6bb5b1b47befa..b0d00f2df13f115dab24d1c63bcaf5c454fa964c 100644 (file)
@@ -41,7 +41,7 @@ it('should display correctly', () => {
           downloadUrl: 'http://download.url/community',
         },
       ],
-    })
+    }),
   ).toMatchSnapshot();
 });
 
@@ -80,6 +80,6 @@ function shallowRender(props: Partial<SystemUpgradeItemProps> = {}) {
       isPatch={false}
       isLTSVersion={false}
       {...props}
-    />
+    />,
   );
 }
index 8f0e2f4477e4b004042010eb7c0d7f567cc4012f..9d0d95af685428f56b4748c1a1cb67b69082ab1d 100644 (file)
@@ -28,7 +28,7 @@ describe('sortUpgrades', () => {
         { version: '5.10' },
         { version: '5.1' },
         { version: '5.4' },
-      ] as SystemUpgrade[])
+      ] as SystemUpgrade[]),
     ).toEqual([{ version: '5.10' }, { version: '5.4.2' }, { version: '5.4' }, { version: '5.1' }]);
     expect(
       u.sortUpgrades([
@@ -36,7 +36,7 @@ describe('sortUpgrades', () => {
         { version: '5.1.2' },
         { version: '6.0' },
         { version: '6.9' },
-      ] as SystemUpgrade[])
+      ] as SystemUpgrade[]),
     ).toEqual([{ version: '6.9' }, { version: '6.0' }, { version: '5.10' }, { version: '5.1.2' }]);
   });
 });
@@ -49,7 +49,7 @@ describe('groupUpgrades', () => {
         { version: '5.4.2' },
         { version: '5.4' },
         { version: '5.1' },
-      ] as SystemUpgrade[])
+      ] as SystemUpgrade[]),
     ).toEqual([
       [{ version: '5.10' }, { version: '5.4.2' }, { version: '5.4' }, { version: '5.1' }],
     ]);
@@ -60,7 +60,7 @@ describe('groupUpgrades', () => {
         { version: '6.0' },
         { version: '5.10' },
         { version: '5.4.2' },
-      ] as SystemUpgrade[])
+      ] as SystemUpgrade[]),
     ).toEqual([
       [{ version: '6.9' }, { version: '6.7' }, { version: '6.0' }],
       [{ version: '5.10' }, { version: '5.4.2' }],
index f3d7bcc72988da25600182ee7bd6572549363d19..9cd80b75943d06966154640684e9fa43f893fbbb 100644 (file)
@@ -89,7 +89,7 @@ export default class Workspace extends React.PureComponent<{}, State> {
     try {
       const data: any[] = JSON.parse(get(WORKSPACE) || '');
       const components: ComponentDescriptor[] = data.filter(
-        (x) => x[TYPE_KEY] === WorkspaceTypes.Component
+        (x) => x[TYPE_KEY] === WorkspaceTypes.Component,
       );
       return { components };
     } catch {
@@ -103,7 +103,7 @@ export default class Workspace extends React.PureComponent<{}, State> {
       // Do not save line number, next time the file is open, it should be open
       // on the first line.
       ...this.state.components.map((x) =>
-        omit({ ...x, [TYPE_KEY]: WorkspaceTypes.Component }, 'line')
+        omit({ ...x, [TYPE_KEY]: WorkspaceTypes.Component }, 'line'),
       ),
     ];
     save(WORKSPACE, JSON.stringify(data));
@@ -135,7 +135,7 @@ export default class Workspace extends React.PureComponent<{}, State> {
       const { key, name, qualifier } = details;
       this.setState((state: State) => ({
         components: state.components.map((component) =>
-          component.key === key ? { ...component, name, qualifier } : component
+          component.key === key ? { ...component, name, qualifier } : component,
         ),
       }));
     }
index fd3ac5140e9a7bf4c23587dd5892e75b5562c3c7..d0bcefb905f5d260c3684d5587b82bfef909a072 100644 (file)
@@ -59,7 +59,7 @@ export default class WorkspaceComponentViewer extends React.PureComponent<Props>
 
     if (this.container && this.props.component.line) {
       const row = this.container.querySelector(
-        `.it__source-line[data-line-number="${this.props.component.line}"]`
+        `.it__source-line[data-line-number="${this.props.component.line}"]`,
       );
       if (row) {
         row.scrollIntoView({ block: 'center' });
index 5eb8740b04354497ac9d2af034268791dc35028f..e5894d49148a6730b6e4ae9a8d13a0c0f4d83d36 100644 (file)
@@ -101,13 +101,13 @@ it('should load data from local storage and allow to open another component', as
 
   expect(byText('previously opened file').get()).toBeInTheDocument();
   expect(
-    byRole('heading', { name: 'qualifier.FIL path/to/component/k1' }).query()
+    byRole('heading', { name: 'qualifier.FIL path/to/component/k1' }).query(),
   ).not.toBeInTheDocument();
 
   await user.click(ui.componentOpenButton.get());
 
   expect(
-    byRole('heading', { name: 'qualifier.FIL path/to/component/k1' }).get()
+    byRole('heading', { name: 'qualifier.FIL path/to/component/k1' }).get(),
   ).toBeInTheDocument();
   expect(save).toHaveBeenCalled();
 });
@@ -148,7 +148,7 @@ function renderWorkspace(componentKey = 'k1', branchLike?: BranchLike) {
   return renderComponent(
     <Workspace>
       <TestComponent componentKey={componentKey} branchLike={branchLike} />
-    </Workspace>
+    </Workspace>,
   );
 }
 
index 55b52dae5f25e8753a5389d98c7cf83c19f56325..857a966a45931221f147b9df0d352a392e8d71d2 100644 (file)
@@ -56,7 +56,7 @@ describe('#getBrancheLikesAsTree', () => {
         branch2Pr1,
         branch1Pr2,
         branch1Pr1,
-      ])
+      ]),
     ).toEqual({
       mainBranchTree: {
         branch: main,
@@ -107,10 +107,10 @@ describe('#isSameBranchLike', () => {
 
   it('compares pull requests', () => {
     expect(
-      isSameBranchLike(mockPullRequest({ key: '1234' }), mockPullRequest({ key: '1234' }))
+      isSameBranchLike(mockPullRequest({ key: '1234' }), mockPullRequest({ key: '1234' })),
     ).toBe(true);
     expect(
-      isSameBranchLike(mockPullRequest({ key: '1234' }), mockPullRequest({ key: '5678' }))
+      isSameBranchLike(mockPullRequest({ key: '1234' }), mockPullRequest({ key: '5678' })),
     ).toBe(false);
   });
 
index 1ce732295d89316b1ffb2fdff291c8310c8491c6..4b9c4b92fd01f5921ea35f33bc201122dab038bb 100644 (file)
@@ -26,7 +26,7 @@ it('should apply diff view correctly', () => {
   applyCodeDifferences(container);
   // eslint-disable-next-line testing-library/no-container, testing-library/no-node-access
   expect(container.getElementsByClassName('code-difference-scrollable')).toMatchSnapshot(
-    'differenciatedCode'
+    'differenciatedCode',
   );
 });
 
@@ -152,6 +152,6 @@ function renderDom(codeSnippet: string) {
       dangerouslySetInnerHTML={{
         __html: codeSnippet,
       }}
-    />
+    />,
   );
 }
index 8a904ccc0a3273bf5475dddac93c3470db335b1b..119b3b9d789e391bc6dc1010ae59797700cfdaf1 100644 (file)
@@ -68,7 +68,7 @@ it('should handle weird response types', async () => {
   await expect(
     throwGlobalError(response).then(() => {
       throw new Error('Should throw');
-    })
+    }),
   ).rejects.toBe(response);
 });
 
index 57eab4065ab26b68fe67a1caed367f14c7a06819..3b4f3173a5c79bfae652dbf6c9094f42ea09ff88 100644 (file)
@@ -31,7 +31,7 @@ it('should work as expected', () => {
   addGlobalErrorMessage('test');
 
   expect(listener1).toHaveBeenCalledWith(
-    expect.objectContaining({ text: 'test', level: MessageLevel.Error })
+    expect.objectContaining({ text: 'test', level: MessageLevel.Error }),
   );
 
   listener1.mockClear();
@@ -41,9 +41,9 @@ it('should work as expected', () => {
   addGlobalSuccessMessage('test');
 
   expect(listener1).toHaveBeenCalledWith(
-    expect.objectContaining({ text: 'test', level: MessageLevel.Success })
+    expect.objectContaining({ text: 'test', level: MessageLevel.Success }),
   );
   expect(listener2).toHaveBeenCalledWith(
-    expect.objectContaining({ text: 'test', level: MessageLevel.Success })
+    expect.objectContaining({ text: 'test', level: MessageLevel.Success }),
   );
 });
index fc4c33e5ddd807e6c97ee80373ec046b65dcc181..bb5763499b9c3828d6638b06275af9579b36a0d7 100644 (file)
@@ -29,7 +29,7 @@ it('should sort issues correctly by type', () => {
   const securityHotspot = mockIssue(false, { type: 'SECURITY_HOTSPOT', key: 'security_hotspot' });
 
   expect(
-    sortByType([bug1, codeSmell, bug2, securityHotspot, vulnerability1, vulnerability2])
+    sortByType([bug1, codeSmell, bug2, securityHotspot, vulnerability1, vulnerability2]),
   ).toEqual([bug1, bug2, vulnerability1, vulnerability2, codeSmell, securityHotspot]);
 });
 
index 48e434bd494db9dc5c99076fb3ce1b023665a701..64e87dceb0277ad1391b21eea646445b0cd86682 100644 (file)
@@ -104,7 +104,7 @@ describe('translateWithParameters', () => {
       x_apples: '{0}: I have {2} apples in my {1} baskets - {3}',
     });
     expect(translateWithParameters('x_apples', 1, 2, 3, 4)).toBe(
-      '1: I have 3 apples in my 2 baskets - 4'
+      '1: I have 3 apples in my 2 baskets - 4',
     );
   });
 
@@ -155,7 +155,7 @@ describe('getLocalizedCategoryMetricName', () => {
       'metric.new_code.extra_short_name': 'metric.new_code.extra_short_name_t',
     });
     expect(getLocalizedCategoryMetricName({ key: 'new_code' })).toBe(
-      'metric.new_code.extra_short_name_t'
+      'metric.new_code.extra_short_name_t',
     );
   });
 
index b9c0d5fe4146f489a99f726fcc4427a7286c00c8..9538fe1870ffab37caaaaff5cd99ed55ba1a8a67 100644 (file)
@@ -65,7 +65,7 @@ describe('#loadL10nBundle', () => {
     const bundle = await loadL10nBundle();
 
     expect(bundle).toEqual(
-      expect.objectContaining({ locale: cachedBundle.locale, messages: cachedBundle.messages })
+      expect.objectContaining({ locale: cachedBundle.locale, messages: cachedBundle.messages }),
     );
   });
 });
index 2cc7cbc4d0963ff3d2f2d03ceebfd6b06e6c2dc5..8781c8d195c4bdf0d28d535eeee5a2384e3dfa64 100644 (file)
@@ -61,13 +61,13 @@ describe('enhanceConditionWithMeasure', () => {
     ];
 
     expect(
-      enhanceConditionWithMeasure(mockQualityGateStatusCondition({ metric: 'bugs' }), measures)
+      enhanceConditionWithMeasure(mockQualityGateStatusCondition({ metric: 'bugs' }), measures),
     ).toMatchObject({
       measure: expect.objectContaining({ metric: expect.objectContaining({ key: 'bugs' }) }),
     });
 
     expect(
-      enhanceConditionWithMeasure(mockQualityGateStatusCondition({ metric: 'new_bugs' }), measures)
+      enhanceConditionWithMeasure(mockQualityGateStatusCondition({ metric: 'new_bugs' }), measures),
     ).toMatchObject({
       measure: expect.objectContaining({
         metric: expect.objectContaining({ key: 'new_bugs' }),
@@ -86,13 +86,13 @@ describe('isPeriodBestValue', () => {
     expect(isPeriodBestValue(mockMeasureEnhanced({ period: undefined }))).toBe(false);
     expect(
       isPeriodBestValue(
-        mockMeasureEnhanced({ period: { index: 1, value: '1.0', bestValue: false } })
-      )
+        mockMeasureEnhanced({ period: { index: 1, value: '1.0', bestValue: false } }),
+      ),
     ).toBe(false);
     expect(
       isPeriodBestValue(
-        mockMeasureEnhanced({ period: { index: 1, value: '1.0', bestValue: true } })
-      )
+        mockMeasureEnhanced({ period: { index: 1, value: '1.0', bestValue: true } }),
+      ),
     ).toBe(true);
   });
 });
@@ -156,16 +156,16 @@ describe('#formatMeasure()', () => {
     expect(formatMeasure(50.89, 'PERCENT', { decimals: 2 })).toBe('50.89%');
     expect(formatMeasure(50.89, 'PERCENT', { decimals: 3 })).toBe('50.890%');
     expect(formatMeasure(50, 'PERCENT', { decimals: 0, omitExtraDecimalZeros: true })).toBe(
-      '50.0%'
+      '50.0%',
     );
     expect(formatMeasure(50, 'PERCENT', { decimals: 1, omitExtraDecimalZeros: true })).toBe(
-      '50.0%'
+      '50.0%',
     );
     expect(formatMeasure(50, 'PERCENT', { decimals: 3, omitExtraDecimalZeros: true })).toBe(
-      '50.0%'
+      '50.0%',
     );
     expect(formatMeasure(50.89, 'PERCENT', { decimals: 3, omitExtraDecimalZeros: true })).toBe(
-      '50.89%'
+      '50.89%',
     );
   });
 
index 7368b3c15a885f7466a5fe04bddb1cc9742a9074..afd407431495ffb8e122962ca8b48889be99a54a 100644 (file)
@@ -40,7 +40,7 @@ describe('isNewCodeDefinitionCompliant', () => {
     'should test for new code definition compliance properly %s',
     (newCodePeriod: NewCodeDefinition, result: boolean) => {
       expect(isNewCodeDefinitionCompliant(newCodePeriod)).toEqual(result);
-    }
+    },
   );
 });
 
@@ -74,11 +74,11 @@ describe('getNumberOfDaysDefaultValue', () => {
     (
       globalNewCodeDefinition: NewCodeDefinition | null,
       inheritedNewCodeDefinition: NewCodeDefinition | null,
-      result: string
+      result: string,
     ) => {
       expect(
-        getNumberOfDaysDefaultValue(globalNewCodeDefinition, inheritedNewCodeDefinition)
+        getNumberOfDaysDefaultValue(globalNewCodeDefinition, inheritedNewCodeDefinition),
       ).toEqual(result);
-    }
+    },
   );
 });
index 52011866a7df6c3b20cde0a79bc7eb426e19a9eb..62fb55108243780dc76c6defe65dbbbdd9b1531c 100644 (file)
@@ -34,20 +34,20 @@ describe('getPeriodLabel', () => {
 
   it('should handle date', () => {
     expect(getNewCodePeriodLabel(mockPeriod({ mode: 'date' }), formatter)).toBe(
-      'overview.period.date.'
+      'overview.period.date.',
     );
     expect(
       getNewCodePeriodLabel(
         mockPeriod({ mode: 'date', parameter: '2019-02-21T01:11:21+0100' }),
-        formatter
-      )
+        formatter,
+      ),
     ).toBe('overview.period.date.2019-02-21T01:11:21+0100');
     expect(formatter).toHaveBeenCalledTimes(1);
   });
 
   it('should handle days', () => {
     expect(getNewCodePeriodLabel(mockPeriod({ mode: 'days', modeParam: '12' }), formatter)).toBe(
-      'overview.period.days.12'
+      'overview.period.days.12',
     );
     expect(formatter).not.toHaveBeenCalled();
   });
@@ -56,28 +56,28 @@ describe('getPeriodLabel', () => {
     expect(
       getNewCodePeriodLabel(
         mockPeriod({ mode: 'previous_analysis', parameter: 'param' }),
-        formatter
-      )
+        formatter,
+      ),
     ).toBe('overview.period.previous_analysis.param');
     expect(formatter).not.toHaveBeenCalled();
   });
 
   it('should handle previous version', () => {
     expect(getNewCodePeriodLabel(mockPeriod({ mode: 'previous_version' }), formatter)).toBe(
-      'overview.period.previous_version_only_date'
+      'overview.period.previous_version_only_date',
     );
     expect(
-      getNewCodePeriodLabel(mockPeriod({ mode: 'previous_version', parameter: '7.9' }), formatter)
+      getNewCodePeriodLabel(mockPeriod({ mode: 'previous_version', parameter: '7.9' }), formatter),
     ).toBe('overview.period.previous_version.7.9');
     expect(formatter).not.toHaveBeenCalled();
   });
 
   it('should handle version', () => {
     expect(
-      getNewCodePeriodLabel(mockPeriod({ mode: 'version', modeParam: '7.2' }), formatter)
+      getNewCodePeriodLabel(mockPeriod({ mode: 'version', modeParam: '7.2' }), formatter),
     ).toBe('overview.period.version.7.2');
     expect(
-      getNewCodePeriodLabel(mockPeriod({ mode: 'previous_version', parameter: '7.9' }), formatter)
+      getNewCodePeriodLabel(mockPeriod({ mode: 'previous_version', parameter: '7.9' }), formatter),
     ).toBe('overview.period.previous_version.7.9');
     expect(formatter).not.toHaveBeenCalled();
   });
@@ -86,11 +86,11 @@ describe('getPeriodLabel', () => {
     expect(
       getNewCodePeriodLabel(
         mockPeriod({ mode: 'manual_baseline', modeParam: 'A658678DE' }),
-        formatter
-      )
+        formatter,
+      ),
     ).toBe('overview.period.manual_baseline.A658678DE');
     expect(getNewCodePeriodLabel(mockPeriod({ mode: 'manual_baseline' }), formatter)).toBe(
-      'overview.period.manual_baseline.2019-04-23T02:12:32+0100'
+      'overview.period.manual_baseline.2019-04-23T02:12:32+0100',
     );
     expect(formatter).toHaveBeenCalledTimes(1);
   });
@@ -99,11 +99,14 @@ describe('getPeriodLabel', () => {
     expect(
       getNewCodePeriodLabel(
         mockPeriod({ mode: NewCodeDefinitionType.SpecificAnalysis, parameter: '7.1' }),
-        formatter
-      )
+        formatter,
+      ),
     ).toBe('overview.period.specific_analysis.2019-04-23T02:12:32+0100');
     expect(
-      getNewCodePeriodLabel(mockPeriod({ mode: NewCodeDefinitionType.SpecificAnalysis }), formatter)
+      getNewCodePeriodLabel(
+        mockPeriod({ mode: NewCodeDefinitionType.SpecificAnalysis }),
+        formatter,
+      ),
     ).toBe('overview.period.specific_analysis.2019-04-23T02:12:32+0100');
     expect(formatter).toHaveBeenCalledTimes(2);
   });
@@ -112,11 +115,11 @@ describe('getPeriodLabel', () => {
     expect(
       getNewCodePeriodLabel(
         mockPeriod({ mode: NewCodeDefinitionType.PreviousVersion, modeParam: 'A658678DE' }),
-        formatter
-      )
+        formatter,
+      ),
     ).toBe('overview.period.previous_version.A658678DE');
     expect(
-      getNewCodePeriodLabel(mockPeriod({ mode: NewCodeDefinitionType.PreviousVersion }), formatter)
+      getNewCodePeriodLabel(mockPeriod({ mode: NewCodeDefinitionType.PreviousVersion }), formatter),
     ).toBe('overview.period.previous_version.2019-04-23T02:12:32+0100');
     expect(formatter).toHaveBeenCalledTimes(1);
   });
index 9ffeddd415a156ec320fd7df4065f3dce7ed6be6..f89c8029f5f6ee8c0e933f7783aa5648a271a6f9 100644 (file)
@@ -41,13 +41,13 @@ describe('#collapsedDirFromPath()', () => {
 
   it('should cut long path', () => {
     expect(collapsedDirFromPath('src/main/js/components/navigator/app/models/state.js')).toBe(
-      'src/.../js/components/navigator/app/models/'
+      'src/.../js/components/navigator/app/models/',
     );
   });
 
   it('should cut very long path', () => {
     expect(
-      collapsedDirFromPath('src/main/another/js/components/navigator/app/models/state.js')
+      collapsedDirFromPath('src/main/another/js/components/navigator/app/models/state.js'),
     ).toBe('src/.../js/components/navigator/app/models/');
   });
 });
@@ -77,7 +77,7 @@ describe('#fileFromPath()', () => {
 describe('#cutLongWords', () => {
   it('should cut the long work in the middle', () => {
     expect(cutLongWords('This is a reallylongwordthatdontexistforthe test')).toBe(
-      'This is a reallylongwordthatdontexistfor... test'
+      'This is a reallylongwordthatdontexistfor... test',
     );
   });
 
index 6c73785fa77e8e8341b589cda41af1d26ca6e90d..93fa41ad0fbecfc84d372bde698bcec714ea9f36 100644 (file)
@@ -29,7 +29,7 @@ describe('validateProjectKey', () => {
     expect(validateProjectKey('123')).toBe(ProjectKeyValidationResult.OnlyDigits);
     // Cannot be more than 400 chars long.
     expect(validateProjectKey(new Array(PROJECT_KEY_MAX_LEN + 1).fill('a').join(''))).toBe(
-      ProjectKeyValidationResult.TooLong
+      ProjectKeyValidationResult.TooLong,
     );
     // Cannot be empty.
     expect(validateProjectKey('')).toBe(ProjectKeyValidationResult.Empty);
index 1b63083c9467522164f088874e190c5cf983a719..b9bff4a5641a1fc84d87739c2acc3d9949bd9fab 100644 (file)
@@ -45,8 +45,8 @@ describe('extractStatusConditionsFromApplicationStatusChildProject', () => {
   it('should correclty extract the conditions for the application child project status', () => {
     expect(
       extractStatusConditionsFromApplicationStatusChildProject(
-        mockQualityGateApplicationStatus().projects[0]
-      )
+        mockQualityGateApplicationStatus().projects[0],
+      ),
     ).toEqual([
       {
         actual: '10',
index ea446cb9d2200576b31a2edfeeeeb75392414617..d2bf1d8c9a9827bd13ccb268e6d641b29e28b8c4 100644 (file)
@@ -61,7 +61,7 @@ describe('getJSON', () => {
     getJSON(url, { data: 'test' });
     expect(window.fetch).toHaveBeenCalledWith(
       url + '?data=test',
-      expect.objectContaining({ method: 'GET' })
+      expect.objectContaining({ method: 'GET' }),
     );
   });
 });
@@ -81,7 +81,7 @@ describe('getText', () => {
     getText(url, { data: 'test' });
     expect(window.fetch).toHaveBeenCalledWith(
       url + '?data=test',
-      expect.objectContaining({ method: 'GET' })
+      expect.objectContaining({ method: 'GET' }),
     );
   });
 });
@@ -97,7 +97,7 @@ describe('parseError', () => {
   it('should parse error and return concatenated messages', async () => {
     const response = new Response(
       JSON.stringify({ errors: [{ msg: 'Error1' }, { msg: 'Error2' }] }),
-      { status: HttpStatus.BadRequest }
+      { status: HttpStatus.BadRequest },
     );
     await expect(parseError(response)).resolves.toBe('Error1. Error2');
   });
@@ -145,7 +145,7 @@ describe('postJSON', () => {
     postJSON(url, { data: 'test' });
     expect(window.fetch).toHaveBeenCalledWith(
       url,
-      expect.objectContaining({ body: 'data=test', method: 'POST' })
+      expect.objectContaining({ body: 'data=test', method: 'POST' }),
     );
   });
 });
@@ -169,7 +169,7 @@ describe('postJSONBody', () => {
         headers: { Accept: 'application/json', 'Content-Type': 'application/json' },
         body: '{"nested":{"data":"test","withArray":[1,2]}}',
         method: 'POST',
-      })
+      }),
     );
   });
 });
@@ -183,7 +183,7 @@ describe('post', () => {
 
     expect(window.fetch).toHaveBeenCalledWith(
       url,
-      expect.objectContaining({ body: 'data=test', method: 'POST' })
+      expect.objectContaining({ body: 'data=test', method: 'POST' }),
     );
     expect(response.json).not.toHaveBeenCalled();
     expect(response.text).not.toHaveBeenCalled();
@@ -197,7 +197,7 @@ describe('post', () => {
 
     expect(window.fetch).toHaveBeenCalledWith(
       url,
-      expect.objectContaining({ body: 'dataArray=1&dataArray=2', method: 'POST' })
+      expect.objectContaining({ body: 'dataArray=1&dataArray=2', method: 'POST' }),
     );
   });
 });
@@ -220,7 +220,7 @@ describe('requestTryAndRepeatUntil', () => {
     const promiseResult = requestTryAndRepeatUntil(
       apiCall,
       { max: -1, slowThreshold: -20 },
-      stopRepeat
+      stopRepeat,
     );
 
     for (let i = 1; i < 5; i++) {
@@ -245,7 +245,7 @@ describe('requestTryAndRepeatUntil', () => {
       apiCall,
       { max: -1, slowThreshold: -20 },
       stopRepeat,
-      [HttpStatus.GatewayTimeout]
+      [HttpStatus.GatewayTimeout],
     );
 
     for (let i = 1; i < 5; i++) {
@@ -268,7 +268,7 @@ describe('requestTryAndRepeatUntil', () => {
     const promiseResult = requestTryAndRepeatUntil(
       apiCall,
       { max: 3, slowThreshold: 0 },
-      stopRepeat
+      stopRepeat,
     );
 
     for (let i = 1; i < 3; i++) {
@@ -290,7 +290,7 @@ describe('requestTryAndRepeatUntil', () => {
     const promiseResult = requestTryAndRepeatUntil(
       apiCall,
       { max: 5, slowThreshold: 3 },
-      stopRepeat
+      stopRepeat,
     );
 
     for (let i = 1; i < 3; i++) {
index de90bc2512edd291db0806b1128158d22e555d23..8ea1e4da43ccc9a856a7338f439258c895236c05 100644 (file)
@@ -31,7 +31,7 @@ describe('sanitizeStringRestricted', () => {
     as well. This is <b>Amazing</b> and this <strong>bold</strong> <br>
     and <code>code.is.accepted too</code>
     </p>
-  `)
+  `),
     ).toBe(`
     Hi <a target="_blank" href="http://example.com">this</a> is <i>in italics</i> and <ul>
     <li> lists </li>
@@ -125,7 +125,7 @@ describe('sanitizeStringRestricted', () => {
     <span title=malformed attribs' do=don't id=foo checked onclick="a<b">Bar</span>`);
 
     expect(clean.replace(/\s+/g, '')).toBe(
-      `Clickyalert("&lt;b&gt;hi&lt;/b&gt;");&lt;divid=notarealtagonclick=notcode()&gt;&lt;notatag&lt;&lt;&lt;allinonetextblock&gt;&gt;&gt;&lt;%#somephpcodeherewrite("$horriblySyntacticConstruct1");%&gt;*/alert('hi');*/alert('hi');--&gt;*/alert('hi');--&gt;'}--&gt;--&gt;&lt;!--Zoicks--&gt;sectioninHTML]]&gt;<ahref=""></a><ahref="/">Bar</a>`
+      `Clickyalert("&lt;b&gt;hi&lt;/b&gt;");&lt;divid=notarealtagonclick=notcode()&gt;&lt;notatag&lt;&lt;&lt;allinonetextblock&gt;&gt;&gt;&lt;%#somephpcodeherewrite("$horriblySyntacticConstruct1");%&gt;*/alert('hi');*/alert('hi');--&gt;*/alert('hi');--&gt;'}--&gt;--&gt;&lt;!--Zoicks--&gt;sectioninHTML]]&gt;<ahref=""></a><ahref="/">Bar</a>`,
     );
   });
 });
index 09bd047a51f64c61ccec5f41a66d678befa57baa..b6a284f1d8a5390963d2de79cf6d6b75452a57ee 100644 (file)
@@ -47,7 +47,7 @@ describe('renderCWECategory', () => {
   };
   it('should render cwe categories correctly', () => {
     expect(renderCWECategory(standards, '1004')).toEqual(
-      "CWE-1004 - Sensitive Cookie Without 'HttpOnly' Flag"
+      "CWE-1004 - Sensitive Cookie Without 'HttpOnly' Flag",
     );
     expect(renderCWECategory(standards, '124')).toEqual('CWE-124');
     expect(renderCWECategory(standards, 'unknown')).toEqual('No CWE associated');
@@ -114,7 +114,7 @@ describe('renderPciDss32Category', () => {
   };
   it('should render Pci Dss 3.2 correctly', () => {
     expect(renderPciDss32Category(standards, '1')).toEqual(
-      '1 - Install and maintain a firewall configuration to protect cardholder data'
+      '1 - Install and maintain a firewall configuration to protect cardholder data',
     );
     expect(renderPciDss32Category(standards, '1.1')).toEqual('1.1');
   });
@@ -136,7 +136,7 @@ describe('renderPciDss40Category', () => {
   };
   it('should render Pci Dss 4.0 correctly', () => {
     expect(renderPciDss40Category(standards, '1')).toEqual(
-      '1 - Install and maintain a firewall configuration to protect cardholder data'
+      '1 - Install and maintain a firewall configuration to protect cardholder data',
     );
     expect(renderPciDss40Category(standards, '1.1')).toEqual('1.1');
   });
@@ -185,10 +185,10 @@ describe('renderSonarSourceSecurityCategory', () => {
   };
   it('should render sonarsource categories correctly', () => {
     expect(renderSonarSourceSecurityCategory(standards, 'xss')).toEqual(
-      'Cross-Site Scripting (XSS)'
+      'Cross-Site Scripting (XSS)',
     );
     expect(renderSonarSourceSecurityCategory(standards, 'xss', true)).toEqual(
-      'SONAR Cross-Site Scripting (XSS)'
+      'SONAR Cross-Site Scripting (XSS)',
     );
     expect(renderSonarSourceSecurityCategory(standards, 'others')).toEqual('Others');
     expect(renderSonarSourceSecurityCategory(standards, 'others', true)).toEqual('Others');
index f0b722f9ef1682396452ec298839f229f367e326..4d015fe89a660e254e858829821fdc56dee3e5f6 100644 (file)
@@ -31,7 +31,7 @@ describe('stringify', () => {
     };
 
     expect(stringify(obj)).toEqual(
-      'prop1=a%20string&prop2=123&prop3=true&prop4=&prop5=9&prop5=8&prop5=7&prop6='
+      'prop1=a%20string&prop2=123&prop3=true&prop4=&prop5=9&prop5=8&prop5=7&prop6=',
     );
   });
 
index f974915cb562b137a754bb3236fa71ffece3fef1..9920338721c2a45992da6017fca5bb7aacb0624a 100644 (file)
@@ -30,13 +30,13 @@ describe('#decodeJwt', () => {
     };
     expect(
       decodeJwt(
-        'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJhcmk6Y2xvdWQ6Yml0YnVja2V0OjphcHAvezMyNzcxM2VkLWYxYjItNDY1OS05YzkxLWM4ZWNmOGJlN2YzZX0vc29uYXJjbG91ZC1ncmVnIiwiaWF0IjoxNTQxMDU4NjA1LCJxc2giOiJhNmM5M2FkZGQ5NzFjMDVkMDhkYTFlMTY2OWMyNjQwZmJhNTI5ZTk4ZmJiNWIyYjllZmZhZGYwMGJmNDg0Mjc3IiwiYXVkIjoiYXJpOmNsb3VkOmJpdGJ1Y2tldDo6YXBwL3szMjc3MTNlZC1mMWIyLTQ2NTktOWM5MS1jOGVjZjhiZTdmM2V9L3NvbmFyY2xvdWQtZ3JlZyIsImV4cCI6MTU0MTA2MjIwNX0.5_0dFh_TPT_UorDewu2JEErgQE2ZnzBjvCDrOThseRo'
-      )
+        'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJhcmk6Y2xvdWQ6Yml0YnVja2V0OjphcHAvezMyNzcxM2VkLWYxYjItNDY1OS05YzkxLWM4ZWNmOGJlN2YzZX0vc29uYXJjbG91ZC1ncmVnIiwiaWF0IjoxNTQxMDU4NjA1LCJxc2giOiJhNmM5M2FkZGQ5NzFjMDVkMDhkYTFlMTY2OWMyNjQwZmJhNTI5ZTk4ZmJiNWIyYjllZmZhZGYwMGJmNDg0Mjc3IiwiYXVkIjoiYXJpOmNsb3VkOmJpdGJ1Y2tldDo6YXBwL3szMjc3MTNlZC1mMWIyLTQ2NTktOWM5MS1jOGVjZjhiZTdmM2V9L3NvbmFyY2xvdWQtZ3JlZyIsImV4cCI6MTU0MTA2MjIwNX0.5_0dFh_TPT_UorDewu2JEErgQE2ZnzBjvCDrOThseRo',
+      ),
     ).toEqual(claims);
     expect(
       decodeJwt(
-        'eyJpc3MiOiJhcmk6Y2xvdWQ6Yml0YnVja2V0OjphcHAvezMyNzcxM2VkLWYxYjItNDY1OS05YzkxLWM4ZWNmOGJlN2YzZX0vc29uYXJjbG91ZC1ncmVnIiwiaWF0IjoxNTQxMDU4NjA1LCJxc2giOiJhNmM5M2FkZGQ5NzFjMDVkMDhkYTFlMTY2OWMyNjQwZmJhNTI5ZTk4ZmJiNWIyYjllZmZhZGYwMGJmNDg0Mjc3IiwiYXVkIjoiYXJpOmNsb3VkOmJpdGJ1Y2tldDo6YXBwL3szMjc3MTNlZC1mMWIyLTQ2NTktOWM5MS1jOGVjZjhiZTdmM2V9L3NvbmFyY2xvdWQtZ3JlZyIsImV4cCI6MTU0MTA2MjIwNX0'
-      )
+        'eyJpc3MiOiJhcmk6Y2xvdWQ6Yml0YnVja2V0OjphcHAvezMyNzcxM2VkLWYxYjItNDY1OS05YzkxLWM4ZWNmOGJlN2YzZX0vc29uYXJjbG91ZC1ncmVnIiwiaWF0IjoxNTQxMDU4NjA1LCJxc2giOiJhNmM5M2FkZGQ5NzFjMDVkMDhkYTFlMTY2OWMyNjQwZmJhNTI5ZTk4ZmJiNWIyYjllZmZhZGYwMGJmNDg0Mjc3IiwiYXVkIjoiYXJpOmNsb3VkOmJpdGJ1Y2tldDo6YXBwL3szMjc3MTNlZC1mMWIyLTQ2NTktOWM5MS1jOGVjZjhiZTdmM2V9L3NvbmFyY2xvdWQtZ3JlZyIsImV4cCI6MTU0MTA2MjIwNX0',
+      ),
     ).toEqual(claims);
   });
 });
@@ -44,7 +44,7 @@ describe('#decodeJwt', () => {
 describe('#latinize', () => {
   it('should remove diacritics and replace them with normal letters', () => {
     expect(latinize('âêîôûŵŷäëïöüẅÿàèìòùẁỳáéíóúẃýøāēīūčģķļņšž')).toBe(
-      'aeiouwyaeiouwyaeiouwyaeiouwyoaeiucgklnsz'
+      'aeiouwyaeiouwyaeiouwyaeiouwyoaeiucgklnsz',
     );
     expect(latinize('ASDFGhjklQWERTz')).toBe('ASDFGhjklQWERTz');
   });
index b18ec26c2258029e5941dabef42cdd8ddbf6a75e..cab23e1ce0bdc79f90b3ec3db7d7c33c3d6a9fd2 100644 (file)
@@ -65,8 +65,8 @@ describe('getAvailableExpirationOptions', () => {
             value,
             label: `users.tokens.expiration.${value.toString()}`,
           };
-        }
-      )
+        },
+      ),
     );
   });
 
@@ -80,7 +80,7 @@ describe('getAvailableExpirationOptions', () => {
           value,
           label: `users.tokens.expiration.${value.toString()}`,
         };
-      })
+      }),
     );
   });
 
index f02f99ccd6625727c68a202a89b4466b29e13861..6e19414632bf0a81fdd69e265d3f856e58262289 100644 (file)
@@ -58,7 +58,7 @@ describe('#convertGithubApiUrlToLink', () => {
   it('should correctly convert a GitHub API URL to a Web URL', () => {
     expect(convertGithubApiUrlToLink('https://api.github.com')).toBe('https://github.com');
     expect(convertGithubApiUrlToLink('https://company.github.com/api/v3')).toBe(
-      'https://company.github.com'
+      'https://company.github.com',
     );
   });
 });
@@ -97,7 +97,7 @@ describe('#getComponentIssuesUrl', () => {
       expect.objectContaining({
         pathname: '/project/issues',
         search: queryToSearch({ id: SIMPLE_COMPONENT_KEY }),
-      })
+      }),
     );
   });
 
@@ -106,7 +106,7 @@ describe('#getComponentIssuesUrl', () => {
       expect.objectContaining({
         pathname: '/project/issues',
         search: queryToSearch({ resolved: 'false', id: SIMPLE_COMPONENT_KEY }),
-      })
+      }),
     );
   });
 });
@@ -117,7 +117,7 @@ describe('#getComponentSecurityHotspotsUrl', () => {
       expect.objectContaining({
         pathname: '/security_hotspots',
         search: queryToSearch({ id: SIMPLE_COMPONENT_KEY }),
-      })
+      }),
     );
   });
 
@@ -132,7 +132,7 @@ describe('#getComponentSecurityHotspotsUrl', () => {
         [SecurityStandard.PCI_DSS_3_2]: '4.2',
         [SecurityStandard.PCI_DSS_4_0]: '4.1',
         ignoredParam: '1234',
-      })
+      }),
     ).toEqual(
       expect.objectContaining({
         pathname: '/security_hotspots',
@@ -146,7 +146,7 @@ describe('#getComponentSecurityHotspotsUrl', () => {
           [SecurityStandard.PCI_DSS_3_2]: '4.2',
           [SecurityStandard.PCI_DSS_4_0]: '4.1',
         }),
-      })
+      }),
     );
   });
 });
@@ -157,7 +157,7 @@ describe('#getComponentOverviewUrl', () => {
       expect.objectContaining({
         pathname: '/portfolio',
         search: queryToSearch({ id: SIMPLE_COMPONENT_KEY }),
-      })
+      }),
     );
   });
   it('should return a portfolio url for a subportfolio', () => {
@@ -165,7 +165,7 @@ describe('#getComponentOverviewUrl', () => {
       expect.objectContaining({
         pathname: '/portfolio',
         search: queryToSearch({ id: SIMPLE_COMPONENT_KEY }),
-      })
+      }),
     );
   });
   it('should return a dashboard url for a project', () => {
@@ -173,7 +173,7 @@ describe('#getComponentOverviewUrl', () => {
       expect.objectContaining({
         pathname: '/dashboard',
         search: queryToSearch({ id: SIMPLE_COMPONENT_KEY }),
-      })
+      }),
     );
   });
   it('should return correct dashboard url for a project when navigating from new code', () => {
@@ -182,13 +182,13 @@ describe('#getComponentOverviewUrl', () => {
         SIMPLE_COMPONENT_KEY,
         ComponentQualifier.Project,
         undefined,
-        CodeScope.New
-      )
+        CodeScope.New,
+      ),
     ).toEqual(
       expect.objectContaining({
         pathname: '/dashboard',
         search: queryToSearch({ id: SIMPLE_COMPONENT_KEY, code_scope: 'new' }),
-      })
+      }),
     );
   });
   it('should return correct dashboard url for a project when navigating from overall code', () => {
@@ -197,13 +197,13 @@ describe('#getComponentOverviewUrl', () => {
         SIMPLE_COMPONENT_KEY,
         ComponentQualifier.Project,
         undefined,
-        CodeScope.Overall
-      )
+        CodeScope.Overall,
+      ),
     ).toEqual(
       expect.objectContaining({
         pathname: '/dashboard',
         search: queryToSearch({ id: SIMPLE_COMPONENT_KEY, code_scope: 'overall' }),
-      })
+      }),
     );
   });
   it('should return a dashboard url for an app', () => {
@@ -211,7 +211,7 @@ describe('#getComponentOverviewUrl', () => {
       expect.objectContaining({
         pathname: '/dashboard',
         search: queryToSearch({ id: SIMPLE_COMPONENT_KEY }),
-      })
+      }),
     );
   });
 });
@@ -219,34 +219,34 @@ describe('#getComponentOverviewUrl', () => {
 describe('#getComponentDrilldownUrl', () => {
   it('should return component drilldown url', () => {
     expect(
-      getComponentDrilldownUrl({ componentKey: SIMPLE_COMPONENT_KEY, metric: METRIC })
+      getComponentDrilldownUrl({ componentKey: SIMPLE_COMPONENT_KEY, metric: METRIC }),
     ).toEqual(
       expect.objectContaining({
         pathname: '/component_measures',
         search: queryToSearch({ id: SIMPLE_COMPONENT_KEY, metric: METRIC }),
-      })
+      }),
     );
   });
 
   it('should not encode component key', () => {
     expect(
-      getComponentDrilldownUrl({ componentKey: COMPLEX_COMPONENT_KEY, metric: METRIC })
+      getComponentDrilldownUrl({ componentKey: COMPLEX_COMPONENT_KEY, metric: METRIC }),
     ).toEqual(
       expect.objectContaining({
         pathname: '/component_measures',
         search: queryToSearch({ id: COMPLEX_COMPONENT_KEY, metric: METRIC }),
-      })
+      }),
     );
   });
 
   it('should add asc param only when its list view', () => {
     expect(
-      getComponentDrilldownUrl({ componentKey: SIMPLE_COMPONENT_KEY, metric: METRIC, asc: false })
+      getComponentDrilldownUrl({ componentKey: SIMPLE_COMPONENT_KEY, metric: METRIC, asc: false }),
     ).toEqual(
       expect.objectContaining({
         pathname: '/component_measures',
         search: queryToSearch({ id: SIMPLE_COMPONENT_KEY, metric: METRIC }),
-      })
+      }),
     );
 
     expect(
@@ -255,7 +255,7 @@ describe('#getComponentDrilldownUrl', () => {
         metric: METRIC,
         listView: true,
         asc: false,
-      })
+      }),
     ).toEqual(
       expect.objectContaining({
         pathname: '/component_measures',
@@ -265,7 +265,7 @@ describe('#getComponentDrilldownUrl', () => {
           view: 'list',
           asc: 'false',
         }),
-      })
+      }),
     );
   });
 });
@@ -273,7 +273,7 @@ describe('#getComponentDrilldownUrl', () => {
 describe('#getComponentDrilldownUrlWithSelection', () => {
   it('should return component drilldown url with selection', () => {
     expect(
-      getComponentDrilldownUrlWithSelection(SIMPLE_COMPONENT_KEY, COMPLEX_COMPONENT_KEY, METRIC)
+      getComponentDrilldownUrlWithSelection(SIMPLE_COMPONENT_KEY, COMPLEX_COMPONENT_KEY, METRIC),
     ).toEqual(
       expect.objectContaining({
         pathname: '/component_measures',
@@ -282,7 +282,7 @@ describe('#getComponentDrilldownUrlWithSelection', () => {
           metric: METRIC,
           selected: COMPLEX_COMPONENT_KEY,
         }),
-      })
+      }),
     );
   });
 
@@ -292,8 +292,8 @@ describe('#getComponentDrilldownUrlWithSelection', () => {
         SIMPLE_COMPONENT_KEY,
         COMPLEX_COMPONENT_KEY,
         METRIC,
-        mockBranch({ name: 'foo' })
-      )
+        mockBranch({ name: 'foo' }),
+      ),
     ).toEqual(
       expect.objectContaining({
         pathname: '/component_measures',
@@ -303,7 +303,7 @@ describe('#getComponentDrilldownUrlWithSelection', () => {
           branch: 'foo',
           selected: COMPLEX_COMPONENT_KEY,
         }),
-      })
+      }),
     );
   });
 
@@ -314,8 +314,8 @@ describe('#getComponentDrilldownUrlWithSelection', () => {
         COMPLEX_COMPONENT_KEY,
         METRIC,
         undefined,
-        MeasurePageView.list
-      )
+        MeasurePageView.list,
+      ),
     ).toEqual(
       expect.objectContaining({
         pathname: '/component_measures',
@@ -325,7 +325,7 @@ describe('#getComponentDrilldownUrlWithSelection', () => {
           view: MeasurePageView.list,
           selected: COMPLEX_COMPONENT_KEY,
         }),
-      })
+      }),
     );
 
     expect(
@@ -334,8 +334,8 @@ describe('#getComponentDrilldownUrlWithSelection', () => {
         COMPLEX_COMPONENT_KEY,
         METRIC,
         mockMainBranch(),
-        MeasurePageView.treemap
-      )
+        MeasurePageView.treemap,
+      ),
     ).toEqual(
       expect.objectContaining({
         pathname: '/component_measures',
@@ -345,7 +345,7 @@ describe('#getComponentDrilldownUrlWithSelection', () => {
           view: MeasurePageView.treemap,
           selected: COMPLEX_COMPONENT_KEY,
         }),
-      })
+      }),
     );
 
     expect(
@@ -354,8 +354,8 @@ describe('#getComponentDrilldownUrlWithSelection', () => {
         COMPLEX_COMPONENT_KEY,
         METRIC,
         mockPullRequest({ key: '1' }),
-        MeasurePageView.tree
-      )
+        MeasurePageView.tree,
+      ),
     ).toEqual(
       expect.objectContaining({
         pathname: '/component_measures',
@@ -365,7 +365,7 @@ describe('#getComponentDrilldownUrlWithSelection', () => {
           pullRequest: '1',
           selected: COMPLEX_COMPONENT_KEY,
         }),
-      })
+      }),
     );
   });
 });
@@ -434,7 +434,7 @@ describe('#getPathUrlAsString', () => {
       getPathUrlAsString({
         pathname: '/dashboard',
         search: queryToSearch({ id: SIMPLE_COMPONENT_KEY }),
-      })
+      }),
     ).toBe('/dashboard?id=' + SIMPLE_COMPONENT_KEY);
   });
 
@@ -443,7 +443,7 @@ describe('#getPathUrlAsString', () => {
       getPathUrlAsString({
         pathname: '/dashboard',
         search: queryToSearch({ id: COMPLEX_COMPONENT_KEY }),
-      })
+      }),
     ).toBe('/dashboard?id=' + COMPLEX_COMPONENT_KEY_ENCODED);
   });
 
@@ -510,7 +510,7 @@ describe('queryToSearch', () => {
     };
 
     expect(queryToSearch(query)).toBe(
-      '?b1=true&b2=false&normalString=hello&author=GRRM&author=JKR&author=Stross'
+      '?b1=true&b2=false&normalString=hello&author=GRRM&author=JKR&author=Stross',
     );
   });
 
index db3483a25e4beb6ed60c89185dab839119f3b48c..6be4278504ef13184c22ffd1d982fb7a1939f717 100644 (file)
@@ -32,8 +32,8 @@ describe('isSameHomePage', () => {
           type: 'APPLICATION',
           branch: 'test-branch',
           component: 'test-component',
-        }
-      )
+        },
+      ),
     ).toBe(true);
 
     expect(
@@ -45,8 +45,8 @@ describe('isSameHomePage', () => {
         },
         {
           type: 'ISSUES',
-        }
-      )
+        },
+      ),
     ).toBe(false);
 
     expect(
@@ -60,8 +60,8 @@ describe('isSameHomePage', () => {
           type: 'APPLICATION',
           branch: 'test-branch-1',
           component: 'test-component',
-        }
-      )
+        },
+      ),
     ).toBe(false);
 
     expect(
@@ -75,8 +75,8 @@ describe('isSameHomePage', () => {
           type: 'APPLICATION',
           branch: 'test-branch',
           component: 'test-component-1',
-        }
-      )
+        },
+      ),
     ).toBe(false);
   });
 });
index 342c09ea859fb1f1a07a7edd20616b379d7a45c9..e93f81b3d199a10b93c1cd79f3ed9a3f26c144e8 100644 (file)
@@ -83,13 +83,13 @@ export function getBrancheLikesAsTree(branchLikes: BranchLike[]): BranchLikeTree
   const mainBranch = branchLikes.find(isMainBranch);
   const branches = orderBy(
     branchLikes.filter(isBranch).filter((b) => !isMainBranch(b)),
-    (b) => b.name
+    (b) => b.name,
   );
   const pullRequests = orderBy(branchLikes.filter(isPullRequest), (b) => parseInt(b.key, 10), [
     'desc',
   ]);
   const parentlessPullRequests = pullRequests.filter(
-    (pr) => !pr.isOrphan && ![mainBranch, ...branches].find((b) => !!b && b.name === pr.base)
+    (pr) => !pr.isOrphan && ![mainBranch, ...branches].find((b) => !!b && b.name === pr.base),
   );
   const orphanPullRequests = pullRequests.filter((pr) => pr.isOrphan);
 
@@ -115,7 +115,7 @@ export function getBrancheLikesAsTree(branchLikes: BranchLike[]): BranchLikeTree
 
 export function getBranchLikeQuery(
   branchLike?: BranchLike,
-  includeMainBranch = false
+  includeMainBranch = false,
 ): BranchParameters {
   if (isBranch(branchLike) && (includeMainBranch || !isMainBranch(branchLike))) {
     return { branch: branchLike.name };
@@ -128,7 +128,7 @@ export function getBranchLikeQuery(
 // Create branch object from branch name or pull request key
 export function fillBranchLike(
   branch?: string,
-  pullRequest?: string
+  pullRequest?: string,
 ): Branch | PullRequest | undefined {
   if (branch) {
     return {
index 80f2ec8fb714851863ebf175df7ea751d0252dad..f4884a8171314a1d1114dc70bd83269011afcaec 100644 (file)
@@ -37,7 +37,7 @@ export default function applyCodeDifferences(element: Element | null) {
     }
     const [markedNonCompliant, markedCompliantCode] = differentiateCode(
       noncompliant.innerHTML,
-      compliant.innerHTML
+      compliant.innerHTML,
     );
 
     replaceInDom(noncompliant, markedNonCompliant);
@@ -52,14 +52,14 @@ function getExamplesFromDom(element: Element) {
     Object.values(
       groupBy(
         pres.filter((e) => e.getAttribute('data-diff-id') !== undefined),
-        (e) => e.getAttribute('data-diff-id')
-      )
+        (e) => e.getAttribute('data-diff-id'),
+      ),
     )
       // If we have 1 or 3+ example we can't display any differences
       .filter((diffsBlock) => diffsBlock.length === NUMBER_OF_EXAMPLES)
       .map(
         (diffBlock) =>
-          keyBy(diffBlock, (block) => block.getAttribute('data-diff-type')) as DiffBlock
+          keyBy(diffBlock, (block) => block.getAttribute('data-diff-type')) as DiffBlock,
       )
   );
 }
index eab62cefbcfe5f8fedfc16636ef564ce52634d2d..48c30de2327ec7541fc87499607648183a808a15 100644 (file)
@@ -20,7 +20,7 @@
 import { ComponentMeasure, ComponentMeasureEnhanced } from '../types/types';
 
 export function getComponentMeasureUniqueKey(
-  component?: ComponentMeasure | ComponentMeasureEnhanced
+  component?: ComponentMeasure | ComponentMeasureEnhanced,
 ) {
   return component ? [component.key, component.branch].filter((s) => !!s).join('/') : undefined;
 }
index 79d52d9a2a47dfb03105ba213bac528fe565a2f8..e21ce4b4a8526cce2779e39cd42057682630c17c 100644 (file)
@@ -60,7 +60,7 @@ export function getAllEditionsAbove(currentEdition?: EditionKey) {
 
 export function getEditionUrl(
   edition: Edition,
-  data: { serverId?: string; ncloc?: number; sourceEdition?: EditionKey }
+  data: { serverId?: string; ncloc?: number; sourceEdition?: EditionKey },
 ) {
   let url = edition.homeUrl;
   const query = new URLSearchParams(omitNil(data)).toString();
index 47d7331a698c33e3b2807582f818cc054372b619..1111e74979beb11a90988632fbfa858313be957b 100644 (file)
@@ -41,7 +41,7 @@ function addMessage(text: string, level: MessageLevel) {
       id: uniqueId('global-message-'),
       level,
       text,
-    })
+    }),
   );
 }
 
index 7572276d6c4e0f1eea8b04e78af95a254cf09620..df9c80dc754cf07d1abde08f42eb7da86d217397 100644 (file)
@@ -40,7 +40,7 @@ function injectRelational(
   issue: Dict<any>,
   source: any[] | undefined,
   baseField: string,
-  lookupField: string
+  lookupField: string,
 ) {
   const newFields: Dict<any> = {};
   const baseValue = issue[baseField];
@@ -102,7 +102,7 @@ const FLOW_ORDER_MAP = {
 
 function splitFlows(
   issue: RawIssue,
-  components: Component[] = []
+  components: Component[] = [],
 ): { secondaryLocations: FlowLocation[]; flows: FlowLocation[][]; flowsWithType: Flow[] } {
   if (issue.flows?.some((flow) => flow.type !== undefined)) {
     const flowsWithType = issue.flows.filter((flow) => flow.type !== undefined) as Flow[];
@@ -122,7 +122,7 @@ function splitFlows(
       flow.map((location) => {
         const component = components.find((component) => component.key === location.component);
         return { ...location, componentName: component && component.name };
-      })
+      }),
     );
 
   const onlySecondaryLocations = parsedFlows.every((flow) => flow.length === 1);
@@ -140,7 +140,7 @@ function orderLocations(locations: FlowLocation[]) {
   return sortBy(
     locations,
     (location) => location.textRange && location.textRange.startLine,
-    (location) => location.textRange && location.textRange.startOffset
+    (location) => location.textRange && location.textRange.startOffset,
   );
 }
 
@@ -148,7 +148,7 @@ export function parseIssueFromResponse(
   issue: RawIssue,
   components?: Component[],
   users?: UserBase[],
-  rules?: Rule[]
+  rules?: Rule[],
 ): Issue {
   return {
     ...issue,
index 2298c3b6de27fcc362720d842d36d5f82fc79363..de7f86afc2830870d7da4bd521ae58dc612850cd 100644 (file)
@@ -22,13 +22,13 @@ export function isShortcut(event: KeyboardEvent): boolean {
 }
 
 export function isTextarea(
-  event: KeyboardEvent
+  event: KeyboardEvent,
 ): event is KeyboardEvent & { target: HTMLTextAreaElement } {
   return event.target instanceof HTMLTextAreaElement;
 }
 
 export function isInput(
-  event: KeyboardEvent
+  event: KeyboardEvent,
 ): event is KeyboardEvent & { target: HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement } {
   return (
     event.target instanceof HTMLInputElement ||
index 80ad53da2d616ac0d0fc6734e368764092e833c4..875b32315935383722325d571d75bef7873a7fad 100644 (file)
@@ -60,7 +60,7 @@ export function translateWithParameters(
 
 export function getLocalizedMetricName(
   metric: { key: string; name?: string },
-  short = false
+  short = false,
 ): string {
   const bundleKey = `metric.${metric.key}.${short ? 'short_name' : 'name'}`;
 
index 53aa06d8d2c13605080025b5fd5753e58279d878..d55d8ccac21e4a52eba70a7a6fcd97833ac76a1b 100644 (file)
@@ -91,7 +91,7 @@ export async function loadL10nBundle() {
       locale: effectiveLocale,
       messages,
     },
-    cache
+    cache,
   );
 
   return intl;
index 63ed58f4863ff7b65a95ecd4868a103967946584..6eea63084122d823e9fec11f20ce649e1fe507bb 100644 (file)
@@ -29,7 +29,7 @@ import { isDefined } from './types';
 
 export function enhanceMeasuresWithMetrics(
   measures: Measure[],
-  metrics: Metric[]
+  metrics: Metric[],
 ): MeasureEnhanced[] {
   return measures
     .map((measure) => {
@@ -41,7 +41,7 @@ export function enhanceMeasuresWithMetrics(
 
 export function enhanceConditionWithMeasure(
   condition: QualityGateStatusCondition,
-  measures: MeasureEnhanced[]
+  measures: MeasureEnhanced[],
 ): QualityGateStatusConditionEnhanced | undefined {
   const measure = measures.find((m) => m.metric.key === condition.metric);
 
@@ -85,7 +85,7 @@ interface Formatter {
 export function formatMeasure(
   value: string | number | undefined,
   type: string,
-  options?: any
+  options?: any,
 ): string {
   const formatter = getFormatter(type);
   // eslint-disable-next-line react-hooks/rules-of-hooks
@@ -125,7 +125,7 @@ export function getShortType(type: string): string {
 function useFormatter(
   value: string | number | undefined,
   formatter: Formatter,
-  options?: any
+  options?: any,
 ): string {
   return value !== undefined && value !== '' ? formatter(value, options) : '';
 }
@@ -148,7 +148,7 @@ function getFormatter(type: string): Formatter {
 function numberFormatter(
   value: string | number,
   minimumFractionDigits = 0,
-  maximumFractionDigits = minimumFractionDigits
+  maximumFractionDigits = minimumFractionDigits,
 ) {
   const { format } = new Intl.NumberFormat(getCurrentLocale(), {
     minimumFractionDigits,
@@ -179,7 +179,7 @@ const shortIntFormats = [
 
 function shortIntFormatter(
   value: string | number,
-  option?: { roundingFunc?: (x: number) => number }
+  option?: { roundingFunc?: (x: number) => number },
 ): string {
   const roundingFunc = (option && option.roundingFunc) || undefined;
   if (typeof value === 'string') {
@@ -194,7 +194,7 @@ function shortIntFormatter(
         numberFormatter(
           numberRound(value / formatUnit, Math.pow(10, fraction), roundingFunc),
           0,
-          fraction
+          fraction,
         ) + translate(suffix)
       );
     }
@@ -206,7 +206,7 @@ function shortIntFormatter(
 function numberRound(
   value: number,
   fraction: number = 1000,
-  roundingFunc: (x: number) => number = Math.round
+  roundingFunc: (x: number) => number = Math.round,
 ) {
   return roundingFunc(value * fraction) / fraction;
 }
@@ -217,7 +217,7 @@ function floatFormatter(value: string | number): string {
 
 function percentFormatter(
   value: string | number,
-  { decimals, omitExtraDecimalZeros }: { decimals?: number; omitExtraDecimalZeros?: boolean } = {}
+  { decimals, omitExtraDecimalZeros }: { decimals?: number; omitExtraDecimalZeros?: boolean } = {},
 ): string {
   if (typeof value === 'string') {
     value = parseFloat(value);
@@ -308,14 +308,14 @@ function formatDuration(isNegative: boolean, days: number, hours: number, minute
     formatted = addSpaceIfNeeded(formatted);
     formatted += translateWithParameters(
       'work_duration.x_hours',
-      isNegative && formatted.length === 0 ? -1 * hours : hours
+      isNegative && formatted.length === 0 ? -1 * hours : hours,
     );
   }
   if (shouldDisplayMinutes(days, hours, minutes)) {
     formatted = addSpaceIfNeeded(formatted);
     formatted += translateWithParameters(
       'work_duration.x_minutes',
-      isNegative && formatted.length === 0 ? -1 * minutes : minutes
+      isNegative && formatted.length === 0 ? -1 * minutes : minutes,
     );
   }
   return formatted;
@@ -325,7 +325,7 @@ function formatDurationShort(
   isNegative: boolean,
   days: number,
   hours: number,
-  minutes: number
+  minutes: number,
 ): string {
   if (shouldDisplayDaysInShortFormat(days)) {
     const roundedDays = Math.round(days);
@@ -337,7 +337,7 @@ function formatDurationShort(
     const roundedHours = Math.round(hours);
     const formattedHours = formatMeasure(
       isNegative ? -1 * roundedHours : roundedHours,
-      'SHORT_INT'
+      'SHORT_INT',
     );
     return translateWithParameters('work_duration.x_hours', formattedHours);
   }
index eb4377ed65707f9e2155f5fa25a26303f5ae10df..d1ce7474ad1244f8e5b595688c6fd2295ae0967d 100644 (file)
@@ -53,7 +53,7 @@ export function mockBitbucketProject(overrides: Partial<BitbucketProject> = {}):
 }
 
 export function mockBitbucketRepository(
-  overrides: Partial<BitbucketRepository> = {}
+  overrides: Partial<BitbucketRepository> = {},
 ): BitbucketRepository {
   return {
     id: 1,
@@ -65,7 +65,7 @@ export function mockBitbucketRepository(
 }
 
 export function mockBitbucketCloudRepository(
-  overrides: Partial<BitbucketCloudRepository> = {}
+  overrides: Partial<BitbucketCloudRepository> = {},
 ): BitbucketCloudRepository {
   return {
     uuid: 1,
index 4e5f9ea022c73cbbb5d5263b3f1ef553bd8a5b76..6c1f5a91360db3e119197c8913b7eeab88f97bc2 100644 (file)
@@ -38,7 +38,7 @@ import {
 } from '../../types/alm-settings';
 
 export function mockAlmSettingsInstance(
-  overrides: Partial<AlmSettingsInstance> = {}
+  overrides: Partial<AlmSettingsInstance> = {},
 ): AlmSettingsInstance {
   return {
     alm: AlmKeys.GitHub,
@@ -48,7 +48,7 @@ export function mockAlmSettingsInstance(
 }
 
 export function mockBitbucketCloudAlmSettingsInstance(
-  overrides: Partial<AlmSettingsInstance> = {}
+  overrides: Partial<AlmSettingsInstance> = {},
 ): AlmSettingsInstance {
   return {
     alm: AlmKeys.BitbucketCloud,
@@ -58,7 +58,7 @@ export function mockBitbucketCloudAlmSettingsInstance(
 }
 
 export function mockAzureBindingDefinition(
-  overrides: Partial<AzureBindingDefinition> = {}
+  overrides: Partial<AzureBindingDefinition> = {},
 ): AzureBindingDefinition {
   return {
     key: 'key',
@@ -68,7 +68,7 @@ export function mockAzureBindingDefinition(
 }
 
 export function mockBitbucketServerBindingDefinition(
-  overrides: Partial<BitbucketServerBindingDefinition> = {}
+  overrides: Partial<BitbucketServerBindingDefinition> = {},
 ): BitbucketServerBindingDefinition {
   return {
     key: 'key',
@@ -79,7 +79,7 @@ export function mockBitbucketServerBindingDefinition(
 }
 
 export function mockBitbucketCloudBindingDefinition(
-  overrides: Partial<BitbucketCloudBindingDefinition> = {}
+  overrides: Partial<BitbucketCloudBindingDefinition> = {},
 ): BitbucketCloudBindingDefinition {
   return {
     key: 'key',
@@ -91,7 +91,7 @@ export function mockBitbucketCloudBindingDefinition(
 }
 
 export function mockGithubBindingDefinition(
-  overrides: Partial<GithubBindingDefinition> = {}
+  overrides: Partial<GithubBindingDefinition> = {},
 ): GithubBindingDefinition {
   return {
     key: 'key',
@@ -106,7 +106,7 @@ export function mockGithubBindingDefinition(
 }
 
 export function mockGitlabBindingDefinition(
-  overrides: Partial<GitlabBindingDefinition> = {}
+  overrides: Partial<GitlabBindingDefinition> = {},
 ): GitlabBindingDefinition {
   return {
     key: 'foo',
@@ -116,7 +116,7 @@ export function mockGitlabBindingDefinition(
 }
 
 export function mockProjectAlmBindingResponse(
-  overrides: Partial<ProjectAlmBindingResponse> = {}
+  overrides: Partial<ProjectAlmBindingResponse> = {},
 ): ProjectAlmBindingResponse {
   return {
     alm: AlmKeys.GitHub,
@@ -128,7 +128,7 @@ export function mockProjectAlmBindingResponse(
 }
 
 export function mockProjectBitbucketBindingResponse(
-  overrides: Partial<ProjectBitbucketBindingResponse> = {}
+  overrides: Partial<ProjectBitbucketBindingResponse> = {},
 ): ProjectBitbucketBindingResponse {
   return {
     alm: AlmKeys.BitbucketServer,
@@ -141,7 +141,7 @@ export function mockProjectBitbucketBindingResponse(
 }
 
 export function mockProjectBitbucketCloudBindingResponse(
-  overrides: Partial<ProjectBitbucketCloudBindingResponse> = {}
+  overrides: Partial<ProjectBitbucketCloudBindingResponse> = {},
 ): ProjectBitbucketCloudBindingResponse {
   return {
     alm: AlmKeys.BitbucketCloud,
@@ -153,7 +153,7 @@ export function mockProjectBitbucketCloudBindingResponse(
 }
 
 export function mockProjectGithubBindingResponse(
-  overrides: Partial<ProjectGitHubBindingResponse> = {}
+  overrides: Partial<ProjectGitHubBindingResponse> = {},
 ): ProjectGitHubBindingResponse {
   return {
     alm: AlmKeys.GitHub,
@@ -165,7 +165,7 @@ export function mockProjectGithubBindingResponse(
 }
 
 export function mockProjectGitLabBindingResponse(
-  overrides: Partial<ProjectGitLabBindingResponse> = {}
+  overrides: Partial<ProjectGitLabBindingResponse> = {},
 ): ProjectGitLabBindingResponse {
   return {
     alm: AlmKeys.GitLab,
@@ -178,7 +178,7 @@ export function mockProjectGitLabBindingResponse(
 }
 
 export function mockProjectAzureBindingResponse(
-  overrides: Partial<ProjectAzureBindingResponse> = {}
+  overrides: Partial<ProjectAzureBindingResponse> = {},
 ): ProjectAzureBindingResponse {
   return {
     alm: AlmKeys.Azure,
@@ -192,7 +192,7 @@ export function mockProjectAzureBindingResponse(
 }
 
 export function mockAlmSettingsBindingStatus(
-  overrides: Partial<AlmSettingsBindingStatus>
+  overrides: Partial<AlmSettingsBindingStatus>,
 ): AlmSettingsBindingStatus {
   return {
     alertSuccess: false,
@@ -203,7 +203,7 @@ export function mockAlmSettingsBindingStatus(
 }
 
 export function mockProjectAlmBindingConfigurationErrors(
-  overrides: Partial<ProjectAlmBindingConfigurationErrors> = {}
+  overrides: Partial<ProjectAlmBindingConfigurationErrors> = {},
 ): ProjectAlmBindingConfigurationErrors {
   return {
     scope: ProjectAlmBindingConfigurationErrorScope.Global,
index aec096a07c8403c80b8e74d788c3f28bde6f2f16..d8c524e0fbcae1bdae5c7eb607721cd7a6a3057f 100644 (file)
@@ -20,7 +20,7 @@
 import { ApplicationPeriod } from '../../types/application';
 
 export function mockApplicationPeriod(
-  overrides: Partial<ApplicationPeriod> = {}
+  overrides: Partial<ApplicationPeriod> = {},
 ): ApplicationPeriod {
   return {
     date: '2017-10-01',
index 1152e44388f72012130f13ad44482a2860833fca..04799cf9e41e07729b9a43590b618f0217e4e3bf 100644 (file)
@@ -20,7 +20,7 @@
 import { ComponentReportStatus } from '../../types/component-report';
 
 export function mockComponentReportStatus(
-  props?: Partial<ComponentReportStatus>
+  props?: Partial<ComponentReportStatus>,
 ): ComponentReportStatus {
   return {
     canAdmin: true,
index 19f37fdbdb43b95955d46972e00f6d0535fa3476..044dbe3e9d25b7fc82cebda246345b0e6b1e710c 100644 (file)
@@ -54,7 +54,7 @@ export function mockTreeComponent(overrides: Partial<TreeComponent>): TreeCompon
 
 export function mockComponentMeasure(
   file = false,
-  overrides: Partial<ComponentMeasure> = {}
+  overrides: Partial<ComponentMeasure> = {},
 ): ComponentMeasure {
   if (file) {
     return {
@@ -76,7 +76,7 @@ export function mockComponentMeasure(
 }
 
 export function mockComponentMeasureEnhanced(
-  overrides: Partial<ComponentMeasureEnhanced> = {}
+  overrides: Partial<ComponentMeasureEnhanced> = {},
 ): ComponentMeasureEnhanced {
   return {
     ...mockComponentMeasure(false, overrides as ComponentMeasure),
index 86a151ce234d3f1a2abeeda878136d1ec04fd1aa..6d44ee20fcda1d717bf23f9e20fbcfcca16b20bd 100644 (file)
@@ -52,7 +52,7 @@ export function mockIssueChangelog(overrides: Partial<IssueChangelog> = {}): Iss
 }
 
 export function mockIssueChangelogDiff(
-  overrides: Partial<IssueChangelogDiff> = {}
+  overrides: Partial<IssueChangelogDiff> = {},
 ): IssueChangelogDiff {
   return {
     key: 'assign',
index 72ecf4f8c617fac9abeaa53481fce8a10ae656eb..381d4f0eec0438a2e22f4c024e2e1dd54f842219 100644 (file)
@@ -32,7 +32,7 @@ export function mockNewCodePeriod(overrides: Partial<NewCodeDefinition> = {}): N
 }
 
 export function mockNewCodePeriodBranch(
-  overrides: Partial<NewCodeDefinitionBranch> = {}
+  overrides: Partial<NewCodeDefinitionBranch> = {},
 ): NewCodeDefinitionBranch {
   return {
     projectKey: 'pkey',
index 55c791d724adf13c1178e2ed2a14fea918d3d69f..5e8672a99724a32d7c2ec816f7c515cb597e13e5 100644 (file)
@@ -36,7 +36,7 @@ export function mockQualityGate(overrides: Partial<QualityGate> = {}): QualityGa
 }
 
 export function mockQualityGateStatus(
-  overrides: Partial<QualityGateStatus> = {}
+  overrides: Partial<QualityGateStatus> = {},
 ): QualityGateStatus {
   return {
     ignoredConditions: false,
@@ -50,7 +50,7 @@ export function mockQualityGateStatus(
 }
 
 export function mockQualityGateProjectCondition(
-  overrides: Partial<QualityGateProjectStatusCondition> = {}
+  overrides: Partial<QualityGateProjectStatusCondition> = {},
 ): QualityGateProjectStatusCondition {
   return {
     actualValue: '10',
@@ -64,7 +64,7 @@ export function mockQualityGateProjectCondition(
 }
 
 export function mockQualityGateStatusCondition(
-  overrides: Partial<QualityGateStatusCondition> = {}
+  overrides: Partial<QualityGateStatusCondition> = {},
 ): QualityGateStatusCondition {
   return {
     actual: '10',
@@ -77,7 +77,7 @@ export function mockQualityGateStatusCondition(
 }
 
 export function mockQualityGateStatusConditionEnhanced(
-  overrides: Partial<QualityGateStatusConditionEnhanced> = {}
+  overrides: Partial<QualityGateStatusConditionEnhanced> = {},
 ): QualityGateStatusConditionEnhanced {
   return {
     actual: '10',
@@ -91,7 +91,7 @@ export function mockQualityGateStatusConditionEnhanced(
 }
 
 export function mockQualityGateProjectStatus(
-  overrides: Partial<QualityGateProjectStatus> = {}
+  overrides: Partial<QualityGateProjectStatus> = {},
 ): QualityGateProjectStatus {
   return {
     conditions: [
@@ -112,7 +112,7 @@ export function mockQualityGateProjectStatus(
 }
 
 export function mockQualityGateApplicationStatus(
-  overrides: Partial<QualityGateApplicationStatus> = {}
+  overrides: Partial<QualityGateApplicationStatus> = {},
 ): QualityGateApplicationStatus {
   return {
     metrics: [mockMetric(), mockMetric({ name: 'new_bugs', key: 'new_bugs', type: 'INT' })],
index 0b7e44c87dce00881354e993fe1b7bd7ad6c55dd..29b47459f8462705b9a414a1ea7c590c00d6bdcc 100644 (file)
@@ -29,10 +29,10 @@ import {
 export function mockReactSelectOptionProps<
   OptionType = unknown,
   IsMulti extends boolean = boolean,
-  GroupType extends GroupBase<OptionType> = GroupBase<OptionType>
+  GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,
 >(
   data: OptionType,
-  overrides?: OptionProps<OptionType, IsMulti, GroupType>
+  overrides?: OptionProps<OptionType, IsMulti, GroupType>,
 ): OptionProps<OptionType, IsMulti, GroupType> {
   return {
     ...overrides,
@@ -47,7 +47,7 @@ export function mockReactSelectInputProps(): InputProps {
 export function mockReactSelectControlProps<
   OptionType = unknown,
   IsMulti extends boolean = boolean,
-  GroupType extends GroupBase<OptionType> = GroupBase<OptionType>
+  GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,
 >(): ControlProps<OptionType, IsMulti, GroupType> {
   return {} as ControlProps<OptionType, IsMulti, GroupType>;
 }
@@ -55,7 +55,7 @@ export function mockReactSelectControlProps<
 export function mockReactSelectClearIndicatorProps<
   OptionType = unknown,
   IsMulti extends boolean = boolean,
-  GroupType extends GroupBase<OptionType> = GroupBase<OptionType>
+  GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,
 >(_option: OptionType): ClearIndicatorProps<OptionType, IsMulti, GroupType> {
   return { getStyles: () => {} } as unknown as ClearIndicatorProps<OptionType, IsMulti, GroupType>;
 }
@@ -63,7 +63,7 @@ export function mockReactSelectClearIndicatorProps<
 export function mockReactSelectDropdownIndicatorProps<
   OptionType = unknown,
   IsMulti extends boolean = boolean,
-  GroupType extends GroupBase<OptionType> = GroupBase<OptionType>
+  GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,
 >(_option: OptionType): DropdownIndicatorProps<OptionType, IsMulti, GroupType> {
   return {} as DropdownIndicatorProps<OptionType, IsMulti, GroupType>;
 }
index 8e20ba3d8c0f81048728147e885fa67fcc2f9409..4cee41133459b16eda51c0b9f3c765e6493f7018 100644 (file)
@@ -120,7 +120,7 @@ export function mockHotspotRule(overrides?: Partial<HotspotRule>): HotspotRule {
 }
 
 export function mockHotspotReviewHistoryElement(
-  overrides?: Partial<ReviewHistoryElement>
+  overrides?: Partial<ReviewHistoryElement>,
 ): ReviewHistoryElement {
   return {
     date: '2019-09-13T17:55:42+0200',
index 92e7588b44e059ed778db4987ed2fa8cc2771a4f..1001876863dbc96e5695e24e34094d4d796157aa 100644 (file)
@@ -27,7 +27,7 @@ import {
 } from '../../types/settings';
 
 export function mockDefinition(
-  overrides: Partial<ExtendedSettingDefinition> = {}
+  overrides: Partial<ExtendedSettingDefinition> = {},
 ): ExtendedSettingDefinition {
   return {
     key: 'foo',
@@ -40,7 +40,7 @@ export function mockDefinition(
 }
 
 export function mockSettingFieldDefinition(
-  overrides: Partial<SettingFieldDefinition> = {}
+  overrides: Partial<SettingFieldDefinition> = {},
 ): SettingFieldDefinition {
   return { key: 'name', name: 'Name', options: [], ...overrides };
 }
@@ -70,7 +70,7 @@ export function mockSettingValue(overrides: Partial<SettingValue> = {}) {
 }
 
 export function mockSettingWithCategory(
-  overrides: Partial<SettingWithCategory> = {}
+  overrides: Partial<SettingWithCategory> = {},
 ): SettingWithCategory {
   return {
     key: 'foo',
index 0deea49f19983fad272979823d59dc225af59c5e..54843d134f515230043a6ecf79f19ff90583e041 100644 (file)
@@ -30,7 +30,7 @@ import {
 export function mockSourceViewerFile(
   name = 'foo/bar.ts',
   project = 'project',
-  override?: Partial<SourceViewerFile>
+  override?: Partial<SourceViewerFile>,
 ): SourceViewerFile {
   return {
     measures: {
@@ -71,7 +71,7 @@ export function mockSourceLine(overrides: Partial<SourceLine> = {}): SourceLine
 export function mockSnippetsByComponent(
   file = 'main.js',
   project = 'project',
-  lines: number[] = [16]
+  lines: number[] = [16],
 ): SnippetsByComponent {
   const sources = lines.reduce((lines: { [key: number]: SourceLine }, line) => {
     lines[line] = mockSourceLine({ line });
index 9f724a3f9d4fb6f85f3abb86790e301770deed9a..e5b1e2187bc2ff65ae2f2f51b4d510802257b442 100644 (file)
@@ -45,7 +45,7 @@ export function isNewCodeDefinitionCompliant(newCodePeriod: NewCodeDefinition) {
 
 export function getNumberOfDaysDefaultValue(
   globalNewCodeDefinition?: NewCodeDefinition | null,
-  inheritedNewCodeDefinition?: NewCodeDefinition | null
+  inheritedNewCodeDefinition?: NewCodeDefinition | null,
 ) {
   if (
     inheritedNewCodeDefinition &&
index 7d92c9521ef9e515ccfd020135a75337f5aa6503..d234e24e3547a825cbed036152c13417bbd79778 100644 (file)
@@ -29,7 +29,7 @@ export function getNewCodePeriodDate(period?: { date?: string }): Date | undefin
 
 export function getNewCodePeriodLabel(
   period: Period | undefined,
-  dateFormatter: (date: string) => string
+  dateFormatter: (date: string) => string,
 ) {
   if (!period) {
     return undefined;
@@ -65,7 +65,7 @@ export function getNewCodePeriodLabel(
 }
 
 export function isApplicationNewCodePeriod(
-  period: Period | ApplicationPeriod
+  period: Period | ApplicationPeriod,
 ): period is ApplicationPeriod {
   return (period as ApplicationPeriod).project !== undefined;
 }
index c1ef07bf3f398f285c66b355edd658f53540c04f..d49dd1e428eea010b2c5d472016b78060e9d8334 100644 (file)
@@ -70,7 +70,7 @@ function convertToPermissionDefinition(permission: string, l10nPrefix: string) {
 export function filterPermissions(
   permissions: Array<Permissions | { category: string; permissions: Permissions[] }>,
   hasApplicationsEnabled: boolean,
-  hasPortfoliosEnabled: boolean
+  hasPortfoliosEnabled: boolean,
 ) {
   return permissions.map((permission) => {
     if (typeof permission === 'object' && permission.category === 'creator') {
@@ -91,14 +91,14 @@ export function filterPermissions(
 
 export function convertToPermissionDefinitions(
   permissions: Array<string | { category: string; permissions: string[] }>,
-  l10nPrefix: string
+  l10nPrefix: string,
 ): Array<PermissionDefinition | PermissionDefinitionGroup> {
   return permissions.map((permission) => {
     if (typeof permission === 'object') {
       return {
         category: permission.category,
         permissions: permission.permissions.map((permission) =>
-          convertToPermissionDefinition(permission, l10nPrefix)
+          convertToPermissionDefinition(permission, l10nPrefix),
         ),
       };
     }
@@ -107,7 +107,7 @@ export function convertToPermissionDefinitions(
 }
 
 export function isPermissionDefinitionGroup(
-  permission?: PermissionDefinition | PermissionDefinitionGroup
+  permission?: PermissionDefinition | PermissionDefinitionGroup,
 ): permission is PermissionDefinitionGroup {
   return Boolean(permission && (permission as PermissionDefinitionGroup).category);
 }
index d50dab3c4e2b2f823355b17283d25fa94dbf36ff..b9407fcca22cf0a6d815e1662f97a7d9d4d18225 100644 (file)
@@ -24,7 +24,7 @@ import {
 } from '../types/quality-gates';
 
 export function extractStatusConditionsFromProjectStatus(
-  projectStatus: QualityGateProjectStatus
+  projectStatus: QualityGateProjectStatus,
 ): QualityGateStatusCondition[] {
   const { conditions } = projectStatus;
   return conditions
@@ -40,7 +40,7 @@ export function extractStatusConditionsFromProjectStatus(
 }
 
 export function extractStatusConditionsFromApplicationStatusChildProject(
-  projectStatus: QualityGateApplicationStatusChildProject
+  projectStatus: QualityGateApplicationStatusChildProject,
 ): QualityGateStatusCondition[] {
   const { conditions } = projectStatus;
   return conditions
index 37ced126f60bd1df7a54e6157852f9fb26c8b55c..f5c5e426dce01745161bdc8f9e264f81146774ff 100644 (file)
@@ -90,14 +90,14 @@ export function parseAsArray<T>(value: string | undefined, itemParser: (x: strin
 
 export function parseAsOptionalArray<T>(
   value: string | undefined,
-  itemParser: (x: string) => T
+  itemParser: (x: string) => T,
 ): T[] | undefined {
   return value ? parseAsArray(value, itemParser) : undefined;
 }
 
 export function serializeDate(
   value?: Date,
-  serializer = toISO8601WithOffsetString
+  serializer = toISO8601WithOffsetString,
 ): string | undefined {
   if (value != null) {
     return serializer(value);
index c66c950602de714944d60b458c9ed45824023b02..d8efca16d91f497e16ee861ae406563ee4a94378 100644 (file)
@@ -23,7 +23,7 @@ const notUndefined = <T>(x: T | undefined): x is T => x !== undefined;
 
 export const mapReactQueryResult = <T, R>(
   res: UseQueryResult<T>,
-  mapper: (data: T) => R
+  mapper: (data: T) => R,
 ): UseQueryResult<R> => {
   return {
     ...res,
index d48f498855d9e6e96db77241105c4883f68ef4bd..9f0e415787ffed061360bbd6964f1ce225f4c245 100644 (file)
@@ -79,7 +79,10 @@ class Request {
   private isJSON = false;
 
   // eslint-disable-next-line no-useless-constructor
-  constructor(private readonly url: string, private readonly options: { method?: string } = {}) {}
+  constructor(
+    private readonly url: string,
+    private readonly options: { method?: string } = {},
+  ) {}
 
   getSubmitData(customHeaders: any = {}): { url: string; options: RequestInit } {
     let { url } = this;
@@ -210,7 +213,7 @@ export function getJSON(url: string, data?: RequestData, bypassRedirect?: boolea
 export function getText(
   url: string,
   data?: RequestData,
-  bypassRedirect?: boolean
+  bypassRedirect?: boolean,
 ): Promise<string> {
   return get(url, data, bypassRedirect).then(parseText);
 }
@@ -248,7 +251,7 @@ export function postJSON(url: string, data?: RequestData, bypassRedirect?: boole
 export function postJSONBody(
   url: string,
   data?: RequestData,
-  bypassRedirect?: boolean
+  bypassRedirect?: boolean,
 ): Promise<any> {
   return request(url)
     .setMethod('POST')
@@ -288,14 +291,14 @@ function tryRequestAgain<T>(
   tries: { max: number; slowThreshold: number },
   stopRepeat: (response: T) => boolean,
   repeatErrors: number[] = [],
-  lastError?: Response
+  lastError?: Response,
 ) {
   tries.max--;
   if (tries.max !== 0) {
     return new Promise<T>((resolve) => {
       setTimeout(
         () => resolve(requestTryAndRepeatUntil(repeatAPICall, tries, stopRepeat, repeatErrors)),
-        tries.max > tries.slowThreshold ? 500 : 3000
+        tries.max > tries.slowThreshold ? 500 : 3000,
       );
     });
   }
@@ -306,7 +309,7 @@ export function requestTryAndRepeatUntil<T>(
   repeatAPICall: () => Promise<T>,
   tries: { max: number; slowThreshold: number },
   stopRepeat: (response: T) => boolean,
-  repeatErrors: number[] = []
+  repeatErrors: number[] = [],
 ) {
   return repeatAPICall().then(
     (r) => {
@@ -320,7 +323,7 @@ export function requestTryAndRepeatUntil<T>(
         return tryRequestAgain(repeatAPICall, tries, stopRepeat, repeatErrors, error);
       }
       return Promise.reject(error);
-    }
+    },
   );
 }
 
index 739b7766e9c9fb3a78d951cb39bd46ca5537f2d4..e79014758b95eb3c24b1e628aba2a1dc0e2e0080 100644 (file)
@@ -36,7 +36,7 @@ export function renderCWECategory(standards: Standards, category: string): strin
 export function renderOwaspTop10Category(
   standards: Standards,
   category: string,
-  withPrefix = false
+  withPrefix = false,
 ): string {
   return renderOwaspCategory('owaspTop10', standards, category, withPrefix);
 }
@@ -44,7 +44,7 @@ export function renderOwaspTop10Category(
 export function renderOwaspTop102021Category(
   standards: Standards,
   category: string,
-  withPrefix = false
+  withPrefix = false,
 ): string {
   return renderOwaspCategory('owaspTop10-2021', standards, category, withPrefix);
 }
@@ -53,7 +53,7 @@ function renderOwaspCategory(
   type: 'owaspTop10' | 'owaspTop10-2021',
   standards: Standards,
   category: string,
-  withPrefix: boolean
+  withPrefix: boolean,
 ) {
   const record = standards[type][category];
   if (!record) {
@@ -65,7 +65,7 @@ function renderOwaspCategory(
 export function renderSonarSourceSecurityCategory(
   standards: Standards,
   category: string,
-  withPrefix = false
+  withPrefix = false,
 ): string {
   const record = standards.sonarsourceSecurity[category];
   if (!record) {
index 4b6a4e15d1d466310804a5842b8de6eca7de3b0d..5c48bf2900f4c1c39786de08065eef0347eafeb2 100644 (file)
@@ -34,7 +34,7 @@ export async function probeSonarLintServers(): Promise<Array<Ide>> {
         const { ideName, description } = json;
         return { port: p, ideName, description } as Ide;
       })
-      .catch(() => undefined)
+      .catch(() => undefined),
   );
   const results = await Promise.all(probeRequests);
   return results.filter((r) => r !== undefined) as Ide[];
index dc4ed8b81eaea65ccc8328fc6a73260252b4836e..7a6f7b7074563c9e8c6863b93c97a3c0df9da1e4 100644 (file)
@@ -399,7 +399,7 @@ const diacriticsMap: Dict<string> = {};
 defaultDiacriticsRemovalap.forEach((defaultDiacritic) =>
   defaultDiacritic.letters.split('').forEach((letter) => {
     diacriticsMap[letter] = defaultDiacritic.base;
-  })
+  }),
 );
 
 // "what?" version ... http://jsperf.com/diacritics/12
index ba7799b2339d6eca7e4d2a9030909749852bb7f0..ff6ab55eb666c7fb83a6bfe70895a56b2c0989bd 100644 (file)
@@ -42,7 +42,7 @@ export function getReactDomContainerSelector() {
 
 export function initAppVariables() {
   const appVariablesDiv = document.querySelector<AppVariablesElement>(
-    getReactDomContainerSelector()
+    getReactDomContainerSelector(),
   );
   if (appVariablesDiv === null) {
     throw new Error('Failed to get app variables');
index 533cff7bd1ade5f426eb09f6b3d80a892dac1869..8ee93223637f1b303a11aee7b7f4a0eaa1aec182 100644 (file)
@@ -505,7 +505,7 @@ export function mockCompareResult(overrides: Partial<CompareResponse> = {}): Com
 }
 
 export function mockQualityProfileInheritance(
-  overrides: Partial<ProfileInheritanceDetails> = {}
+  overrides: Partial<ProfileInheritanceDetails> = {},
 ): ProfileInheritanceDetails {
   return {
     activeRuleCount: 4,
@@ -518,7 +518,7 @@ export function mockQualityProfileInheritance(
 }
 
 export function mockQualityProfileChangelogEvent(
-  eventOverride?: Partial<ProfileChangelogEvent>
+  eventOverride?: Partial<ProfileChangelogEvent>,
 ): ProfileChangelogEvent {
   return {
     action: 'ACTIVATED',
@@ -545,7 +545,7 @@ export function mockRouter(
   overrides: {
     push?: (loc: To) => void;
     replace?: (loc: To) => void;
-  } = {}
+  } = {},
 ) {
   return {
     createHref: jest.fn(),
@@ -741,7 +741,7 @@ export function mockUserGroupMember(overrides: Partial<UserGroupMember> = {}): U
 }
 
 export function mockDocumentationMarkdown(
-  overrides: Partial<{ content: string; title: string; key: string }> = {}
+  overrides: Partial<{ content: string; title: string; key: string }> = {},
 ): string {
   const content =
     overrides.content ||
@@ -794,7 +794,7 @@ export function mockIdentityProvider(overrides: Partial<IdentityProvider> = {}):
 }
 
 export function mockRef(
-  overrides: Partial<React.RefObject<Partial<HTMLElement>>> = {}
+  overrides: Partial<React.RefObject<Partial<HTMLElement>>> = {},
 ): React.RefObject<HTMLElement> {
   return {
     current: {
index ad497152d7694b6857ef1aed434242311950e7cf..4b21b5df3fefbd0b7c4fca5f951a8f70ca1d41d8 100644 (file)
@@ -57,7 +57,7 @@ export function renderAppWithAdminContext(
   indexPath: string,
   routes: () => JSX.Element,
   context: RenderContext = {},
-  overrides: { systemStatus?: SysStatus; adminPages?: Extension[] } = {}
+  overrides: { systemStatus?: SysStatus; adminPages?: Extension[] } = {},
 ): RenderResult {
   function MockAdminContainer() {
     return (
@@ -87,14 +87,14 @@ export function renderAppWithAdminContext(
       {routes()}
     </Route>,
     indexPath,
-    context
+    context,
   );
 }
 
 export function renderComponent(
   component: React.ReactElement,
   pathname = '/',
-  { appState = mockAppState(), featureList = [] }: RenderContext = {}
+  { appState = mockAppState(), featureList = [] }: RenderContext = {},
 ) {
   function Wrapper({ children }: { children: React.ReactElement }) {
     const queryClient = new QueryClient();
@@ -125,11 +125,11 @@ export function renderAppWithComponentContext(
   indexPath: string,
   routes: () => JSX.Element,
   context: RenderContext = {},
-  componentContext: Partial<ComponentContextShape> = {}
+  componentContext: Partial<ComponentContextShape> = {},
 ) {
   function MockComponentContainer() {
     const [realComponent, setRealComponent] = React.useState(
-      componentContext?.component ?? mockComponent()
+      componentContext?.component ?? mockComponent(),
     );
     return (
       <ComponentContext.Provider
@@ -150,14 +150,14 @@ export function renderAppWithComponentContext(
   return renderRoutedApp(
     <Route element={<MockComponentContainer />}>{routes()}</Route>,
     indexPath,
-    context
+    context,
   );
 }
 
 export function renderApp(
   indexPath: string,
   component: JSX.Element,
-  context: RenderContext = {}
+  context: RenderContext = {},
 ): RenderResult {
   return renderRoutedApp(<Route path={indexPath} element={component} />, indexPath, context);
 }
@@ -165,7 +165,7 @@ export function renderApp(
 export function renderAppRoutes(
   indexPath: string,
   routes: () => JSX.Element,
-  context?: RenderContext
+  context?: RenderContext,
 ): RenderResult {
   return renderRoutedApp(routes(), indexPath, context);
 }
@@ -186,7 +186,7 @@ function renderRoutedApp(
     appState = mockAppState(),
     featureList = [],
     languages = {},
-  }: RenderContext = {}
+  }: RenderContext = {},
 ): RenderResult {
   const path = parsePath(navigateTo);
   path.pathname = `/${path.pathname}`;
@@ -217,7 +217,7 @@ function renderRoutedApp(
           </LanguagesContext.Provider>
         </MetricsContext.Provider>
       </IntlWrapper>
-    </HelmetProvider>
+    </HelmetProvider>,
   );
 }
 
@@ -230,11 +230,11 @@ export function dateInputEvent(user: UserEvent) {
 
       await user.selectOptions(
         await screen.findByRole('combobox', { name: 'Month:' }),
-        formatter.format(date)
+        formatter.format(date),
       );
       await user.selectOptions(
         screen.getByRole('combobox', { name: 'Year:' }),
-        String(date.getFullYear())
+        String(date.getFullYear()),
       );
 
       await user.click(screen.getByRole('gridcell', { name: String(date.getDate()) }));
@@ -249,7 +249,7 @@ export function dateInputEvent(user: UserEvent) {
 export function findTooltipWithContent(
   text: Matcher,
   target?: HTMLElement,
-  selector = 'svg > desc'
+  selector = 'svg > desc',
 ) {
   // eslint-disable-next-line no-console
   console.warn(`The usage of findTooltipWithContent() is deprecated; use expect.toHaveATooltipWithContent() instead.
index 0f6eae1adb8e203a40a4d4ae09f0bf3506638810..30758533bdb4c07a8c620b11e6c8250a1c3b5027 100644 (file)
@@ -35,11 +35,11 @@ function maybeScreen(container?: HTMLElement) {
 export interface ReactTestingQuery {
   find<T extends HTMLElement = HTMLElement>(
     container?: HTMLElement,
-    waitForOptions?: waitForOptions
+    waitForOptions?: waitForOptions,
   ): Promise<T>;
   findAll<T extends HTMLElement = HTMLElement>(
     container?: HTMLElement,
-    waitForOptions?: waitForOptions
+    waitForOptions?: waitForOptions,
   ): Promise<T[]>;
   get<T extends HTMLElement = HTMLElement>(container?: HTMLElement): T;
   getAll<T extends HTMLElement = HTMLElement>(container?: HTMLElement): T[];
@@ -57,7 +57,7 @@ export interface ReactTestingQuery {
   findAt<T extends HTMLElement = HTMLElement>(
     index: number,
     container?: HTMLElement,
-    waitForOptions?: waitForOptions
+    waitForOptions?: waitForOptions,
   ): Promise<T>;
 
   queryAt<T extends HTMLElement = HTMLElement>(index: number, container?: HTMLElement): T | null;
@@ -66,12 +66,12 @@ export interface ReactTestingQuery {
 abstract class ChainingQuery implements ReactTestingQuery {
   abstract find<T extends HTMLElement = HTMLElement>(
     container?: HTMLElement,
-    waitForOptions?: waitForOptions
+    waitForOptions?: waitForOptions,
   ): Promise<T>;
 
   abstract findAll<T extends HTMLElement = HTMLElement>(
     container?: HTMLElement,
-    waitForOptions?: waitForOptions
+    waitForOptions?: waitForOptions,
   ): Promise<T[]>;
 
   abstract get<T extends HTMLElement = HTMLElement>(container?: HTMLElement): T;
@@ -89,7 +89,7 @@ abstract class ChainingQuery implements ReactTestingQuery {
   async findAt<T extends HTMLElement = HTMLElement>(
     index: number,
     container?: HTMLElement,
-    waitForOptions?: waitForOptions
+    waitForOptions?: waitForOptions,
   ): Promise<T> {
     return (await this.findAll<T>(container, waitForOptions))[index];
   }
@@ -139,14 +139,14 @@ class ChainDispatch extends ChainingQuery {
 
   async find<T extends HTMLElement = HTMLElement>(
     container?: HTMLElement,
-    waitForOptions?: waitForOptions
+    waitForOptions?: waitForOptions,
   ) {
     return this.elementQuery.find<T>(await this.insideQuery.find(container, waitForOptions));
   }
 
   async findAll<T extends HTMLElement = HTMLElement>(
     container?: HTMLElement,
-    waitForOptions?: waitForOptions
+    waitForOptions?: waitForOptions,
   ) {
     return this.elementQuery.findAll<T>(await this.insideQuery.find(container, waitForOptions));
   }
@@ -159,7 +159,7 @@ class ChainDispatch extends ChainingQuery {
     const containers = this.insideQuery.getAll(container);
     return containers.reduce(
       (acc, item) => [...acc, ...(this.elementQuery.queryAll<T>(item) ?? [])],
-      []
+      [],
     );
   }
 
@@ -190,14 +190,14 @@ class DispatchByText extends ChainingQuery {
 
   find<T extends HTMLElement = HTMLElement>(
     container?: HTMLElement,
-    waitForOptions?: waitForOptions
+    waitForOptions?: waitForOptions,
   ) {
     return maybeScreen(container).findByText<T>(...this.args, waitForOptions);
   }
 
   findAll<T extends HTMLElement = HTMLElement>(
     container?: HTMLElement,
-    waitForOptions?: waitForOptions
+    waitForOptions?: waitForOptions,
   ) {
     return maybeScreen(container).findAllByText<T>(...this.args, waitForOptions);
   }
@@ -229,14 +229,14 @@ class DispatchByLabelText extends ChainingQuery {
 
   find<T extends HTMLElement = HTMLElement>(
     container?: HTMLElement,
-    waitForOptions?: waitForOptions
+    waitForOptions?: waitForOptions,
   ) {
     return maybeScreen(container).findByLabelText<T>(...this.args, waitForOptions);
   }
 
   findAll<T extends HTMLElement = HTMLElement>(
     container?: HTMLElement,
-    waitForOptions?: waitForOptions
+    waitForOptions?: waitForOptions,
   ) {
     return maybeScreen(container).findAllByLabelText<T>(...this.args, waitForOptions);
   }
@@ -268,14 +268,14 @@ class DispatchByRole extends ChainingQuery {
 
   find<T extends HTMLElement = HTMLElement>(
     container?: HTMLElement,
-    waitForOptions?: waitForOptions
+    waitForOptions?: waitForOptions,
   ) {
     return maybeScreen(container).findByRole<T>(...this.args, waitForOptions);
   }
 
   findAll<T extends HTMLElement = HTMLElement>(
     container?: HTMLElement,
-    waitForOptions?: waitForOptions
+    waitForOptions?: waitForOptions,
   ) {
     return maybeScreen(container).findAllByRole<T>(...this.args, waitForOptions);
   }
@@ -307,14 +307,14 @@ class DispatchByTestId extends ChainingQuery {
 
   find<T extends HTMLElement = HTMLElement>(
     container?: HTMLElement,
-    waitForOptions?: waitForOptions
+    waitForOptions?: waitForOptions,
   ) {
     return maybeScreen(container).findByTestId<T>(...this.args, waitForOptions);
   }
 
   findAll<T extends HTMLElement = HTMLElement>(
     container?: HTMLElement,
-    waitForOptions?: waitForOptions
+    waitForOptions?: waitForOptions,
   ) {
     return maybeScreen(container).findAllByTestId<T>(...this.args, waitForOptions);
   }
@@ -346,14 +346,14 @@ class DispatchByDisplayValue extends ChainingQuery {
 
   find<T extends HTMLElement = HTMLElement>(
     container?: HTMLElement,
-    waitForOptions?: waitForOptions
+    waitForOptions?: waitForOptions,
   ) {
     return maybeScreen(container).findByDisplayValue<T>(...this.args, waitForOptions);
   }
 
   findAll<T extends HTMLElement = HTMLElement>(
     container?: HTMLElement,
-    waitForOptions?: waitForOptions
+    waitForOptions?: waitForOptions,
   ) {
     return maybeScreen(container).findAllByDisplayValue<T>(...this.args, waitForOptions);
   }
@@ -385,14 +385,14 @@ class DispatchByPlaceholderText extends ChainingQuery {
 
   find<T extends HTMLElement = HTMLElement>(
     container?: HTMLElement,
-    waitForOptions?: waitForOptions
+    waitForOptions?: waitForOptions,
   ) {
     return maybeScreen(container).findByPlaceholderText<T>(...this.args, waitForOptions);
   }
 
   findAll<T extends HTMLElement = HTMLElement>(
     container?: HTMLElement,
-    waitForOptions?: waitForOptions
+    waitForOptions?: waitForOptions,
   ) {
     return maybeScreen(container).findAllByPlaceholderText<T>(...this.args, waitForOptions);
   }
index 3506f663e3c26a4f4f233d9b22ffecd828fdee3b..cb196db2fb0f787e96225274b62efefca9ada783 100644 (file)
@@ -76,7 +76,7 @@ export function submit(element: ShallowWrapper | ReactWrapper): void {
 export function change(
   element: ShallowWrapper | ReactWrapper,
   value: string | object,
-  event = {}
+  event = {},
 ): void {
   // `type()` returns a component constructor for a composite element and string for DOM nodes
   if (typeof element.type() === 'function') {
index 5852cfa8928bc3ee6d4e93ad3e11fa868b354c46..107d133fef870e2f6699f7b378e32b9e3bc38484 100644 (file)
@@ -57,7 +57,7 @@ export async function getAvailableExpirationOptions() {
     return EXPIRATION_OPTIONS.filter(
       (option) =>
         option.value <= SETTINGS_EXPIRATION_MAP[maxTokenLifetime] &&
-        option.value !== TokenExpiration.NoExpiration
+        option.value !== TokenExpiration.NoExpiration,
     );
   }
 
index abc925bde54ccaf2d48b072f5ef64e9e02ee8924..4ccd67c7218b12629cefbd0b7b7f9baee7d61970 100644 (file)
@@ -80,7 +80,7 @@ export function getComponentOverviewUrl(
   componentKey: string,
   componentQualifier: ComponentQualifier | string,
   branchParameters?: BranchParameters,
-  codeScope?: CodeScopeType
+  codeScope?: CodeScopeType,
 ) {
   return isPortfolioLike(componentQualifier)
     ? getPortfolioUrl(componentKey)
@@ -89,7 +89,7 @@ export function getComponentOverviewUrl(
 
 export function getComponentAdminUrl(
   componentKey: string,
-  componentQualifier: ComponentQualifier | string
+  componentQualifier: ComponentQualifier | string,
 ) {
   if (isPortfolioLike(componentQualifier)) {
     return getPortfolioAdminUrl(componentKey);
@@ -102,7 +102,7 @@ export function getComponentAdminUrl(
 export function getProjectUrl(
   project: string,
   branch?: string,
-  codeScope?: CodeScopeType
+  codeScope?: CodeScopeType,
 ): Partial<Path> {
   return {
     pathname: PROJECT_BASE_URL,
@@ -120,7 +120,7 @@ export function getProjectSecurityHotspots(project: string): To {
 export function getProjectQueryUrl(
   project: string,
   branchParameters?: BranchParameters,
-  codeScope?: CodeScopeType
+  codeScope?: CodeScopeType,
 ): To {
   return {
     pathname: PROJECT_BASE_URL,
@@ -153,7 +153,7 @@ export function getApplicationAdminUrl(key: string): To {
 export function getComponentBackgroundTaskUrl(
   componentKey: string,
   status?: string,
-  taskType?: string
+  taskType?: string,
 ): Path {
   return {
     pathname: '/project/background_tasks',
@@ -260,7 +260,7 @@ export function getComponentDrilldownUrlWithSelection(
   selectionKey: string,
   metric: string,
   branchLike?: BranchLike,
-  view?: MeasurePageView
+  view?: MeasurePageView,
 ): To {
   return getComponentDrilldownUrl({
     componentKey,
@@ -323,7 +323,7 @@ export function getQualityGateUrl(name: string): To {
  */
 export function getProjectTutorialLocation(
   project: string,
-  selectedTutorial?: string
+  selectedTutorial?: string,
 ): Partial<Path> {
   return {
     pathname: '/tutorials',
@@ -348,7 +348,7 @@ export function getQualityGatesUrl(): To {
 
 export function getGlobalSettingsUrl(
   category?: string,
-  query?: Dict<string | undefined | number>
+  query?: Dict<string | undefined | number>,
 ): Partial<Path> {
   return {
     pathname: '/admin/settings',
@@ -390,7 +390,7 @@ export function getCodeUrl(
   project: string,
   branchLike?: BranchLike,
   selected?: string,
-  line?: number
+  line?: number,
 ): Partial<Path> {
   return {
     pathname: '/code',
index 6da44bf380f057c6265f666b2c8226683676a49c..7a95efd23e6d03269258d2a703634fb41339df4d 100644 (file)
@@ -27,7 +27,7 @@ interface Options extends IntersectionObserverInit {
 
 export default function useIntersectionObserver<T extends Element>(
   ref: RefObject<T>,
-  options: Options = {}
+  options: Options = {},
 ) {
   const { root = null, rootMargin = '0px', threshold = 0, freezeOnceVisible = false } = options;
   const [entry, setEntry] = useState<IntersectionObserverEntry>();
@@ -42,7 +42,7 @@ export default function useIntersectionObserver<T extends Element>(
     const observer = new IntersectionObserver(
       ([entry]) => setEntry(entry),
 
-      { root, rootMargin, threshold }
+      { root, rootMargin, threshold },
     );
 
     observer.observe(ref.current);
index 57a451eeea6f7fffc15887bca810ef79f1263442..0626ba590508e74a2b1859a5ebb76d416cbc1891 100644 (file)
@@ -61,6 +61,6 @@ export function useBadgeMetricsQuery() {
 
 export function useBadgeTokenQuery(componentKey: string) {
   return useQuery(['badges-token', componentKey] as const, ({ queryKey: [_, key] }) =>
-    getProjectBadgesToken(key)
+    getProjectBadgesToken(key),
   );
 }
index 604c347231e7c96a9ae733f272f223439670c7e4..5ccfcec40873c8beb786d1e0b3edd70ea0e1c3c6 100644 (file)
@@ -126,7 +126,7 @@ export function useBranchesQuery(component?: Component) {
         prOrBranch === 'pull-request'
           ? branchLikes.find((b) => isPullRequest(b) && b.key === name)
           : branchLikes.find(
-              (b) => isBranch(b) && (prOrBranch === 'branch' ? b.name === name : b.isMain)
+              (b) => isBranch(b) && (prOrBranch === 'branch' ? b.name === name : b.isMain),
             );
       return { branchLikes, branchLike };
     },
@@ -311,7 +311,7 @@ export function useRefreshBranchStatus(): () => void {
         queryKey: invalidateDetailsKey,
       });
     }, DELAY_REFRECH),
-    [invalidateDetailsKey, invalidateStatusKey]
+    [invalidateDetailsKey, invalidateStatusKey],
   );
 }
 
@@ -327,7 +327,7 @@ export function useRefreshBranches() {
 export function withBranchLikes<P extends { component?: Component }>(
   WrappedComponent: React.ComponentType<
     P & { branchLikes?: BranchLike[]; branchLike?: BranchLike; isFetchingBranch?: boolean }
-  >
+  >,
 ): React.ComponentType<Omit<P, 'branchLike' | 'branchLikes'>> {
   return function WithBranchLike(p: P) {
     const { data, isFetching } = useBranchesQuery(p.component);
@@ -343,7 +343,7 @@ export function withBranchLikes<P extends { component?: Component }>(
 }
 
 export function withBranchStatusRefresh<
-  P extends { refreshBranchStatus: ReturnType<typeof useRefreshBranchStatus> }
+  P extends { refreshBranchStatus: ReturnType<typeof useRefreshBranchStatus> },
 >(WrappedComponent: React.ComponentType<P>): React.ComponentType<Omit<P, 'refreshBranchStatus'>> {
   return function WithBranchStatusRefresh(props: P) {
     const refresh = useRefreshBranchStatus();
index 5fc783d9029bcedf3cf4419e9e6d7eb897350bfd..462899a133311a242340cb7bb09ce44d35140a86 100644 (file)
@@ -46,7 +46,7 @@ export function useProjectBindingQuery<T = ProjectAlmBindingResponse>(
     unknown,
     T,
     ['devops_integration', string, 'binding']
-  >
+  >,
 ) {
   const keyFromUrl = useProjectKeyFromLocation();
 
@@ -65,7 +65,7 @@ export function useProjectBindingQuery<T = ProjectAlmBindingResponse>(
       staleTime: 60_000,
       retry: false,
       ...options,
-    }
+    },
   );
 }
 
index d9af694132a5baee0a0c19431fdf3af98d5217c0..73b282d70b01f6b58c985ed2289c119a1ed83694 100644 (file)
@@ -87,7 +87,7 @@ interface GithubSyncStatusOptions {
 
 export function useGitHubSyncStatusQuery(options: GithubSyncStatusOptions = {}) {
   const hasGithubProvisioning = useContext(AvailableFeaturesContext).includes(
-    Feature.GithubProvisioning
+    Feature.GithubProvisioning,
   );
   return useQuery(['identity_provider', 'github_sync', 'status'], fetchGithubProvisioningStatus, {
     enabled: hasGithubProvisioning,
index 9dcdea5e40a199f5bdd9b719ae716b9bb36daeb9..34da12a2ef463768350499caa743a9d5132f9670 100644 (file)
@@ -39,7 +39,7 @@ export function useNewCodeDefinitionQuery(params?: {
   return useQuery(
     getNewCodeDefinitionQueryKey(params?.projectKey, params?.branchName),
     () => getNewCodeDefinition({ branch: params?.branchName, project: params?.projectKey }),
-    { enabled: params?.enabled ?? true, refetchOnWindowFocus: false }
+    { enabled: params?.enabled ?? true, refetchOnWindowFocus: false },
   );
 }
 
index 2c6daabfb2505b352099f412deca2d665429fd19..3de28aaccdc00b6c1a3c762c633ffa38e715562c 100644 (file)
@@ -52,7 +52,7 @@ export function useSaveValuesMutation() {
       values: {
         newValue?: SettingValue;
         definition: ExtendedSettingDefinition;
-      }[]
+      }[],
     ) => {
       return Promise.all(
         values
@@ -68,7 +68,7 @@ export function useSaveValuesMutation() {
             } catch (error) {
               return { key: definition.key, success: false };
             }
-          })
+          }),
       );
     },
     onSuccess: () => {
index 38657ab82a224188f26fd5e09b8a6a9c9f7a38ee..3826de75f26ffa0d80748ae4356faac907d67c98 100644 (file)
@@ -36,13 +36,13 @@ const STALE_TIME = 4 * 60 * 1000;
 
 export function useUsersQueries<U extends RestUserBase>(
   getParams: Omit<Parameters<typeof getUsers>[0], 'pageSize' | 'pageIndex'>,
-  numberOfPages: number
+  numberOfPages: number,
 ) {
   type QueryKey = [
     'user',
     'list',
     number,
-    Omit<Parameters<typeof getUsers>[0], 'pageSize' | 'pageIndex'>
+    Omit<Parameters<typeof getUsers>[0], 'pageSize' | 'pageIndex'>,
   ];
   const results = useQueries({
     queries: range(1, numberOfPages + 1).map((page: number) => ({
@@ -59,7 +59,7 @@ export function useUsersQueries<U extends RestUserBase>(
       total: data?.page.total,
       isLoading: acc.isLoading || isLoading,
     }),
-    { users: [] as U[], total: 0, isLoading: false }
+    { users: [] as U[], total: 0, isLoading: false },
   );
 }
 
@@ -140,7 +140,7 @@ export function useRevokeTokenMutation() {
     mutationFn: (data: Parameters<typeof revokeToken>[0]) => revokeToken(data),
     onSuccess(_, data) {
       queryClient.setQueryData<UserToken[]>(['user', data.login, 'tokens'], (oldData) =>
-        oldData ? oldData.filter((token) => token.name !== data.name) : undefined
+        oldData ? oldData.filter((token) => token.name !== data.name) : undefined,
       );
     },
   });
@@ -152,7 +152,7 @@ export function useAddUserToGroupMutation() {
     mutationFn: (data: Parameters<typeof addUserToGroup>[0]) => addUserToGroup(data),
     onSuccess(_, data) {
       queryClient.setQueryData<number>(['user', data.login, 'groups', 'total'], (oldData) =>
-        oldData !== undefined ? oldData + 1 : undefined
+        oldData !== undefined ? oldData + 1 : undefined,
       );
     },
   });
@@ -164,7 +164,7 @@ export function useRemoveUserToGroupMutation() {
     mutationFn: (data: Parameters<typeof removeUserFromGroup>[0]) => removeUserFromGroup(data),
     onSuccess(_, data) {
       queryClient.setQueryData<number>(['user', data.login, 'groups', 'total'], (oldData) =>
-        oldData !== undefined ? oldData - 1 : undefined
+        oldData !== undefined ? oldData - 1 : undefined,
       );
     },
   });
index 21beffc5ec7c09631c7dc637096e2cc9992e4a5c..09b6bbd40dc9b089e4e91911eaabae5bdc6cc888 100644 (file)
@@ -24,7 +24,7 @@ import { ComponentClass, VFC } from 'react';
 export function withQueryClient<P>(
   Component:
     | ComponentClass<P & { queryClient: QueryClient }>
-    | VFC<P & { queryClient: QueryClient }>
+    | VFC<P & { queryClient: QueryClient }>,
 ): VFC<Omit<P, 'queryClient'>> {
   return function WithQueryClient(props: P) {
     const queryClient = useQueryClient();
index b3ff217ad9f12b197985f526f7f117ea79aa8109..a3b256247d414bcf79038fc5ceaff3331b9e0388 100644 (file)
@@ -31,8 +31,8 @@ it.each([[isFile], [isView], [isProject], [isApplication], [isPortfolioLike]])(
   (utilityMethod: (componentQualifier: ComponentQualifier) => void) => {
     const results = Object.values(ComponentQualifier).reduce(
       (prev, qualifier) => ({ ...prev, [qualifier]: utilityMethod(qualifier) }),
-      {}
+      {},
     );
     expect(results).toMatchSnapshot();
-  }
+  },
 );
index f73833525a3de2c7084c3de92f090210c1dc5ac2..5356cd385d4b89994d438bfd12cc7b52b4b85100 100644 (file)
@@ -169,55 +169,55 @@ export interface ProjectAlmBindingConfigurationErrors {
 }
 
 export function isProjectBitbucketBindingResponse(
-  binding: ProjectAlmBindingResponse
+  binding: ProjectAlmBindingResponse,
 ): binding is ProjectBitbucketBindingResponse {
   return binding.alm === AlmKeys.BitbucketServer;
 }
 
 export function isProjectBitbucketCloudBindingResponse(
-  binding: ProjectAlmBindingResponse
+  binding: ProjectAlmBindingResponse,
 ): binding is ProjectBitbucketBindingResponse {
   return binding.alm === AlmKeys.BitbucketCloud;
 }
 
 export function isProjectGitHubBindingResponse(
-  binding: ProjectAlmBindingResponse
+  binding: ProjectAlmBindingResponse,
 ): binding is ProjectGitHubBindingResponse {
   return binding.alm === AlmKeys.GitHub;
 }
 
 export function isProjectGitLabBindingResponse(
-  binding: ProjectAlmBindingResponse
+  binding: ProjectAlmBindingResponse,
 ): binding is ProjectGitLabBindingResponse {
   return binding.alm === AlmKeys.GitLab;
 }
 
 export function isProjectAzureBindingResponse(
-  binding: ProjectAlmBindingResponse
+  binding: ProjectAlmBindingResponse,
 ): binding is ProjectAzureBindingResponse {
   return binding.alm === AlmKeys.Azure;
 }
 
 export function isBitbucketBindingDefinition(
-  binding?: AlmBindingDefinitionBase & { url?: string }
+  binding?: AlmBindingDefinitionBase & { url?: string },
 ): binding is BitbucketServerBindingDefinition {
   return binding !== undefined && binding.url !== undefined;
 }
 
 export function isBitbucketCloudBindingDefinition(
-  binding?: AlmBindingDefinitionBase & { clientId?: string; workspace?: string }
+  binding?: AlmBindingDefinitionBase & { clientId?: string; workspace?: string },
 ): binding is BitbucketCloudBindingDefinition {
   return binding !== undefined && binding.clientId !== undefined && binding.workspace !== undefined;
 }
 
 export function isGithubBindingDefinition(
-  binding?: AlmBindingDefinitionBase & { appId?: string; url?: string }
+  binding?: AlmBindingDefinitionBase & { appId?: string; url?: string },
 ): binding is GithubBindingDefinition {
   return binding !== undefined && binding.appId !== undefined && binding.url !== undefined;
 }
 
 export function isGitLabBindingDefinition(
-  binding?: AlmBindingDefinitionBase | GithubBindingDefinition | BitbucketCloudBindingDefinition
+  binding?: AlmBindingDefinitionBase | GithubBindingDefinition | BitbucketCloudBindingDefinition,
 ): binding is GitlabBindingDefinition {
   // There's too much overlap with the others. We must not only validate that certain fields are
   // present, we must also validate that others are NOT present. And even so, we cannot be 100%
index 5cb658de7c6e21f8c14d5ae5305150c0a6d97bb8..0d2e7d8bdf845d6b1bd28239d0fbee9c63ba8e9a 100644 (file)
@@ -57,7 +57,7 @@ export interface TreeComponentWithPath extends TreeComponent {
 }
 
 export function isPortfolioLike(
-  componentQualifier?: string | ComponentQualifier
+  componentQualifier?: string | ComponentQualifier,
 ): componentQualifier is ComponentQualifier.Portfolio | ComponentQualifier.SubPortfolio {
   return (
     componentQualifier === ComponentQualifier.Portfolio ||
@@ -66,27 +66,27 @@ export function isPortfolioLike(
 }
 
 export function isApplication(
-  componentQualifier?: string | ComponentQualifier
+  componentQualifier?: string | ComponentQualifier,
 ): componentQualifier is ComponentQualifier.Application {
   return componentQualifier === ComponentQualifier.Application;
 }
 
 export function isProject(
-  componentQualifier?: string | ComponentQualifier
+  componentQualifier?: string | ComponentQualifier,
 ): componentQualifier is ComponentQualifier.Project {
   return componentQualifier === ComponentQualifier.Project;
 }
 
 export function isFile(
-  componentQualifier?: string | ComponentQualifier
+  componentQualifier?: string | ComponentQualifier,
 ): componentQualifier is ComponentQualifier.File {
   return [ComponentQualifier.File, ComponentQualifier.TestFile].includes(
-    componentQualifier as ComponentQualifier
+    componentQualifier as ComponentQualifier,
   );
 }
 
 export function isView(
-  componentQualifier?: string | ComponentQualifier
+  componentQualifier?: string | ComponentQualifier,
 ): componentQualifier is
   | ComponentQualifier.Application
   | ComponentQualifier.Portfolio