From 8d5c354fdf9bc8b59af40410ef7ffdf648f72d83 Mon Sep 17 00:00:00 2001 From: Ambroise C Date: Wed, 5 Jun 2024 13:41:07 +0200 Subject: [PATCH] NO-JIRA Add typescript-sort-keys eslint rules (#11209) --- server/sonar-web/.eslintrc | 3 +- server/sonar-web/package.json | 1 + server/sonar-web/src/main/js/@types/lunr.d.ts | 10 +-- .../src/main/js/api/alm-integrations.ts | 18 ++-- server/sonar-web/src/main/js/api/ce.ts | 6 +- .../sonar-web/src/main/js/api/components.ts | 14 +-- .../src/main/js/api/gitlab-provisioning.ts | 2 +- .../src/main/js/api/group-memberships.ts | 8 +- server/sonar-web/src/main/js/api/issues.ts | 6 +- .../js/api/mocks/AlmSettingsServiceMock.ts | 2 +- .../js/api/mocks/CodingRulesServiceMock.ts | 2 +- .../js/api/mocks/ComponentsServiceMock.ts | 4 +- .../js/api/mocks/ComputeEngineServiceMock.ts | 2 +- .../api/mocks/GroupMembersipsServiceMock.ts | 2 +- .../main/js/api/mocks/GroupsServiceMock.ts | 2 +- .../main/js/api/mocks/IssuesServiceMock.ts | 2 +- .../js/api/mocks/NavigationServiceMock.ts | 2 +- .../api/mocks/NewCodeDefinitionServiceMock.ts | 4 +- .../js/api/mocks/PermissionsServiceMock.ts | 46 +++++----- .../api/mocks/ProjectActivityServiceMock.ts | 12 +-- .../main/js/api/mocks/ProjectsServiceMock.tsx | 2 +- .../js/api/mocks/QualityGatesServiceMock.ts | 4 +- .../api/mocks/SecurityHotspotServiceMock.ts | 12 +-- .../main/js/api/mocks/SettingsServiceMock.ts | 6 +- .../main/js/api/mocks/SystemServiceMock.ts | 4 +- .../js/api/mocks/TimeMachineServiceMock.ts | 2 +- .../src/main/js/api/mocks/UserTokensMock.ts | 8 +- .../src/main/js/api/mocks/data/components.ts | 4 +- .../sonar-web/src/main/js/api/navigation.ts | 2 +- .../src/main/js/api/newCodeDefinition.ts | 6 +- .../sonar-web/src/main/js/api/permissions.ts | 56 ++++++------ .../src/main/js/api/project-management.ts | 6 +- .../src/main/js/api/projectActivity.ts | 12 +-- .../src/main/js/api/quality-gates.ts | 4 +- .../src/main/js/api/quality-profiles.ts | 30 +++---- server/sonar-web/src/main/js/api/rules.ts | 4 +- server/sonar-web/src/main/js/api/settings.ts | 8 +- server/sonar-web/src/main/js/api/system.ts | 8 +- .../sonar-web/src/main/js/api/time-machine.ts | 4 +- .../sonar-web/src/main/js/api/user-tokens.ts | 6 +- .../sonar-web/src/main/js/api/user_groups.ts | 4 +- server/sonar-web/src/main/js/api/users.ts | 16 ++-- .../main/js/app/components/AdminContainer.tsx | 2 +- .../main/js/app/components/AdminContext.tsx | 2 +- .../main/js/app/components/PageTracker.tsx | 2 +- .../main/js/app/components/RecentHistory.ts | 2 +- .../main/js/app/components/StartupModal.tsx | 2 +- .../extensions/CreateApplicationForm.tsx | 2 +- .../global-search/GlobalSearchResults.tsx | 2 +- .../js/app/components/nav/component/Menu.tsx | 2 +- .../branch-like/BranchHelpTooltip.tsx | 6 +- .../nav/component/branch-like/MenuItem.tsx | 2 +- .../nav/component/branch-like/PRLink.tsx | 2 +- .../js/apps/account/projects/Projects.tsx | 2 +- .../components/AuditAppRenderer.tsx | 2 +- .../components/AnalysisWarningsModal.tsx | 2 +- .../components/CurrentsFilter.tsx | 2 +- .../background-tasks/components/Search.tsx | 4 +- .../components/StatusFilter.tsx | 2 +- .../background-tasks/components/TaskDate.tsx | 2 +- .../background-tasks/components/Tasks.tsx | 2 +- .../components/TypesFilter.tsx | 2 +- .../ChangeAdminPasswordApp.tsx | 4 +- .../apps/code/components/CodeAppRenderer.tsx | 22 ++--- .../js/apps/code/components/Component.tsx | 2 +- .../js/apps/code/components/Components.tsx | 2 +- .../main/js/apps/code/components/Search.tsx | 4 +- .../components/ActivatedRuleActions.tsx | 8 +- .../components/ActivationButton.tsx | 2 +- .../components/CodingRulesApp.tsx | 2 +- .../components/CustomRuleFormFieldsCCT.tsx | 4 +- .../js/apps/coding-rules/components/Facet.tsx | 2 +- .../components/PrioritizedRulesFacet.tsx | 2 +- .../components/QualityProfileSelector.tsx | 2 +- .../coding-rules/components/RuleDetails.tsx | 2 +- .../components/RuleDetailsCustomRules.tsx | 2 +- .../components/RuleDetailsHeaderMeta.tsx | 2 +- .../components/RuleDetailsHeaderSide.tsx | 2 +- .../coding-rules/components/RuleListItem.tsx | 4 +- .../components/SeveritySelect.tsx | 2 +- .../src/main/js/apps/coding-rules/query.ts | 2 +- .../src/main/js/apps/coding-rules/rule.ts | 4 +- .../components/MeasureContent.tsx | 4 +- .../components/MeasureViewSelect.tsx | 2 +- .../apps/component-measures/config/bubbles.ts | 4 +- .../drilldown/BubbleChartView.tsx | 8 +- .../drilldown/FilesView.tsx | 2 +- .../main/js/apps/component-measures/utils.ts | 4 +- .../project/Azure/AzureProjectAccordion.tsx | 2 +- .../Azure/AzureProjectCreateRenderer.tsx | 10 +-- .../project/Azure/AzureProjectsList.tsx | 4 +- .../BitbucketCloudPersonalAccessTokenForm.tsx | 2 +- .../BitbucketCloudProjectCreateRender.tsx | 2 +- .../BitbucketCloudSearchForm.tsx | 2 +- .../BitbucketImportRepositoryForm.tsx | 6 +- .../BitbucketProjectCreateRenderer.tsx | 6 +- .../BitbucketServer/BitbucketRepositories.tsx | 2 +- .../BitbucketSearchResults.tsx | 2 +- ...BitbucketServerPersonalAccessTokenForm.tsx | 2 +- .../apps/create/project/CreateProjectPage.tsx | 24 ++--- .../project/Github/GitHubProjectCreate.tsx | 2 +- .../Github/GitHubProjectCreateRenderer.tsx | 6 +- .../Gitlab/GItlabPersonalAccessTokenForm.tsx | 2 +- .../project/Gitlab/GitlabProjectCreate.tsx | 2 +- .../Gitlab/GitlabProjectCreateRenderer.tsx | 2 +- .../Gitlab/GitlabProjectSelectionForm.tsx | 2 +- .../create/project/components/AlmRepoItem.tsx | 14 +-- .../AlmSettingsInstanceDropdown.tsx | 4 +- .../project/components/ProjectValidation.tsx | 8 +- .../project/components/RepositoryList.tsx | 12 +-- .../project/manual/ManualProjectCreate.tsx | 2 +- .../monorepo/MonorepoConnectionSelector.tsx | 2 +- .../project/monorepo/MonorepoProjectsList.tsx | 2 +- .../monorepo/MonorepoRepositorySelector.tsx | 2 +- .../create/project/usePersonalAccessToken.ts | 14 +-- .../js/apps/groups/components/Members.tsx | 2 +- .../groups/components/ViewMembersModal.tsx | 2 +- .../apps/issues/components/AssigneeSelect.tsx | 2 +- .../js/apps/issues/components/IssueHeader.tsx | 4 +- .../issues/components/IssueHeaderSide.tsx | 2 +- .../IssueNewStatusAndTransitionGuide.tsx | 2 +- .../js/apps/issues/components/IssuesApp.tsx | 4 +- .../SnippetViewer.tsx | 4 +- .../crossComponentSourceViewer/utils.ts | 2 +- .../SubnavigationIssue.tsx | 2 +- .../js/apps/issues/sidebar/AssigneeFacet.tsx | 2 +- .../apps/issues/sidebar/CreationDateFacet.tsx | 2 +- .../js/apps/issues/sidebar/FacetItemsList.tsx | 4 +- .../js/apps/issues/sidebar/LanguageFacet.tsx | 8 +- .../js/apps/issues/sidebar/ListStyleFacet.tsx | 8 +- .../js/apps/issues/sidebar/PeriodFilter.tsx | 2 +- .../issues/sidebar/PrioritizedRuleFacet.tsx | 2 +- .../js/apps/issues/sidebar/ProjectFacet.tsx | 4 +- .../main/js/apps/issues/sidebar/Sidebar.tsx | 2 +- .../issues/sidebar/SimpleListStyleFacet.tsx | 8 +- .../js/apps/issues/sidebar/StandardFacet.tsx | 6 +- .../main/js/apps/issues/sidebar/TagFacet.tsx | 2 +- .../src/main/js/apps/issues/utils.ts | 12 +-- .../js/apps/maintenance/components/App.tsx | 8 +- .../components/MigrationProgress.tsx | 2 +- .../src/main/js/apps/marketplace/App.tsx | 2 +- .../main/js/apps/marketplace/EditionBoxes.tsx | 2 +- .../marketplace/MarketplaceAppContainer.tsx | 2 +- .../main/js/apps/marketplace/PluginsList.tsx | 4 +- .../components/PluginUpdateItem.tsx | 2 +- .../overview/branches/BranchMetaTopBar.tsx | 2 +- .../branches/MeasuresPanelPercentCards.tsx | 4 +- .../branches/QualityGateConditions.tsx | 2 +- .../branches/QualityGateStatusHeader.tsx | 2 +- .../SoftwareImpactMeasureBreakdownCard.tsx | 6 +- .../branches/SoftwareImpactMeasureCard.tsx | 6 +- .../js/apps/overview/branches/TabsPanel.tsx | 4 +- .../components/IssueMeasuresCardInner.tsx | 12 +-- .../apps/overview/components/MeasuresCard.tsx | 8 +- .../components/MeasuresCardNumber.tsx | 4 +- .../components/MeasuresCardPercent.tsx | 14 +-- .../pullRequests/BranchQualityGate.tsx | 2 +- .../pullRequests/IssueMeasuresCard.tsx | 2 +- .../pullRequests/MeasuresCardPanel.tsx | 4 +- .../pullRequests/PullRequestMetaTopBar.tsx | 2 +- .../pullRequests/PullRequestOverview.tsx | 2 +- .../components/PermissionCell.tsx | 2 +- .../components/PermissionTemplatesApp.tsx | 6 +- .../components/Template.tsx | 2 +- .../js/apps/permission-templates/utils.ts | 2 +- .../components/PermissionsGlobalApp.tsx | 2 +- .../components/PermissionsProjectApp.tsx | 2 +- .../ProjectActivityAnalysesList.tsx | 4 +- .../components/ProjectActivityAnalysis.tsx | 4 +- .../components/ProjectActivityApp.tsx | 2 +- .../components/ProjectActivityAppRenderer.tsx | 8 +- .../components/ProjectActivityDateInput.tsx | 2 +- .../components/ProjectActivityGraphs.tsx | 4 +- .../components/forms/AddEventForm.tsx | 2 +- .../components/forms/RemoveEventForm.tsx | 2 +- .../src/main/js/apps/projectActivity/utils.ts | 2 +- .../ProjectInformationApp.tsx | 2 +- .../projectInformation/about/AboutProject.tsx | 2 +- .../about/components/MetaQualityProfiles.tsx | 4 +- .../apps/projectInformation/badges/utils.ts | 2 +- .../RegulatoryReport.tsx | 2 +- .../projectNewCode/components/BranchList.tsx | 2 +- .../BranchNewCodeDefinitionSettingModal.tsx | 4 +- .../NewCodeDefinitionSettingAnalysis.tsx | 4 +- ...ewCodeDefinitionSettingReferenceBranch.tsx | 2 +- .../ProjectNewCodeDefinitionApp.tsx | 2 +- .../ProjectNewCodeDefinitionSelector.tsx | 2 +- .../components/AddLanguageModal.tsx | 2 +- .../LanguageProfileSelectOption.tsx | 2 +- .../js/apps/projects/__tests__/utils-test.ts | 2 +- .../apps/projects/components/AllProjects.tsx | 2 +- .../projects/components/PerspectiveSelect.tsx | 2 +- .../apps/projects/components/ProjectsList.tsx | 2 +- .../components/ProjectsSortingSelect.tsx | 4 +- .../__tests__/DefaultPageSelector-test.tsx | 2 +- .../project-card/ProjectCardMeasure.tsx | 2 +- .../project-card/ProjectCardMeasures.tsx | 2 +- .../apps/projects/filters/RangeFacetBase.tsx | 22 ++--- .../src/main/js/apps/projects/query.ts | 26 +++--- .../src/main/js/apps/projects/types.ts | 2 +- .../src/main/js/apps/projects/utils.ts | 10 +-- .../js/apps/projectsManagement/Search.tsx | 4 +- .../components/CaycFixOptimizeBanner.tsx | 2 +- .../quality-gates/components/Condition.tsx | 4 +- .../ConditionReviewAndUpdateModal.tsx | 8 +- .../components/ConditionValue.tsx | 2 +- .../components/ConditionValueDescription.tsx | 2 +- .../quality-gates/components/Conditions.tsx | 2 +- .../components/ConditionsTable.tsx | 4 +- .../components/DetailsContent.tsx | 2 +- .../components/EditConditionModal.tsx | 2 +- .../js/apps/quality-gates/components/List.tsx | 2 +- .../quality-gates/components/MetricSelect.tsx | 2 +- .../components/PermissionItem.tsx | 2 +- .../quality-gates/components/Projects.tsx | 2 +- .../components/QualityGatePermissions.tsx | 4 +- ...QualityGatePermissionsAddModalRenderer.tsx | 4 +- .../QualityGatePermissionsRenderer.tsx | 4 +- .../components/ThresholdInput.tsx | 4 +- .../src/main/js/apps/quality-gates/utils.ts | 6 +- .../changelog/ChangelogContainer.tsx | 2 +- .../changelog/CleanCodeAttributeChange.tsx | 4 +- .../compare/ComparisonForm.tsx | 6 +- .../compare/ComparisonResultDeactivation.tsx | 2 +- .../compare/ComparisonResults.tsx | 2 +- .../compare/ComparisonResultsSummary.tsx | 4 +- .../components/ProfileActions.tsx | 2 +- .../components/ProfileLink.tsx | 2 +- .../components/QualityProfilesApp.tsx | 2 +- .../details/ChangeProjectsForm.tsx | 2 +- .../details/ProfileHeader.tsx | 2 +- .../quality-profiles/details/ProfileRules.tsx | 4 +- .../details/ProfileRulesRow.tsx | 6 +- .../ProfileRulesSonarWayComparison.tsx | 2 +- .../quality-profiles/home/ProfilesListRow.tsx | 2 +- .../main/js/apps/quality-profiles/types.ts | 20 ++--- .../security-hotspots/SecurityHotspotsApp.tsx | 10 +-- .../SecurityHotspotsAppRenderer.tsx | 4 +- .../components/EmptyHotspotsPage.tsx | 2 +- .../components/HotspotCategory.tsx | 2 +- .../components/HotspotCommentModal.tsx | 4 +- .../components/HotspotHeader.tsx | 6 +- .../components/HotspotHeaderRightSection.tsx | 4 +- .../components/HotspotList.tsx | 2 +- .../components/HotspotOpenInIdeButton.tsx | 4 +- .../components/HotspotSimpleList.tsx | 6 +- .../components/HotspotSnippetContainer.tsx | 2 +- .../HotspotSnippetContainerRenderer.tsx | 6 +- .../components/HotspotSnippetHeader.tsx | 6 +- .../components/HotspotViewerTabs.tsx | 6 +- .../components/status/StatusSelection.tsx | 2 +- .../status/StatusSelectionRenderer.tsx | 8 +- .../hooks/useStickyDetection.ts | 2 +- .../js/apps/sessions/components/Login.tsx | 2 +- .../components/AdditionalCategories.tsx | 4 +- .../components/CategoryDefinitionsList.tsx | 2 +- .../js/apps/settings/components/EmailForm.tsx | 6 +- .../components/SettingsAppRenderer.tsx | 2 +- .../components/SettingsSearchRenderer.tsx | 8 +- .../components/SubCategoryDefinitionsList.tsx | 4 +- .../AlmBindingDefinitionForm.tsx | 12 +-- .../AlmBindingDefinitionFormField.tsx | 2 +- .../AlmBindingDefinitionFormRenderer.tsx | 14 +-- .../almIntegration/AlmIntegration.tsx | 2 +- .../almIntegration/AlmIntegrationRenderer.tsx | 2 +- .../components/almIntegration/AlmTab.tsx | 4 +- .../almIntegration/AlmTabRenderer.tsx | 4 +- .../almIntegration/BitbucketForm.tsx | 2 +- .../components/almIntegration/DeleteModal.tsx | 4 +- .../AuthenticationFormField.tsx | 8 +- .../AuthenticationMultiValuesField.tsx | 2 +- .../AuthenticationSecuredField.tsx | 6 +- .../AuthenticationToggleField.tsx | 2 +- .../authentication/ConfigurationDetails.tsx | 12 +-- .../ConfirmProvisioningModal.tsx | 4 +- .../authentication/GitHubMappingModal.tsx | 4 +- .../GitLabAuthenticationTab.tsx | 4 +- .../GitLabConfigurationForm.tsx | 4 +- .../GithubAuthenticationTab.tsx | 2 +- .../authentication/ProvisioningSection.tsx | 32 +++---- .../components/authentication/TabHeader.tsx | 6 +- .../authentication/TestConfiguration.tsx | 6 +- .../authentication/hook/useConfiguration.ts | 16 ++-- .../hook/useGithubConfiguration.ts | 6 +- .../AlmSpecificForm.tsx | 6 +- .../PRDecorationBinding.tsx | 6 +- .../PRDecorationBindingRenderer.tsx | 10 +-- .../__tests__/PRDecorationBinding-it.tsx | 2 +- .../src/main/js/apps/settings/utils.ts | 6 +- .../js/apps/system/components/PageHeader.tsx | 2 +- .../components/info-items/HealthCard.tsx | 2 +- .../components/info-items/HealthItem.tsx | 2 +- .../system/components/info-items/Section.tsx | 2 +- .../src/main/js/apps/users/UsersList.tsx | 2 +- .../js/apps/users/components/TokensForm.tsx | 2 +- .../apps/users/components/TokensFormModal.tsx | 2 +- .../js/apps/users/components/UserActions.tsx | 2 +- .../js/apps/users/components/UserForm.tsx | 2 +- .../js/apps/users/components/UserListItem.tsx | 2 +- .../users/components/UserListItemIdentity.tsx | 2 +- .../users/components/UserScmAccountInput.tsx | 2 +- .../sonar-web/src/main/js/apps/users/utils.ts | 2 +- .../components/ApiFilterContext.tsx | 2 +- .../web-api-v2/components/ApiInformation.tsx | 4 +- .../js/apps/web-api/components/Search.tsx | 4 +- .../js/apps/web-api/components/WebApiApp.tsx | 2 +- .../src/main/js/apps/web-api/utils.ts | 2 +- .../main/js/apps/webhooks/components/App.tsx | 2 +- .../webhooks/components/__tests__/App-it.tsx | 2 +- .../SourceViewer/SourceViewerCode.tsx | 8 +- .../components/DuplicationPopup.tsx | 2 +- .../SourceViewer/components/Line.tsx | 14 +-- .../components/LineIssuesList.tsx | 4 +- .../activity-graph/DataTableModal.tsx | 2 +- .../DefinitionChangeEventInner.tsx | 2 +- .../activity-graph/GraphHistory.tsx | 8 +- .../activity-graph/GraphsHeader.tsx | 6 +- .../activity-graph/GraphsHistory.tsx | 2 +- .../activity-graph/GraphsLegendItem.tsx | 2 +- .../activity-graph/GraphsTooltipsContent.tsx | 2 +- .../components/activity-graph/GraphsZoom.tsx | 2 +- .../js/components/activity-graph/utils.ts | 2 +- .../js/components/charts/AdvancedTimeline.tsx | 12 +-- .../components/charts/ColorGradientLegend.tsx | 5 +- .../js/components/charts/ZoomTimeLine.tsx | 10 +-- .../common/DisableableSelectOption.tsx | 4 +- .../components/common/DocumentationLink.tsx | 2 +- .../common/ScreenPositionHelper.tsx | 2 +- .../components/common/VisibilitySelector.tsx | 4 +- .../controls/ComponentReportActions.tsx | 2 +- .../ComponentReportActionsRenderer.tsx | 6 +- .../main/js/components/controls/Favorite.tsx | 2 +- .../components/controls/FocusOutHandler.tsx | 2 +- .../controls/InputValidationField.tsx | 2 +- .../js/components/controls/ListFooter.tsx | 8 +- .../js/components/controls/ManagedFilter.tsx | 2 +- .../js/components/controls/SelectList.tsx | 8 +- .../controls/SelectListListContainer.tsx | 2 +- .../main/js/components/controls/Tooltip.tsx | 16 ++-- .../AlmSettingsInstanceSelector.tsx | 6 +- .../SoftwareImpactSeverityIcon.tsx | 2 +- .../src/main/js/components/issue/Issue.tsx | 2 +- .../issue/components/IssueActionsBar.tsx | 6 +- .../issue/components/IssueAssign.tsx | 4 +- .../issue/components/IssueMessage.tsx | 2 +- .../components/issue/components/IssueTags.tsx | 2 +- .../issue/components/IssueTransitionItem.tsx | 4 +- .../components/IssueTransitionOverlay.tsx | 4 +- .../locations/SingleFileLocationNavigator.tsx | 2 +- .../js/components/logos/SonarLintLogo.tsx | 2 +- .../NewCodeDefinitionDaysOption.tsx | 8 +- .../NewCodeDefinitionSelector.tsx | 2 +- .../components/permissions/AllHoldersList.tsx | 20 ++--- .../js/components/permissions/GroupHolder.tsx | 4 +- .../components/permissions/PermissionCell.tsx | 4 +- .../js/components/permissions/UserHolder.tsx | 4 +- .../permissions/usePermissionChange.tsx | 4 +- .../js/components/rules/IssueTabViewer.tsx | 22 ++--- .../js/components/rules/RuleDescription.tsx | 2 +- .../js/components/rules/RuleTabViewer.tsx | 10 +-- .../shared/AnalysisMissingInfoMessage.tsx | 2 +- .../shared/CleanCodeAttributePill.tsx | 4 +- .../js/components/shared/DrilldownLink.tsx | 2 +- .../components/shared/SoftwareImpactPill.tsx | 2 +- .../shared/SoftwareImpactPillList.tsx | 2 +- .../src/main/js/components/tags/TagsList.tsx | 2 +- .../tutorials/TutorialSelection.tsx | 2 +- .../BranchAnalysisStepContent.tsx | 2 +- .../commands/AnalysisCommand.tsx | 4 +- .../azure-pipelines/commands/ClangGCC.tsx | 2 +- .../bitbucket-pipelines/AnalysisCommand.tsx | 2 +- .../tutorials/components/EditTokenModal.tsx | 4 +- .../GithubCFamilyExampleRepositories.tsx | 2 +- .../components/GradleBuildSelection.tsx | 2 +- .../tutorials/components/RenderOptions.tsx | 2 +- .../components/SentenceWithHighlights.tsx | 2 +- .../github-action/AnalysisCommand.tsx | 2 +- .../github-action/GitHubActionTutorial.tsx | 2 +- .../github-action/commands/CFamily.tsx | 2 +- .../github-action/commands/DotNet.tsx | 2 +- .../github-action/commands/Gradle.tsx | 2 +- .../github-action/commands/JavaMaven.tsx | 2 +- .../github-action/commands/Others.tsx | 2 +- .../tutorials/jenkins/JenkinsStep.tsx | 4 +- .../jenkins/buildtool-steps/DotNetCore.tsx | 2 +- .../tutorials/other/BuildToolForm.tsx | 2 +- .../tutorials/other/OtherTutorial.tsx | 2 +- .../tutorials/other/ProjectAnalysisStep.tsx | 4 +- .../components/tutorials/other/TokenStep.tsx | 12 +-- .../other/commands/AnalysisCommand.tsx | 2 +- .../other/commands/ClangGCCCommand.tsx | 2 +- .../tutorials/other/commands/DotNet.tsx | 2 +- .../other/commands/DownloadBuildWrapper.tsx | 2 +- .../tutorials/other/commands/ExecScanner.tsx | 4 +- .../tutorials/other/commands/JavaGradle.tsx | 2 +- .../tutorials/other/commands/JavaMaven.tsx | 2 +- .../tutorials/other/commands/Other.tsx | 2 +- .../components/upgrade/SystemUpgradeForm.tsx | 2 +- .../workspace/__tests__/Workspace-test.tsx | 2 +- .../src/main/js/helpers/UseQuery.tsx | 2 +- .../src/main/js/helpers/code-difference.ts | 2 +- .../sonar-web/src/main/js/helpers/editions.ts | 2 +- .../sonar-web/src/main/js/helpers/issues.ts | 2 +- .../sonar-web/src/main/js/helpers/request.ts | 2 +- .../src/main/js/helpers/testMocks.ts | 2 +- .../main/js/helpers/testReactTestingUtils.tsx | 8 +- server/sonar-web/src/main/js/helpers/urls.ts | 6 +- .../hooks/__tests__/useLocalStorage-test.tsx | 4 +- .../sonar-web/src/main/js/queries/branch.tsx | 6 +- .../src/main/js/queries/component.ts | 4 +- .../src/main/js/queries/devops-integration.ts | 2 +- .../src/main/js/queries/group-memberships.ts | 4 +- .../sonar-web/src/main/js/queries/groups.ts | 2 +- .../js/queries/identity-provider/gitlab.ts | 2 +- .../src/main/js/queries/import-projects.ts | 8 +- .../src/main/js/queries/newCodeDefinition.ts | 2 +- .../src/main/js/queries/quality-gates.ts | 2 +- server/sonar-web/src/main/js/queries/rules.ts | 2 +- .../sonar-web/src/main/js/queries/settings.ts | 8 +- server/sonar-web/src/main/js/queries/users.ts | 2 +- .../components/a11y/A11yContext.tsx | 2 +- .../components/controls/DocHelpTooltip.tsx | 2 +- .../components/measure/Measure.tsx | 2 +- .../src/main/js/sonar-aligned/types/router.ts | 2 +- .../src/main/js/types/alm-integration.ts | 12 +-- .../src/main/js/types/alm-settings.ts | 8 +- .../src/main/js/types/application.ts | 4 +- .../sonar-web/src/main/js/types/appstate.ts | 2 +- server/sonar-web/src/main/js/types/axios.d.ts | 14 +-- .../src/main/js/types/branch-like.ts | 4 +- server/sonar-web/src/main/js/types/browser.ts | 6 +- .../src/main/js/types/clean-code-taxonomy.ts | 2 +- .../src/main/js/types/coding-rules.ts | 2 +- .../sonar-web/src/main/js/types/component.ts | 2 +- .../sonar-web/src/main/js/types/editions.ts | 6 +- server/sonar-web/src/main/js/types/issues.ts | 34 +++---- .../sonar-web/src/main/js/types/l10nBundle.ts | 2 +- .../src/main/js/types/new-code-definition.ts | 10 +-- .../src/main/js/types/notifications.ts | 2 +- server/sonar-web/src/main/js/types/plugins.ts | 22 ++--- .../src/main/js/types/project-activity.ts | 18 ++-- .../src/main/js/types/provisioning.ts | 56 ++++++------ .../src/main/js/types/quality-gates.ts | 10 +-- server/sonar-web/src/main/js/types/rules.ts | 6 +- .../src/main/js/types/security-hotspots.ts | 32 +++---- .../sonar-web/src/main/js/types/security.ts | 2 +- .../sonar-web/src/main/js/types/settings.ts | 8 +- server/sonar-web/src/main/js/types/system.ts | 8 +- server/sonar-web/src/main/js/types/tasks.ts | 14 +-- server/sonar-web/src/main/js/types/token.ts | 6 +- server/sonar-web/src/main/js/types/types.ts | 90 +++++++++---------- server/sonar-web/src/main/js/types/users.ts | 22 ++--- server/sonar-web/src/main/js/types/webhook.ts | 2 +- server/sonar-web/yarn.lock | 16 ++++ 454 files changed, 1166 insertions(+), 1147 deletions(-) diff --git a/server/sonar-web/.eslintrc b/server/sonar-web/.eslintrc index eb719ac425b..ae429400752 100644 --- a/server/sonar-web/.eslintrc +++ b/server/sonar-web/.eslintrc @@ -1,6 +1,6 @@ { "extends": "sonarqube", - "plugins": ["header", "eslint-plugin-local-rules"], + "plugins": ["header", "typescript-sort-keys", "eslint-plugin-local-rules"], "ignorePatterns": ["eslint-local-rules/**/*"], "root": true, "parserOptions": { @@ -48,6 +48,7 @@ ], "react/jsx-curly-brace-presence": "warn", "testing-library/render-result-naming-convention": "off", + "typescript-sort-keys/interface": "error", /* Local rules, defined in ./eslint-local-rules/ */ "local-rules/use-componentqualifier-enum": "warn", "local-rules/use-metrickey-enum": "warn", diff --git a/server/sonar-web/package.json b/server/sonar-web/package.json index ec3dcbf01f3..74cab28e3ff 100644 --- a/server/sonar-web/package.json +++ b/server/sonar-web/package.json @@ -96,6 +96,7 @@ "eslint-plugin-react": "7.33.2", "eslint-plugin-react-hooks": "4.6.0", "eslint-plugin-testing-library": "6.2.0", + "eslint-plugin-typescript-sort-keys": "3.2.0", "fs-extra": "11.2.0", "http-proxy": "1.18.1", "jest": "29.7.0", diff --git a/server/sonar-web/src/main/js/@types/lunr.d.ts b/server/sonar-web/src/main/js/@types/lunr.d.ts index 367a226719d..a10e8ce3905 100644 --- a/server/sonar-web/src/main/js/@types/lunr.d.ts +++ b/server/sonar-web/src/main/js/@types/lunr.d.ts @@ -23,16 +23,16 @@ declare module 'lunr' { field(field: string, options?: { boost?: number }): void; + metadataWhitelist?: string[]; + ref(field: string): void; use(fn: Function): void; - - metadataWhitelist?: string[]; } export interface LunrBuilder { - pipeline: any; metadataWhitelist: string[]; + pipeline: any; } export interface LunrIndex { @@ -44,14 +44,14 @@ declare module 'lunr' { } export interface LunrMatch { + matchData: { metadata: any }; ref: string; score: number; - matchData: { metadata: any }; } export interface LunrToken { - str: string; metadata: any; + str: string; } function lunr(initializer: LunrInit): LunrIndex; diff --git a/server/sonar-web/src/main/js/api/alm-integrations.ts b/server/sonar-web/src/main/js/api/alm-integrations.ts index d949954dbb7..b6e2d5047af 100644 --- a/server/sonar-web/src/main/js/api/alm-integrations.ts +++ b/server/sonar-web/src/main/js/api/alm-integrations.ts @@ -45,7 +45,7 @@ export function setAlmPersonalAccessToken( export function checkPersonalAccessTokenIsValid( almSetting: string, -): Promise<{ status: boolean; error?: string }> { +): Promise<{ error?: string; status: boolean }> { return get('/api/alm_integrations/check_pat', { almSetting }) .then(() => ({ status: true })) .catch(async (response: Response) => { @@ -92,10 +92,10 @@ export function setupAzureProjectCreation(data: { export function importAzureRepository(data: { almSetting: string; - projectName: string; - repositoryName: string; newCodeDefinitionType?: string; newCodeDefinitionValue?: string; + projectName: string; + repositoryName: string; }): Promise<{ project: ProjectBase }> { return postJSON('/api/alm_integrations/import_azure_project', data).catch(throwGlobalError); } @@ -130,10 +130,10 @@ export function setupBitbucketServerProjectCreation(data: { export function importBitbucketServerProject(data: { almSetting: string; - projectKey: string; - repositorySlug: string; newCodeDefinitionType?: string; newCodeDefinitionValue?: string; + projectKey: string; + repositorySlug: string; }): Promise<{ project: ProjectBase }> { return postJSON('/api/alm_integrations/import_bitbucketserver_project', data).catch( throwGlobalError, @@ -184,9 +184,9 @@ export function setupBitbucketCloudProjectCreation(data: { export function importBitbucketCloudRepository(data: { almSetting: string; - repositorySlug: string; newCodeDefinitionType?: string; newCodeDefinitionValue?: string; + repositorySlug: string; }): Promise<{ project: ProjectBase }> { return postJSON('/api/alm_integrations/import_bitbucketcloud_repo', data).catch(throwGlobalError); } @@ -202,9 +202,9 @@ export function setupGithubProjectCreation(data: { export function importGithubRepository(data: { almSetting: string; - repositoryKey: string; newCodeDefinitionType?: string; newCodeDefinitionValue?: string; + repositoryKey: string; }): Promise<{ project: ProjectBase }> { return postJSON('/api/alm_integrations/import_github_project', data).catch(throwGlobalError); } @@ -226,10 +226,10 @@ export function getGithubOrganizations( export function getGithubRepositories(data: { almSetting: string; organization: string; - pageSize: number; page?: number; + pageSize: number; query?: string; -}): Promise<{ repositories: GithubRepository[]; paging: Paging }> { +}): Promise<{ paging: Paging; repositories: GithubRepository[] }> { const { almSetting, organization, pageSize, page = 1, query } = data; return getJSON('/api/alm_integrations/list_github_repositories', { almSetting, diff --git a/server/sonar-web/src/main/js/api/ce.ts b/server/sonar-web/src/main/js/api/ce.ts index 7acd1af27c4..72a15a36e38 100644 --- a/server/sonar-web/src/main/js/api/ce.ts +++ b/server/sonar-web/src/main/js/api/ce.ts @@ -25,8 +25,8 @@ import { ActivityRequestParameters, Task, TaskWarning } from '../types/tasks'; import { Paging } from '../types/types'; export function getAnalysisStatus(data: { - component: string; branch?: string; + component: string; pullRequest?: string; }): Promise<{ component: { @@ -42,7 +42,7 @@ export function getAnalysisStatus(data: { export function getActivity( data: ActivityRequestParameters, -): Promise<{ tasks: Task[]; paging: Paging }> { +): Promise<{ paging: Paging; tasks: Task[] }> { return getJSON('/api/ce/activity', data); } @@ -69,7 +69,7 @@ export function cancelAllTasks(): Promise { export function getTasksForComponent( component: string, -): Promise<{ queue: Task[]; current?: Task }> { +): Promise<{ current?: Task; queue: Task[] }> { return getJSON('/api/ce/component', { component }).catch(throwGlobalError); } diff --git a/server/sonar-web/src/main/js/api/components.ts b/server/sonar-web/src/main/js/api/components.ts index 7c8ae1e2dc1..4ef35769030 100644 --- a/server/sonar-web/src/main/js/api/components.ts +++ b/server/sonar-web/src/main/js/api/components.ts @@ -52,15 +52,15 @@ export interface ProjectBase { } export interface ComponentRaw { + analysisDate?: string; + isFavorite?: boolean; key: string; + leakPeriodDate?: string; name: string; - isFavorite?: boolean; - analysisDate?: string; + needIssueSync?: boolean; qualifier: ComponentQualifier; tags: string[]; visibility: Visibility; - leakPeriodDate?: string; - needIssueSync?: boolean; } export function searchProjectTags(data?: { ps?: number; q?: string }): Promise { @@ -175,7 +175,7 @@ export function getMyProjects(data: { export interface Facet { property: string; - values: Array<{ val: string; count: number }>; + values: Array<{ count: number; val: string }>; } export function searchProjects(data: RequestData): Promise<{ @@ -188,9 +188,9 @@ export function searchProjects(data: RequestData): Promise<{ } export function searchComponents(data?: { + ps?: number; q?: string; qualifiers?: string; - ps?: number; }): Promise { return getJSON('/api/components/search', data); } @@ -241,7 +241,7 @@ export function getComponentForSourceViewer( } export function getSources( - data: { key: string; from?: number; to?: number } & BranchParameters, + data: { from?: number; key: string; to?: number } & BranchParameters, ): Promise { return getJSON('/api/sources/lines', data).then((r) => r.sources); } diff --git a/server/sonar-web/src/main/js/api/gitlab-provisioning.ts b/server/sonar-web/src/main/js/api/gitlab-provisioning.ts index d14e3c7c025..7f0c67d928a 100644 --- a/server/sonar-web/src/main/js/api/gitlab-provisioning.ts +++ b/server/sonar-web/src/main/js/api/gitlab-provisioning.ts @@ -29,7 +29,7 @@ import { Paging } from '../types/types'; const GITLAB_CONFIGURATIONS = '/api/v2/dop-translation/gitlab-configurations'; export function fetchGitLabConfigurations() { - return axios.get<{ page: Paging; gitlabConfigurations: GitlabConfiguration[] }>( + return axios.get<{ gitlabConfigurations: GitlabConfiguration[]; page: Paging }>( GITLAB_CONFIGURATIONS, ); } diff --git a/server/sonar-web/src/main/js/api/group-memberships.ts b/server/sonar-web/src/main/js/api/group-memberships.ts index 10d293929e3..e13cbff3727 100644 --- a/server/sonar-web/src/main/js/api/group-memberships.ts +++ b/server/sonar-web/src/main/js/api/group-memberships.ts @@ -23,18 +23,18 @@ import { GroupMembership, Paging } from '../types/types'; const GROUPS_MEMBERSHIPS_ENDPOINT = '/api/v2/authorizations/group-memberships'; export function getGroupMemberships(data: { - userId?: string; groupId?: string; - pageSize?: number; pageIndex?: number; + pageSize?: number; + userId?: string; }) { - return axios.get<{ page: Paging; groupMemberships: GroupMembership[] }>( + return axios.get<{ groupMemberships: GroupMembership[]; page: Paging }>( GROUPS_MEMBERSHIPS_ENDPOINT, { params: data }, ); } -export function addGroupMembership(data: { userId: string; groupId: string }) { +export function addGroupMembership(data: { groupId: string; userId: string }) { return axios.post(GROUPS_MEMBERSHIPS_ENDPOINT, data); } diff --git a/server/sonar-web/src/main/js/api/issues.ts b/server/sonar-web/src/main/js/api/issues.ts index 6b87eaea6e4..751e6959760 100644 --- a/server/sonar-web/src/main/js/api/issues.ts +++ b/server/sonar-web/src/main/js/api/issues.ts @@ -60,9 +60,9 @@ export function getFacet( } export function searchIssueTags(data: { - project?: string; - branch?: string; all?: boolean; + branch?: string; + project?: string; ps?: number; q?: string; }): Promise { @@ -92,8 +92,8 @@ export function editIssueComment(data: { comment: string; text: string }): Promi } export function setIssueAssignee(data: { - issue: string; assignee?: string; + issue: string; }): Promise { return postJSON('/api/issues/assign', data); } diff --git a/server/sonar-web/src/main/js/api/mocks/AlmSettingsServiceMock.ts b/server/sonar-web/src/main/js/api/mocks/AlmSettingsServiceMock.ts index 8dfb4bdd073..92bc429ab42 100644 --- a/server/sonar-web/src/main/js/api/mocks/AlmSettingsServiceMock.ts +++ b/server/sonar-web/src/main/js/api/mocks/AlmSettingsServiceMock.ts @@ -104,8 +104,8 @@ const defaultAlmSettings = [ interface EnhancedProjectAlmBindingParam extends ProjectAlmBindingParams { projectName?: string; - repositoryName?: string; repository?: string; + repositoryName?: string; slug?: string; summaryCommentEnabled?: boolean; } diff --git a/server/sonar-web/src/main/js/api/mocks/CodingRulesServiceMock.ts b/server/sonar-web/src/main/js/api/mocks/CodingRulesServiceMock.ts index 62967a73ab9..ef7faa530b5 100644 --- a/server/sonar-web/src/main/js/api/mocks/CodingRulesServiceMock.ts +++ b/server/sonar-web/src/main/js/api/mocks/CodingRulesServiceMock.ts @@ -448,7 +448,7 @@ export default class CodingRulesServiceMock { prioritizedRule, }: SearchRulesQuery): Promise => { const standards = await getStandards(); - const facetCounts: Array<{ property: string; values: { val: string; count: number }[] }> = []; + const facetCounts: Array<{ property: string; values: { count: number; val: string }[] }> = []; for (const facet of facets?.split(',') ?? []) { // If we can count facet values from the list of rules if (FACET_RULE_MAP[facet]) { diff --git a/server/sonar-web/src/main/js/api/mocks/ComponentsServiceMock.ts b/server/sonar-web/src/main/js/api/mocks/ComponentsServiceMock.ts index 787556a810e..0e55f044311 100644 --- a/server/sonar-web/src/main/js/api/mocks/ComponentsServiceMock.ts +++ b/server/sonar-web/src/main/js/api/mocks/ComponentsServiceMock.ts @@ -343,8 +343,8 @@ export default class ComponentsServiceMock { if (tree) { const { component, ancestors } = tree; return this.reply({ component, ancestors } as { - component: ComponentRaw; ancestors: ComponentRaw[]; + component: ComponentRaw; }); } throw new Error(`Couldn't find component with key ${data.component}`); @@ -368,7 +368,7 @@ export default class ComponentsServiceMock { return this.reply({ duplications: [], files: {} }); }; - handleGetSources = (data: { key: string; from?: number; to?: number } & BranchParameters) => { + handleGetSources = (data: { from?: number; key: string; to?: number } & BranchParameters) => { const { lines } = this.findSourceFile(data.key); const from = data.from || 1; const to = data.to || lines.length; diff --git a/server/sonar-web/src/main/js/api/mocks/ComputeEngineServiceMock.ts b/server/sonar-web/src/main/js/api/mocks/ComputeEngineServiceMock.ts index 71abfecd79d..a8a37b79cba 100644 --- a/server/sonar-web/src/main/js/api/mocks/ComputeEngineServiceMock.ts +++ b/server/sonar-web/src/main/js/api/mocks/ComputeEngineServiceMock.ts @@ -102,7 +102,7 @@ export default class ComputeEngineServiceMock { this.taskWarnings = taskWarnings; }; - handleAnalysisStatus = (data: { component: string; branch?: string; pullRequest?: string }) => { + handleAnalysisStatus = (data: { branch?: string; component: string; pullRequest?: string }) => { return Promise.resolve({ component: { key: data.component, diff --git a/server/sonar-web/src/main/js/api/mocks/GroupMembersipsServiceMock.ts b/server/sonar-web/src/main/js/api/mocks/GroupMembersipsServiceMock.ts index 973760b0aa7..fb6470a0b22 100644 --- a/server/sonar-web/src/main/js/api/mocks/GroupMembersipsServiceMock.ts +++ b/server/sonar-web/src/main/js/api/mocks/GroupMembersipsServiceMock.ts @@ -45,8 +45,8 @@ export default class GroupMembershipsServiceMock { userId, groupId, }: { - userId: string; groupId: string; + userId: string; }): Promise => { const newMembership = mockGroupMembership({ userId, groupId }); this.memberships.push(newMembership); diff --git a/server/sonar-web/src/main/js/api/mocks/GroupsServiceMock.ts b/server/sonar-web/src/main/js/api/mocks/GroupsServiceMock.ts index b2267028033..443e7bfae9a 100644 --- a/server/sonar-web/src/main/js/api/mocks/GroupsServiceMock.ts +++ b/server/sonar-web/src/main/js/api/mocks/GroupsServiceMock.ts @@ -45,7 +45,7 @@ export default class GroupsServiceMock { this.groups = cloneDeep(this.readOnlyGroups); } - handleCreateGroup = (group: { name: string; description?: string }): Promise => { + handleCreateGroup = (group: { description?: string; name: string }): Promise => { const newGroup = mockGroup(group); this.groups.push(newGroup); return this.reply(newGroup); diff --git a/server/sonar-web/src/main/js/api/mocks/IssuesServiceMock.ts b/server/sonar-web/src/main/js/api/mocks/IssuesServiceMock.ts index a845ef3ca47..3764ea178d0 100644 --- a/server/sonar-web/src/main/js/api/mocks/IssuesServiceMock.ts +++ b/server/sonar-web/src/main/js/api/mocks/IssuesServiceMock.ts @@ -513,7 +513,7 @@ export default class IssuesServiceMock { return this.getActionsResponse({ severity: data.severity }, data.issue); }; - handleSetIssueAssignee = (data: { issue: string; assignee?: string }) => { + handleSetIssueAssignee = (data: { assignee?: string; issue: string }) => { return this.getActionsResponse( { assignee: diff --git a/server/sonar-web/src/main/js/api/mocks/NavigationServiceMock.ts b/server/sonar-web/src/main/js/api/mocks/NavigationServiceMock.ts index de4e357a419..f391a82f89e 100644 --- a/server/sonar-web/src/main/js/api/mocks/NavigationServiceMock.ts +++ b/server/sonar-web/src/main/js/api/mocks/NavigationServiceMock.ts @@ -56,7 +56,7 @@ export class NavigationServiceMock { return Promise.resolve(this.componentNavigation); }; - handleGetMarketplaceNavigation(): Promise<{ serverId: string; ncloc: number }> { + handleGetMarketplaceNavigation(): Promise<{ ncloc: number; serverId: string }> { return Promise.resolve({ serverId: 'foo', ncloc: 0 }); } diff --git a/server/sonar-web/src/main/js/api/mocks/NewCodeDefinitionServiceMock.ts b/server/sonar-web/src/main/js/api/mocks/NewCodeDefinitionServiceMock.ts index 6160350e92b..c34c1b4d7be 100644 --- a/server/sonar-web/src/main/js/api/mocks/NewCodeDefinitionServiceMock.ts +++ b/server/sonar-web/src/main/js/api/mocks/NewCodeDefinitionServiceMock.ts @@ -71,8 +71,8 @@ export default class NewCodeDefinitionServiceMock { }; handleSetNewCodePeriod = (data: { - project?: string; branch?: string; + project?: string; type: NewCodeDefinitionType; value?: string; }) => { @@ -89,7 +89,7 @@ export default class NewCodeDefinitionServiceMock { return this.reply(undefined); }; - handleResetNewCodePeriod = (data: { project?: string; branch?: string }) => { + handleResetNewCodePeriod = (data: { branch?: string; project?: string }) => { const { branch } = data; if (branch) { const index = this.#listBranchesNewCode.findIndex((bNew) => bNew.branchKey === branch); diff --git a/server/sonar-web/src/main/js/api/mocks/PermissionsServiceMock.ts b/server/sonar-web/src/main/js/api/mocks/PermissionsServiceMock.ts index 4236df00b27..80a300ac1ca 100644 --- a/server/sonar-web/src/main/js/api/mocks/PermissionsServiceMock.ts +++ b/server/sonar-web/src/main/js/api/mocks/PermissionsServiceMock.ts @@ -149,7 +149,7 @@ jest.mock('../permissions'); export default class PermissionsServiceMock { #permissionTemplates: PermissionTemplate[] = []; #permissions: Permission[]; - #defaultTemplates: Array<{ templateId: string; qualifier: string }> = []; + #defaultTemplates: Array<{ qualifier: string; templateId: string }> = []; #groups: PermissionGroup[]; #users: PermissionUser[]; #isAllowedToChangePermissions = true; @@ -226,21 +226,21 @@ export default class PermissionsServiceMock { }; handleGetPermissionTemplateUsers = (data: { - templateId: string; - q?: string; - permission?: string; p?: number; + permission?: string; ps?: number; + q?: string; + templateId: string; }) => { return this.handleGetPermissionUsers(data); }; handleGetPermissionTemplateGroups = (data: { - templateId: string; - q?: string; - permission?: string; p?: number; + permission?: string; ps?: number; + q?: string; + templateId: string; }) => { return this.handleGetPermissionGroups(data); }; @@ -250,10 +250,10 @@ export default class PermissionsServiceMock { }; handleGetPermissionUsers = (data: { - q?: string; - permission?: string; p?: number; + permission?: string; ps?: number; + q?: string; }) => { const { ps = PAGE_SIZE, p = DEFAULT_PAGE, q, permission } = data; @@ -278,10 +278,10 @@ export default class PermissionsServiceMock { }; handleGetPermissionGroups = (data: { - q?: string; - permission?: string; p?: number; + permission?: string; ps?: number; + q?: string; }) => { const { ps = PAGE_SIZE, p = DEFAULT_PAGE, q, permission } = data; @@ -302,29 +302,29 @@ export default class PermissionsServiceMock { }; handleGetPermissionGroupsForComponent = (data: { - projectKey: string; - q?: string; - permission?: string; p?: number; + permission?: string; + projectKey: string; ps?: number; + q?: string; }) => { return this.handleGetPermissionGroups(data); }; handleGetPermissionUsersForComponent = (data: { - projectKey: string; - q?: string; - permission?: string; p?: number; + permission?: string; + projectKey: string; ps?: number; + q?: string; }) => { return this.handleGetPermissionUsers(data); }; handleGrantPermissionToGroup = (data: { - projectKey?: string; groupName: string; permission: string; + projectKey?: string; }) => { if (!this.#isAllowedToChangePermissions) { return Promise.reject(); @@ -340,9 +340,9 @@ export default class PermissionsServiceMock { }; handleRevokePermissionFromGroup = (data: { - projectKey?: string; groupName: string; permission: string; + projectKey?: string; }) => { if (!this.#isAllowedToChangePermissions) { return Promise.reject(); @@ -358,9 +358,9 @@ export default class PermissionsServiceMock { }; handleGrantPermissionToUser = (data: { - projectKey?: string; login: string; permission: string; + projectKey?: string; }) => { if (!this.#isAllowedToChangePermissions) { return Promise.reject(); @@ -376,9 +376,9 @@ export default class PermissionsServiceMock { }; handleRevokePermissionFromUser = (data: { - projectKey?: string; login: string; permission: string; + projectKey?: string; }) => { if (!this.#isAllowedToChangePermissions) { return Promise.reject(); @@ -398,8 +398,8 @@ export default class PermissionsServiceMock { }; handleCreatePermissionTemplate = (data: { - name: string; description?: string; + name: string; projectKeyPattern?: string; }) => { const newTemplate = mockPermissionTemplate({ @@ -411,8 +411,8 @@ export default class PermissionsServiceMock { }; handleUpdatePermissionTemplate = (data: { - id: string; description?: string; + id: string; name?: string; projectKeyPattern?: string; }) => { diff --git a/server/sonar-web/src/main/js/api/mocks/ProjectActivityServiceMock.ts b/server/sonar-web/src/main/js/api/mocks/ProjectActivityServiceMock.ts index 1bf40fabd37..8140dab432f 100644 --- a/server/sonar-web/src/main/js/api/mocks/ProjectActivityServiceMock.ts +++ b/server/sonar-web/src/main/js/api/mocks/ProjectActivityServiceMock.ts @@ -107,12 +107,12 @@ export class ProjectActivityServiceMock { getActivityHandler = ( data: { - project: string; - statuses?: string; category?: string; from?: string; p?: number; + project: string; ps?: number; + statuses?: string; } & BranchParameters, ) => { const { project, ps = PAGE_SIZE, p = DEFAULT_PAGE, category, from } = data; @@ -140,12 +140,12 @@ export class ProjectActivityServiceMock { getAllTimeProjectActivityHandler = ( data: { - project: string; - statuses?: string; category?: string; from?: string; p?: number; + project: string; ps?: number; + statuses?: string; } & BranchParameters, ) => { const { project, p = DEFAULT_PAGE, category, from } = data; @@ -179,9 +179,9 @@ export class ProjectActivityServiceMock { createEventHandler = (data: { analysis: string; - name: string; category?: ProjectAnalysisEventCategory; description?: string; + name: string; }) => { const { analysis: analysisKey, @@ -203,7 +203,7 @@ export class ProjectActivityServiceMock { }); }; - changeEventHandler = (data: { event: string; name: string; description?: string }) => { + changeEventHandler = (data: { description?: string; event: string; name: string }) => { const { event: eventKey, name, description } = data; const [eventIndex, analysisKey] = this.findEvent(eventKey); const analysis = this.findAnalysis(analysisKey); diff --git a/server/sonar-web/src/main/js/api/mocks/ProjectsServiceMock.tsx b/server/sonar-web/src/main/js/api/mocks/ProjectsServiceMock.tsx index ff065030560..4a6f946d9f3 100644 --- a/server/sonar-web/src/main/js/api/mocks/ProjectsServiceMock.tsx +++ b/server/sonar-web/src/main/js/api/mocks/ProjectsServiceMock.tsx @@ -57,9 +57,9 @@ export class ProjectsServiceMock { filter = '', s, }: { - ps: number; facets: string; filter: string; + ps: number; s?: string; }) => { /* diff --git a/server/sonar-web/src/main/js/api/mocks/QualityGatesServiceMock.ts b/server/sonar-web/src/main/js/api/mocks/QualityGatesServiceMock.ts index 84ca1fd02ed..d82a794672c 100644 --- a/server/sonar-web/src/main/js/api/mocks/QualityGatesServiceMock.ts +++ b/server/sonar-web/src/main/js/api/mocks/QualityGatesServiceMock.ts @@ -397,7 +397,7 @@ export class QualityGatesServiceMock { return Promise.resolve(); }; - copyHandler = ({ sourceName, name }: { sourceName: string; name: string }) => { + copyHandler = ({ sourceName, name }: { name: string; sourceName: string }) => { const newQG = cloneDeep(this.list.find((q) => q.name === sourceName)); if (newQG === undefined) { return Promise.reject({ @@ -491,8 +491,8 @@ export class QualityGatesServiceMock { query, }: { gateName: string; - selected: string; query: string | undefined; + selected: string; }) => { let filteredProjects = this.projects; if (selected === 'selected') { diff --git a/server/sonar-web/src/main/js/api/mocks/SecurityHotspotServiceMock.ts b/server/sonar-web/src/main/js/api/mocks/SecurityHotspotServiceMock.ts index fbf9b7593db..50d11baafdd 100644 --- a/server/sonar-web/src/main/js/api/mocks/SecurityHotspotServiceMock.ts +++ b/server/sonar-web/src/main/js/api/mocks/SecurityHotspotServiceMock.ts @@ -134,8 +134,8 @@ export default class SecurityHotspotServiceMock { handleGetSecurityHotspotList = ( hotspotKeys: string[], data: { - project: string; branch?: string; + project: string; }, ) => { if (data?.branch === 'normal-branch') { @@ -190,14 +190,14 @@ export default class SecurityHotspotServiceMock { }; handleGetSecurityHotspots = (data: { - project: string; + branch?: string; + inNewCodePeriod?: boolean; + onlyMine?: boolean; p: number; + project: string; ps: number; - status?: HotspotStatus; resolution?: HotspotResolution; - onlyMine?: boolean; - inNewCodePeriod?: boolean; - branch?: string; + status?: HotspotStatus; }) => { if (data?.branch === 'normal-branch') { return this.reply({ diff --git a/server/sonar-web/src/main/js/api/mocks/SettingsServiceMock.ts b/server/sonar-web/src/main/js/api/mocks/SettingsServiceMock.ts index b67a20c4524..98599b3037d 100644 --- a/server/sonar-web/src/main/js/api/mocks/SettingsServiceMock.ts +++ b/server/sonar-web/src/main/js/api/mocks/SettingsServiceMock.ts @@ -158,7 +158,7 @@ export default class SettingsServiceMock { jest.mocked(encryptValue).mockImplementation(this.handleEcnryptValue); } - handleGetValue = (data: { key: string; component?: string } & BranchParameters) => { + handleGetValue = (data: { component?: string; key: string } & BranchParameters) => { const setting = this.#settingValues.find((s) => s.key === data.key) as SettingValue; const definition = this.#definitions.find( (d) => d.key === data.key, @@ -172,7 +172,7 @@ export default class SettingsServiceMock { return this.reply(setting ?? undefined); }; - handleGetValues = (data: { keys: string[]; component?: string } & BranchParameters) => { + handleGetValues = (data: { component?: string; keys: string[] } & BranchParameters) => { const settings = data.keys .map((k) => { const def = this.#definitions.find((d) => d.key === k); @@ -215,7 +215,7 @@ export default class SettingsServiceMock { return this.reply(undefined); }; - handleResetSettingValue = (data: { keys: string; component?: string } & BranchParameters) => { + handleResetSettingValue = (data: { component?: string; keys: string } & BranchParameters) => { const setting = this.#settingValues.find((s) => s.key === data.keys) as SettingValue; const definition = this.#definitions.find( (d) => d.key === data.keys, diff --git a/server/sonar-web/src/main/js/api/mocks/SystemServiceMock.ts b/server/sonar-web/src/main/js/api/mocks/SystemServiceMock.ts index 224338dd86d..34e832b5b3f 100644 --- a/server/sonar-web/src/main/js/api/mocks/SystemServiceMock.ts +++ b/server/sonar-web/src/main/js/api/mocks/SystemServiceMock.ts @@ -27,10 +27,10 @@ import { getSystemInfo, getSystemUpgrades, setLogLevel } from '../system'; jest.mock('../system'); type SystemUpgrades = { - upgrades: []; + installedVersionActive: boolean; latestLTA: string; updateCenterRefresh: string; - installedVersionActive: boolean; + upgrades: []; }; export default class SystemServiceMock { diff --git a/server/sonar-web/src/main/js/api/mocks/TimeMachineServiceMock.ts b/server/sonar-web/src/main/js/api/mocks/TimeMachineServiceMock.ts index d5a29963f7e..53065863d8d 100644 --- a/server/sonar-web/src/main/js/api/mocks/TimeMachineServiceMock.ts +++ b/server/sonar-web/src/main/js/api/mocks/TimeMachineServiceMock.ts @@ -88,8 +88,8 @@ export class TimeMachineServiceMock { handleGetAllTimeMachineData = ( data: { component: string; - metrics: string; from?: string; + metrics: string; p?: number; to?: string; } & BranchParameters, diff --git a/server/sonar-web/src/main/js/api/mocks/UserTokensMock.ts b/server/sonar-web/src/main/js/api/mocks/UserTokensMock.ts index 5f604fdef92..5601b2cb721 100644 --- a/server/sonar-web/src/main/js/api/mocks/UserTokensMock.ts +++ b/server/sonar-web/src/main/js/api/mocks/UserTokensMock.ts @@ -59,11 +59,11 @@ export default class UserTokensMock { projectKey, expirationDate, }: { - name: string; + expirationDate?: string; login: string; - type: TokenType; + name: string; projectKey: string; - expirationDate?: string; + type: TokenType; }) => { if (this.failGeneration) { this.failGeneration = false; @@ -90,7 +90,7 @@ export default class UserTokensMock { return Promise.resolve(token); }; - handleRevokeToken = ({ name }: { name: string; login?: string }) => { + handleRevokeToken = ({ name }: { login?: string; name: string }) => { this.tokens = this.tokens.filter((t) => t.name !== name); return Promise.resolve(); diff --git a/server/sonar-web/src/main/js/api/mocks/data/components.ts b/server/sonar-web/src/main/js/api/mocks/data/components.ts index 14ba685aa6c..b724a319643 100644 --- a/server/sonar-web/src/main/js/api/mocks/data/components.ts +++ b/server/sonar-web/src/main/js/api/mocks/data/components.ts @@ -49,18 +49,18 @@ import { } from './ids'; export interface ComponentTree { - component: Component; ancestors: Component[]; children: ComponentTree[]; + component: Component; } export interface SourceFile { component: SourceViewerFile; - lines: SourceLine[]; duplication?: { duplications: Duplication[]; files: Dict; }; + lines: SourceLine[]; } export function mockFullComponentTree( diff --git a/server/sonar-web/src/main/js/api/navigation.ts b/server/sonar-web/src/main/js/api/navigation.ts index 8c370062964..1df68cfb3f4 100644 --- a/server/sonar-web/src/main/js/api/navigation.ts +++ b/server/sonar-web/src/main/js/api/navigation.ts @@ -29,7 +29,7 @@ export function getComponentNavigation( return getJSON('/api/navigation/component', data); } -export function getMarketplaceNavigation(): Promise<{ serverId: string; ncloc: number }> { +export function getMarketplaceNavigation(): Promise<{ ncloc: number; serverId: string }> { return getJSON('/api/navigation/marketplace').catch(throwGlobalError); } diff --git a/server/sonar-web/src/main/js/api/newCodeDefinition.ts b/server/sonar-web/src/main/js/api/newCodeDefinition.ts index 63936d5bd15..a779c897cc7 100644 --- a/server/sonar-web/src/main/js/api/newCodeDefinition.ts +++ b/server/sonar-web/src/main/js/api/newCodeDefinition.ts @@ -27,22 +27,22 @@ import { } from '../types/new-code-definition'; export function getNewCodeDefinition(data?: { - project?: string; branch?: string; + project?: string; }): Promise> { return getJSON('/api/new_code_periods/show', data).catch(throwGlobalError); } export function setNewCodeDefinition(data: { - project?: string; branch?: string; + project?: string; type: NewCodeDefinitionType; value?: string; }): Promise { return post('/api/new_code_periods/set', data).catch(throwGlobalError); } -export function resetNewCodeDefinition(data: { project?: string; branch?: string }): Promise { +export function resetNewCodeDefinition(data: { branch?: string; project?: string }): Promise { return post('/api/new_code_periods/unset', data).catch(throwGlobalError); } diff --git a/server/sonar-web/src/main/js/api/permissions.ts b/server/sonar-web/src/main/js/api/permissions.ts index 0dc048add92..26a5e0c4438 100644 --- a/server/sonar-web/src/main/js/api/permissions.ts +++ b/server/sonar-web/src/main/js/api/permissions.ts @@ -33,40 +33,40 @@ import { BaseSearchProjectsParameters } from './components'; const PAGE_SIZE = 100; export function grantPermissionToUser(data: { - projectKey?: string; login: string; permission: string; + projectKey?: string; }) { return post('/api/permissions/add_user', data).catch(throwGlobalError); } export function revokePermissionFromUser(data: { - projectKey?: string; login: string; permission: string; + projectKey?: string; }) { return post('/api/permissions/remove_user', data).catch(throwGlobalError); } export function grantPermissionToGroup(data: { - projectKey?: string; groupName: string; permission: string; + projectKey?: string; }) { return post('/api/permissions/add_group', data).catch(throwGlobalError); } export function revokePermissionFromGroup(data: { - projectKey?: string; groupName: string; permission: string; + projectKey?: string; }) { return post('/api/permissions/remove_group', data).catch(throwGlobalError); } interface GetPermissionTemplatesResponse { + defaultTemplates: Array<{ qualifier: string; templateId: string }>; permissionTemplates: PermissionTemplate[]; - defaultTemplates: Array<{ templateId: string; qualifier: string }>; permissions: Array; } @@ -76,16 +76,16 @@ export function getPermissionTemplates(): Promise }> { return postJSON('/api/permissions/create_template', data); } export function updatePermissionTemplate(data: { - id: string; description?: string; + id: string; name?: string; projectKeyPattern?: string; }): Promise { @@ -112,17 +112,17 @@ export function bulkApplyTemplate(data: BaseSearchProjectsParameters): Promise { return post('/api/permissions/add_user_to_template', data); } export function revokeTemplatePermissionFromUser(data: { - templateId: string; login: string; permission: string; + templateId: string; }): Promise { return post('/api/permissions/remove_user_from_template', data); } @@ -147,11 +147,11 @@ export function removeProjectCreatorFromTemplate( } export function getPermissionsUsersForComponent(data: { - projectKey: string; - q?: string; - permission?: string; p?: number; + permission?: string; + projectKey: string; ps?: number; + q?: string; }): Promise<{ paging: Paging; users: PermissionUser[] }> { if (!data.ps) { data.ps = PAGE_SIZE; @@ -160,12 +160,12 @@ export function getPermissionsUsersForComponent(data: { } export function getPermissionsGroupsForComponent(data: { - projectKey: string; - q?: string; - permission?: string; p?: number; + permission?: string; + projectKey: string; ps?: number; -}): Promise<{ paging: Paging; groups: PermissionGroup[] }> { + q?: string; +}): Promise<{ groups: PermissionGroup[]; paging: Paging }> { if (!data.ps) { data.ps = PAGE_SIZE; } @@ -173,10 +173,10 @@ export function getPermissionsGroupsForComponent(data: { } export function getGlobalPermissionsUsers(data: { - q?: string; - permission?: string; p?: number; + permission?: string; ps?: number; + q?: string; }): Promise<{ paging: Paging; users: PermissionUser[] }> { if (!data.ps) { data.ps = PAGE_SIZE; @@ -185,11 +185,11 @@ export function getGlobalPermissionsUsers(data: { } export function getGlobalPermissionsGroups(data: { - q?: string; - permission?: string; p?: number; + permission?: string; ps?: number; -}): Promise<{ paging: Paging; groups: PermissionGroup[] }> { + q?: string; +}): Promise<{ groups: PermissionGroup[]; paging: Paging }> { if (!data.ps) { data.ps = PAGE_SIZE; } @@ -197,11 +197,11 @@ export function getGlobalPermissionsGroups(data: { } export function getPermissionTemplateUsers(data: { - templateId: string; - q?: string; - permission?: string; p?: number; + permission?: string; ps?: number; + q?: string; + templateId: string; }): Promise<{ paging: Paging; users: PermissionUser[] }> { if (data.ps === undefined) { data.ps = PAGE_SIZE; @@ -210,12 +210,12 @@ export function getPermissionTemplateUsers(data: { } export function getPermissionTemplateGroups(data: { - templateId: string; - q?: string; - permission?: string; p?: number; + permission?: string; ps?: number; -}): Promise<{ paging: Paging; groups: PermissionGroup[] }> { + q?: string; + templateId: string; +}): Promise<{ groups: PermissionGroup[]; paging: Paging }> { if (data.ps === undefined) { data.ps = PAGE_SIZE; } diff --git a/server/sonar-web/src/main/js/api/project-management.ts b/server/sonar-web/src/main/js/api/project-management.ts index b86443c4729..02caf215ae7 100644 --- a/server/sonar-web/src/main/js/api/project-management.ts +++ b/server/sonar-web/src/main/js/api/project-management.ts @@ -74,12 +74,12 @@ export function deletePortfolio(portfolio: string): Promise { } export function createProject(data: { - name: string; - project: string; mainBranch: string; - visibility?: Visibility; + name: string; newCodeDefinitionType?: string; newCodeDefinitionValue?: string; + project: string; + visibility?: Visibility; }): Promise<{ project: ProjectBase }> { return postJSON('/api/projects/create', data).catch(throwGlobalError); } diff --git a/server/sonar-web/src/main/js/api/projectActivity.ts b/server/sonar-web/src/main/js/api/projectActivity.ts index 2feb8ca042b..baf4c8ac5b2 100644 --- a/server/sonar-web/src/main/js/api/projectActivity.ts +++ b/server/sonar-web/src/main/js/api/projectActivity.ts @@ -35,12 +35,12 @@ export enum ProjectActivityStatuses { } export type ProjectActivityParams = { - project?: string; - statuses?: string; category?: string; from?: string; p?: number; + project?: string; ps?: number; + statuses?: string; } & BranchParameters; export interface ProjectActivityResponse { @@ -79,17 +79,17 @@ export function getAllTimeProjectActivity( export interface CreateEventResponse { analysis: string; - key: string; - name: string; category: ProjectAnalysisEventCategory | ApplicationAnalysisEventCategory; description?: string; + key: string; + name: string; } export function createEvent(data: { analysis: string; - name: string; category?: string; description?: string; + name: string; }): Promise { return postJSON('/api/project_analyses/create_event', data).then( (r) => r.event, @@ -102,9 +102,9 @@ export function deleteEvent(event: string): Promise { } export function changeEvent(data: { + description?: string; event: string; name?: string; - description?: string; }): Promise { return postJSON('/api/project_analyses/update_event', data).then( (r) => r.event, diff --git a/server/sonar-web/src/main/js/api/quality-gates.ts b/server/sonar-web/src/main/js/api/quality-gates.ts index e961ecb3639..a7bad22b443 100644 --- a/server/sonar-web/src/main/js/api/quality-gates.ts +++ b/server/sonar-web/src/main/js/api/quality-gates.ts @@ -58,7 +58,7 @@ export function renameQualityGate(data: { return post('/api/qualitygates/rename', data).catch(throwGlobalError); } -export function copyQualityGate(data: { sourceName: string; name: string }): Promise { +export function copyQualityGate(data: { name: string; sourceName: string }): Promise { return postJSON('/api/qualitygates/copy', data).catch(throwGlobalError); } @@ -125,8 +125,8 @@ export function getApplicationQualityGate(data: { export function getQualityGateProjectStatus( data: { - projectKey?: string; projectId?: string; + projectKey?: string; } & BranchParameters, ): Promise { return getJSON('/api/qualitygates/project_status', data) diff --git a/server/sonar-web/src/main/js/api/quality-profiles.ts b/server/sonar-web/src/main/js/api/quality-profiles.ts index f3e0123c13d..4ec559294c4 100644 --- a/server/sonar-web/src/main/js/api/quality-profiles.ts +++ b/server/sonar-web/src/main/js/api/quality-profiles.ts @@ -40,21 +40,21 @@ export interface Actions { export interface Profile { actions?: ProfileActions; + activeDeprecatedRuleCount: number; + activeRuleCount: number; + isBuiltIn?: boolean; + isDefault?: boolean; + isInherited?: boolean; key: string; - name: string; language: string; languageName: string; - isInherited?: boolean; + lastUsed?: string; + name: string; parentKey?: string; parentName?: string; - isDefault?: boolean; - activeRuleCount: number; - activeDeprecatedRuleCount: number; + projectCount?: number; rulesUpdatedAt?: string; - lastUsed?: string; userUpdatedAt?: string; - isBuiltIn?: boolean; - projectCount?: number; } export interface SearchQualityProfilesParameters { @@ -190,25 +190,25 @@ export function getProfileChangelog( } export interface RuleCompare { - key: string; - name: string; cleanCodeAttributeCategory?: CleanCodeAttributeCategory; impacts: SoftwareImpact[]; + key: string; left?: { params: Dict; severity: string }; + name: string; right?: { params: Dict; severity: string }; } export interface CompareResponse { - left: { name: string }; - right: { name: string }; inLeft: Array; inRight: Array; + left: { name: string }; modified: Array< RuleCompare & { left: { params: Dict; severity: string }; right: { params: Dict; severity: string }; } >; + right: { name: string }; } export function compareProfiles(leftKey: string, rightKey: string): Promise { @@ -233,14 +233,14 @@ export function dissociateProject({ language, name: qualityProfile }: Profile, p export interface SearchUsersGroupsParameters { language: string; - qualityProfile: string; q?: string; + qualityProfile: string; selected?: 'all' | 'selected' | 'deselected'; } interface SearchUsersResponse { - users: UserSelected[]; paging: Paging; + users: UserSelected[]; } export function searchUsers(parameters: SearchUsersGroupsParameters): Promise { @@ -320,10 +320,10 @@ export function bulkDeactivateRules(data: BulkActivateParameters) { export interface ActivateRuleParameters { key: string; params?: Dict; + prioritizedRule?: boolean; reset?: boolean; rule: string; severity?: string; - prioritizedRule?: boolean; } export function activateRule(data: ActivateRuleParameters) { diff --git a/server/sonar-web/src/main/js/api/rules.ts b/server/sonar-web/src/main/js/api/rules.ts index 7339a43998e..8c88414b393 100644 --- a/server/sonar-web/src/main/js/api/rules.ts +++ b/server/sonar-web/src/main/js/api/rules.ts @@ -35,14 +35,14 @@ import { const RULES_ENDPOINT = '/api/v2/clean-code-policy/rules'; export interface CreateRuleData { + cleanCodeAttribute: CleanCodeAttribute; + impacts: SoftwareImpact[]; key: string; markdownDescription: string; name: string; parameters?: Partial[]; status?: string; templateKey: string; - cleanCodeAttribute: CleanCodeAttribute; - impacts: SoftwareImpact[]; } export function getRulesApp(): Promise { diff --git a/server/sonar-web/src/main/js/api/settings.ts b/server/sonar-web/src/main/js/api/settings.ts index 53aecff13e8..41109bcf70c 100644 --- a/server/sonar-web/src/main/js/api/settings.ts +++ b/server/sonar-web/src/main/js/api/settings.ts @@ -39,13 +39,13 @@ export function getDefinitions(component?: string): Promise { return getValues({ keys: [data.key], component: data.component }).then(([result]) => result); } export function getValues( - data: { keys: string[]; component?: string } & BranchParameters, + data: { component?: string; keys: string[] } & BranchParameters, ): Promise { return getJSON('/api/settings/values', { keys: data.keys.join(','), @@ -87,13 +87,13 @@ export function setSettingValue( } export function setSimpleSettingValue( - data: { component?: string; value?: string; values?: string[]; key: string } & BranchParameters, + data: { component?: string; key: string; value?: string; values?: string[] } & BranchParameters, ): Promise { return post('/api/settings/set', data).catch(throwGlobalError); } export function resetSettingValue( - data: { keys: string; component?: string } & BranchParameters, + data: { component?: string; keys: string } & BranchParameters, ): Promise { return post('/api/settings/reset', data); } diff --git a/server/sonar-web/src/main/js/api/system.ts b/server/sonar-web/src/main/js/api/system.ts index ba72977355b..6640209dc60 100644 --- a/server/sonar-web/src/main/js/api/system.ts +++ b/server/sonar-web/src/main/js/api/system.ts @@ -34,15 +34,15 @@ export function getSystemInfo(): Promise { return getJSON('/api/system/info').catch(throwGlobalError); } -export function getSystemStatus(): Promise<{ id: string; version: string; status: SysStatus }> { +export function getSystemStatus(): Promise<{ id: string; status: SysStatus; version: string }> { return getJSON('/api/system/status'); } export function getSystemUpgrades(): Promise<{ - upgrades: SystemUpgrade[]; - latestLTA?: string; installedVersionActive?: boolean; + latestLTA?: string; updateCenterRefresh?: string; + upgrades: SystemUpgrade[]; }> { return getJSON('/api/system/upgrades'); } @@ -65,8 +65,8 @@ export function restart(): Promise { export function waitSystemUPStatus(): Promise<{ id: string; - version: string; status: SysStatus; + version: string; }> { return requestTryAndRepeatUntil( getSystemStatus, diff --git a/server/sonar-web/src/main/js/api/time-machine.ts b/server/sonar-web/src/main/js/api/time-machine.ts index d080224310e..7e40683a9f8 100644 --- a/server/sonar-web/src/main/js/api/time-machine.ts +++ b/server/sonar-web/src/main/js/api/time-machine.ts @@ -25,8 +25,8 @@ import { Paging } from '../types/types'; export interface TimeMachineResponse { measures: { - metric: MetricKey; history: Array<{ date: string; value?: string }>; + metric: MetricKey; }[]; paging: Paging; } @@ -47,8 +47,8 @@ export function getTimeMachineData( export function getAllTimeMachineData( data: { component?: string; - metrics: string; from?: string; + metrics: string; p?: number; to?: string; } & BranchParameters, diff --git a/server/sonar-web/src/main/js/api/user-tokens.ts b/server/sonar-web/src/main/js/api/user-tokens.ts index c315abd9bf4..d56ef0ac78c 100644 --- a/server/sonar-web/src/main/js/api/user-tokens.ts +++ b/server/sonar-web/src/main/js/api/user-tokens.ts @@ -28,15 +28,15 @@ export function getTokens(login: string): Promise { } export function generateToken(data: { + expirationDate?: string; + login?: string; name: string; projectKey?: string; type?: string; - login?: string; - expirationDate?: string; }): Promise { return postJSON('/api/user_tokens/generate', data).catch(throwGlobalError); } -export function revokeToken(data: { name: string; login?: string }) { +export function revokeToken(data: { login?: string; name: string }) { return post('/api/user_tokens/revoke', data).catch(throwGlobalError); } diff --git a/server/sonar-web/src/main/js/api/user_groups.ts b/server/sonar-web/src/main/js/api/user_groups.ts index 543d9b13dc4..a2c9de1dc16 100644 --- a/server/sonar-web/src/main/js/api/user_groups.ts +++ b/server/sonar-web/src/main/js/api/user_groups.ts @@ -23,10 +23,10 @@ import { Group, Paging } from '../types/types'; const GROUPS_ENDPOINT = '/api/v2/authorizations/groups'; export function getUsersGroups(params: { - q?: string; managed?: boolean; pageIndex?: number; pageSize?: number; + q?: string; }): Promise<{ groups: Group[]; page: Paging }> { return axios.get(GROUPS_ENDPOINT, { params }); } @@ -38,8 +38,8 @@ export function createGroup(data: { description?: string; name: string }): Promi export function updateGroup( id: string, data: { - name?: string; description?: string; + name?: string; }, ) { return axios.patch(`${GROUPS_ENDPOINT}/${id}`, data); diff --git a/server/sonar-web/src/main/js/api/users.ts b/server/sonar-web/src/main/js/api/users.ts index 597fa6da3b8..02c631b1a72 100644 --- a/server/sonar-web/src/main/js/api/users.ts +++ b/server/sonar-web/src/main/js/api/users.ts @@ -61,17 +61,17 @@ export function getIdentityProviders(): Promise<{ identityProviders: IdentityPro } export function getUsers(data: { - q: string; active?: boolean; + groupId?: string; + 'groupId!'?: string; managed?: boolean; - sonarQubeLastConnectionDateFrom?: string; - sonarQubeLastConnectionDateTo?: string; + pageIndex?: number; + pageSize?: number; + q: string; sonarLintLastConnectionDateFrom?: string; sonarLintLastConnectionDateTo?: string; - pageSize?: number; - pageIndex?: number; - groupId?: string; - 'groupId!'?: string; + sonarQubeLastConnectionDateFrom?: string; + sonarQubeLastConnectionDateTo?: string; }) { return axios.get<{ page: Paging; users: T[] }>(USERS_ENDPOINT, { params: data, @@ -95,7 +95,7 @@ export function updateUser( return axiosToCatch.patch(`${USERS_ENDPOINT}/${id}`, data); } -export function deleteUser({ id, anonymize }: { id: string; anonymize?: boolean }) { +export function deleteUser({ id, anonymize }: { anonymize?: boolean; id: string }) { return axios.delete(`${USERS_ENDPOINT}/${id}`, { params: { anonymize } }); } diff --git a/server/sonar-web/src/main/js/app/components/AdminContainer.tsx b/server/sonar-web/src/main/js/app/components/AdminContainer.tsx index 8d5741c7176..9d485ca07a8 100644 --- a/server/sonar-web/src/main/js/app/components/AdminContainer.tsx +++ b/server/sonar-web/src/main/js/app/components/AdminContainer.tsx @@ -39,9 +39,9 @@ export interface AdminContainerProps { } interface State { + adminPages: Extension[]; pendingPlugins: PendingPluginResult; systemStatus: SysStatus; - adminPages: Extension[]; } export class AdminContainer extends React.PureComponent { diff --git a/server/sonar-web/src/main/js/app/components/AdminContext.tsx b/server/sonar-web/src/main/js/app/components/AdminContext.tsx index b17ba85ae09..943ed99f631 100644 --- a/server/sonar-web/src/main/js/app/components/AdminContext.tsx +++ b/server/sonar-web/src/main/js/app/components/AdminContext.tsx @@ -22,8 +22,8 @@ import { PendingPluginResult } from '../../types/plugins'; import { SysStatus } from '../../types/types'; export interface AdminContextInterface { - fetchSystemStatus: () => void; fetchPendingPlugins: () => void; + fetchSystemStatus: () => void; pendingPlugins: PendingPluginResult; systemStatus: SysStatus; } diff --git a/server/sonar-web/src/main/js/app/components/PageTracker.tsx b/server/sonar-web/src/main/js/app/components/PageTracker.tsx index 94a20c98e3c..c7afecb7018 100644 --- a/server/sonar-web/src/main/js/app/components/PageTracker.tsx +++ b/server/sonar-web/src/main/js/app/components/PageTracker.tsx @@ -28,8 +28,8 @@ import { AppState } from '../../types/appstate'; import withAppStateContext from './app-state/withAppStateContext'; interface Props { - location: Location; appState: AppState; + location: Location; } interface State { diff --git a/server/sonar-web/src/main/js/app/components/RecentHistory.ts b/server/sonar-web/src/main/js/app/components/RecentHistory.ts index e3cf0a039ae..b01e67f8e8e 100644 --- a/server/sonar-web/src/main/js/app/components/RecentHistory.ts +++ b/server/sonar-web/src/main/js/app/components/RecentHistory.ts @@ -23,9 +23,9 @@ const RECENT_HISTORY = 'sonar_recent_history'; const HISTORY_LIMIT = 10; export type History = Array<{ + icon: string; key: string; name: string; - icon: string; }>; export default class RecentHistory { diff --git a/server/sonar-web/src/main/js/app/components/StartupModal.tsx b/server/sonar-web/src/main/js/app/components/StartupModal.tsx index 192f4708c81..ac2f66081bf 100644 --- a/server/sonar-web/src/main/js/app/components/StartupModal.tsx +++ b/server/sonar-web/src/main/js/app/components/StartupModal.tsx @@ -31,8 +31,8 @@ import withAppStateContext from './app-state/withAppStateContext'; import withCurrentUserContext from './current-user/withCurrentUserContext'; interface Props { - currentUser: CurrentUser; appState: AppState; + currentUser: CurrentUser; } interface State { diff --git a/server/sonar-web/src/main/js/app/components/extensions/CreateApplicationForm.tsx b/server/sonar-web/src/main/js/app/components/extensions/CreateApplicationForm.tsx index 412f325edd5..bc7a4705069 100644 --- a/server/sonar-web/src/main/js/app/components/extensions/CreateApplicationForm.tsx +++ b/server/sonar-web/src/main/js/app/components/extensions/CreateApplicationForm.tsx @@ -40,8 +40,8 @@ interface State { description: string; key: string; name: string; - visibility: Visibility; submitting: boolean; + visibility: Visibility; } export default class CreateApplicationForm extends React.PureComponent { diff --git a/server/sonar-web/src/main/js/app/components/global-search/GlobalSearchResults.tsx b/server/sonar-web/src/main/js/app/components/global-search/GlobalSearchResults.tsx index cb7020b5174..62bf4d1a0b4 100644 --- a/server/sonar-web/src/main/js/app/components/global-search/GlobalSearchResults.tsx +++ b/server/sonar-web/src/main/js/app/components/global-search/GlobalSearchResults.tsx @@ -24,11 +24,11 @@ import GlobalSearchShowMore from './GlobalSearchShowMore'; import { ComponentResult, More, Results, sortQualifiers } from './utils'; export interface Props { - query: string; loadingMore?: string; more: More; onMoreClick: (qualifier: string) => void; onSelect: (componentKey: string) => void; + query: string; renderNoResults: () => React.ReactElement; renderResult: (component: ComponentResult) => React.ReactNode; results: Results; diff --git a/server/sonar-web/src/main/js/app/components/nav/component/Menu.tsx b/server/sonar-web/src/main/js/app/components/nav/component/Menu.tsx index 2d5863072fb..bc8bd1e1bde 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/Menu.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/Menu.tsx @@ -104,9 +104,9 @@ export function Menu(props: Readonly) { pathname, additionalQueryParams = {}, }: { + additionalQueryParams?: Dict; label: string; pathname: string; - additionalQueryParams?: Dict; }) => { const query = getQuery(); if (isApplicationChildInaccessble) { diff --git a/server/sonar-web/src/main/js/app/components/nav/component/branch-like/BranchHelpTooltip.tsx b/server/sonar-web/src/main/js/app/components/nav/component/branch-like/BranchHelpTooltip.tsx index 6d6f4aa61d5..ca84fc527de 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/branch-like/BranchHelpTooltip.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/branch-like/BranchHelpTooltip.tsx @@ -31,11 +31,11 @@ import { AlmKeys } from '../../../../../types/alm-settings'; import { Component } from '../../../../../types/types'; interface Props { + branchSupportEnabled: boolean; + canAdminComponent?: boolean; component: Component; - isApplication: boolean; hasManyBranches: boolean; - canAdminComponent?: boolean; - branchSupportEnabled: boolean; + isApplication: boolean; } export default function BranchHelpTooltip({ diff --git a/server/sonar-web/src/main/js/app/components/nav/component/branch-like/MenuItem.tsx b/server/sonar-web/src/main/js/app/components/nav/component/branch-like/MenuItem.tsx index 9a9a9624b63..c822b99a1cc 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/branch-like/MenuItem.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/branch-like/MenuItem.tsx @@ -29,9 +29,9 @@ import QualityGateStatus from './QualityGateStatus'; export interface MenuItemProps { branchLike: BranchLike; + indent: boolean; onSelect: (branchLike: BranchLike) => void; selected: boolean; - indent: boolean; setSelectedNode?: (node: HTMLLIElement) => void; } diff --git a/server/sonar-web/src/main/js/app/components/nav/component/branch-like/PRLink.tsx b/server/sonar-web/src/main/js/app/components/nav/component/branch-like/PRLink.tsx index c2bb7f92ba6..189e7769c1d 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/branch-like/PRLink.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/branch-like/PRLink.tsx @@ -52,8 +52,8 @@ export default function PRLink({ currentBranchLike, component, }: Readonly<{ - currentBranchLike: BranchLike; component: Component; + currentBranchLike: BranchLike; }>) { if (!isPullRequest(currentBranchLike)) { return null; diff --git a/server/sonar-web/src/main/js/apps/account/projects/Projects.tsx b/server/sonar-web/src/main/js/apps/account/projects/Projects.tsx index 88e849dfa67..8c8c9897231 100644 --- a/server/sonar-web/src/main/js/apps/account/projects/Projects.tsx +++ b/server/sonar-web/src/main/js/apps/account/projects/Projects.tsx @@ -24,8 +24,8 @@ import { MyProject } from '../../../types/types'; import ProjectCard from './ProjectCard'; interface Props { - loading: boolean; loadMore: () => void; + loading: boolean; projects: MyProject[]; total?: number; } diff --git a/server/sonar-web/src/main/js/apps/audit-logs/components/AuditAppRenderer.tsx b/server/sonar-web/src/main/js/apps/audit-logs/components/AuditAppRenderer.tsx index 1ba1ff7fe1c..9c5db272fc3 100644 --- a/server/sonar-web/src/main/js/apps/audit-logs/components/AuditAppRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/audit-logs/components/AuditAppRenderer.tsx @@ -40,8 +40,8 @@ import DownloadButton from './DownloadButton'; export interface AuditAppRendererProps { dateRange?: { from?: Date; to?: Date }; downloadStarted: boolean; - handleOptionSelection: (option: RangeOption) => void; handleDateSelection: (dateRange: { from?: Date; to?: Date }) => void; + handleOptionSelection: (option: RangeOption) => void; handleStartDownload: () => void; housekeepingPolicy: HousekeepingPolicy; selection: RangeOption; diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/AnalysisWarningsModal.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/AnalysisWarningsModal.tsx index 88f24970bff..aead4d9dd33 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/AnalysisWarningsModal.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/AnalysisWarningsModal.tsx @@ -34,8 +34,8 @@ interface Props { } interface State { - loading: boolean; dismissedWarning?: string; + loading: boolean; warnings: TaskWarning[]; } diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/CurrentsFilter.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/CurrentsFilter.tsx index 03500e370fb..929797daa7b 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/CurrentsFilter.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/CurrentsFilter.tsx @@ -23,8 +23,8 @@ import { translate } from '../../../helpers/l10n'; import { CURRENTS } from '../constants'; interface CurrentsFilterProps { - value?: string; onChange: (value: string) => void; + value?: string; } export default function CurrentsFilter(props: Readonly) { diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/Search.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/Search.tsx index 3da2cf77431..724cd058613 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/Search.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/Search.tsx @@ -31,13 +31,13 @@ interface Props { component?: unknown; currents: string; loading: boolean; + maxExecutedAt: Date | undefined; + minSubmittedAt: Date | undefined; onFilterUpdate: (changes: Partial) => void; onReload: () => void; query: string; status: string; taskType: string; - maxExecutedAt: Date | undefined; - minSubmittedAt: Date | undefined; types: string[]; } diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/StatusFilter.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/StatusFilter.tsx index 22fb8307f43..80acd0afc2e 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/StatusFilter.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/StatusFilter.tsx @@ -24,9 +24,9 @@ import { TaskStatuses } from '../../../types/tasks'; import { STATUSES } from '../constants'; interface StatusFilterProps { - value?: string; id: string; onChange: (value?: string) => void; + value?: string; } export default function StatusFilter(props: Readonly) { diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/TaskDate.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/TaskDate.tsx index 4a2259e2ea6..c0440ac55c5 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/TaskDate.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/TaskDate.tsx @@ -25,8 +25,8 @@ import TimeFormatter from '../../../components/intl/TimeFormatter'; import { isValidDate, parseDate } from '../../../helpers/dates'; interface Props { - date?: string; baseDate?: string; + date?: string; } export default function TaskDate({ date, baseDate }: Readonly) { diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/Tasks.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/Tasks.tsx index 614523ac92e..274803fa07e 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/Tasks.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/Tasks.tsx @@ -27,10 +27,10 @@ import { Task as ITask } from '../../../types/tasks'; import Task from './Task'; interface Props { - tasks: ITask[]; component?: unknown; onCancelTask: (task: ITask) => Promise; onFilterTask: (task: ITask) => void; + tasks: ITask[]; } const COLUMN_WIDTHS = [0, 'auto', 'auto', 0, 0, 0, 0]; diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/TypesFilter.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/TypesFilter.tsx index 9a7a620c706..d7b66d133df 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/TypesFilter.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/TypesFilter.tsx @@ -23,10 +23,10 @@ import { translate } from '../../../helpers/l10n'; import { ALL_TYPES } from '../constants'; interface Props { - value: string; id: string; onChange: Function; types: string[]; + value: string; } export default class TypesFilter extends React.PureComponent { diff --git a/server/sonar-web/src/main/js/apps/change-admin-password/ChangeAdminPasswordApp.tsx b/server/sonar-web/src/main/js/apps/change-admin-password/ChangeAdminPasswordApp.tsx index 708fd0eb11b..84226852821 100644 --- a/server/sonar-web/src/main/js/apps/change-admin-password/ChangeAdminPasswordApp.tsx +++ b/server/sonar-web/src/main/js/apps/change-admin-password/ChangeAdminPasswordApp.tsx @@ -32,9 +32,9 @@ interface Props { } interface State { - passwordValue: string; - confirmPasswordValue: string; canSubmit?: boolean; + confirmPasswordValue: string; + passwordValue: string; submitting: boolean; success: boolean; } diff --git a/server/sonar-web/src/main/js/apps/code/components/CodeAppRenderer.tsx b/server/sonar-web/src/main/js/apps/code/components/CodeAppRenderer.tsx index 9072e7221c7..c85649dca92 100644 --- a/server/sonar-web/src/main/js/apps/code/components/CodeAppRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/code/components/CodeAppRenderer.tsx @@ -50,20 +50,11 @@ import Search from './Search'; import SourceViewerWrapper from './SourceViewerWrapper'; interface Props { - branchLike?: BranchLike; - component: Component; - location: Location; - metrics: Dict; baseComponent?: ComponentMeasure; + branchLike?: BranchLike; breadcrumbs: Breadcrumb[]; + component: Component; components?: ComponentMeasure[]; - highlighted?: ComponentMeasure; - loading: boolean; - searchResults?: ComponentMeasure[]; - sourceViewer?: ComponentMeasure; - total: number; - newCodeSelected: boolean; - handleGoToParent: () => void; handleHighlight: (highlighted: ComponentMeasure) => void; handleLoadMore: () => void; @@ -71,6 +62,15 @@ interface Props { handleSearchResults: (searchResults: ComponentMeasure[]) => void; handleSelect: (component: ComponentMeasure) => void; handleSelectNewCode: (newCodeSelected: boolean) => void; + highlighted?: ComponentMeasure; + + loading: boolean; + location: Location; + metrics: Dict; + newCodeSelected: boolean; + searchResults?: ComponentMeasure[]; + sourceViewer?: ComponentMeasure; + total: number; } export default function CodeAppRenderer(props: Readonly) { diff --git a/server/sonar-web/src/main/js/apps/code/components/Component.tsx b/server/sonar-web/src/main/js/apps/code/components/Component.tsx index daecf2363c1..30a28ac8c4b 100644 --- a/server/sonar-web/src/main/js/apps/code/components/Component.tsx +++ b/server/sonar-web/src/main/js/apps/code/components/Component.tsx @@ -35,10 +35,10 @@ interface Props { component: TypeComponentMeasure; isBaseComponent?: boolean; metrics: Metric[]; + newCodeSelected?: boolean; previous?: TypeComponentMeasure; rootComponent: TypeComponentMeasure; selected?: boolean; - newCodeSelected?: boolean; showAnalysisDate?: boolean; } diff --git a/server/sonar-web/src/main/js/apps/code/components/Components.tsx b/server/sonar-web/src/main/js/apps/code/components/Components.tsx index 0cd65d47c8a..8940adf525d 100644 --- a/server/sonar-web/src/main/js/apps/code/components/Components.tsx +++ b/server/sonar-web/src/main/js/apps/code/components/Components.tsx @@ -35,9 +35,9 @@ interface ComponentsProps { branchLike?: BranchLike; components: ComponentMeasure[]; metrics: Metric[]; + newCodeSelected?: boolean; rootComponent: ComponentMeasure; selected?: ComponentMeasure; - newCodeSelected?: boolean; showAnalysisDate?: boolean; } diff --git a/server/sonar-web/src/main/js/apps/code/components/Search.tsx b/server/sonar-web/src/main/js/apps/code/components/Search.tsx index f1be0f903e6..da5d834add2 100644 --- a/server/sonar-web/src/main/js/apps/code/components/Search.tsx +++ b/server/sonar-web/src/main/js/apps/code/components/Search.tsx @@ -39,15 +39,15 @@ interface Props { component: ComponentMeasure; location: Location; newCodeSelected: boolean; - onSearchClear: () => void; onNewCodeToggle: (newCode: boolean) => void; + onSearchClear: () => void; onSearchResults: (results?: ComponentMeasure[]) => void; router: Router; } interface State { - query: string; loading: boolean; + query: string; } class Search extends React.PureComponent { diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/ActivatedRuleActions.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/ActivatedRuleActions.tsx index b1a674d1442..01291c91d3a 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/ActivatedRuleActions.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/ActivatedRuleActions.tsx @@ -28,13 +28,13 @@ import ActivationButton from './ActivationButton'; interface Props { activation: RuleActivation; + canDeactivateInherited?: boolean; + handleDeactivate: (key?: string) => void; + handleRevert: (key?: string) => void; + onActivate: (severity: string, prioritizedRule: boolean) => Promise | void; profile: Profile; ruleDetails: Rule; - onActivate: (severity: string, prioritizedRule: boolean) => Promise | void; - handleRevert: (key?: string) => void; - handleDeactivate: (key?: string) => void; showDeactivated?: boolean; - canDeactivateInherited?: boolean; } export default function ActivatedRuleActions(props: Readonly) { diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/ActivationButton.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/ActivationButton.tsx index 8dbb73292f0..995cb49fd19 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/ActivationButton.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/ActivationButton.tsx @@ -25,13 +25,13 @@ import ActivationFormModal from './ActivationFormModal'; interface Props { activation?: RuleActivation; + ariaLabel?: string; buttonText: string; className?: string; modalHeader: string; onDone?: (severity: string, prioritizedRule: boolean) => Promise | void; profiles: BaseProfile[]; rule: Rule | RuleDetails; - ariaLabel?: string; } export default function ActivationButton(props: Props) { diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/CodingRulesApp.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/CodingRulesApp.tsx index 2ed87f2e2cb..9aeee494b4f 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/CodingRulesApp.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/CodingRulesApp.tsx @@ -89,8 +89,8 @@ interface Props { interface State { actives?: Actives; - canWrite?: boolean; canDeactivateInherited?: boolean; + canWrite?: boolean; facets?: Facets; loading: boolean; openFacets: OpenFacets; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/CustomRuleFormFieldsCCT.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/CustomRuleFormFieldsCCT.tsx index 70362092ddd..94e0d1f4447 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/CustomRuleFormFieldsCCT.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/CustomRuleFormFieldsCCT.tsx @@ -44,9 +44,9 @@ import { } from '../../../types/clean-code-taxonomy'; interface Props { - value: T; - onChange: (value: T) => void; disabled?: boolean; + onChange: (value: T) => void; + value: T; } export function CleanCodeCategoryField(props: Readonly>) { diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/Facet.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/Facet.tsx index eb4d06aba2f..2f594df563f 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/Facet.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/Facet.tsx @@ -31,12 +31,12 @@ import { MultipleSelectionHint } from '../../issues/sidebar/MultipleSelectionHin import { FacetKey } from '../query'; export interface BasicProps { + help?: React.ReactNode; onChange: (changes: Dict) => void; onToggle: (facet: FacetKey) => void; open: boolean; stats?: Dict; values: string[]; - help?: React.ReactNode; } interface Props extends BasicProps { diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/PrioritizedRulesFacet.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/PrioritizedRulesFacet.tsx index 24cfa5bf962..66f1cc3b697 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/PrioritizedRulesFacet.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/PrioritizedRulesFacet.tsx @@ -22,8 +22,8 @@ import { translate } from '../../../helpers/l10n'; import Facet, { BasicProps } from './Facet'; interface Props extends Omit { - onChange: (changes: { prioritizedRule: boolean | undefined }) => void; disabled: boolean; + onChange: (changes: { prioritizedRule: boolean | undefined }) => void; value: boolean | undefined; } diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/QualityProfileSelector.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/QualityProfileSelector.tsx index 49d11f4e5e1..14d5c97f445 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/QualityProfileSelector.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/QualityProfileSelector.tsx @@ -30,8 +30,8 @@ import { translate } from '../../../helpers/l10n'; interface Props { inputId?: string; - profiles: Profile[]; onChange: (selected: Profile[]) => void; + profiles: Profile[]; selectedProfiles: Profile[]; } diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetails.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetails.tsx index 09e0dda08ff..9d1f4f5c5b5 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetails.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetails.tsx @@ -49,8 +49,8 @@ import RuleDetailsProfiles from './RuleDetailsProfiles'; interface Props { allowCustomRules?: boolean; - canWrite?: boolean; canDeactivateInherited?: boolean; + canWrite?: boolean; onActivate: (profile: string, rule: string, activation: RuleActivation) => void; onDeactivate: (profile: string, rule: string) => void; onDelete: (rule: string) => void; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsCustomRules.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsCustomRules.tsx index 0717e518569..86d454ba10e 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsCustomRules.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsCustomRules.tsx @@ -103,9 +103,9 @@ export default function RuleDetailsCustomRules(props: Readonly) { function RuleListItem( props: Readonly<{ - rule: Rule; editable?: boolean; onDelete: (ruleKey: string) => void; + rule: Rule; }>, ) { const { rule, editable } = props; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsHeaderMeta.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsHeaderMeta.tsx index f89b77de11b..f4a47bcbe32 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsHeaderMeta.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsHeaderMeta.tsx @@ -28,8 +28,8 @@ import { Dict, RuleDetails } from '../../../types/types'; const EXTERNAL_RULE_REPO_PREFIX = 'external_'; interface Props { - ruleDetails: RuleDetails; referencedRepositories: Dict<{ key: string; language: string; name: string }>; + ruleDetails: RuleDetails; } export default function RuleDetailsHeaderMeta(props: Readonly) { diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsHeaderSide.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsHeaderSide.tsx index cba1acf03d3..69a76df022b 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsHeaderSide.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsHeaderSide.tsx @@ -55,8 +55,8 @@ export default function RuleDetailsHeaderSide({ ruleDetails }: Readonly) interface RuleHeaderMetaItemProps { children: React.ReactNode; - title: string; className?: string; + title: string; } function RuleHeaderInfo({ children, title, ...props }: Readonly) { diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleListItem.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleListItem.tsx index 25b65e20a73..56df3875bba 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleListItem.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleListItem.tsx @@ -51,14 +51,14 @@ import ActivationButton from './ActivationButton'; interface Props { activation?: RuleActivation; - isLoggedIn: boolean; canDeactivateInherited?: boolean; + isLoggedIn: boolean; onActivate: (profile: string, rule: string, activation: RuleActivation) => void; onDeactivate: (profile: string, rule: string) => void; onOpen: (ruleKey: string) => void; rule: Rule; - selected: boolean; selectRule: (key: string) => void; + selected: boolean; selectedProfile?: Profile; } diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/SeveritySelect.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/SeveritySelect.tsx index 5b39ade4564..f6bd9792ed5 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/SeveritySelect.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/SeveritySelect.tsx @@ -27,8 +27,8 @@ import { IssueSeverity } from '../../../types/issues'; export interface SeveritySelectProps { isDisabled: boolean; - severity: string; onChange: (value: LabelValueSelectOption) => void; + severity: string; } function Option(props: Readonly, false>>) { diff --git a/server/sonar-web/src/main/js/apps/coding-rules/query.ts b/server/sonar-web/src/main/js/apps/coding-rules/query.ts index 181d59f2d75..db6f4b9925f 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/query.ts +++ b/server/sonar-web/src/main/js/apps/coding-rules/query.ts @@ -50,6 +50,7 @@ export interface Query { languages: string[]; owaspTop10: string[]; 'owaspTop10-2021': string[]; + prioritizedRule: boolean | undefined; profile: string | undefined; repositories: string[]; ruleKey: string | undefined; @@ -60,7 +61,6 @@ export interface Query { tags: string[]; template: boolean | undefined; types: string[]; - prioritizedRule: boolean | undefined; } export type FacetKey = keyof Query; diff --git a/server/sonar-web/src/main/js/apps/coding-rules/rule.ts b/server/sonar-web/src/main/js/apps/coding-rules/rule.ts index dfacec9bd77..1e9cc72ab39 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/rule.ts +++ b/server/sonar-web/src/main/js/apps/coding-rules/rule.ts @@ -27,12 +27,12 @@ export enum RuleDescriptionSections { } export interface RuleDescriptionContext { - key: string; displayName: string; + key: string; } export interface RuleDescriptionSection { - key: RuleDescriptionSections; content: string; context?: RuleDescriptionContext; + key: RuleDescriptionSections; } diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/MeasureContent.tsx b/server/sonar-web/src/main/js/apps/component-measures/components/MeasureContent.tsx index 13ec54ab504..e9b232a4268 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/components/MeasureContent.tsx +++ b/server/sonar-web/src/main/js/apps/component-measures/components/MeasureContent.tsx @@ -58,14 +58,14 @@ import MeasureViewSelect from './MeasureViewSelect'; import MeasuresBreadcrumbs from './MeasuresBreadcrumbs'; interface Props { + asc?: boolean; branchLike?: BranchLike; leakPeriod?: Period; - requestedMetric: Pick; metrics: Dict; + requestedMetric: Pick; rootComponent: ComponentMeasure; router: Router; selected?: string; - asc?: boolean; updateQuery: (query: Partial) => void; view: MeasurePageView; } diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/MeasureViewSelect.tsx b/server/sonar-web/src/main/js/apps/component-measures/components/MeasureViewSelect.tsx index b5f574c8874..9370dbc13cd 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/components/MeasureViewSelect.tsx +++ b/server/sonar-web/src/main/js/apps/component-measures/components/MeasureViewSelect.tsx @@ -26,8 +26,8 @@ import { hasList, hasTree, hasTreemap } from '../utils'; export interface MeasureViewSelectProps { className?: string; - metric: Metric; handleViewChange: (view: MeasurePageView) => void; + metric: Metric; view: MeasurePageView; } diff --git a/server/sonar-web/src/main/js/apps/component-measures/config/bubbles.ts b/server/sonar-web/src/main/js/apps/component-measures/config/bubbles.ts index 1f0eeb1771a..f660bda32db 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/config/bubbles.ts +++ b/server/sonar-web/src/main/js/apps/component-measures/config/bubbles.ts @@ -21,10 +21,10 @@ import { MetricKey } from '~sonar-aligned/types/metrics'; export const bubbles: { [domain: string]: { + colors?: string[]; + size: string; x: string; y: string; - size: string; - colors?: string[]; yDomain?: [number, number]; }; } = { diff --git a/server/sonar-web/src/main/js/apps/component-measures/drilldown/BubbleChartView.tsx b/server/sonar-web/src/main/js/apps/component-measures/drilldown/BubbleChartView.tsx index a635695ddb7..aac6a045d29 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/drilldown/BubbleChartView.tsx +++ b/server/sonar-web/src/main/js/apps/component-measures/drilldown/BubbleChartView.tsx @@ -61,9 +61,9 @@ import EmptyResult from './EmptyResult'; const HEIGHT = 500; interface Props { + branchLike?: BranchLike; component: ComponentMeasureI; components: ComponentMeasureEnhanced[]; - branchLike?: BranchLike; domain: string; metrics: Dict; paging?: Paging; @@ -89,8 +89,8 @@ export default class BubbleChartView extends React.PureComponent { getTooltip( component: ComponentMeasureEnhanced, - values: { x: number; y: number; size: number; colors?: Array }, - metrics: { x: Metric; y: Metric; size: Metric; colors?: Metric[] }, + values: { colors?: Array; size: number; x: number; y: number }, + metrics: { colors?: Metric[]; size: Metric; x: Metric; y: Metric }, ) { const inner = [ [component.name, isProject(component.qualifier) ? component.branch : undefined] @@ -139,7 +139,7 @@ export default class BubbleChartView extends React.PureComponent { return translatedDescription; } - renderBubbleChart(metrics: { x: Metric; y: Metric; size: Metric; colors?: Metric[] }) { + renderBubbleChart(metrics: { colors?: Metric[]; size: Metric; x: Metric; y: Metric }) { const { ratingFilters } = this.state; const items = this.props.components diff --git a/server/sonar-web/src/main/js/apps/component-measures/drilldown/FilesView.tsx b/server/sonar-web/src/main/js/apps/component-measures/drilldown/FilesView.tsx index 227d382a3a1..5100108363c 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/drilldown/FilesView.tsx +++ b/server/sonar-web/src/main/js/apps/component-measures/drilldown/FilesView.tsx @@ -43,8 +43,8 @@ interface Props { components: ComponentMeasureEnhanced[]; defaultShowBestMeasures: boolean; fetchMore: () => void; - handleSelect: (component: ComponentMeasureEnhanced) => void; handleOpen: (component: ComponentMeasureEnhanced) => void; + handleSelect: (component: ComponentMeasureEnhanced) => void; loadingMore: boolean; metric: Metric; metrics: Dict; diff --git a/server/sonar-web/src/main/js/apps/component-measures/utils.ts b/server/sonar-web/src/main/js/apps/component-measures/utils.ts index 27369731902..3f5a422ebfa 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/utils.ts +++ b/server/sonar-web/src/main/js/apps/component-measures/utils.ts @@ -224,7 +224,7 @@ export const groupByDomains = memoize((measures: MeasureEnhanced[]) => { })); return sortBy(domains, [ - (domain: { name: string; measures: MeasureEnhanced[] }) => { + (domain: { measures: MeasureEnhanced[]; name: string }) => { const idx = KNOWN_DOMAINS.indexOf(domain.name); return idx >= 0 ? idx : KNOWN_DOMAINS.length; }, @@ -300,10 +300,10 @@ function parseView(metric: MetricKey, rawView?: string): MeasurePageView { } export interface Query { + asc?: boolean; metric: string; selected?: string; view: MeasurePageView; - asc?: boolean; } export const parseQuery = memoize((urlQuery: RawQuery): Query => { diff --git a/server/sonar-web/src/main/js/apps/create/project/Azure/AzureProjectAccordion.tsx b/server/sonar-web/src/main/js/apps/create/project/Azure/AzureProjectAccordion.tsx index a9e42550839..c1cd6b2f34f 100644 --- a/server/sonar-web/src/main/js/apps/create/project/Azure/AzureProjectAccordion.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/Azure/AzureProjectAccordion.tsx @@ -30,8 +30,8 @@ import { CreateProjectModes } from '../types'; export interface AzureProjectAccordionProps { loading: boolean; - onOpen: (key: string) => void; onImportRepository: (repository: AzureRepository) => void; + onOpen: (key: string) => void; project: AzureProject; repositories?: AzureRepository[]; searchQuery?: string; diff --git a/server/sonar-web/src/main/js/apps/create/project/Azure/AzureProjectCreateRenderer.tsx b/server/sonar-web/src/main/js/apps/create/project/Azure/AzureProjectCreateRenderer.tsx index 7db5f88a75a..4113350fa63 100644 --- a/server/sonar-web/src/main/js/apps/create/project/Azure/AzureProjectCreateRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/Azure/AzureProjectCreateRenderer.tsx @@ -44,22 +44,22 @@ import AzurePersonalAccessTokenForm from './AzurePersonalAccessTokenForm'; import AzureProjectsList from './AzureProjectsList'; export interface AzureProjectCreateRendererProps { + almInstances?: AlmSettingsInstance[]; loading: boolean; loadingRepositories: Dict; onImportRepository: (resository: AzureRepository) => void; onOpenProject: (key: string) => void; onPersonalAccessTokenCreate: () => void; onSearch: (query: string) => void; + onSelectedAlmInstanceChange: (instance: AlmSettingsInstance) => void; projects?: AzureProject[]; repositories?: Dict; - searching?: boolean; - searchResults?: AzureRepository[]; + resetPat: boolean; searchQuery?: string; - almInstances?: AlmSettingsInstance[]; + searchResults?: AzureRepository[]; + searching?: boolean; selectedAlmInstance?: AlmSettingsInstance; showPersonalAccessTokenForm?: boolean; - resetPat: boolean; - onSelectedAlmInstanceChange: (instance: AlmSettingsInstance) => void; } export default function AzureProjectCreateRenderer( diff --git a/server/sonar-web/src/main/js/apps/create/project/Azure/AzureProjectsList.tsx b/server/sonar-web/src/main/js/apps/create/project/Azure/AzureProjectsList.tsx index 5cd8189660c..f45f62f37cc 100644 --- a/server/sonar-web/src/main/js/apps/create/project/Azure/AzureProjectsList.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/Azure/AzureProjectsList.tsx @@ -31,12 +31,12 @@ import AzureProjectAccordion from './AzureProjectAccordion'; export interface AzureProjectsListProps { loadingRepositories: Dict; - onOpenProject: (key: string) => void; onImportRepository: (repository: AzureRepository) => void; + onOpenProject: (key: string) => void; projects?: AzureProject[]; repositories?: Dict; - searchResults?: AzureRepository[]; searchQuery?: string; + searchResults?: AzureRepository[]; } const PAGE_SIZE = 10; diff --git a/server/sonar-web/src/main/js/apps/create/project/BitbucketCloud/BitbucketCloudPersonalAccessTokenForm.tsx b/server/sonar-web/src/main/js/apps/create/project/BitbucketCloud/BitbucketCloudPersonalAccessTokenForm.tsx index 194fdc6ca8b..2d4c2d071d9 100644 --- a/server/sonar-web/src/main/js/apps/create/project/BitbucketCloud/BitbucketCloudPersonalAccessTokenForm.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/BitbucketCloud/BitbucketCloudPersonalAccessTokenForm.tsx @@ -34,8 +34,8 @@ import { usePersonalAccessToken } from '../usePersonalAccessToken'; interface Props { almSetting: AlmInstanceBase; - resetPat: boolean; onPersonalAccessTokenCreated: () => void; + resetPat: boolean; } export default function BitbucketCloudPersonalAccessTokenForm({ diff --git a/server/sonar-web/src/main/js/apps/create/project/BitbucketCloud/BitbucketCloudProjectCreateRender.tsx b/server/sonar-web/src/main/js/apps/create/project/BitbucketCloud/BitbucketCloudProjectCreateRender.tsx index eecb3055a36..4c238b03e48 100644 --- a/server/sonar-web/src/main/js/apps/create/project/BitbucketCloud/BitbucketCloudProjectCreateRender.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/BitbucketCloud/BitbucketCloudProjectCreateRender.tsx @@ -45,8 +45,8 @@ export interface BitbucketCloudProjectCreateRendererProps { onSelectedAlmInstanceChange: (instance: AlmSettingsInstance) => void; repositories?: BitbucketCloudRepository[]; resetPat: boolean; - searching: boolean; searchQuery: string; + searching: boolean; selectedAlmInstance?: AlmSettingsInstance; showPersonalAccessTokenForm: boolean; } diff --git a/server/sonar-web/src/main/js/apps/create/project/BitbucketCloud/BitbucketCloudSearchForm.tsx b/server/sonar-web/src/main/js/apps/create/project/BitbucketCloud/BitbucketCloudSearchForm.tsx index 335c38a3807..f7159a41b88 100644 --- a/server/sonar-web/src/main/js/apps/create/project/BitbucketCloud/BitbucketCloudSearchForm.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/BitbucketCloud/BitbucketCloudSearchForm.tsx @@ -36,8 +36,8 @@ export interface BitbucketCloudSearchFormProps { onLoadMore: () => void; onSearch: (searchQuery: string) => void; repositories?: BitbucketCloudRepository[]; - searching: boolean; searchQuery: string; + searching: boolean; } function getRepositoryUrl(workspace: string, slug: string) { diff --git a/server/sonar-web/src/main/js/apps/create/project/BitbucketServer/BitbucketImportRepositoryForm.tsx b/server/sonar-web/src/main/js/apps/create/project/BitbucketServer/BitbucketImportRepositoryForm.tsx index dbc28d6e7ee..7f30dbe9db7 100644 --- a/server/sonar-web/src/main/js/apps/create/project/BitbucketServer/BitbucketImportRepositoryForm.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/BitbucketServer/BitbucketImportRepositoryForm.tsx @@ -29,12 +29,12 @@ import BitbucketRepositories from './BitbucketRepositories'; import BitbucketSearchResults from './BitbucketSearchResults'; export interface BitbucketImportRepositoryFormProps { - onSearch: (query: string) => void; onImportRepository: (repo: BitbucketRepository) => void; - projects?: BitbucketProject[]; + onSearch: (query: string) => void; projectRepositories?: Dict; - searching: boolean; + projects?: BitbucketProject[]; searchResults?: BitbucketRepository[]; + searching: boolean; } export default function BitbucketImportRepositoryForm(props: BitbucketImportRepositoryFormProps) { diff --git a/server/sonar-web/src/main/js/apps/create/project/BitbucketServer/BitbucketProjectCreateRenderer.tsx b/server/sonar-web/src/main/js/apps/create/project/BitbucketServer/BitbucketProjectCreateRenderer.tsx index d44187b2e24..9c4eb92bbba 100644 --- a/server/sonar-web/src/main/js/apps/create/project/BitbucketServer/BitbucketProjectCreateRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/BitbucketServer/BitbucketProjectCreateRenderer.tsx @@ -38,14 +38,14 @@ export interface BitbucketProjectCreateRendererProps { almInstances: AlmSettingsInstance[]; isLoading: boolean; onImportRepository: (repository: BitbucketRepository) => void; - onSearch: (query: string) => void; onPersonalAccessTokenCreated: () => void; + onSearch: (query: string) => void; onSelectedAlmInstanceChange: (instance: AlmSettingsInstance) => void; - projects?: BitbucketProject[]; projectRepositories?: Dict; + projects?: BitbucketProject[]; resetPat: boolean; - searching: boolean; searchResults?: BitbucketRepository[]; + searching: boolean; selectedAlmInstance?: AlmSettingsInstance; showPersonalAccessTokenForm?: boolean; } diff --git a/server/sonar-web/src/main/js/apps/create/project/BitbucketServer/BitbucketRepositories.tsx b/server/sonar-web/src/main/js/apps/create/project/BitbucketServer/BitbucketRepositories.tsx index 003e52d1329..53d9b214654 100644 --- a/server/sonar-web/src/main/js/apps/create/project/BitbucketServer/BitbucketRepositories.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/BitbucketServer/BitbucketRepositories.tsx @@ -26,8 +26,8 @@ import BitbucketProjectAccordion from './BitbucketProjectAccordion'; export interface BitbucketRepositoriesProps { onImportRepository: (repo: BitbucketRepository) => void; - projects: BitbucketProject[]; projectRepositories: Dict; + projects: BitbucketProject[]; } export default function BitbucketRepositories(props: BitbucketRepositoriesProps) { diff --git a/server/sonar-web/src/main/js/apps/create/project/BitbucketServer/BitbucketSearchResults.tsx b/server/sonar-web/src/main/js/apps/create/project/BitbucketServer/BitbucketSearchResults.tsx index 0e29ce7ee5d..278e1b453d8 100644 --- a/server/sonar-web/src/main/js/apps/create/project/BitbucketServer/BitbucketSearchResults.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/BitbucketServer/BitbucketSearchResults.tsx @@ -26,8 +26,8 @@ import BitbucketProjectAccordion from './BitbucketProjectAccordion'; export interface BitbucketSearchResultsProps { onImportRepository: (repo: BitbucketRepository) => void; projects: BitbucketProject[]; - searching: boolean; searchResults?: BitbucketRepository[]; + searching: boolean; } export default function BitbucketSearchResults(props: BitbucketSearchResultsProps) { diff --git a/server/sonar-web/src/main/js/apps/create/project/BitbucketServer/BitbucketServerPersonalAccessTokenForm.tsx b/server/sonar-web/src/main/js/apps/create/project/BitbucketServer/BitbucketServerPersonalAccessTokenForm.tsx index 52bc7809881..43dd9588214 100644 --- a/server/sonar-web/src/main/js/apps/create/project/BitbucketServer/BitbucketServerPersonalAccessTokenForm.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/BitbucketServer/BitbucketServerPersonalAccessTokenForm.tsx @@ -35,8 +35,8 @@ import { usePersonalAccessToken } from '../usePersonalAccessToken'; interface Props { almSetting: AlmInstanceBase; - resetPat: boolean; onPersonalAccessTokenCreated: () => void; + resetPat: boolean; } export default function BitbucketServerPersonalAccessTokenForm({ diff --git a/server/sonar-web/src/main/js/apps/create/project/CreateProjectPage.tsx b/server/sonar-web/src/main/js/apps/create/project/CreateProjectPage.tsx index 1422d315c3f..4eb68e8bb64 100644 --- a/server/sonar-web/src/main/js/apps/create/project/CreateProjectPage.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/CreateProjectPage.tsx @@ -50,13 +50,13 @@ export interface CreateProjectPageProps extends WithAvailableFeaturesProps { interface State { azureSettings: DopSetting[]; - bitbucketSettings: DopSetting[]; bitbucketCloudSettings: DopSetting[]; + bitbucketSettings: DopSetting[]; + creatingAlmDefinition?: AlmKeys; githubSettings: DopSetting[]; gitlabSettings: DopSetting[]; - loading: boolean; - creatingAlmDefinition?: AlmKeys; importProjects?: ImportProjectParam; + loading: boolean; redirectTo: string; } @@ -70,8 +70,8 @@ const PROJECT_MODE_FOR_ALM_KEY = { export type ImportProjectParam = | { - creationMode: CreateProjectModes.AzureDevOps; almSetting: string; + creationMode: CreateProjectModes.AzureDevOps; monorepo: false; projects: { projectName: string; @@ -79,33 +79,33 @@ export type ImportProjectParam = }[]; } | { - creationMode: CreateProjectModes.BitbucketCloud; almSetting: string; + creationMode: CreateProjectModes.BitbucketCloud; monorepo: false; projects: { repositorySlug: string; }[]; } | { - creationMode: CreateProjectModes.BitbucketServer; almSetting: string; + creationMode: CreateProjectModes.BitbucketServer; monorepo: false; projects: { - repositorySlug: string; projectKey: string; + repositorySlug: string; }[]; } | { - creationMode: CreateProjectModes.GitHub; almSetting: string; + creationMode: CreateProjectModes.GitHub; monorepo: false; projects: { repositoryKey: string; }[]; } | { - creationMode: CreateProjectModes.GitLab; almSetting: string; + creationMode: CreateProjectModes.GitLab; monorepo: false; projects: { gitlabProjectId: string; @@ -115,20 +115,20 @@ export type ImportProjectParam = creationMode: CreateProjectModes.Manual; monorepo: false; projects: { - project: string; - name: string; mainBranch: string; + name: string; + project: string; }[]; } | { creationMode: CreateProjectModes; devOpsPlatformSettingId: string; monorepo: true; + projectIdentifier?: string; projects: { projectKey: string; projectName: string; }[]; - projectIdentifier?: string; repositoryIdentifier: string; }; diff --git a/server/sonar-web/src/main/js/apps/create/project/Github/GitHubProjectCreate.tsx b/server/sonar-web/src/main/js/apps/create/project/Github/GitHubProjectCreate.tsx index e22904aedf1..43735995971 100644 --- a/server/sonar-web/src/main/js/apps/create/project/Github/GitHubProjectCreate.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/Github/GitHubProjectCreate.tsx @@ -34,9 +34,9 @@ import GitHubProjectCreateRenderer from './GitHubProjectCreateRenderer'; import { redirectToGithub } from './utils'; interface Props { + dopSettings: DopSetting[]; isLoadingBindings: boolean; onProjectSetupDone: (importProjects: ImportProjectParam) => void; - dopSettings: DopSetting[]; } export default function GitHubProjectCreate(props: Readonly) { diff --git a/server/sonar-web/src/main/js/apps/create/project/Github/GitHubProjectCreateRenderer.tsx b/server/sonar-web/src/main/js/apps/create/project/Github/GitHubProjectCreateRenderer.tsx index c5834b26766..45026131cf5 100644 --- a/server/sonar-web/src/main/js/apps/create/project/Github/GitHubProjectCreateRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/Github/GitHubProjectCreateRenderer.tsx @@ -36,6 +36,7 @@ import RepositoryList from '../components/RepositoryList'; import { CreateProjectModes } from '../types'; interface GitHubProjectCreateRendererProps { + almInstances: AlmSettingsInstance[]; error: boolean; loadingBindings: boolean; loadingOrganizations: boolean; @@ -44,14 +45,13 @@ interface GitHubProjectCreateRendererProps { onLoadMore: () => void; onSearch: (q: string) => void; onSelectOrganization: (key: string) => void; + onSelectedAlmInstanceChange: (instance: AlmSettingsInstance) => void; organizations?: GithubOrganization[]; repositories?: GithubRepository[]; repositoryPaging: Paging; searchQuery: string; - selectedOrganization?: GithubOrganization; - almInstances: AlmSettingsInstance[]; selectedAlmInstance?: AlmSettingsInstance; - onSelectedAlmInstanceChange: (instance: AlmSettingsInstance) => void; + selectedOrganization?: GithubOrganization; } function orgToOption({ key, name }: GithubOrganization) { diff --git a/server/sonar-web/src/main/js/apps/create/project/Gitlab/GItlabPersonalAccessTokenForm.tsx b/server/sonar-web/src/main/js/apps/create/project/Gitlab/GItlabPersonalAccessTokenForm.tsx index cb2c8eeaaba..8886ac9e903 100644 --- a/server/sonar-web/src/main/js/apps/create/project/Gitlab/GItlabPersonalAccessTokenForm.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/Gitlab/GItlabPersonalAccessTokenForm.tsx @@ -35,8 +35,8 @@ import { usePersonalAccessToken } from '../usePersonalAccessToken'; interface Props { almSetting: AlmInstanceBase; - resetPat: boolean; onPersonalAccessTokenCreated: () => void; + resetPat: boolean; } export default function GitlabPersonalAccessTokenForm({ diff --git a/server/sonar-web/src/main/js/apps/create/project/Gitlab/GitlabProjectCreate.tsx b/server/sonar-web/src/main/js/apps/create/project/Gitlab/GitlabProjectCreate.tsx index a5ff527ff4e..09d87aea1b1 100644 --- a/server/sonar-web/src/main/js/apps/create/project/Gitlab/GitlabProjectCreate.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/Gitlab/GitlabProjectCreate.tsx @@ -34,9 +34,9 @@ import GitlabPersonalAccessTokenForm from './GItlabPersonalAccessTokenForm'; import GitlabProjectCreateRenderer from './GitlabProjectCreateRenderer'; interface Props { + dopSettings: DopSetting[]; isLoadingBindings: boolean; onProjectSetupDone: (importProjects: ImportProjectParam) => void; - dopSettings: DopSetting[]; } export default function GitlabProjectCreate(props: Readonly) { diff --git a/server/sonar-web/src/main/js/apps/create/project/Gitlab/GitlabProjectCreateRenderer.tsx b/server/sonar-web/src/main/js/apps/create/project/Gitlab/GitlabProjectCreateRenderer.tsx index 49eb4473a87..a496c18867c 100644 --- a/server/sonar-web/src/main/js/apps/create/project/Gitlab/GitlabProjectCreateRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/Gitlab/GitlabProjectCreateRenderer.tsx @@ -41,12 +41,12 @@ export interface GitlabProjectCreateRendererProps { onLoadMore: () => void; onPersonalAccessTokenCreated: () => void; onSearch: (searchQuery: string) => void; + onSelectedAlmInstanceChange: (instance: AlmInstanceBase) => void; projects?: GitlabProject[]; projectsPaging: Paging; resetPat: boolean; searchQuery: string; selectedAlmInstance?: AlmSettingsInstance; - onSelectedAlmInstanceChange: (instance: AlmInstanceBase) => void; showPersonalAccessTokenForm?: boolean; } diff --git a/server/sonar-web/src/main/js/apps/create/project/Gitlab/GitlabProjectSelectionForm.tsx b/server/sonar-web/src/main/js/apps/create/project/Gitlab/GitlabProjectSelectionForm.tsx index b5b5d2cedd0..1a8ff2baffa 100644 --- a/server/sonar-web/src/main/js/apps/create/project/Gitlab/GitlabProjectSelectionForm.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/Gitlab/GitlabProjectSelectionForm.tsx @@ -38,8 +38,8 @@ export interface GitlabProjectSelectionFormProps { onSearch: (searchQuery: string) => void; projects?: GitlabProject[]; projectsPaging: Paging; - searching: boolean; searchQuery: string; + searching: boolean; } export default function GitlabProjectSelectionForm( diff --git a/server/sonar-web/src/main/js/apps/create/project/components/AlmRepoItem.tsx b/server/sonar-web/src/main/js/apps/create/project/components/AlmRepoItem.tsx index d4689365912..098dec33862 100644 --- a/server/sonar-web/src/main/js/apps/create/project/components/AlmRepoItem.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/components/AlmRepoItem.tsx @@ -34,25 +34,25 @@ import { translate } from '../../../../helpers/l10n'; import { getProjectUrl } from '../../../../helpers/urls'; type AlmRepoItemProps = { - primaryTextNode: React.ReactNode; - secondaryTextNode?: React.ReactNode; - sqProjectKey?: string; + almIconSrc: string; almKey: string; almUrl?: string; almUrlText?: string; - almIconSrc: string; + primaryTextNode: React.ReactNode; + secondaryTextNode?: React.ReactNode; + sqProjectKey?: string; } & ( | { multiple: true; onCheck: (key: string) => void; - selected: boolean; onImport?: never; + selected: boolean; } | { multiple?: false; onCheck?: never; - selected?: never; onImport: (key: string) => void; + selected?: never; } ); @@ -152,7 +152,7 @@ export default function AlmRepoItem({ ); } -const RepositoryItem = styled.li<{ selected?: boolean; imported?: boolean }>` +const RepositoryItem = styled.li<{ imported?: boolean; selected?: boolean }>` box-sizing: border-box; border: ${({ selected }) => selected ? themeBorder('default', 'primary') : themeBorder('default')}; diff --git a/server/sonar-web/src/main/js/apps/create/project/components/AlmSettingsInstanceDropdown.tsx b/server/sonar-web/src/main/js/apps/create/project/components/AlmSettingsInstanceDropdown.tsx index 92193fd3ec1..ab601b743ff 100644 --- a/server/sonar-web/src/main/js/apps/create/project/components/AlmSettingsInstanceDropdown.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/components/AlmSettingsInstanceDropdown.tsx @@ -24,10 +24,10 @@ import { hasMessage, translate, translateWithParameters } from '../../../../help import { AlmKeys, AlmSettingsInstance } from '../../../../types/alm-settings'; interface Props { - almKey: AlmKeys; almInstances?: AlmSettingsInstance[]; - selectedAlmInstance?: AlmSettingsInstance; + almKey: AlmKeys; onChangeConfig: (instance: AlmSettingsInstance) => void; + selectedAlmInstance?: AlmSettingsInstance; } const MIN_SIZE_INSTANCES = 2; diff --git a/server/sonar-web/src/main/js/apps/create/project/components/ProjectValidation.tsx b/server/sonar-web/src/main/js/apps/create/project/components/ProjectValidation.tsx index f07613fa84a..481711667b9 100644 --- a/server/sonar-web/src/main/js/apps/create/project/components/ProjectValidation.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/components/ProjectValidation.tsx @@ -48,20 +48,20 @@ interface Props { } interface State { - name: string; - nameError?: boolean; - nameTouched: boolean; key: string; keyError?: ProjectKeyErrors; keyTouched: boolean; + name: string; + nameError?: boolean; + nameTouched: boolean; validatingKey: boolean; } export interface ProjectData { hasError: boolean; id?: I; - name: string; key: string; + name: string; touched: boolean; } diff --git a/server/sonar-web/src/main/js/apps/create/project/components/RepositoryList.tsx b/server/sonar-web/src/main/js/apps/create/project/components/RepositoryList.tsx index 351b08ffa4b..02eb7f64b7b 100644 --- a/server/sonar-web/src/main/js/apps/create/project/components/RepositoryList.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/components/RepositoryList.tsx @@ -31,18 +31,18 @@ import { Paging } from '../../../../types/types'; import AlmRepoItem from '../components/AlmRepoItem'; interface RepositoryListProps { + almKey: AlmKeys.GitHub | AlmKeys.GitLab; + checkAll: () => void; loadingRepositories: boolean; + onCheck: (key: string) => void; + onImport: () => void; + onLoadMore: () => void; + onSearch: (query: string) => void; repositories?: GithubRepository[] | GitlabProject[]; repositoryPaging: Paging; searchQuery: string; - onLoadMore: () => void; - onSearch: (query: string) => void; - almKey: AlmKeys.GitHub | AlmKeys.GitLab; selected: Set; - checkAll: () => void; uncheckAll: () => void; - onCheck: (key: string) => void; - onImport: () => void; } export default function RepositoryList(props: Readonly) { diff --git a/server/sonar-web/src/main/js/apps/create/project/manual/ManualProjectCreate.tsx b/server/sonar-web/src/main/js/apps/create/project/manual/ManualProjectCreate.tsx index 3663ddbd302..71e9bcdcecd 100644 --- a/server/sonar-web/src/main/js/apps/create/project/manual/ManualProjectCreate.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/manual/ManualProjectCreate.tsx @@ -47,8 +47,8 @@ import { CreateProjectModes } from '../types'; interface Props { branchesEnabled: boolean; - onProjectSetupDone: (importProjects: ImportProjectParam) => void; onClose: () => void; + onProjectSetupDone: (importProjects: ImportProjectParam) => void; } interface MainBranchState { diff --git a/server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoConnectionSelector.tsx b/server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoConnectionSelector.tsx index 9025f7e7391..26b76f55a26 100644 --- a/server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoConnectionSelector.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoConnectionSelector.tsx @@ -54,8 +54,8 @@ interface Props { selectedDopSetting?: DopSetting; selectedOrganization?: LabelValueSelectOption; selectedRepository?: LabelValueSelectOption; - showPersonalAccessToken?: boolean; showOrganizations?: boolean; + showPersonalAccessToken?: boolean; } export function MonorepoConnectionSelector({ diff --git a/server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoProjectsList.tsx b/server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoProjectsList.tsx index e0b2999a425..d66d5585f7e 100644 --- a/server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoProjectsList.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoProjectsList.tsx @@ -23,10 +23,10 @@ import { FormattedMessage } from 'react-intl'; import { ProjectData, ProjectValidationCard } from '../components/ProjectValidation'; interface Props { - projectKeys: string[]; onAddProject: () => void; onChangeProject: (project: ProjectData) => void; onRemoveProject: (id?: number) => void; + projectKeys: string[]; projects: ProjectData[]; } diff --git a/server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoRepositorySelector.tsx b/server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoRepositorySelector.tsx index 2436e445be3..24bb13e715d 100644 --- a/server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoRepositorySelector.tsx +++ b/server/sonar-web/src/main/js/apps/create/project/monorepo/MonorepoRepositorySelector.tsx @@ -38,8 +38,8 @@ interface Props { loadingRepositories: boolean; onSearchRepositories: (query: string) => void; onSelectRepository: (repositoryKey: string) => void; - repositorySearchQuery: string; repositoryOptions?: LabelValueSelectOption[] | GroupBase[]; + repositorySearchQuery: string; selectedOrganization?: LabelValueSelectOption; selectedRepository?: LabelValueSelectOption; showOrganizations?: boolean; diff --git a/server/sonar-web/src/main/js/apps/create/project/usePersonalAccessToken.ts b/server/sonar-web/src/main/js/apps/create/project/usePersonalAccessToken.ts index 49f50774ff3..1b5efc45a3a 100644 --- a/server/sonar-web/src/main/js/apps/create/project/usePersonalAccessToken.ts +++ b/server/sonar-web/src/main/js/apps/create/project/usePersonalAccessToken.ts @@ -27,17 +27,17 @@ import { AlmInstanceBase } from '../../../types/alm-settings'; import { tokenExistedBefore } from './utils'; export interface PATType { - validationFailed: boolean; - validationErrorMessage?: string; - touched: boolean; - password: string; - username?: string; - submitting: boolean; checkingPat: boolean; firstConnection: boolean; - handleUsernameChange: (event: React.ChangeEvent) => void; handlePasswordChange: (event: React.ChangeEvent) => void; handleSubmit: (e: React.SyntheticEvent) => Promise; + handleUsernameChange: (event: React.ChangeEvent) => void; + password: string; + submitting: boolean; + touched: boolean; + username?: string; + validationErrorMessage?: string; + validationFailed: boolean; } export const usePersonalAccessToken = ( diff --git a/server/sonar-web/src/main/js/apps/groups/components/Members.tsx b/server/sonar-web/src/main/js/apps/groups/components/Members.tsx index ad9a716869e..b8041247d88 100644 --- a/server/sonar-web/src/main/js/apps/groups/components/Members.tsx +++ b/server/sonar-web/src/main/js/apps/groups/components/Members.tsx @@ -25,8 +25,8 @@ import EditMembersModal from './EditMembersModal'; import ViewMembersModal from './ViewMembersModal'; interface Props { - isManaged: boolean; group: Group; + isManaged: boolean; onEdit: () => void; } diff --git a/server/sonar-web/src/main/js/apps/groups/components/ViewMembersModal.tsx b/server/sonar-web/src/main/js/apps/groups/components/ViewMembersModal.tsx index e124d8bf546..3f007ab886e 100644 --- a/server/sonar-web/src/main/js/apps/groups/components/ViewMembersModal.tsx +++ b/server/sonar-web/src/main/js/apps/groups/components/ViewMembersModal.tsx @@ -25,8 +25,8 @@ import { useGroupMembersQuery } from '../../../queries/group-memberships'; import { Group } from '../../../types/types'; interface Props { - isManaged: boolean; group: Group; + isManaged: boolean; onClose: () => void; } diff --git a/server/sonar-web/src/main/js/apps/issues/components/AssigneeSelect.tsx b/server/sonar-web/src/main/js/apps/issues/components/AssigneeSelect.tsx index 781e9aa77b6..2487062b626 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/AssigneeSelect.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/AssigneeSelect.tsx @@ -35,9 +35,9 @@ const UNASSIGNED = { value: '', label: translate('unassigned') }; export interface AssigneeSelectProps { assignee?: SingleValue; className?: string; + inputId: string; issues: Issue[]; onAssigneeSelect: (assignee: SingleValue) => void; - inputId: string; } function userToOption(user: RestUser | UserActive) { diff --git a/server/sonar-web/src/main/js/apps/issues/components/IssueHeader.tsx b/server/sonar-web/src/main/js/apps/issues/components/IssueHeader.tsx index 28dfb7575cc..23f787fd285 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/IssueHeader.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/IssueHeader.tsx @@ -47,10 +47,10 @@ import IssueHeaderSide from './IssueHeaderSide'; import IssueNewStatusAndTransitionGuide from './IssueNewStatusAndTransitionGuide'; interface Props { - issue: Issue; - ruleDetails: RuleDetails; branchLike?: BranchLike; + issue: Issue; onIssueChange: (issue: Issue) => void; + ruleDetails: RuleDetails; } interface State { diff --git a/server/sonar-web/src/main/js/apps/issues/components/IssueHeaderSide.tsx b/server/sonar-web/src/main/js/apps/issues/components/IssueHeaderSide.tsx index 878ee759f41..a4d32bef64d 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/IssueHeaderSide.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/IssueHeaderSide.tsx @@ -51,8 +51,8 @@ export default function IssueHeaderSide({ issue }: Readonly) { interface IssueHeaderMetaItemProps extends React.HTMLAttributes { children: React.ReactNode; - title: string; className?: string; + title: string; } function IssueHeaderInfo({ diff --git a/server/sonar-web/src/main/js/apps/issues/components/IssueNewStatusAndTransitionGuide.tsx b/server/sonar-web/src/main/js/apps/issues/components/IssueNewStatusAndTransitionGuide.tsx index 7f83156f91a..eade6d01630 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/IssueNewStatusAndTransitionGuide.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/IssueNewStatusAndTransitionGuide.tsx @@ -32,9 +32,9 @@ import { Issue } from '../../../types/types'; import { NoticeType } from '../../../types/users'; interface Props { + issues: Issue[]; run?: boolean; togglePopup: (issue: string, popup: string, show?: boolean) => void; - issues: Issue[]; } const PLACEMENT_RIGHT = 'right'; diff --git a/server/sonar-web/src/main/js/apps/issues/components/IssuesApp.tsx b/server/sonar-web/src/main/js/apps/issues/components/IssuesApp.tsx index 60df939d6d0..2cfa5efd2c7 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/IssuesApp.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/IssuesApp.tsx @@ -125,13 +125,12 @@ export interface State { facets: Dict; issues: Issue[]; loading: boolean; - loadingRule: boolean; loadingFacets: Dict; loadingMore: boolean; + loadingRule: boolean; locationsNavigator: boolean; myIssues: boolean; openFacets: Dict; - showVariantsFilter: boolean; openIssue?: Issue; openPopup?: { issue: string; name: string }; openRuleDetails?: RuleDetails; @@ -145,6 +144,7 @@ export interface State { selected?: string; selectedFlowIndex?: number; selectedLocationIndex?: number; + showVariantsFilter: boolean; } // When opening a specific issue, number of issues to fetch through pagination before loading it specifically diff --git a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/SnippetViewer.tsx b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/SnippetViewer.tsx index 29dac81aeff..74bc910f699 100644 --- a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/SnippetViewer.tsx +++ b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/SnippetViewer.tsx @@ -48,6 +48,7 @@ import { } from '../../../types/types'; export interface SnippetViewerProps { + className?: string; component: SourceViewerFile; displayLineNumberOptions?: boolean; displaySCM?: boolean; @@ -55,6 +56,7 @@ export interface SnippetViewerProps { duplicationsByLine?: { [line: number]: number[] }; expandBlock: (snippetIndex: number, direction: ExpandDirection) => Promise; handleSymbolClick: (symbols: string[]) => void; + hideLocationIndex?: boolean; highlightedLocationMessage: { index: number; text: string | undefined } | undefined; highlightedSymbols: string[]; index: number; @@ -65,9 +67,7 @@ export interface SnippetViewerProps { renderAdditionalChildInLine?: (line: SourceLine) => React.ReactNode | undefined; renderDuplicationPopup: (index: number, line: number) => React.ReactNode; snippet: SourceLine[]; - className?: string; snippetSourcesMap?: LineMap; - hideLocationIndex?: boolean; } type Props = SnippetViewerProps & ThemeProp; diff --git a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/utils.ts b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/utils.ts index f74fcf5e6ad..feb94e50c9d 100644 --- a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/utils.ts +++ b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/utils.ts @@ -102,7 +102,7 @@ export function createSnippets(params: { const startIndex = Math.max(1, loc.textRange.startLine - LINES_ABOVE); const endIndex = addLinesBellow({ issue, locationEnd: loc.textRange.endLine }); - let firstCollision: { start: number; end: number } | undefined; + let firstCollision: { end: number; start: number } | undefined; // Remove ranges that collide into the first collision snippets = snippets.filter((snippet) => { diff --git a/server/sonar-web/src/main/js/apps/issues/issues-subnavigation/SubnavigationIssue.tsx b/server/sonar-web/src/main/js/apps/issues/issues-subnavigation/SubnavigationIssue.tsx index d66a2c2960e..a3f5c1f9de8 100644 --- a/server/sonar-web/src/main/js/apps/issues/issues-subnavigation/SubnavigationIssue.tsx +++ b/server/sonar-web/src/main/js/apps/issues/issues-subnavigation/SubnavigationIssue.tsx @@ -33,9 +33,9 @@ import IssueLocationsNavigator from './IssueLocationsNavigator'; export interface ConciseIssueProps { issue: Issue; + onClick: (issueKey: string) => void; onFlowSelect: (index?: number) => void; onLocationSelect: (index: number) => void; - onClick: (issueKey: string) => void; selected: boolean; selectedFlowIndex: number | undefined; selectedLocationIndex: number | undefined; diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/AssigneeFacet.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/AssigneeFacet.tsx index b1de98acb94..b5d11b91224 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/AssigneeFacet.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/AssigneeFacet.tsx @@ -37,8 +37,8 @@ interface Props { onToggle: (property: string) => void; open: boolean; query: Query; - stats: Dict | undefined; referencedUsers: Dict; + stats: Dict | undefined; } export class AssigneeFacet extends React.PureComponent { diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/CreationDateFacet.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/CreationDateFacet.tsx index df8ff0d7fea..b1be9d09549 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/CreationDateFacet.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/CreationDateFacet.tsx @@ -40,10 +40,10 @@ interface Props { createdBefore: Date | undefined; createdInLast: string; fetching: boolean; + inNewCodePeriod: boolean; onChange: (changes: Partial) => void; onToggle: (property: string) => void; open: boolean; - inNewCodePeriod: boolean; stats: Dict | undefined; } diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/FacetItemsList.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/FacetItemsList.tsx index fb728c8e9b9..aefe1787821 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/FacetItemsList.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/FacetItemsList.tsx @@ -22,13 +22,13 @@ import * as React from 'react'; export type FacetItemsListProps = | { children?: React.ReactNode; - labelledby: string; label?: never; + labelledby: string; } | { children?: React.ReactNode; - labelledby?: never; label: string; + labelledby?: never; }; export function FacetItemsList({ children, labelledby, label }: FacetItemsListProps) { diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/LanguageFacet.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/LanguageFacet.tsx index 00dcc61bd38..049fea05af4 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/LanguageFacet.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/LanguageFacet.tsx @@ -29,19 +29,19 @@ import { Query } from '../utils'; import { ListStyleFacet } from './ListStyleFacet'; interface Props { + disabled?: boolean; + disabledHelper?: string; fetching?: boolean; languages: Languages; - maxInitialItems?: number; - selectedLanguages: string[]; loadSearchResultCount?: (property: string, changes: Partial) => Promise; + maxInitialItems?: number; onChange: (changes: Partial) => void; onToggle: (property: string) => void; open: boolean; query?: Query; referencedLanguages?: Dict; + selectedLanguages: string[]; stats: Dict | undefined; - disabled?: boolean; - disabledHelper?: string; } class LanguageFacetClass extends React.PureComponent { diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/ListStyleFacet.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/ListStyleFacet.tsx index 3e87f1065e3..953a8590230 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/ListStyleFacet.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/ListStyleFacet.tsx @@ -35,14 +35,14 @@ import { MultipleSelectionHint } from './MultipleSelectionHint'; interface SearchResponse { maxResults?: boolean; - results: S[]; paging?: Paging; + results: S[]; } export interface Props { + disableZero?: boolean; disabled?: boolean; disabledHelper?: string; - disableZero?: boolean; facetHeader: string; fetching: boolean; getFacetItemText: (item: string) => string; @@ -64,10 +64,10 @@ export interface Props { query?: RawQuery; renderFacetItem: (item: string) => string | JSX.Element; renderSearchResult: (result: S, query: string) => React.ReactNode; + searchInputAriaLabel?: string; searchPlaceholder: string; showLessAriaLabel?: string; showMoreAriaLabel?: string; - searchInputAriaLabel?: string; showStatBar?: boolean; stats: Dict | undefined; values: string[]; @@ -76,11 +76,11 @@ export interface Props { interface State { autoFocus: boolean; query: string; - searching: boolean; searchMaxResults?: boolean; searchPaging?: Paging; searchResults?: S[]; searchResultsCounts: Dict; + searching: boolean; showFullList: boolean; } diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/PeriodFilter.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/PeriodFilter.tsx index 6fbd93b38b1..3ac157eba62 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/PeriodFilter.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/PeriodFilter.tsx @@ -25,8 +25,8 @@ import { Query } from '../utils'; import { FacetItemsList } from './FacetItemsList'; export interface PeriodFilterProps { - onChange: (changes: Partial) => void; newCodeSelected: boolean; + onChange: (changes: Partial) => void; } enum Period { diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/PrioritizedRuleFacet.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/PrioritizedRuleFacet.tsx index e782e8616a1..c793a92ecc0 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/PrioritizedRuleFacet.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/PrioritizedRuleFacet.tsx @@ -30,8 +30,8 @@ export interface PrioritizedRuleFacetProps { onChange: (changes: Partial) => void; onToggle: (property: string) => void; open: boolean; - value: true | undefined; stats: Dict | undefined; + value: true | undefined; } export function PrioritizedRuleFacet(props: Readonly) { diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/ProjectFacet.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/ProjectFacet.tsx index 52b10e6cf96..68048716c98 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/ProjectFacet.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/ProjectFacet.tsx @@ -34,8 +34,8 @@ import { ListStyleFacet } from './ListStyleFacet'; interface Props { component: Component | undefined; - loadSearchResultCount: (property: string, changes: Partial) => Promise; fetching: boolean; + loadSearchResultCount: (property: string, changes: Partial) => Promise; onChange: (changes: Partial) => void; onToggle: (property: string) => void; open: boolean; @@ -66,7 +66,7 @@ export function ProjectFacet(props: Readonly) { const handleSearch = ( query: string, page = 1, - ): Promise<{ results: SearchedProject[]; paging: Paging }> => { + ): Promise<{ paging: Paging; results: SearchedProject[] }> => { if ( component && [ diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/Sidebar.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/Sidebar.tsx index 934e8cad6b3..749603a72d7 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/Sidebar.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/Sidebar.tsx @@ -70,13 +70,13 @@ export interface Props { onFacetToggle: (property: string) => void; onFilterChange: (changes: Partial) => void; openFacets: Dict; - showVariantsFilter: boolean; query: Query; referencedComponentsById: Dict; referencedComponentsByKey: Dict; referencedLanguages: Dict; referencedRules: Dict; referencedUsers: Dict; + showVariantsFilter: boolean; } export function Sidebar(props: Readonly) { diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/SimpleListStyleFacet.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/SimpleListStyleFacet.tsx index 521297cc483..9494ad6b641 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/SimpleListStyleFacet.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/SimpleListStyleFacet.tsx @@ -28,8 +28,8 @@ import { MultipleSelectionHint } from './MultipleSelectionHint'; export interface CommonProps { fetching: boolean; - needIssueSync?: boolean; help?: React.ReactNode; + needIssueSync?: boolean; onChange: (changes: Partial) => void; onToggle: (property: string) => void; open: boolean; @@ -37,11 +37,11 @@ export interface CommonProps { } interface Props extends CommonProps { - property: string; - listItems: Array; itemNamePrefix: string; - selectedItems: Array; + listItems: Array; + property: string; renderIcon?: (item: string, disabled: boolean) => React.ReactNode; + selectedItems: Array; } export function SimpleListStyleFacet(props: Props) { diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/StandardFacet.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/StandardFacet.tsx index 6913a0dcf1f..fe35647d881 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/StandardFacet.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/StandardFacet.tsx @@ -53,11 +53,11 @@ interface Props { onToggle: (property: string) => void; open: boolean; owaspTop10: string[]; - owaspTop10Open: boolean; - owaspTop10Stats: Dict | undefined; 'owaspTop10-2021': string[]; 'owaspTop10-2021Open': boolean; 'owaspTop10-2021Stats': Dict | undefined; + owaspTop10Open: boolean; + owaspTop10Stats: Dict | undefined; query: Partial; sonarsourceSecurity: string[]; sonarsourceSecurityOpen: boolean; @@ -65,8 +65,8 @@ interface Props { } interface State { - standards: Standards; showFullSonarSourceList: boolean; + standards: Standards; } type StatsProp = diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/TagFacet.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/TagFacet.tsx index 400960bd1e6..913d5dde428 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/TagFacet.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/TagFacet.tsx @@ -29,8 +29,8 @@ import { Query } from '../utils'; import { ListStyleFacet } from './ListStyleFacet'; interface Props { - component: Component | undefined; branch?: string; + component: Component | undefined; fetching: boolean; loadSearchResultCount: (property: string, changes: Partial) => Promise; onChange: (changes: Partial) => void; diff --git a/server/sonar-web/src/main/js/apps/issues/utils.ts b/server/sonar-web/src/main/js/apps/issues/utils.ts index 69435787427..918c638d948 100644 --- a/server/sonar-web/src/main/js/apps/issues/utils.ts +++ b/server/sonar-web/src/main/js/apps/issues/utils.ts @@ -57,6 +57,7 @@ import { RestUser } from '../../types/users'; const OWASP_ASVS_4_0 = 'owaspAsvs-4.0'; export interface Query { + [OWASP_ASVS_4_0]: string[]; assigned: boolean; assignees: string[]; author: string[]; @@ -72,26 +73,25 @@ export interface Query { fixedInPullRequest: string; impactSeverities: SoftwareImpactSeverity[]; impactSoftwareQualities: SoftwareQuality[]; + inNewCodePeriod: boolean; + issueStatuses: IssueStatus[]; issues: string[]; languages: string[]; + owaspAsvsLevel: string; owaspTop10: string[]; 'owaspTop10-2021': string[]; 'pciDss-3.2': string[]; 'pciDss-4.0': string[]; - [OWASP_ASVS_4_0]: string[]; - owaspAsvsLevel: string; + prioritizedRule?: boolean; projects: string[]; + resolved?: boolean; rules: string[]; scopes: string[]; severities: string[]; - inNewCodePeriod: boolean; sonarsourceSecurity: string[]; sort: string; - issueStatuses: IssueStatus[]; tags: string[]; types: string[]; - resolved?: boolean; - prioritizedRule?: boolean; } export const STANDARDS = 'standards'; diff --git a/server/sonar-web/src/main/js/apps/maintenance/components/App.tsx b/server/sonar-web/src/main/js/apps/maintenance/components/App.tsx index 57b0e4383da..9014ef86d5a 100644 --- a/server/sonar-web/src/main/js/apps/maintenance/components/App.tsx +++ b/server/sonar-web/src/main/js/apps/maintenance/components/App.tsx @@ -44,15 +44,15 @@ interface Props { interface State { message?: string; - startedAt?: string; migrationState?: MigrationStatus; - systemStatus?: string; - wasStarting?: boolean; progress?: { completedSteps: number; - totalSteps: number; expectedFinishTimestamp: string; + totalSteps: number; }; + startedAt?: string; + systemStatus?: string; + wasStarting?: boolean; } const DELAY_REDIRECT_PREV_PAGE = 2500; diff --git a/server/sonar-web/src/main/js/apps/maintenance/components/MigrationProgress.tsx b/server/sonar-web/src/main/js/apps/maintenance/components/MigrationProgress.tsx index f44cf3e9026..4c2c597ab63 100644 --- a/server/sonar-web/src/main/js/apps/maintenance/components/MigrationProgress.tsx +++ b/server/sonar-web/src/main/js/apps/maintenance/components/MigrationProgress.tsx @@ -28,8 +28,8 @@ import DateTimeFormatter from '../../../components/intl/DateTimeFormatter'; interface Props { progress: { completedSteps: number; - totalSteps: number; expectedFinishTimestamp: string; + totalSteps: number; }; } diff --git a/server/sonar-web/src/main/js/apps/marketplace/App.tsx b/server/sonar-web/src/main/js/apps/marketplace/App.tsx index 87e7faaaaf0..fbb876c1a4d 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/App.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/App.tsx @@ -59,8 +59,8 @@ import { interface Props { currentEdition?: EditionKey; fetchPendingPlugins: () => void; - pendingPlugins: PendingPluginResult; location: Location; + pendingPlugins: PendingPluginResult; router: Router; standaloneMode?: boolean; updateCenterActive: boolean; diff --git a/server/sonar-web/src/main/js/apps/marketplace/EditionBoxes.tsx b/server/sonar-web/src/main/js/apps/marketplace/EditionBoxes.tsx index a22a23c2932..15a91464c32 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/EditionBoxes.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/EditionBoxes.tsx @@ -30,8 +30,8 @@ export interface Props { } interface State { - serverId?: string; ncloc?: number; + serverId?: string; } export default class EditionBoxes extends React.PureComponent { diff --git a/server/sonar-web/src/main/js/apps/marketplace/MarketplaceAppContainer.tsx b/server/sonar-web/src/main/js/apps/marketplace/MarketplaceAppContainer.tsx index 8425258e660..611340d0312 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/MarketplaceAppContainer.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/MarketplaceAppContainer.tsx @@ -28,8 +28,8 @@ import { GlobalSettingKeys } from '../../types/settings'; import App from './App'; export interface MarketplaceAppContainerProps { - location: Location; appState: AppState; + location: Location; } function MarketplaceAppContainer(props: MarketplaceAppContainerProps) { diff --git a/server/sonar-web/src/main/js/apps/marketplace/PluginsList.tsx b/server/sonar-web/src/main/js/apps/marketplace/PluginsList.tsx index 8decba91433..45f250947d3 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/PluginsList.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/PluginsList.tsx @@ -26,12 +26,12 @@ import PluginAvailable from './components/PluginAvailable'; import PluginInstalled from './components/PluginInstalled'; export interface PluginsListProps { - plugins: Plugin[]; pending: { installing: PendingPlugin[]; - updating: PendingPlugin[]; removing: PendingPlugin[]; + updating: PendingPlugin[]; }; + plugins: Plugin[]; readOnly: boolean; refreshPending: () => void; } diff --git a/server/sonar-web/src/main/js/apps/marketplace/components/PluginUpdateItem.tsx b/server/sonar-web/src/main/js/apps/marketplace/components/PluginUpdateItem.tsx index fe90b7b6a9d..a88090e8943 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/components/PluginUpdateItem.tsx +++ b/server/sonar-web/src/main/js/apps/marketplace/components/PluginUpdateItem.tsx @@ -26,8 +26,8 @@ import PluginChangeLogButton from './PluginChangeLogButton'; interface Props { pluginName: string; - update: Update; release: Release; + update: Update; } export default function PluginUpdateItem({ release, update, pluginName }: Readonly) { diff --git a/server/sonar-web/src/main/js/apps/overview/branches/BranchMetaTopBar.tsx b/server/sonar-web/src/main/js/apps/overview/branches/BranchMetaTopBar.tsx index bd55e0a1313..02fb4acbce6 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/BranchMetaTopBar.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/BranchMetaTopBar.tsx @@ -34,8 +34,8 @@ import { Component, MeasureEnhanced } from '../../../types/types'; import { HomePage } from '../../../types/users'; interface Props { - component: Component; branch: Branch; + component: Component; measures: MeasureEnhanced[]; showTakeTheTourButton: boolean; startTour?: () => void; diff --git a/server/sonar-web/src/main/js/apps/overview/branches/MeasuresPanelPercentCards.tsx b/server/sonar-web/src/main/js/apps/overview/branches/MeasuresPanelPercentCards.tsx index 5086dfc64c4..faeda3e4f70 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/MeasuresPanelPercentCards.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/MeasuresPanelPercentCards.tsx @@ -28,11 +28,11 @@ import MeasuresCardPercent from '../components/MeasuresCardPercent'; import { MeasurementType, getMeasurementMetricKey } from '../utils'; interface Props { - useDiffMetric?: boolean; branch?: BranchLike; component: Component; - measures: MeasureEnhanced[]; conditions: QualityGateStatusConditionEnhanced[]; + measures: MeasureEnhanced[]; + useDiffMetric?: boolean; } /** diff --git a/server/sonar-web/src/main/js/apps/overview/branches/QualityGateConditions.tsx b/server/sonar-web/src/main/js/apps/overview/branches/QualityGateConditions.tsx index 7e17d21f8d1..4899399f211 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/QualityGateConditions.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/QualityGateConditions.tsx @@ -33,8 +33,8 @@ const LEVEL_ORDER = ['ERROR', 'WARN']; export interface QualityGateConditionsProps { branchLike?: BranchLike; - component: Pick; collapsible?: boolean; + component: Pick; failedConditions: QualityGateStatusConditionEnhanced[]; isBuiltInQualityGate?: boolean; } diff --git a/server/sonar-web/src/main/js/apps/overview/branches/QualityGateStatusHeader.tsx b/server/sonar-web/src/main/js/apps/overview/branches/QualityGateStatusHeader.tsx index c5a82ca02df..91f37d748aa 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/QualityGateStatusHeader.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/QualityGateStatusHeader.tsx @@ -24,8 +24,8 @@ import { Status } from '~sonar-aligned/types/common'; import { translate } from '../../../helpers/l10n'; interface Props { - status: Status; failedConditionCount: number; + status: Status; } export default function QualityGateStatusHeader(props: Props) { diff --git a/server/sonar-web/src/main/js/apps/overview/branches/SoftwareImpactMeasureBreakdownCard.tsx b/server/sonar-web/src/main/js/apps/overview/branches/SoftwareImpactMeasureBreakdownCard.tsx index 73d7c60c3ee..463c20ea9f7 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/SoftwareImpactMeasureBreakdownCard.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/SoftwareImpactMeasureBreakdownCard.tsx @@ -32,12 +32,12 @@ import { SoftwareImpactSeverity, SoftwareQuality } from '../../../types/clean-co import { Component } from '../../../types/types'; export interface SoftwareImpactMeasureBreakdownCardProps { - softwareQuality: SoftwareQuality; + active?: boolean; branch?: Branch; component: Component; - value?: string; severity: SoftwareImpactSeverity; - active?: boolean; + softwareQuality: SoftwareQuality; + value?: string; } export function SoftwareImpactMeasureBreakdownCard( diff --git a/server/sonar-web/src/main/js/apps/overview/branches/SoftwareImpactMeasureCard.tsx b/server/sonar-web/src/main/js/apps/overview/branches/SoftwareImpactMeasureCard.tsx index 00093074e7c..10e6ca40957 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/SoftwareImpactMeasureCard.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/SoftwareImpactMeasureCard.tsx @@ -44,12 +44,12 @@ import SoftwareImpactMeasureBreakdownCard from './SoftwareImpactMeasureBreakdown import SoftwareImpactMeasureRating from './SoftwareImpactMeasureRating'; export interface SoftwareImpactBreakdownCardProps { + branch?: Branch; component: Component; conditions: QualityGateStatusConditionEnhanced[]; - softwareQuality: SoftwareQuality; - ratingMetricKey: MetricKey; measures: MeasureEnhanced[]; - branch?: Branch; + ratingMetricKey: MetricKey; + softwareQuality: SoftwareQuality; } export function SoftwareImpactMeasureCard(props: Readonly) { diff --git a/server/sonar-web/src/main/js/apps/overview/branches/TabsPanel.tsx b/server/sonar-web/src/main/js/apps/overview/branches/TabsPanel.tsx index a7f6537c34e..a3fc0d55659 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/TabsPanel.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/TabsPanel.tsx @@ -40,11 +40,11 @@ export interface MeasuresPanelProps { analyses?: Analysis[]; appLeak?: ApplicationPeriod; component: Component; + isNewCode: boolean; loading?: boolean; + onTabSelect: (tab: CodeScope) => void; period?: Period; qgStatuses?: QualityGateStatus[]; - isNewCode: boolean; - onTabSelect: (tab: CodeScope) => void; } const SQ_UPGRADE_NOTIFICATION_TIMEOUT = { weeks: 3 }; diff --git a/server/sonar-web/src/main/js/apps/overview/components/IssueMeasuresCardInner.tsx b/server/sonar-web/src/main/js/apps/overview/components/IssueMeasuresCardInner.tsx index dc55744353c..240b1ff975f 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/IssueMeasuresCardInner.tsx +++ b/server/sonar-web/src/main/js/apps/overview/components/IssueMeasuresCardInner.tsx @@ -28,14 +28,14 @@ import { translate, translateWithParameters } from '../../../helpers/l10n'; import { localizeMetric } from '../../../helpers/measures'; interface IssueMeasuresCardInnerProps extends React.HTMLAttributes { - metric: MetricKey; - value?: string; - header: React.ReactNode; - url: Partial; - failed?: boolean; - icon?: React.ReactNode; disabled?: boolean; + failed?: boolean; footer?: React.ReactNode; + header: React.ReactNode; + icon?: React.ReactNode; + metric: MetricKey; + url: Partial; + value?: string; } export function IssueMeasuresCardInner(props: Readonly) { diff --git a/server/sonar-web/src/main/js/apps/overview/components/MeasuresCard.tsx b/server/sonar-web/src/main/js/apps/overview/components/MeasuresCard.tsx index f5ae6d20830..69355b2e1fe 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/MeasuresCard.tsx +++ b/server/sonar-web/src/main/js/apps/overview/components/MeasuresCard.tsx @@ -27,12 +27,12 @@ import { translate, translateWithParameters } from '../../../helpers/l10n'; import { localizeMetric } from '../../../helpers/measures'; export interface MeasuresCardProps { - url: To; - value?: string; - metric: MetricKey; - label: string; failed?: boolean; icon?: React.ReactElement; + label: string; + metric: MetricKey; + url: To; + value?: string; } export default function MeasuresCard( diff --git a/server/sonar-web/src/main/js/apps/overview/components/MeasuresCardNumber.tsx b/server/sonar-web/src/main/js/apps/overview/components/MeasuresCardNumber.tsx index 78d2b7ba17a..21abfe5068c 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/MeasuresCardNumber.tsx +++ b/server/sonar-web/src/main/js/apps/overview/components/MeasuresCardNumber.tsx @@ -28,12 +28,12 @@ import { Status, getConditionRequiredLabel } from '../utils'; import MeasuresCard, { MeasuresCardProps } from './MeasuresCard'; interface Props extends MeasuresCardProps { + conditionMetric: MetricKey; conditions: QualityGateStatusConditionEnhanced[]; label: string; + showRequired?: boolean; url: To; value?: string; - conditionMetric: MetricKey; - showRequired?: boolean; } export default function MeasuresCardNumber( diff --git a/server/sonar-web/src/main/js/apps/overview/components/MeasuresCardPercent.tsx b/server/sonar-web/src/main/js/apps/overview/components/MeasuresCardPercent.tsx index f29fc280146..ec8d80d70fe 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/MeasuresCardPercent.tsx +++ b/server/sonar-web/src/main/js/apps/overview/components/MeasuresCardPercent.tsx @@ -43,18 +43,18 @@ import AfterMergeNote from './AfterMergeNote'; import MeasuresCard from './MeasuresCard'; interface Props { - componentKey: string; branchLike?: BranchLike; - measurementType: MeasurementType; - label: string; - url: To; - measures: MeasureEnhanced[]; - conditions: QualityGateStatusConditionEnhanced[]; + componentKey: string; conditionMetric: MetricKey; + conditions: QualityGateStatusConditionEnhanced[]; + label: string; linesMetric: MetricKey; + measurementType: MeasurementType; + measures: MeasureEnhanced[]; overallConditionMetric?: MetricKey; - useDiffMetric?: boolean; showRequired?: boolean; + url: To; + useDiffMetric?: boolean; } export default function MeasuresCardPercent( diff --git a/server/sonar-web/src/main/js/apps/overview/pullRequests/BranchQualityGate.tsx b/server/sonar-web/src/main/js/apps/overview/pullRequests/BranchQualityGate.tsx index e5cfc9ffa0f..4510df24148 100644 --- a/server/sonar-web/src/main/js/apps/overview/pullRequests/BranchQualityGate.tsx +++ b/server/sonar-web/src/main/js/apps/overview/pullRequests/BranchQualityGate.tsx @@ -28,10 +28,10 @@ import { Component } from '../../../types/types'; import BranchQualityGateConditions from './BranchQualityGateConditions'; interface Props { - status: Status; branchLike?: BranchLike; component: Pick; failedConditions: QualityGateStatusConditionEnhanced[]; + status: Status; } export default function BranchQualityGate(props: Readonly) { diff --git a/server/sonar-web/src/main/js/apps/overview/pullRequests/IssueMeasuresCard.tsx b/server/sonar-web/src/main/js/apps/overview/pullRequests/IssueMeasuresCard.tsx index 1036ac37e3a..7f77a7d81a1 100644 --- a/server/sonar-web/src/main/js/apps/overview/pullRequests/IssueMeasuresCard.tsx +++ b/server/sonar-web/src/main/js/apps/overview/pullRequests/IssueMeasuresCard.tsx @@ -46,9 +46,9 @@ import { IssueMeasuresCardInner } from '../components/IssueMeasuresCardInner'; import { Status, getConditionRequiredLabel } from '../utils'; interface Props { + component: Component; conditions: QualityGateStatusConditionEnhanced[]; measures: MeasureEnhanced[]; - component: Component; pullRequest: PullRequest; } diff --git a/server/sonar-web/src/main/js/apps/overview/pullRequests/MeasuresCardPanel.tsx b/server/sonar-web/src/main/js/apps/overview/pullRequests/MeasuresCardPanel.tsx index 101f1cb5cfb..fc313e846e2 100644 --- a/server/sonar-web/src/main/js/apps/overview/pullRequests/MeasuresCardPanel.tsx +++ b/server/sonar-web/src/main/js/apps/overview/pullRequests/MeasuresCardPanel.tsx @@ -34,10 +34,10 @@ import IssueMeasuresCard from './IssueMeasuresCard'; interface Props { className?: string; - pullRequest: PullRequest; component: Component; - measures: MeasureEnhanced[]; conditions: QualityGateStatusConditionEnhanced[]; + measures: MeasureEnhanced[]; + pullRequest: PullRequest; } export default function MeasuresCardPanel(props: React.PropsWithChildren) { diff --git a/server/sonar-web/src/main/js/apps/overview/pullRequests/PullRequestMetaTopBar.tsx b/server/sonar-web/src/main/js/apps/overview/pullRequests/PullRequestMetaTopBar.tsx index 5efdb695599..8746ad0ca12 100644 --- a/server/sonar-web/src/main/js/apps/overview/pullRequests/PullRequestMetaTopBar.tsx +++ b/server/sonar-web/src/main/js/apps/overview/pullRequests/PullRequestMetaTopBar.tsx @@ -30,8 +30,8 @@ import { MeasureEnhanced } from '../../../types/types'; import LastAnalysisLabel from '../components/LastAnalysisLabel'; interface Props { - pullRequest: PullRequest; measures: MeasureEnhanced[]; + pullRequest: PullRequest; } export default function PullRequestMetaTopBar({ pullRequest, measures }: Readonly) { diff --git a/server/sonar-web/src/main/js/apps/overview/pullRequests/PullRequestOverview.tsx b/server/sonar-web/src/main/js/apps/overview/pullRequests/PullRequestOverview.tsx index adf3fc71408..2e97368cfaa 100644 --- a/server/sonar-web/src/main/js/apps/overview/pullRequests/PullRequestOverview.tsx +++ b/server/sonar-web/src/main/js/apps/overview/pullRequests/PullRequestOverview.tsx @@ -39,8 +39,8 @@ import PullRequestMetaTopBar from './PullRequestMetaTopBar'; import SonarLintAd from './SonarLintAd'; interface Props { - pullRequest: PullRequest; component: Component; + pullRequest: PullRequest; } export default function PullRequestOverview(props: Readonly>) { diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/PermissionCell.tsx b/server/sonar-web/src/main/js/apps/permission-templates/components/PermissionCell.tsx index 7f42e8834a3..7deea79a972 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/PermissionCell.tsx +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/PermissionCell.tsx @@ -24,9 +24,9 @@ import { translate } from '../../../helpers/l10n'; interface Props { permission: { + groupsCount: number; key: string; usersCount: number; - groupsCount: number; withProjectCreator?: boolean; }; } diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/PermissionTemplatesApp.tsx b/server/sonar-web/src/main/js/apps/permission-templates/components/PermissionTemplatesApp.tsx index e9305f632b8..51a93c6197b 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/PermissionTemplatesApp.tsx +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/PermissionTemplatesApp.tsx @@ -33,14 +33,14 @@ import Home from './Home'; import Template from './Template'; interface Props { - location: Location; appState: AppState; + location: Location; } interface State { - ready: boolean; - permissions: Permission[]; permissionTemplates: PermissionTemplate[]; + permissions: Permission[]; + ready: boolean; } class PermissionTemplatesApp extends React.PureComponent { diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/Template.tsx b/server/sonar-web/src/main/js/apps/permission-templates/components/Template.tsx index adde1dba308..c29169de24a 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/Template.tsx +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/Template.tsx @@ -87,7 +87,7 @@ export default class Template extends React.PureComponent { }) : Promise.resolve({ paging: undefined, users: [] }); - const getGroups: Promise<{ paging?: Paging; groups: PermissionGroup[] }> = + const getGroups: Promise<{ groups: PermissionGroup[]; paging?: Paging }> = filter !== 'users' ? api.getPermissionTemplateGroups({ templateId: template.id, diff --git a/server/sonar-web/src/main/js/apps/permission-templates/utils.ts b/server/sonar-web/src/main/js/apps/permission-templates/utils.ts index a7139ebb40e..4e378b464db 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/utils.ts +++ b/server/sonar-web/src/main/js/apps/permission-templates/utils.ts @@ -55,7 +55,7 @@ export function mergePermissionsToTemplates( export function mergeDefaultsToTemplates( permissionTemplates: PermissionTemplate[], - defaultTemplates: Array<{ templateId: string; qualifier: string }> = [], + defaultTemplates: Array<{ qualifier: string; templateId: string }> = [], ): PermissionTemplate[] { return permissionTemplates.map((permissionTemplate) => { const defaultFor: string[] = []; diff --git a/server/sonar-web/src/main/js/apps/permissions/global/components/PermissionsGlobalApp.tsx b/server/sonar-web/src/main/js/apps/permissions/global/components/PermissionsGlobalApp.tsx index c22a320554e..8fb1fbeabf2 100644 --- a/server/sonar-web/src/main/js/apps/permissions/global/components/PermissionsGlobalApp.tsx +++ b/server/sonar-web/src/main/js/apps/permissions/global/components/PermissionsGlobalApp.tsx @@ -85,7 +85,7 @@ class PermissionsGlobalApp extends React.PureComponent { }) : Promise.resolve({ paging: undefined, users: [] }); - const getGroups: Promise<{ paging?: Paging; groups: PermissionGroup[] }> = + const getGroups: Promise<{ groups: PermissionGroup[]; paging?: Paging }> = filter !== 'users' ? api.getGlobalPermissionsGroups({ q: query || undefined, diff --git a/server/sonar-web/src/main/js/apps/permissions/project/components/PermissionsProjectApp.tsx b/server/sonar-web/src/main/js/apps/permissions/project/components/PermissionsProjectApp.tsx index b5b89e9db02..dcfc3dbece6 100644 --- a/server/sonar-web/src/main/js/apps/permissions/project/components/PermissionsProjectApp.tsx +++ b/server/sonar-web/src/main/js/apps/permissions/project/components/PermissionsProjectApp.tsx @@ -96,7 +96,7 @@ class PermissionsProjectApp extends React.PureComponent { }) : Promise.resolve({ paging: undefined, users: [] }); - const getGroups: Promise<{ paging?: Paging; groups: PermissionGroup[] }> = + const getGroups: Promise<{ groups: PermissionGroup[]; paging?: Paging }> = filter !== 'users' ? api.getPermissionsGroupsForComponent({ projectKey: component.key, diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAnalysesList.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAnalysesList.tsx index 4afc148e25b..9ed8ee1f261 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAnalysesList.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAnalysesList.tsx @@ -39,9 +39,9 @@ interface Props { canDeleteAnalyses?: boolean; initializing: boolean; leakPeriodDate?: Date; + onUpdateQuery: (changes: Partial) => void; project: { qualifier: string }; query: Query; - onUpdateQuery: (changes: Partial) => void; } const LIST_MARGIN_TOP = 24; @@ -68,8 +68,8 @@ export default class ProjectActivityAnalysesList extends React.PureComponent void; + selected: boolean; } export enum Dialog { diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityApp.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityApp.tsx index dca1b0e056c..0b0b0340620 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityApp.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityApp.tsx @@ -46,9 +46,9 @@ import ProjectActivityAppRenderer from './ProjectActivityAppRenderer'; export interface State { analyses: ParsedAnalysis[]; analysesLoading: boolean; - leakPeriodDate?: Date; graphLoading: boolean; initialized: boolean; + leakPeriodDate?: Date; measuresHistory: MeasureHistory[]; query: Query; } diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAppRenderer.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAppRenderer.tsx index 781cd0bbb17..6feb7c9302c 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAppRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAppRenderer.tsx @@ -41,13 +41,13 @@ interface Props { analyses: ParsedAnalysis[]; analysesLoading: boolean; graphLoading: boolean; - leakPeriodDate?: Date; initializing: boolean; - project: Pick; - metrics: Metric[]; + leakPeriodDate?: Date; measuresHistory: MeasureHistory[]; - query: Query; + metrics: Metric[]; onUpdateQuery: (changes: Partial) => void; + project: Pick; + query: Query; } export default function ProjectActivityAppRenderer(props: Props) { diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityDateInput.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityDateInput.tsx index 345c0840b96..1cdec36bf1c 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityDateInput.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityDateInput.tsx @@ -24,8 +24,8 @@ import { Query } from '../utils'; interface Props { from?: Date; - to?: Date; onChange: (changes: Partial) => void; + to?: Date; } export default class ProjectActivityDateInput extends React.PureComponent { diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityGraphs.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityGraphs.tsx index c3eb54a28ab..a406dbd8d0e 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityGraphs.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityGraphs.tsx @@ -61,10 +61,10 @@ interface Props { } interface State { - graphStartDate?: Date; graphEndDate?: Date; - series: Serie[]; + graphStartDate?: Date; graphs: Serie[][]; + series: Serie[]; } const MAX_GRAPH_NB = 2; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/forms/AddEventForm.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/forms/AddEventForm.tsx index d47cf48b690..6041eb64164 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/forms/AddEventForm.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/forms/AddEventForm.tsx @@ -24,9 +24,9 @@ import { useCreateEventMutation } from '../../../../queries/project-analyses'; import { ParsedAnalysis } from '../../../../types/project-activity'; interface Props { - category?: string; addEventButtonText: string; analysis: ParsedAnalysis; + category?: string; onClose: () => void; } diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/forms/RemoveEventForm.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/forms/RemoveEventForm.tsx index 50c36f74f1a..d3d55255c9c 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/forms/RemoveEventForm.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/forms/RemoveEventForm.tsx @@ -27,8 +27,8 @@ export interface RemoveEventFormProps { analysisKey: string; event: AnalysisEvent; header: string; - removeEventQuestion: string; onClose: () => void; + removeEventQuestion: string; } export default function RemoveEventForm(props: RemoveEventFormProps) { diff --git a/server/sonar-web/src/main/js/apps/projectActivity/utils.ts b/server/sonar-web/src/main/js/apps/projectActivity/utils.ts index c64d34fa0fb..93e6703bfc2 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/utils.ts +++ b/server/sonar-web/src/main/js/apps/projectActivity/utils.ts @@ -64,8 +64,8 @@ export function historyQueryChanged(prevQuery: Query, nextQuery: Query) { export interface AnalysesByDay { byDay: Dict; - version: string | null; key: string | null; + version: string | null; } export function getAnalysesByVersionByDay( diff --git a/server/sonar-web/src/main/js/apps/projectInformation/ProjectInformationApp.tsx b/server/sonar-web/src/main/js/apps/projectInformation/ProjectInformationApp.tsx index 3e7def28b8a..a6cd0ba1bba 100644 --- a/server/sonar-web/src/main/js/apps/projectInformation/ProjectInformationApp.tsx +++ b/server/sonar-web/src/main/js/apps/projectInformation/ProjectInformationApp.tsx @@ -42,8 +42,8 @@ interface Props extends WithAvailableFeaturesProps { branchLike?: BranchLike; component: Component; currentUser: CurrentUser; - onComponentChange: (changes: {}) => void; metrics: Dict; + onComponentChange: (changes: {}) => void; } function ProjectInformationApp(props: Props) { diff --git a/server/sonar-web/src/main/js/apps/projectInformation/about/AboutProject.tsx b/server/sonar-web/src/main/js/apps/projectInformation/about/AboutProject.tsx index 382bf84c832..af612975d1d 100644 --- a/server/sonar-web/src/main/js/apps/projectInformation/about/AboutProject.tsx +++ b/server/sonar-web/src/main/js/apps/projectInformation/about/AboutProject.tsx @@ -104,8 +104,8 @@ export default function AboutProject(props: AboutProjectProps) { } interface ProjectInformationSectionProps { - last?: boolean; className?: string; + last?: boolean; } function ProjectInformationSection(props: PropsWithChildren) { diff --git a/server/sonar-web/src/main/js/apps/projectInformation/about/components/MetaQualityProfiles.tsx b/server/sonar-web/src/main/js/apps/projectInformation/about/components/MetaQualityProfiles.tsx index 103b591e188..746fab901f2 100644 --- a/server/sonar-web/src/main/js/apps/projectInformation/about/components/MetaQualityProfiles.tsx +++ b/server/sonar-web/src/main/js/apps/projectInformation/about/components/MetaQualityProfiles.tsx @@ -83,9 +83,9 @@ function ProfileItem({ languages, deprecatedByKey, }: { - profile: ComponentQualityProfile; - languages: Languages; deprecatedByKey: Dict; + languages: Languages; + profile: ComponentQualityProfile; }) { const languageFromStore = languages[profile.language]; const languageName = languageFromStore ? languageFromStore.name : profile.language; diff --git a/server/sonar-web/src/main/js/apps/projectInformation/badges/utils.ts b/server/sonar-web/src/main/js/apps/projectInformation/badges/utils.ts index d4f68baff00..b1c3435804b 100644 --- a/server/sonar-web/src/main/js/apps/projectInformation/badges/utils.ts +++ b/server/sonar-web/src/main/js/apps/projectInformation/badges/utils.ts @@ -27,8 +27,8 @@ export type BadgeFormats = 'md' | 'url'; export interface BadgeOptions { branch?: string; format?: BadgeFormats; - project?: string; metric?: string; + project?: string; pullRequest?: string; } diff --git a/server/sonar-web/src/main/js/apps/projectInformation/projectRegulatoryReport/RegulatoryReport.tsx b/server/sonar-web/src/main/js/apps/projectInformation/projectRegulatoryReport/RegulatoryReport.tsx index bcac8e01fc5..70307484945 100644 --- a/server/sonar-web/src/main/js/apps/projectInformation/projectRegulatoryReport/RegulatoryReport.tsx +++ b/server/sonar-web/src/main/js/apps/projectInformation/projectRegulatoryReport/RegulatoryReport.tsx @@ -42,8 +42,8 @@ import { BranchLike } from '../../../types/branch-like'; import { Component } from '../../../types/types'; interface Props { - component: Pick; branchLike?: BranchLike; + component: Pick; } export default function RegulatoryReport({ component, branchLike }: Props) { diff --git a/server/sonar-web/src/main/js/apps/projectNewCode/components/BranchList.tsx b/server/sonar-web/src/main/js/apps/projectNewCode/components/BranchList.tsx index 0dfeac5cc3a..c9b86380519 100644 --- a/server/sonar-web/src/main/js/apps/projectNewCode/components/BranchList.tsx +++ b/server/sonar-web/src/main/js/apps/projectNewCode/components/BranchList.tsx @@ -41,8 +41,8 @@ import BranchNewCodeDefinitionSettingModal from './BranchNewCodeDefinitionSettin interface Props { branchList: Branch[]; component: Component; - inheritedSetting: NewCodeDefinition; globalNewCodeDefinition: NewCodeDefinition; + inheritedSetting: NewCodeDefinition; } interface State { diff --git a/server/sonar-web/src/main/js/apps/projectNewCode/components/BranchNewCodeDefinitionSettingModal.tsx b/server/sonar-web/src/main/js/apps/projectNewCode/components/BranchNewCodeDefinitionSettingModal.tsx index 9050575e121..3ea6f12303f 100644 --- a/server/sonar-web/src/main/js/apps/projectNewCode/components/BranchNewCodeDefinitionSettingModal.tsx +++ b/server/sonar-web/src/main/js/apps/projectNewCode/components/BranchNewCodeDefinitionSettingModal.tsx @@ -37,9 +37,9 @@ interface Props { branch: BranchWithNewCodePeriod; branchList: Branch[]; component: string; - onClose: (branch?: string, newSetting?: NewCodeDefinition) => void; - inheritedSetting: NewCodeDefinition; globalNewCodeDefinition: NewCodeDefinition; + inheritedSetting: NewCodeDefinition; + onClose: (branch?: string, newSetting?: NewCodeDefinition) => void; } interface State { diff --git a/server/sonar-web/src/main/js/apps/projectNewCode/components/NewCodeDefinitionSettingAnalysis.tsx b/server/sonar-web/src/main/js/apps/projectNewCode/components/NewCodeDefinitionSettingAnalysis.tsx index f89946bbc3c..3cadd905aa8 100644 --- a/server/sonar-web/src/main/js/apps/projectNewCode/components/NewCodeDefinitionSettingAnalysis.tsx +++ b/server/sonar-web/src/main/js/apps/projectNewCode/components/NewCodeDefinitionSettingAnalysis.tsx @@ -30,11 +30,11 @@ import { NewCodeDefinitionType } from '../../../types/new-code-definition'; import { Analysis } from '../../../types/project-activity'; export interface Props { - onSelect: (selection: NewCodeDefinitionType) => void; - selected: boolean; analysis: string; branch: string; component: string; + onSelect: (selection: NewCodeDefinitionType) => void; + selected: boolean; } export default function NewCodeDefinitionSettingAnalysis({ diff --git a/server/sonar-web/src/main/js/apps/projectNewCode/components/NewCodeDefinitionSettingReferenceBranch.tsx b/server/sonar-web/src/main/js/apps/projectNewCode/components/NewCodeDefinitionSettingReferenceBranch.tsx index 76fa8185cc5..972c76b4b12 100644 --- a/server/sonar-web/src/main/js/apps/projectNewCode/components/NewCodeDefinitionSettingReferenceBranch.tsx +++ b/server/sonar-web/src/main/js/apps/projectNewCode/components/NewCodeDefinitionSettingReferenceBranch.tsx @@ -30,6 +30,7 @@ export interface BaselineSettingReferenceBranchProps { branchList: BranchOption[]; className?: string; disabled?: boolean; + inputSelectMenuPlacement?: MenuPlacement; onChangeReferenceBranch: (value: string) => void; onSelect: (selection: NewCodeDefinitionType) => void; referenceBranch: string; @@ -38,7 +39,6 @@ export interface BaselineSettingReferenceBranchProps { NewCodeDefinitionLevels, NewCodeDefinitionLevels.NewProject | NewCodeDefinitionLevels.Global >; - inputSelectMenuPlacement?: MenuPlacement; } export interface BranchOption { diff --git a/server/sonar-web/src/main/js/apps/projectNewCode/components/ProjectNewCodeDefinitionApp.tsx b/server/sonar-web/src/main/js/apps/projectNewCode/components/ProjectNewCodeDefinitionApp.tsx index 1d56019cc44..440a8d74b05 100644 --- a/server/sonar-web/src/main/js/apps/projectNewCode/components/ProjectNewCodeDefinitionApp.tsx +++ b/server/sonar-web/src/main/js/apps/projectNewCode/components/ProjectNewCodeDefinitionApp.tsx @@ -51,10 +51,10 @@ import BranchList from './BranchList'; import ProjectNewCodeDefinitionSelector from './ProjectNewCodeDefinitionSelector'; interface ProjectNewCodeDefinitionAppProps extends WithAvailableFeaturesProps { + appState: AppState; branchLike: Branch; branchLikes: BranchLike[]; component: Component; - appState: AppState; } function ProjectNewCodeDefinitionApp(props: Readonly) { diff --git a/server/sonar-web/src/main/js/apps/projectNewCode/components/ProjectNewCodeDefinitionSelector.tsx b/server/sonar-web/src/main/js/apps/projectNewCode/components/ProjectNewCodeDefinitionSelector.tsx index ced1729d12d..65e436e3250 100644 --- a/server/sonar-web/src/main/js/apps/projectNewCode/components/ProjectNewCodeDefinitionSelector.tsx +++ b/server/sonar-web/src/main/js/apps/projectNewCode/components/ProjectNewCodeDefinitionSelector.tsx @@ -35,8 +35,8 @@ import NewCodeDefinitionSettingReferenceBranch from './NewCodeDefinitionSettingR export interface ProjectBaselineSelectorProps { analysis?: string; branch?: Branch; - branchesEnabled?: boolean; branchList: Branch[]; + branchesEnabled?: boolean; component: string; days: string; globalNewCodeDefinition: NewCodeDefinition; diff --git a/server/sonar-web/src/main/js/apps/projectQualityProfiles/components/AddLanguageModal.tsx b/server/sonar-web/src/main/js/apps/projectQualityProfiles/components/AddLanguageModal.tsx index 8f21bfd7f11..f8a6651cd2d 100644 --- a/server/sonar-web/src/main/js/apps/projectQualityProfiles/components/AddLanguageModal.tsx +++ b/server/sonar-web/src/main/js/apps/projectQualityProfiles/components/AddLanguageModal.tsx @@ -39,7 +39,7 @@ export interface AddLanguageModalProps { export function AddLanguageModal(props: AddLanguageModalProps) { const { languages, profilesByLanguage, unavailableLanguages } = props; - const [{ language, key }, setSelected] = React.useState<{ language?: string; key?: string }>({ + const [{ language, key }, setSelected] = React.useState<{ key?: string; language?: string }>({ language: undefined, key: undefined, }); diff --git a/server/sonar-web/src/main/js/apps/projectQualityProfiles/components/LanguageProfileSelectOption.tsx b/server/sonar-web/src/main/js/apps/projectQualityProfiles/components/LanguageProfileSelectOption.tsx index a73449bc232..582c48c0a3f 100644 --- a/server/sonar-web/src/main/js/apps/projectQualityProfiles/components/LanguageProfileSelectOption.tsx +++ b/server/sonar-web/src/main/js/apps/projectQualityProfiles/components/LanguageProfileSelectOption.tsx @@ -26,8 +26,8 @@ import { LabelValueSelectOption } from '../../../helpers/search'; import { getQualityProfileUrl } from '../../../helpers/urls'; export interface ProfileOption extends LabelValueSelectOption { - language: string; isDisabled: boolean; + language: string; } export type LanguageProfileSelectOptionProps = OptionProps; diff --git a/server/sonar-web/src/main/js/apps/projects/__tests__/utils-test.ts b/server/sonar-web/src/main/js/apps/projects/__tests__/utils-test.ts index 132052c53c9..f8857e08eda 100644 --- a/server/sonar-web/src/main/js/apps/projects/__tests__/utils-test.ts +++ b/server/sonar-web/src/main/js/apps/projects/__tests__/utils-test.ts @@ -148,8 +148,8 @@ describe('fetchProjects', () => { projects: components.map( ( component: Component & { - measures: { languages?: string; new_coverage?: string }; isScannable: boolean; + measures: { languages?: string; new_coverage?: string }; }, ) => { // eslint-disable-next-line jest/no-conditional-in-test diff --git a/server/sonar-web/src/main/js/apps/projects/components/AllProjects.tsx b/server/sonar-web/src/main/js/apps/projects/components/AllProjects.tsx index 18518ea0133..e43f16359de 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/AllProjects.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/AllProjects.tsx @@ -148,8 +148,8 @@ export class AllProjects extends React.PureComponent { handlePerspectiveChange = ({ view }: { view?: string }) => { const query: { - view: string | undefined; sort?: string; + view: string | undefined; } = { view: view === 'overall' ? undefined : view, }; diff --git a/server/sonar-web/src/main/js/apps/projects/components/PerspectiveSelect.tsx b/server/sonar-web/src/main/js/apps/projects/components/PerspectiveSelect.tsx index 2d4a69f12f3..693721f51cc 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/PerspectiveSelect.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/PerspectiveSelect.tsx @@ -28,8 +28,8 @@ interface Props { } export interface PerspectiveOption { - value: string; label: string; + value: string; } export default class PerspectiveSelect extends React.PureComponent { diff --git a/server/sonar-web/src/main/js/apps/projects/components/ProjectsList.tsx b/server/sonar-web/src/main/js/apps/projects/components/ProjectsList.tsx index 918592fceeb..3b680c306f1 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/ProjectsList.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/ProjectsList.tsx @@ -44,8 +44,8 @@ interface Props { handleFavorite: (component: string, isFavorite: boolean) => void; isFavorite: boolean; isFiltered: boolean; - loading: boolean; loadMore: () => void; + loading: boolean; projects: Project[]; query: Query; total?: number; diff --git a/server/sonar-web/src/main/js/apps/projects/components/ProjectsSortingSelect.tsx b/server/sonar-web/src/main/js/apps/projects/components/ProjectsSortingSelect.tsx index 41e106aab5f..3458e060d21 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/ProjectsSortingSelect.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/ProjectsSortingSelect.tsx @@ -41,10 +41,10 @@ interface Props { } export interface Option { - label: string; - value: string; className?: string; + label: string; short?: string; + value: string; } export default class ProjectsSortingSelect extends React.PureComponent { diff --git a/server/sonar-web/src/main/js/apps/projects/components/__tests__/DefaultPageSelector-test.tsx b/server/sonar-web/src/main/js/apps/projects/components/__tests__/DefaultPageSelector-test.tsx index 054d0c39570..201c00fd968 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/__tests__/DefaultPageSelector-test.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/__tests__/DefaultPageSelector-test.tsx @@ -117,8 +117,8 @@ function renderDefaultPageSelector({ path = '/projects', currentUser = mockLoggedInUser(), }: { - path?: string; currentUser?: CurrentUser; + path?: string; } = {}) { return render( diff --git a/server/sonar-web/src/main/js/apps/projects/components/project-card/ProjectCardMeasure.tsx b/server/sonar-web/src/main/js/apps/projects/components/project-card/ProjectCardMeasure.tsx index e5b1ca342dc..2047d0f73c2 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/project-card/ProjectCardMeasure.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/project-card/ProjectCardMeasure.tsx @@ -21,9 +21,9 @@ import classNames from 'classnames'; import * as React from 'react'; export interface ProjectCardMeasureProps { + className?: string; label: string; metricKey: string; - className?: string; } export default function ProjectCardMeasure( diff --git a/server/sonar-web/src/main/js/apps/projects/components/project-card/ProjectCardMeasures.tsx b/server/sonar-web/src/main/js/apps/projects/components/project-card/ProjectCardMeasures.tsx index b34bdd750f6..e7cfe3abf6b 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/project-card/ProjectCardMeasures.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/project-card/ProjectCardMeasures.tsx @@ -37,9 +37,9 @@ import { Dict } from '../../../../types/types'; import ProjectCardMeasure from './ProjectCardMeasure'; export interface ProjectCardMeasuresProps { + componentQualifier: ComponentQualifier; isNewCode: boolean; measures: Dict; - componentQualifier: ComponentQualifier; } function renderNewIssues(props: ProjectCardMeasuresProps) { diff --git a/server/sonar-web/src/main/js/apps/projects/filters/RangeFacetBase.tsx b/server/sonar-web/src/main/js/apps/projects/filters/RangeFacetBase.tsx index e11d3046248..b80678c4350 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/RangeFacetBase.tsx +++ b/server/sonar-web/src/main/js/apps/projects/filters/RangeFacetBase.tsx @@ -30,24 +30,24 @@ import { Facet } from '../types'; export type Option = string | number; interface Props { - property: string; className?: string; - onQueryChange: (change: RawQuery) => void; - options: Option[]; - renderAccessibleLabel: (option: Option) => string; - renderOption: (option: Option, isSelected: boolean) => React.ReactNode; - - value?: Option; facet?: Facet; + getFacetValueForOption?: (facet: Facet, option: Option) => number; + header: string; + highlightUnder?: number; + highlightUnderMax?: number; + maxFacetValue?: number; + onQueryChange: (change: RawQuery) => void; optionClassName?: string; + options: Option[]; - getFacetValueForOption?: (facet: Facet, option: Option) => number; + property: string; - highlightUnder?: number; - highlightUnderMax?: number; + renderAccessibleLabel: (option: Option) => string; + renderOption: (option: Option, isSelected: boolean) => React.ReactNode; - header: string; + value?: Option; } const defaultGetFacetValueForOption = (facet: Facet, option: string | number) => facet[option]; diff --git a/server/sonar-web/src/main/js/apps/projects/query.ts b/server/sonar-web/src/main/js/apps/projects/query.ts index 2635b966faf..3ccf4a0d176 100644 --- a/server/sonar-web/src/main/js/apps/projects/query.ts +++ b/server/sonar-web/src/main/js/apps/projects/query.ts @@ -24,28 +24,28 @@ import { Dict } from '../../types/types'; type Level = 'ERROR' | 'WARN' | 'OK'; export interface Query { + [x: string]: string | number | string[] | undefined; + coverage?: number; + duplications?: number; gate?: Level; - reliability?: number; - new_reliability?: number; - security?: number; - new_security?: number; - security_review_rating?: number; - new_security_review_rating?: number; + languages?: string[]; maintainability?: number; - new_maintainability?: number; - coverage?: number; new_coverage?: number; - duplications?: number; new_duplications?: number; - size?: number; new_lines?: number; - languages?: string[]; + new_maintainability?: number; + new_reliability?: number; + new_security?: number; + new_security_review_rating?: number; qualifier?: ComponentQualifier; - tags?: string[]; + reliability?: number; search?: string; + security?: number; + security_review_rating?: number; + size?: number; sort?: string; + tags?: string[]; view?: string; - [x: string]: string | number | string[] | undefined; } export function parseUrlQuery(urlQuery: RawQuery): Query { diff --git a/server/sonar-web/src/main/js/apps/projects/types.ts b/server/sonar-web/src/main/js/apps/projects/types.ts index 4abea9916c0..8d6b00a6f01 100644 --- a/server/sonar-web/src/main/js/apps/projects/types.ts +++ b/server/sonar-web/src/main/js/apps/projects/types.ts @@ -23,6 +23,7 @@ import { Dict } from '../../types/types'; export interface Project { analysisDate?: string; isFavorite?: boolean; + isScannable: boolean; key: string; leakPeriodDate?: string; measures: Dict; @@ -31,7 +32,6 @@ export interface Project { qualifier: ComponentQualifier; tags: string[]; visibility: Visibility; - isScannable: boolean; } export interface Facet { diff --git a/server/sonar-web/src/main/js/apps/projects/utils.ts b/server/sonar-web/src/main/js/apps/projects/utils.ts index a59ea6ea7b9..854d057f476 100644 --- a/server/sonar-web/src/main/js/apps/projects/utils.ts +++ b/server/sonar-web/src/main/js/apps/projects/utils.ts @@ -154,7 +154,7 @@ export function localizeSorting(sort?: string): string { return translate('projects.sort', sort ?? 'name'); } -export function parseSorting(sort: string): { sortValue: string; sortDesc: boolean } { +export function parseSorting(sort: string): { sortDesc: boolean; sortValue: string } { const desc = sort.startsWith('-'); return { sortValue: desc ? sort.substring(1) : sort, sortDesc: desc }; @@ -178,9 +178,9 @@ export function fetchProjects({ query, pageIndex = 1, }: { - query: Query; isFavorite: boolean; pageIndex?: number; + query: Query; }) { const ps = PAGE_SIZE; @@ -271,7 +271,7 @@ export function fetchProjectMeasures(projects: Array<{ key: string }>, query: Qu return getMeasuresForProjects(projectKeys, metrics); } -function mapFacetValues(values: Array<{ val: string; count: number }>) { +function mapFacetValues(values: Array<{ count: number; val: string }>) { const map: Dict = {}; values.forEach((value) => { @@ -324,7 +324,7 @@ function getFacetsMap(facets: Facet[]) { return map; } -export function convertToSorting({ sort }: Query): { s?: string; asc?: boolean } { +export function convertToSorting({ sort }: Query): { asc?: boolean; s?: string } { if (sort?.startsWith('-')) { return { s: propertyToMetricMap[sort.substring(1)], asc: false }; } @@ -338,7 +338,7 @@ const ONE_DAY = 24 * ONE_HOUR; const ONE_MONTH = 30 * ONE_DAY; const ONE_YEAR = 12 * ONE_MONTH; -function format(periods: Array<{ value: number; label: string }>) { +function format(periods: Array<{ label: string; value: number }>) { let result = ''; let count = 0; let lastId = -1; diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/Search.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/Search.tsx index 8fe725ef816..a699ef58aad 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/Search.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/Search.tsx @@ -43,21 +43,21 @@ import DeleteModal from './DeleteModal'; export interface Props { analyzedBefore: Date | undefined; + appState: AppState; onAllDeselected: () => void; onAllSelected: () => void; onDateChanged: (analyzedBefore: Date | undefined) => void; onDeleteProjects: () => void; onProvisionedChanged: (provisioned: boolean) => void; onQualifierChanged: (qualifier: string) => void; - onVisibilityChanged: (qualifier: string) => void; onSearch: (query: string) => void; + onVisibilityChanged: (qualifier: string) => void; projects: Project[]; provisioned: boolean; qualifiers: string; query: string; ready: boolean; selection: any[]; - appState: AppState; total: number; visibility?: Visibility; } diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/CaycFixOptimizeBanner.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/CaycFixOptimizeBanner.tsx index 68532aff7e5..62b4c5fd332 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/CaycFixOptimizeBanner.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/CaycFixOptimizeBanner.tsx @@ -27,8 +27,8 @@ import { DocLink } from '../../../helpers/doc-links'; import { translate } from '../../../helpers/l10n'; interface Props { - renderCaycModal: ({ onClose }: { onClose: () => void }) => React.ReactNode; isOptimizing?: boolean; + renderCaycModal: ({ onClose }: { onClose: () => void }) => React.ReactNode; } export default function CaycNonCompliantBanner({ renderCaycModal, isOptimizing }: Readonly) { diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/Condition.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/Condition.tsx index d225dc4c5f0..51ba56ea28d 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/Condition.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/Condition.tsx @@ -52,12 +52,12 @@ export enum ConditionChange { } interface Props { - condition: ConditionType; canEdit: boolean; + condition: ConditionType; + isCaycModal?: boolean; metric: Metric; qualityGate: QualityGate; showEdit?: boolean; - isCaycModal?: boolean; } export default function ConditionComponent({ diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionReviewAndUpdateModal.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionReviewAndUpdateModal.tsx index cc5e8ba28f1..70d264e7afb 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionReviewAndUpdateModal.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionReviewAndUpdateModal.tsx @@ -32,13 +32,13 @@ import ConditionsTable from './ConditionsTable'; interface Props { canEdit: boolean; - metrics: Dict; conditions: Condition[]; - scope: 'new' | 'overall' | 'new-cayc'; - onClose: () => void; + isOptimizing?: boolean; lockEditing: () => void; + metrics: Dict; + onClose: () => void; qualityGate: QualityGate; - isOptimizing?: boolean; + scope: 'new' | 'overall' | 'new-cayc'; } export default function CaycReviewUpdateConditionsModal(props: Readonly) { diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionValue.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionValue.tsx index e01c9af0805..181516dce08 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionValue.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionValue.tsx @@ -28,9 +28,9 @@ import ConditionValueDescription from './ConditionValueDescription'; interface Props { condition: Condition; + isCaycCompliantAndOverCompliant?: boolean; isCaycModal?: boolean; metric: Metric; - isCaycCompliantAndOverCompliant?: boolean; } function ConditionValue({ diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionValueDescription.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionValueDescription.tsx index 4f0bf6c5542..e713be7ed20 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionValueDescription.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionValueDescription.tsx @@ -36,8 +36,8 @@ const NO_DESCRIPTION_CONDITION = [ interface Props { condition: Condition; - metric: Metric; isToBeModified?: boolean; + metric: Metric; } export default function ConditionValueDescription({ diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.tsx index fa10bd4300d..42546938009 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.tsx @@ -56,8 +56,8 @@ import ConditionsTable from './ConditionsTable'; import QGRecommendedIcon from './QGRecommendedIcon'; interface Props { - qualityGate: QualityGate; isFetching?: boolean; + qualityGate: QualityGate; } const FORBIDDEN_METRIC_TYPES = ['DATA', 'DISTRIB', 'STRING', 'BOOL']; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionsTable.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionsTable.tsx index 1d22170598b..63ab8c16e65 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionsTable.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionsTable.tsx @@ -25,12 +25,12 @@ import Condition from './Condition'; interface Props { canEdit: boolean; + conditions: ConditionType[]; + isCaycModal?: boolean; metrics: Dict; qualityGate: QualityGate; - conditions: ConditionType[]; scope: 'new' | 'overall' | 'new-cayc'; showEdit?: boolean; - isCaycModal?: boolean; } function Header() { diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/DetailsContent.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/DetailsContent.tsx index 2e371a1cd9e..6b8a8fa5a3d 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/DetailsContent.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/DetailsContent.tsx @@ -27,8 +27,8 @@ import Projects from './Projects'; import QualityGatePermissions from './QualityGatePermissions'; export interface DetailsContentProps { - qualityGate: QualityGate; isFetching?: boolean; + qualityGate: QualityGate; } export function DetailsContent(props: DetailsContentProps) { diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/EditConditionModal.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/EditConditionModal.tsx index 24faa55b050..c12319f7aa8 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/EditConditionModal.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/EditConditionModal.tsx @@ -29,8 +29,8 @@ import ThresholdInput from './ThresholdInput'; interface Props { condition: Condition; - metric: Metric; header: string; + metric: Metric; onClose: () => void; qualityGate: QualityGate; } diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/List.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/List.tsx index 56dba85252b..2948d4663db 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/List.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/List.tsx @@ -29,8 +29,8 @@ import BuiltInQualityGateBadge from './BuiltInQualityGateBadge'; import QGRecommendedIcon from './QGRecommendedIcon'; interface Props { - qualityGates: QualityGate[]; currentQualityGate?: string; + qualityGates: QualityGate[]; } export default function List({ qualityGates, currentQualityGate }: Props) { diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/MetricSelect.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/MetricSelect.tsx index a10525a0858..dd098646e45 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/MetricSelect.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/MetricSelect.tsx @@ -28,8 +28,8 @@ import { getLocalizedMetricNameNoDiffMetric } from '../utils'; interface Props { metric?: Metric; - metricsArray: Metric[]; metrics: Dict; + metricsArray: Metric[]; onMetricChange: (metric: Metric) => void; } diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/PermissionItem.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/PermissionItem.tsx index 2808769074c..163ce1bc8a0 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/PermissionItem.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/PermissionItem.tsx @@ -32,8 +32,8 @@ import { Group, isUser } from '../../../types/quality-gates'; import { UserBase } from '../../../types/users'; export interface PermissionItemProps { - onClickDelete: (item: UserBase | Group) => void; item: UserBase | Group; + onClickDelete: (item: UserBase | Group) => void; } export default function PermissionItem(props: PermissionItemProps) { diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/Projects.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/Projects.tsx index 76bbc5e227f..3eaf42adf06 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/Projects.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/Projects.tsx @@ -38,8 +38,8 @@ interface Props { } interface State { - needToReload: boolean; lastSearchParams?: SelectListSearchParams; + needToReload: boolean; projects: Project[]; projectsTotalCount?: number; selectedProjects: string[]; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/QualityGatePermissions.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/QualityGatePermissions.tsx index 52d3ff63fec..668238bf60d 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/QualityGatePermissions.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/QualityGatePermissions.tsx @@ -38,10 +38,10 @@ interface Props { interface State { groups: Group[]; - submitting: boolean; loading: boolean; - showAddModal: boolean; permissionToDelete?: UserBase | Group; + showAddModal: boolean; + submitting: boolean; users: UserBase[]; } diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/QualityGatePermissionsAddModalRenderer.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/QualityGatePermissionsAddModalRenderer.tsx index 363abc3a087..edd4db2b41d 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/QualityGatePermissionsAddModalRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/QualityGatePermissionsAddModalRenderer.tsx @@ -35,14 +35,14 @@ import { Group as UserGroup, isUser } from '../../../types/quality-gates'; import { UserBase } from '../../../types/users'; export interface QualityGatePermissionsAddModalRendererProps { - onClose: () => void; handleSearch: ( q: string, resolve: (options: Options>) => void, ) => void; + onClose: () => void; onSelection: (selection: SingleValue>) => void; - selection?: UserBase | UserGroup; onSubmit: (event: React.SyntheticEvent) => void; + selection?: UserBase | UserGroup; submitting: boolean; } diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/QualityGatePermissionsRenderer.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/QualityGatePermissionsRenderer.tsx index bfa42877023..fb01e1f2165 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/QualityGatePermissionsRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/QualityGatePermissionsRenderer.tsx @@ -40,11 +40,11 @@ export interface QualityGatePermissionsRendererProps { groups: Group[]; loading: boolean; onClickAddPermission: () => void; + onClickDeletePermission: (item: UserBase | Group) => void; onCloseAddPermission: () => void; - onSubmitAddPermission: (item: UserBase | Group) => void; onCloseDeletePermission: () => void; onConfirmDeletePermission: (item: UserBase | Group) => void; - onClickDeletePermission: (item: UserBase | Group) => void; + onSubmitAddPermission: (item: UserBase | Group) => void; permissionToDelete?: UserBase | Group; qualityGate: QualityGate; showAddModal: boolean; diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/ThresholdInput.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/ThresholdInput.tsx index de3c5df6505..9e2a95efbf5 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/ThresholdInput.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/ThresholdInput.tsx @@ -23,11 +23,11 @@ import { LabelValueSelectOption } from '../../../helpers/search'; import { Metric } from '../../../types/types'; interface Props { - name: string; - value: string; disabled?: boolean; metric: Metric; + name: string; onChange: (value: string) => void; + value: string; } export default class ThresholdInput extends React.PureComponent { diff --git a/server/sonar-web/src/main/js/apps/quality-gates/utils.ts b/server/sonar-web/src/main/js/apps/quality-gates/utils.ts index ab487e58aa5..fe1cff63906 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/utils.ts +++ b/server/sonar-web/src/main/js/apps/quality-gates/utils.ts @@ -24,9 +24,9 @@ import { isDiffMetric } from '../../helpers/measures'; import { CaycStatus, Condition, Dict, Metric, QualityGate } from '../../types/types'; interface GroupedByMetricConditions { - overallCodeConditions: Condition[]; - newCodeConditions: Condition[]; caycConditions: Condition[]; + newCodeConditions: Condition[]; + overallCodeConditions: Condition[]; } type CommonCaycMetricKeys = @@ -181,8 +181,8 @@ function isWeakCondition(key: AllCaycMetricKeys, selectedCondition: Condition) { export function getWeakMissingAndNonCaycConditions(conditions: Condition[]) { const result: { - weakConditions: Condition[]; missingConditions: Condition[]; + weakConditions: Condition[]; } = { weakConditions: [], missingConditions: [], diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangelogContainer.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangelogContainer.tsx index 1680149c4ab..723dd1764c1 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangelogContainer.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangelogContainer.tsx @@ -32,8 +32,8 @@ import ChangelogEmpty from './ChangelogEmpty'; import ChangelogSearch from './ChangelogSearch'; interface Props { - profile: Profile; location: Location; + profile: Profile; router: Router; } diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/CleanCodeAttributeChange.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/CleanCodeAttributeChange.tsx index b686d7ce31e..c3c6a9e5fb6 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/CleanCodeAttributeChange.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/CleanCodeAttributeChange.tsx @@ -22,10 +22,10 @@ import { useIntl } from 'react-intl'; import { CleanCodeAttribute, CleanCodeAttributeCategory } from '../../../types/clean-code-taxonomy'; interface Props { - oldCleanCodeAttribute: CleanCodeAttribute; - oldCleanCodeAttributeCategory: CleanCodeAttributeCategory; newCleanCodeAttribute: CleanCodeAttribute; newCleanCodeAttributeCategory: CleanCodeAttributeCategory; + oldCleanCodeAttribute: CleanCodeAttribute; + oldCleanCodeAttributeCategory: CleanCodeAttributeCategory; } export default function CleanCodeAttributeChange(props: Readonly) { diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonForm.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonForm.tsx index 0446064fca5..a157b450d1b 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonForm.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonForm.tsx @@ -25,16 +25,16 @@ import Tooltip from '../../../components/controls/Tooltip'; import { Profile } from '../types'; interface Props { + onCompare: (rule: string) => void; profile: Profile; profiles: Profile[]; - onCompare: (rule: string) => void; withKey?: string; } interface Option { - value: string; - label: string; isDefault: boolean | undefined; + label: string; + value: string; } export default function ComparisonForm(props: Readonly) { diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResultDeactivation.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResultDeactivation.tsx index 59a91f7d513..e650a8ac36c 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResultDeactivation.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResultDeactivation.tsx @@ -26,10 +26,10 @@ import ConfirmButton from '../../../components/controls/ConfirmButton'; import Tooltip from '../../../components/controls/Tooltip'; interface Props { + canDeactivateInheritedRules: boolean; onDone: () => Promise; profile: Profile; ruleKey: string; - canDeactivateInheritedRules: boolean; } export default function ComparisonResultDeactivation(props: React.PropsWithChildren) { diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResults.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResults.tsx index 4d97300f812..066ec051989 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResults.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResults.tsx @@ -35,10 +35,10 @@ import ComparisonResultsSummary from './ComparisonResultsSummary'; type Params = Dict; interface Props extends CompareResponse { + canDeactivateInheritedRules: boolean; leftProfile: Profile; refresh: () => Promise; rightProfile?: Profile; - canDeactivateInheritedRules: boolean; } export default function ComparisonResults(props: Readonly) { diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResultsSummary.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResultsSummary.tsx index 9f90123ed47..a72e426d868 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResultsSummary.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResultsSummary.tsx @@ -22,10 +22,10 @@ import React from 'react'; import { FormattedMessage, useIntl } from 'react-intl'; interface Props { - profileName: string; - comparedProfileName?: string; additionalCount: number; + comparedProfileName?: string; fewerCount: number; + profileName: string; } export default function ComparisonResultsSummary(props: Readonly) { diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileActions.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileActions.tsx index 49b037cc9f8..db150e2c0d6 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileActions.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileActions.tsx @@ -49,9 +49,9 @@ import DeleteProfileForm from './DeleteProfileForm'; import ProfileModalForm from './ProfileModalForm'; interface Props { + isComparable: boolean; profile: Profile; router: Router; - isComparable: boolean; updateProfiles: () => Promise; } diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileLink.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileLink.tsx index cc003710d69..47a63dc59e4 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileLink.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileLink.tsx @@ -22,8 +22,8 @@ import * as React from 'react'; import { getProfilePath } from '../utils'; interface Props { - className?: string; children?: React.ReactElement | string; + className?: string; language: string; name: string; } diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/components/QualityProfilesApp.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/components/QualityProfilesApp.tsx index 76231c544cc..dcc2d61c4d9 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/components/QualityProfilesApp.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/components/QualityProfilesApp.tsx @@ -37,8 +37,8 @@ interface Props { interface State { actions?: Actions; - loading: boolean; exporters?: Exporter[]; + loading: boolean; profiles?: Profile[]; } diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ChangeProjectsForm.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/ChangeProjectsForm.tsx index b5f81519bfa..d5f7851a994 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ChangeProjectsForm.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ChangeProjectsForm.tsx @@ -39,8 +39,8 @@ interface Props { } interface State { - needToReload: boolean; lastSearchParams?: SelectListSearchParams; + needToReload: boolean; projects: ProfileProject[]; projectsTotalCount?: number; selectedProjects: string[]; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileHeader.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileHeader.tsx index 615ce883cf3..c34c384bb7f 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileHeader.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileHeader.tsx @@ -36,8 +36,8 @@ import { } from '../utils'; interface Props { - profile: Profile; isComparable: boolean; + profile: Profile; updateProfiles: () => Promise; } diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRules.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRules.tsx index 2ee069e3340..b23f72ebb9c 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRules.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRules.tsx @@ -51,8 +51,8 @@ interface Props { } interface ByType { - val: string; count: number | null; + val: string; } export default function ProfileRules({ profile }: Readonly) { @@ -65,9 +65,9 @@ export default function ProfileRules({ profile }: Readonly) { const [countsBySoftwareImpact, setCountsBySoftwareImpact] = useState>({}); const [totalBySoftwareQuality, setTotalBySoftwareQuality] = useState>({}); const [sonarWayDiff, setSonarWayDiff] = useState<{ + missingRuleCount: number; profile: string; profileName: string; - missingRuleCount: number; } | null>(null); useEffect(() => { diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRulesRow.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRulesRow.tsx index ef2d3973ec2..698eb5e917f 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRulesRow.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRulesRow.tsx @@ -27,15 +27,15 @@ import { getRulesUrl } from '../../../helpers/urls'; import { RulesFacetName } from '../../../types/rules'; interface Props { - title: string; className?: string; count: number | null; - qprofile: string; - total: number | null; propertyName: | RulesFacetName.CleanCodeAttributeCategories | RulesFacetName.ImpactSoftwareQualities; propertyValue: string; + qprofile: string; + title: string; + total: number | null; } export default function ProfileRulesRow(props: Readonly) { diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRulesSonarWayComparison.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRulesSonarWayComparison.tsx index 38951ce78b7..6e24853ed66 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRulesSonarWayComparison.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRulesSonarWayComparison.tsx @@ -27,8 +27,8 @@ import { getRulesUrl } from '../../../helpers/urls'; interface Props { language: string; profile: string; - sonarway: string; sonarWayMissingRules: number; + sonarway: string; } export default function ProfileRulesSonarWayComparison(props: Props) { diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/home/ProfilesListRow.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/home/ProfilesListRow.tsx index a35dcd8b9fa..e95012d7908 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/home/ProfilesListRow.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/home/ProfilesListRow.tsx @@ -29,9 +29,9 @@ import ProfileLink from '../components/ProfileLink'; import { Profile } from '../types'; export interface ProfilesListRowProps { + isComparable: boolean; profile: Profile; updateProfiles: () => Promise; - isComparable: boolean; } export function ProfilesListRow(props: Readonly) { diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/types.ts b/server/sonar-web/src/main/js/apps/quality-profiles/types.ts index 2d2f4e2c4e6..d6e380ca375 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/types.ts +++ b/server/sonar-web/src/main/js/apps/quality-profiles/types.ts @@ -28,40 +28,40 @@ import { IssueSeverity } from '../../types/issues'; import { Dict } from '../../types/types'; export interface Profile extends BaseProfile { - depth: number; childrenCount: number; + depth: number; } export interface Exporter { key: string; - name: string; languages: string[]; + name: string; } export interface ProfileChangelogEventImpactChange { - oldSoftwareQuality?: SoftwareQuality; + newSeverity?: SoftwareImpactSeverity; newSoftwareQuality?: SoftwareQuality; oldSeverity?: SoftwareImpactSeverity; - newSeverity?: SoftwareImpactSeverity; + oldSoftwareQuality?: SoftwareQuality; } export interface ProfileChangelogEvent { action: string; authorName?: string; cleanCodeAttributeCategory?: CleanCodeAttributeCategory; + date: string; // impacts should be always set in the wild. But Next currently has a specific database state for which this field is undefined. May be possible to make this field required in the future. impacts?: { - softwareQuality: SoftwareQuality; severity: SoftwareImpactSeverity; + softwareQuality: SoftwareQuality; }[]; - date: string; params?: { - severity?: IssueSeverity; - oldCleanCodeAttribute?: CleanCodeAttribute; - oldCleanCodeAttributeCategory?: CleanCodeAttributeCategory; + impactChanges?: ProfileChangelogEventImpactChange[]; newCleanCodeAttribute?: CleanCodeAttribute; newCleanCodeAttributeCategory?: CleanCodeAttributeCategory; - impactChanges?: ProfileChangelogEventImpactChange[]; + oldCleanCodeAttribute?: CleanCodeAttribute; + oldCleanCodeAttributeCategory?: CleanCodeAttributeCategory; + severity?: IssueSeverity; } & Dict; ruleKey: string; ruleName: string; diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/SecurityHotspotsApp.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/SecurityHotspotsApp.tsx index fb4ba64d883..ad7e8adf121 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/SecurityHotspotsApp.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/SecurityHotspotsApp.tsx @@ -54,15 +54,15 @@ const PAGE_SIZE = 500; interface Props { branchLike?: BranchLike; - currentUser: CurrentUser; component: Component; + currentUser: CurrentUser; location: Location; router: Router; } interface State { - filterByCategory?: { standard: SecurityStandard; category: string }; filterByCWE?: string; + filterByCategory?: { category: string; standard: SecurityStandard }; filterByFile?: string; filters: HotspotFilters; hotspotKeys?: string[]; @@ -340,14 +340,14 @@ export class SecurityHotspotsApp extends React.PureComponent { filterByFile, page, }: { + filterByCWE: string | undefined; + filterByCategory: | { - standard: SecurityStandard; category: string; + standard: SecurityStandard; } | undefined; - - filterByCWE: string | undefined; filterByFile: string | undefined; page: number; }) { diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/SecurityHotspotsAppRenderer.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/SecurityHotspotsAppRenderer.tsx index cfb76f48202..ca6afaeebb8 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/SecurityHotspotsAppRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/SecurityHotspotsAppRenderer.tsx @@ -52,11 +52,11 @@ import HotspotViewer from './components/HotspotViewer'; export interface SecurityHotspotsAppRendererProps { branchLike?: BranchLike; component: Component; + filterByCWE?: string; filterByCategory?: { - standard: SecurityStandard; category: string; + standard: SecurityStandard; }; - filterByCWE?: string; filterByFile?: string; filters: HotspotFilters; hotspots: RawHotspot[]; diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/EmptyHotspotsPage.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/EmptyHotspotsPage.tsx index 2becfc24363..a586ffcc6a2 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/EmptyHotspotsPage.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/EmptyHotspotsPage.tsx @@ -26,8 +26,8 @@ import { DocLink } from '../../../helpers/doc-links'; import { translate } from '../../../helpers/l10n'; export interface EmptyHotspotsPageProps { - filtered: boolean; filterByFile: boolean; + filtered: boolean; isStaticListOfHotspots: boolean; } diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotCategory.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotCategory.tsx index c864e02ac0a..f14527b7597 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotCategory.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotCategory.tsx @@ -25,11 +25,11 @@ import HotspotListItem from './HotspotListItem'; interface HotspotCategoryProps { expanded: boolean; - onSetExpanded: (expanded: boolean) => void; hotspots: RawHotspot[]; isLastAndIncomplete: boolean; onHotspotClick: (hotspot: RawHotspot) => void; onLocationClick: (index: number) => void; + onSetExpanded: (expanded: boolean) => void; rating: HotspotRatingEnum; selectedHotspot: RawHotspot; selectedHotspotLocation?: number; diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotCommentModal.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotCommentModal.tsx index 9b429fe03e4..bd19b600e54 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotCommentModal.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotCommentModal.tsx @@ -23,9 +23,9 @@ import FormattingTips from '../../../components/common/FormattingTips'; import { translate } from '../../../helpers/l10n'; export interface HotspotCommentPopupProps { - value?: string; - onSubmit: (comment: string) => void; onCancel: () => void; + onSubmit: (comment: string) => void; + value?: string; } export default function HotspotCommentModal(props: HotspotCommentPopupProps) { diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotHeader.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotHeader.tsx index 2fb0a348ab4..bd4d70e44bd 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotHeader.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotHeader.tsx @@ -39,11 +39,11 @@ import HotspotHeaderRightSection from './HotspotHeaderRightSection'; import Status from './status/Status'; export interface HotspotHeaderProps { - hotspot: Hotspot; - component: Component; branchLike?: BranchLike; - standards?: Standards; + component: Component; + hotspot: Hotspot; onUpdateHotspot: (statusUpdate?: boolean, statusOption?: HotspotStatusOption) => Promise; + standards?: Standards; } export function HotspotHeader(props: HotspotHeaderProps) { diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotHeaderRightSection.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotHeaderRightSection.tsx index 64ea79d4804..0cc28d8a11f 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotHeaderRightSection.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotHeaderRightSection.tsx @@ -26,8 +26,8 @@ import { Hotspot, HotspotStatusOption } from '../../../types/security-hotspots'; import Assignee from './Assignee'; interface Props { - hotspot: Hotspot; categoryStandard?: string; + hotspot: Hotspot; onUpdateHotspot: (statusUpdate?: boolean, statusOption?: HotspotStatusOption) => Promise; } @@ -64,8 +64,8 @@ export default function HotspotHeaderRightSection(props: Props) { interface HotspotHeaderInfoProps { children: React.ReactNode; - title: string; className?: string; + title: string; } function HotspotHeaderInfo({ children, title, className }: HotspotHeaderInfoProps) { diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotList.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotList.tsx index a3c15d65334..a0c98c9183f 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotList.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotList.tsx @@ -47,8 +47,8 @@ interface Props { interface State { expandedCategories: Dict; groupedHotspots: Array<{ + categories: Array<{ hotspots: RawHotspot[]; key: string; title: string }>; risk: HotspotRatingEnum; - categories: Array<{ key: string; hotspots: RawHotspot[]; title: string }>; }>; } diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotOpenInIdeButton.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotOpenInIdeButton.tsx index 6b067444615..29368488d88 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotOpenInIdeButton.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotOpenInIdeButton.tsx @@ -35,13 +35,13 @@ import { openHotspot, probeSonarLintServers } from '../../../helpers/sonarlint'; import { Ide } from '../../../types/sonarlint'; interface Props { - projectKey: string; hotspotKey: string; + projectKey: string; } interface State { - loading: boolean; ides: Ide[]; + loading: boolean; } export default class HotspotOpenInIdeButton extends React.PureComponent { diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotSimpleList.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotSimpleList.tsx index c39192787a4..7773b01d047 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotSimpleList.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotSimpleList.tsx @@ -34,18 +34,18 @@ import { SECURITY_STANDARD_RENDERER } from '../utils'; import HotspotListItem from './HotspotListItem'; export interface HotspotSimpleListProps { + filterByCWE?: string; filterByCategory?: { - standard: SecurityStandard; category: string; + standard: SecurityStandard; }; - filterByCWE?: string; filterByFile?: string; hotspots: RawHotspot[]; hotspotsTotal: number; loadingMore: boolean; onHotspotClick: (hotspot: RawHotspot) => void; - onLocationClick: (index?: number) => void; onLoadMore: () => void; + onLocationClick: (index?: number) => void; selectedHotspot: RawHotspot; selectedHotspotLocation?: number; standards: Standards; diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotSnippetContainer.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotSnippetContainer.tsx index 1462abbb52b..8f301649c64 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotSnippetContainer.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotSnippetContainer.tsx @@ -39,8 +39,8 @@ interface State { highlightedSymbols: string[]; lastLine?: number; loading: boolean; - sourceLines: SourceLine[]; secondaryLocations: FlowLocation[]; + sourceLines: SourceLine[]; } const BUFFER_LINES = 10; diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotSnippetContainerRenderer.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotSnippetContainerRenderer.tsx index 7ff7023ca18..43179dd7c44 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotSnippetContainerRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotSnippetContainerRenderer.tsx @@ -38,13 +38,13 @@ export interface HotspotSnippetContainerRendererProps { hotspot: Hotspot; loading: boolean; locations: { [line: number]: LinearIssueLocation[] }; - selectedHotspotLocation?: number; onExpandBlock: (direction: ExpandDirection) => Promise; - onSymbolClick: (symbols: string[]) => void; onLocationSelect: (index: number) => void; + onSymbolClick: (symbols: string[]) => void; + secondaryLocations: FlowLocation[]; + selectedHotspotLocation?: number; sourceLines: SourceLine[]; sourceViewerFile: SourceViewerFile; - secondaryLocations: FlowLocation[]; } const noop = () => undefined; diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotSnippetHeader.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotSnippetHeader.tsx index 54673c08fcd..29add9012d1 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotSnippetHeader.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotSnippetHeader.tsx @@ -35,10 +35,10 @@ import { CurrentUser, isLoggedIn } from '../../../types/users'; import HotspotOpenInIdeButton from './HotspotOpenInIdeButton'; export interface HotspotSnippetHeaderProps { - hotspot: Hotspot; - currentUser: CurrentUser; - component: Component; branchLike?: BranchLike; + component: Component; + currentUser: CurrentUser; + hotspot: Hotspot; } function HotspotSnippetHeader(props: HotspotSnippetHeaderProps) { diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotViewerTabs.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotViewerTabs.tsx index fabc1c77353..22801e6f3f5 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotViewerTabs.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotViewerTabs.tsx @@ -44,13 +44,13 @@ import StatusReviewButton from './status/StatusReviewButton'; interface Props { activityTabContent: React.ReactNode; + branchLike?: BranchLike; codeTabContent: React.ReactNode; + component: Component; hotspot: Hotspot; onUpdateHotspot: (statusUpdate?: boolean, statusOption?: HotspotStatusOption) => Promise; ruleDescriptionSections?: RuleDescriptionSection[]; ruleLanguage?: string; - component: Component; - branchLike?: BranchLike; } interface Tab { @@ -244,7 +244,7 @@ export default function HotspotViewerTabs(props: Props) { ); } -const StickyTabs = styled.div<{ top: number; isSticky: boolean }>` +const StickyTabs = styled.div<{ isSticky: boolean; top: number }>` background-color: ${themeColor('pageBlock')}; box-shadow: ${({ isSticky }) => (isSticky ? themeShadow('sm') : 'none')}; top: ${({ top }) => top}px; diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/status/StatusSelection.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/status/StatusSelection.tsx index 8a54b54ba88..1379cce6366 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/status/StatusSelection.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/status/StatusSelection.tsx @@ -28,8 +28,8 @@ import StatusSelectionRenderer from './StatusSelectionRenderer'; interface Props { hotspot: Hotspot; - onStatusOptionChange: (statusOption: HotspotStatusOption) => Promise; onClose: () => void; + onStatusOptionChange: (statusOption: HotspotStatusOption) => Promise; } export default function StatusSelection(props: Props) { diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/status/StatusSelectionRenderer.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/status/StatusSelectionRenderer.tsx index 94752ffb288..67d15a1fcf6 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/status/StatusSelectionRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/status/StatusSelectionRenderer.tsx @@ -24,13 +24,13 @@ import { translate } from '../../../../helpers/l10n'; import { HotspotStatusOption } from '../../../../types/security-hotspots'; export interface StatusSelectionRendererProps { - status: HotspotStatusOption; - onStatusChange: (statusOption: HotspotStatusOption) => void; comment?: string; - onCommentChange: (comment: string) => void; + loading: boolean; onCancel: () => void; + onCommentChange: (comment: string) => void; + onStatusChange: (statusOption: HotspotStatusOption) => void; onSubmit: () => Promise; - loading: boolean; + status: HotspotStatusOption; submitDisabled: boolean; } diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/hooks/useStickyDetection.ts b/server/sonar-web/src/main/js/apps/security-hotspots/hooks/useStickyDetection.ts index 5d98fa70ead..07e218e7db3 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/hooks/useStickyDetection.ts +++ b/server/sonar-web/src/main/js/apps/security-hotspots/hooks/useStickyDetection.ts @@ -20,8 +20,8 @@ import { useEffect, useState } from 'react'; interface Options { - offset: number; direction?: 'HORIZONTAL' | 'VERTICAL'; + offset: number; } /* diff --git a/server/sonar-web/src/main/js/apps/sessions/components/Login.tsx b/server/sonar-web/src/main/js/apps/sessions/components/Login.tsx index c5f6dd41bbe..047a6e69a06 100644 --- a/server/sonar-web/src/main/js/apps/sessions/components/Login.tsx +++ b/server/sonar-web/src/main/js/apps/sessions/components/Login.tsx @@ -42,9 +42,9 @@ import OAuthProviders from './OAuthProviders'; export interface LoginProps { identityProviders: IdentityProvider[]; loading: boolean; + location: Location; message?: string; onSubmit: (login: string, password: string) => Promise; - location: Location; } export default function Login(props: Readonly) { diff --git a/server/sonar-web/src/main/js/apps/settings/components/AdditionalCategories.tsx b/server/sonar-web/src/main/js/apps/settings/components/AdditionalCategories.tsx index 99718a5a0a7..ffdf20a0f9d 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/AdditionalCategories.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/AdditionalCategories.tsx @@ -38,14 +38,14 @@ import PullRequestDecorationBinding from './pullRequestDecorationBinding/PRDecor export interface AdditionalCategoryComponentProps { categories: string[]; - definitions: ExtendedSettingDefinition[]; component: Component | undefined; + definitions: ExtendedSettingDefinition[]; selectedCategory: string; } export interface AdditionalCategory { - availableGlobally: boolean; availableForProject: boolean; + availableGlobally: boolean; displayTab: boolean; key: string; name: string; diff --git a/server/sonar-web/src/main/js/apps/settings/components/CategoryDefinitionsList.tsx b/server/sonar-web/src/main/js/apps/settings/components/CategoryDefinitionsList.tsx index 92d95141b5b..285422ffdcd 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/CategoryDefinitionsList.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/CategoryDefinitionsList.tsx @@ -32,9 +32,9 @@ interface Props { category: string; component?: Component; definitions: ExtendedSettingDefinition[]; - subCategory?: string; displaySubCategoryTitle?: boolean; noPadding?: boolean; + subCategory?: string; } interface State { diff --git a/server/sonar-web/src/main/js/apps/settings/components/EmailForm.tsx b/server/sonar-web/src/main/js/apps/settings/components/EmailForm.tsx index 13715d82b6d..4dfa5c97541 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/EmailForm.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/EmailForm.tsx @@ -40,12 +40,12 @@ interface Props { } interface State { + error?: string; + loading: boolean; + message: string; recipient: string; subject: string; - message: string; - loading: boolean; success?: string; - error?: string; } export class EmailForm extends React.PureComponent { diff --git a/server/sonar-web/src/main/js/apps/settings/components/SettingsAppRenderer.tsx b/server/sonar-web/src/main/js/apps/settings/components/SettingsAppRenderer.tsx index 361dd3306a8..c51f3bbf7e5 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/SettingsAppRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/SettingsAppRenderer.tsx @@ -36,8 +36,8 @@ import CategoryDefinitionsList from './CategoryDefinitionsList'; import PageHeader from './PageHeader'; export interface SettingsAppRendererProps { - definitions: ExtendedSettingDefinition[]; component?: Component; + definitions: ExtendedSettingDefinition[]; loading: boolean; location: Location; } diff --git a/server/sonar-web/src/main/js/apps/settings/components/SettingsSearchRenderer.tsx b/server/sonar-web/src/main/js/apps/settings/components/SettingsSearchRenderer.tsx index 56b3e3b0488..ad11a8197ad 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/SettingsSearchRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/SettingsSearchRenderer.tsx @@ -38,15 +38,15 @@ import { buildSettingLink, isRealSettingKey } from '../utils'; const SEARCH_INPUT_ID = 'settings-search-input'; export interface SettingsSearchRendererProps { component?: Component; - results?: ExtendedSettingDefinition[]; - searchQuery: string; - selectedResult?: string; - showResults: boolean; onClickOutside: () => void; onMouseOverResult: (key: string) => void; onSearchInputChange: (query: string) => void; onSearchInputFocus: () => void; onSearchInputKeyDown: (event: React.KeyboardEvent) => void; + results?: ExtendedSettingDefinition[]; + searchQuery: string; + selectedResult?: string; + showResults: boolean; } export default function SettingsSearchRenderer(props: Readonly) { diff --git a/server/sonar-web/src/main/js/apps/settings/components/SubCategoryDefinitionsList.tsx b/server/sonar-web/src/main/js/apps/settings/components/SubCategoryDefinitionsList.tsx index 6ed1d1d1987..cbc93409ded 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/SubCategoryDefinitionsList.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/SubCategoryDefinitionsList.tsx @@ -32,11 +32,11 @@ import EmailForm from './EmailForm'; export interface SubCategoryDefinitionsListProps { category: string; component?: Component; + displaySubCategoryTitle?: boolean; location: Location; + noPadding?: boolean; settings: Array; subCategory?: string; - displaySubCategoryTitle?: boolean; - noPadding?: boolean; } class SubCategoryDefinitionsList extends React.PureComponent { diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionForm.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionForm.tsx index 2f38beab914..df0104f8119 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionForm.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionForm.tsx @@ -48,28 +48,28 @@ import { BITBUCKET_CLOUD_WORKSPACE_ID_FORMAT } from '../../constants'; import AlmBindingDefinitionFormRenderer from './AlmBindingDefinitionFormRenderer'; export interface AlmBindingDefinitionFormProps { + afterSubmit: (data: AlmBindingDefinitionBase) => void; alm: AlmKeys; bindingDefinition?: AlmBindingDefinition; - onCancel: () => void; - afterSubmit: (data: AlmBindingDefinitionBase) => void; enforceValidation?: boolean; + onCancel: () => void; } interface State { + alreadySavedFormData?: AlmBindingDefinition; + bitbucketVariant?: AlmKeys.BitbucketServer | AlmKeys.BitbucketCloud; formData: AlmBindingDefinition; - touched: boolean; submitting: boolean; - bitbucketVariant?: AlmKeys.BitbucketServer | AlmKeys.BitbucketCloud; - alreadySavedFormData?: AlmBindingDefinition; + touched: boolean; validationError?: string; } const BINDING_PER_ALM: { [key in AlmKeys]: { createApi: (def: AlmBindingDefinition) => Promise; - updateApi: (def: AlmBindingDefinition) => Promise; defaultBinding: AlmBindingDefinition; optionalFields: Dict; + updateApi: (def: AlmBindingDefinition) => Promise; }; } = { [AlmKeys.Azure]: { diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionFormField.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionFormField.tsx index 0d0429fd133..2a11ebe6f35 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionFormField.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionFormField.tsx @@ -39,6 +39,7 @@ export interface AlmBindingDefinitionFormFieldProps void; @@ -46,7 +47,6 @@ export interface AlmBindingDefinitionFormFieldProps( diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionFormRenderer.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionFormRenderer.tsx index ba2e2d3b0e1..f72477945d5 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionFormRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionFormRenderer.tsx @@ -36,19 +36,19 @@ import GitlabForm from './GitlabForm'; export interface Props { alm: AlmKeys; - isUpdate: boolean; + bitbucketVariant?: AlmKeys.BitbucketServer | AlmKeys.BitbucketCloud; canSubmit: boolean; - onCancel: () => void; - onSubmit: () => void; - onFieldChange: (fieldId: keyof AlmBindingDefinition, value: string) => void; + errorListElementRef: React.RefObject; formData: AlmBindingDefinition; - submitting: boolean; - bitbucketVariant?: AlmKeys.BitbucketServer | AlmKeys.BitbucketCloud; + isUpdate: boolean; onBitbucketVariantChange: ( bitbucketVariant: AlmKeys.BitbucketServer | AlmKeys.BitbucketCloud, ) => void; + onCancel: () => void; + onFieldChange: (fieldId: keyof AlmBindingDefinition, value: string) => void; + onSubmit: () => void; + submitting: boolean; validationError?: string; - errorListElementRef: React.RefObject; } export default class AlmBindingDefinitionFormRenderer extends React.PureComponent> { diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmIntegration.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmIntegration.tsx index 4f60586bf1b..99cdc5ce918 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmIntegration.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmIntegration.tsx @@ -52,8 +52,8 @@ export type AlmTabs = AlmKeys.Azure | AlmKeys.GitHub | AlmKeys.GitLab | AlmKeys. interface State { currentAlmTab: AlmTabs; definitionKeyForDeletion?: string; - definitions: AlmSettingsBindingDefinitions; definitionStatus: Dict; + definitions: AlmSettingsBindingDefinitions; loadingAlmDefinitions: boolean; loadingProjectCount: boolean; projectCount?: number; diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmIntegrationRenderer.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmIntegrationRenderer.tsx index 73da55bf78f..7ebcb57b0b5 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmIntegrationRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmIntegrationRenderer.tsx @@ -41,8 +41,8 @@ export interface AlmIntegrationRendererProps { branchesEnabled: boolean; currentAlmTab: AlmTabs; definitionKeyForDeletion?: string; - definitions: AlmSettingsBindingDefinitions; definitionStatus: Dict; + definitions: AlmSettingsBindingDefinitions; loadingAlmDefinitions: boolean; loadingProjectCount: boolean; multipleAlmEnabled: boolean; diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmTab.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmTab.tsx index 2a7e94cf238..fb277d721a1 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmTab.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmTab.tsx @@ -30,8 +30,8 @@ import AlmTabRenderer from './AlmTabRenderer'; interface Props { almTab: AlmTabs; branchesEnabled: boolean; - definitions: AlmBindingDefinition[]; definitionStatus: Dict; + definitions: AlmBindingDefinition[]; loadingAlmDefinitions: boolean; loadingProjectCount: boolean; multipleAlmEnabled: boolean; @@ -41,8 +41,8 @@ interface Props { } interface State { - editedDefinition?: AlmBindingDefinition; editDefinition?: boolean; + editedDefinition?: AlmBindingDefinition; } export default class AlmTab extends React.PureComponent { diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmTabRenderer.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmTabRenderer.tsx index 151e080a27c..161c0051952 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmTabRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmTabRenderer.tsx @@ -35,12 +35,13 @@ import { AlmTabs } from './AlmIntegration'; import CreationTooltip from './CreationTooltip'; export interface AlmTabRendererProps { + afterSubmit: (config: AlmBindingDefinitionBase) => void; almTab: AlmTabs; branchesEnabled: boolean; definitionStatus: Dict; + definitions: AlmBindingDefinition[]; editDefinition?: boolean; editedDefinition?: AlmBindingDefinition; - definitions: AlmBindingDefinition[]; loadingAlmDefinitions: boolean; loadingProjectCount: boolean; multipleAlmEnabled: boolean; @@ -49,7 +50,6 @@ export interface AlmTabRendererProps { onCreate: () => void; onDelete: (definitionKey: string) => void; onEdit: (definitionKey: string) => void; - afterSubmit: (config: AlmBindingDefinitionBase) => void; } const AUTHENTICATION_AVAILABLE_PLATFORMS = [ diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/BitbucketForm.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/BitbucketForm.tsx index ddb1abfeaca..08aef939c04 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/BitbucketForm.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/BitbucketForm.tsx @@ -35,8 +35,8 @@ export interface BitbucketFormProps { fieldId: keyof (BitbucketServerBindingDefinition & BitbucketCloudBindingDefinition), value: string, ) => void; - variant?: AlmKeys.BitbucketServer | AlmKeys.BitbucketCloud; onVariantChange: (variant: AlmKeys.BitbucketServer | AlmKeys.BitbucketCloud) => void; + variant?: AlmKeys.BitbucketServer | AlmKeys.BitbucketCloud; } export default function BitbucketForm(props: Readonly) { diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/DeleteModal.tsx b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/DeleteModal.tsx index 1752f19a262..96b25eaea18 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/DeleteModal.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/DeleteModal.tsx @@ -24,9 +24,9 @@ import { translate, translateWithParameters } from '../../../../helpers/l10n'; export interface DeleteModalProps { id: string; - projectCount?: number; - onDelete: (id: string) => void; onCancel: () => void; + onDelete: (id: string) => void; + projectCount?: number; } function showProjectCountWarning(projectCount?: number) { diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/AuthenticationFormField.tsx b/server/sonar-web/src/main/js/apps/settings/components/authentication/AuthenticationFormField.tsx index 17b4380adb5..511c6d8b8f1 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/authentication/AuthenticationFormField.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/AuthenticationFormField.tsx @@ -37,13 +37,13 @@ import AuthenticationSecuredField from './AuthenticationSecuredField'; import AuthenticationToggleFormField from './AuthenticationToggleField'; interface Props { - settingValue?: string | boolean | string[]; + className?: string; definition: ExtendedSettingDefinition | DefinitionV2; + error?: string; + isNotSet: boolean; mandatory?: boolean; onFieldChange: (key: string, value: string | boolean | string[]) => void; - isNotSet: boolean; - error?: string; - className?: string; + settingValue?: string | boolean | string[]; } export default function AuthenticationFormField(props: Readonly) { diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/AuthenticationMultiValuesField.tsx b/server/sonar-web/src/main/js/apps/settings/components/authentication/AuthenticationMultiValuesField.tsx index d10f23ab05d..209497489da 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/authentication/AuthenticationMultiValuesField.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/AuthenticationMultiValuesField.tsx @@ -24,9 +24,9 @@ import { DefinitionV2, ExtendedSettingDefinition } from '../../../../types/setti import { getPropertyName } from '../../utils'; interface Props { + definition: ExtendedSettingDefinition | DefinitionV2; onFieldChange: (value: string[]) => void; settingValue?: string[]; - definition: ExtendedSettingDefinition | DefinitionV2; } export default function AuthenticationMultiValueField(props: Props) { diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/AuthenticationSecuredField.tsx b/server/sonar-web/src/main/js/apps/settings/components/authentication/AuthenticationSecuredField.tsx index 7aea3852525..bed6bf52c4a 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/authentication/AuthenticationSecuredField.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/AuthenticationSecuredField.tsx @@ -24,11 +24,11 @@ import { DefinitionV2, ExtendedSettingDefinition, SettingType } from '../../../. import { isSecuredDefinition } from '../../utils'; interface SamlToggleFieldProps { - onFieldChange: (key: string, value: string) => void; - settingValue?: string; definition: ExtendedSettingDefinition | DefinitionV2; - optional?: boolean; isNotSet: boolean; + onFieldChange: (key: string, value: string) => void; + optional?: boolean; + settingValue?: string; } export default function AuthenticationSecuredField(props: SamlToggleFieldProps) { diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/AuthenticationToggleField.tsx b/server/sonar-web/src/main/js/apps/settings/components/authentication/AuthenticationToggleField.tsx index 95f3f8cf671..ce51bac0d16 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/authentication/AuthenticationToggleField.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/AuthenticationToggleField.tsx @@ -23,9 +23,9 @@ import { DefinitionV2, ExtendedSettingDefinition } from '../../../../types/setti import { getPropertyName } from '../../utils'; interface SamlToggleFieldProps { + definition: ExtendedSettingDefinition | DefinitionV2; onChange: (value: boolean) => void; settingValue?: string | boolean; - definition: ExtendedSettingDefinition | DefinitionV2; } export default function AuthenticationToggleField(props: SamlToggleFieldProps) { diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/ConfigurationDetails.tsx b/server/sonar-web/src/main/js/apps/settings/components/authentication/ConfigurationDetails.tsx index b2bd2d3948c..5a5c948305f 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/authentication/ConfigurationDetails.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/ConfigurationDetails.tsx @@ -29,15 +29,15 @@ import React, { ReactElement } from 'react'; import { translate } from '../../../../helpers/l10n'; interface Props { - title: string; - url: string | string[] | undefined; canDisable: boolean; - onEdit: () => void; - onDelete: () => void; - onToggle: () => void; + enabled: boolean; extraActions?: ReactElement; isDeleting: boolean; - enabled: boolean; + onDelete: () => void; + onEdit: () => void; + onToggle: () => void; + title: string; + url: string | string[] | undefined; } export default function ConfigurationDetails(props: Readonly) { diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/ConfirmProvisioningModal.tsx b/server/sonar-web/src/main/js/apps/settings/components/authentication/ConfirmProvisioningModal.tsx index b6a8dc3e13c..7b430578b8b 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/authentication/ConfirmProvisioningModal.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/ConfirmProvisioningModal.tsx @@ -26,11 +26,11 @@ import { Provider } from '../../../../types/types'; interface Props { allowUsersToSignUp?: boolean; - provider: Provider.Github | Provider.Gitlab; + hasProvisioningTypeChange?: boolean; isAllowListEmpty: boolean; onClose: VoidFunction; onConfirm: VoidFunction; - hasProvisioningTypeChange?: boolean; + provider: Provider.Github | Provider.Gitlab; provisioningStatus: ProvisioningType; } diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/GitHubMappingModal.tsx b/server/sonar-web/src/main/js/apps/settings/components/authentication/GitHubMappingModal.tsx index d22e7f0bf55..a13456ad010 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/authentication/GitHubMappingModal.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/GitHubMappingModal.tsx @@ -45,14 +45,14 @@ import { GitHubMapping } from '../../../../types/provisioning'; interface Props { mapping: GitHubMapping[] | null; - setMapping: React.Dispatch>; onClose: () => void; + setMapping: React.Dispatch>; } interface PermissionCellProps { + list?: GitHubMapping[]; mapping: GitHubMapping; setMapping: React.Dispatch>; - list?: GitHubMapping[]; } const DEFAULT_CUSTOM_ROLE_PERMISSIONS: GitHubMapping['permissions'] = { diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/GitLabAuthenticationTab.tsx b/server/sonar-web/src/main/js/apps/settings/components/authentication/GitLabAuthenticationTab.tsx index 3ec7e17a066..00f377de25f 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/authentication/GitLabAuthenticationTab.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/GitLabAuthenticationTab.tsx @@ -47,10 +47,10 @@ import ProvisioningSection from './ProvisioningSection'; import TabHeader from './TabHeader'; interface ChangesForm { - provisioningType?: GitLabConfigurationUpdateBody['provisioningType']; allowUsersToSignUp?: GitLabConfigurationUpdateBody['allowUsersToSignUp']; - provisioningToken?: GitLabConfigurationUpdateBody['provisioningToken']; allowedGroups?: GitLabConfigurationUpdateBody['allowedGroups']; + provisioningToken?: GitLabConfigurationUpdateBody['provisioningToken']; + provisioningType?: GitLabConfigurationUpdateBody['provisioningType']; } const getDefinitions = ( diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/GitLabConfigurationForm.tsx b/server/sonar-web/src/main/js/apps/settings/components/authentication/GitLabConfigurationForm.tsx index b14f2999d8c..d40ed733154 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/authentication/GitLabConfigurationForm.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/GitLabConfigurationForm.tsx @@ -44,9 +44,9 @@ interface ErrorValue { } interface FormData { - value: string | boolean | string[]; - required: boolean; definition: DefinitionV2; + required: boolean; + value: string | boolean | string[]; } const DEFAULT_URL = 'https://gitlab.com'; diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/GithubAuthenticationTab.tsx b/server/sonar-web/src/main/js/apps/settings/components/authentication/GithubAuthenticationTab.tsx index 99b3caffb8d..e670aa781b3 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/authentication/GithubAuthenticationTab.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/GithubAuthenticationTab.tsx @@ -53,8 +53,8 @@ import useGithubConfiguration, { } from './hook/useGithubConfiguration'; interface GithubAuthenticationProps { - definitions: ExtendedSettingDefinition[]; currentTab: AuthenticationTabs; + definitions: ExtendedSettingDefinition[]; } const GITHUB_EXCLUDED_FIELD = ['sonar.auth.github.enabled', ...GITHUB_ADDITIONAL_FIELDS]; diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/ProvisioningSection.tsx b/server/sonar-web/src/main/js/apps/settings/components/authentication/ProvisioningSection.tsx index ce0c4fd037f..1d86f614874 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/authentication/ProvisioningSection.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/ProvisioningSection.tsx @@ -31,27 +31,27 @@ import { translate } from '../../../../helpers/l10n'; import { ProvisioningType } from '../../../../types/provisioning'; interface Props { - isLoading?: boolean; - provisioningType: ProvisioningType; - onChangeProvisioningType: (val: ProvisioningType) => void; - disabledConfigText: string; - jitTitle: string; - jitDescription: string | ReactElement; - jitSettings?: ReactElement; - autoTitle: string; autoDescription: ReactElement; - synchronizationDetails?: ReactElement; - autoSettings?: ReactElement; - hasFeatureEnabled: boolean; - hasDifferentProvider: boolean; autoFeatureDisabledText: string | ReactElement; - onSave: (e: FormEvent) => void; - onSyncNow?: () => void; - onCancel: () => void; - hasUnsavedChanges: boolean; + autoSettings?: ReactElement; + autoTitle: string; canSave?: boolean; canSync?: boolean; + disabledConfigText: string; enabled: boolean; + hasDifferentProvider: boolean; + hasFeatureEnabled: boolean; + hasUnsavedChanges: boolean; + isLoading?: boolean; + jitDescription: string | ReactElement; + jitSettings?: ReactElement; + jitTitle: string; + onCancel: () => void; + onChangeProvisioningType: (val: ProvisioningType) => void; + onSave: (e: FormEvent) => void; + onSyncNow?: () => void; + provisioningType: ProvisioningType; + synchronizationDetails?: ReactElement; } export default function ProvisioningSection(props: Readonly) { diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/TabHeader.tsx b/server/sonar-web/src/main/js/apps/settings/components/authentication/TabHeader.tsx index 5b9daefc18b..44dcf633d15 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/authentication/TabHeader.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/TabHeader.tsx @@ -22,10 +22,10 @@ import React, { ReactElement } from 'react'; import { translate } from '../../../../helpers/l10n'; interface Props { - title: string; - showCreate: boolean; - onCreate: () => void; configurationValidity?: ReactElement; + onCreate: () => void; + showCreate: boolean; + title: string; } export default function TabHeader({ diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/TestConfiguration.tsx b/server/sonar-web/src/main/js/apps/settings/components/authentication/TestConfiguration.tsx index 91bbc077412..18ced49b36a 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/authentication/TestConfiguration.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/TestConfiguration.tsx @@ -25,11 +25,11 @@ import { translate } from '../../../../helpers/l10n'; const intlPrefix = 'settings.authentication.configuration'; interface Props { - loading: boolean; - onTestConf: () => void; - flagMessageVariant: Variant; flagMessageContent: React.ReactNode; flagMessageTitle: string; + flagMessageVariant: Variant; + loading: boolean; + onTestConf: () => void; } export default function GitLabConfigurationValidity(props: Readonly) { diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/hook/useConfiguration.ts b/server/sonar-web/src/main/js/apps/settings/components/authentication/hook/useConfiguration.ts index edd550dc35c..c9d835f057a 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/authentication/hook/useConfiguration.ts +++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/hook/useConfiguration.ts @@ -26,22 +26,22 @@ import { Dict } from '../../../../../types/types'; export type SettingValue = | { + definition: ExtendedSettingDefinition; + isNotSet: boolean; key: string; - multiValues: false; mandatory: boolean; - isNotSet: boolean; - value?: string; + multiValues: false; newValue?: string | boolean; - definition: ExtendedSettingDefinition; + value?: string; } | { + definition: ExtendedSettingDefinition; + isNotSet: boolean; key: string; - multiValues: true; mandatory: boolean; - isNotSet: boolean; - value?: string[]; + multiValues: true; newValue?: string[]; - definition: ExtendedSettingDefinition; + value?: string[]; }; export default function useConfiguration( diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/hook/useGithubConfiguration.ts b/server/sonar-web/src/main/js/apps/settings/components/authentication/hook/useGithubConfiguration.ts index 6890c9c8e0c..4593b87f7d2 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/authentication/hook/useGithubConfiguration.ts +++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/hook/useGithubConfiguration.ts @@ -49,12 +49,12 @@ export const OPTIONAL_FIELDS = [ ]; export interface SamlSettingValue { + definition: ExtendedSettingDefinition; + isNotSet: boolean; key: string; mandatory: boolean; - isNotSet: boolean; - value?: string; newValue?: string | boolean; - definition: ExtendedSettingDefinition; + value?: string; } export const isOrganizationListEmpty = (values: Record) => diff --git a/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/AlmSpecificForm.tsx b/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/AlmSpecificForm.tsx index 80b4f8caeb5..d33e8defbb0 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/AlmSpecificForm.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/AlmSpecificForm.tsx @@ -38,8 +38,8 @@ import { Dict } from '../../../../types/types'; export interface AlmSpecificFormProps extends WithAvailableFeaturesProps { alm: AlmKeys; - instances: AlmSettingsInstance[]; formData: Omit; + instances: AlmSettingsInstance[]; onFieldChange: (id: keyof ProjectAlmBindingResponse, value: string | boolean) => void; } @@ -50,8 +50,8 @@ interface LabelProps { interface CommonFieldProps extends LabelProps { help?: boolean; - helpParams?: Dict; helpExample?: JSX.Element; + helpParams?: Dict; onFieldChange: (id: keyof ProjectAlmBindingResponse, value: string | boolean) => void; propKey: keyof ProjectAlmBindingResponse; } @@ -103,8 +103,8 @@ function renderLabel(props: LabelProps) { function renderBooleanField( props: Omit & { - value: boolean; inputExtra?: React.ReactNode; + value: boolean; }, ) { const { id, value, onFieldChange, propKey, inputExtra } = props; diff --git a/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/PRDecorationBinding.tsx b/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/PRDecorationBinding.tsx index a56bf2fcb1a..a5054de5ee8 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/PRDecorationBinding.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/PRDecorationBinding.tsx @@ -46,6 +46,8 @@ interface Props { } interface State { + checkingConfiguration: boolean; + configurationErrors?: ProjectAlmBindingConfigurationErrors; formData: FormData; instances: AlmSettingsInstance[]; isChanged: boolean; @@ -53,10 +55,8 @@ interface State { isValid: boolean; loading: boolean; originalData?: FormData; - updating: boolean; successfullyUpdated: boolean; - checkingConfiguration: boolean; - configurationErrors?: ProjectAlmBindingConfigurationErrors; + updating: boolean; } const REQUIRED_FIELDS_BY_ALM: { diff --git a/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/PRDecorationBindingRenderer.tsx b/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/PRDecorationBindingRenderer.tsx index 47e215da6fd..28a1093d711 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/PRDecorationBindingRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/PRDecorationBindingRenderer.tsx @@ -45,21 +45,21 @@ import { ALM_INTEGRATION_CATEGORY } from '../../constants'; import AlmSpecificForm from './AlmSpecificForm'; export interface PRDecorationBindingRendererProps { + checkingConfiguration: boolean; + configurationErrors?: ProjectAlmBindingConfigurationErrors; formData: Omit; instances: AlmSettingsInstance[]; isChanged: boolean; isConfigured: boolean; + isSysAdmin: boolean; isValid: boolean; loading: boolean; + onCheckConfiguration: () => void; onFieldChange: (id: keyof ProjectAlmBindingResponse, value: string | boolean) => void; onReset: () => void; onSubmit: () => void; - updating: boolean; successfullyUpdated: boolean; - onCheckConfiguration: () => void; - checkingConfiguration: boolean; - configurationErrors?: ProjectAlmBindingConfigurationErrors; - isSysAdmin: boolean; + updating: boolean; } export default function PRDecorationBindingRenderer(props: PRDecorationBindingRendererProps) { diff --git a/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/__tests__/PRDecorationBinding-it.tsx b/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/__tests__/PRDecorationBinding-it.tsx index b698dc4b9cc..22abab10298 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/__tests__/PRDecorationBinding-it.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/__tests__/PRDecorationBinding-it.tsx @@ -87,7 +87,7 @@ it.each([ }, ])( 'should get, set, delete and validate binding for $alm', - async ({ key, alm }: { key: string; alm: AlmKeys }) => { + async ({ key, alm }: { alm: AlmKeys; key: string }) => { const { ui, user } = getPageObjects(); almSettings.setProjectBindingConfigurationErrors({ scope: ProjectAlmBindingConfigurationErrorScope.Global, diff --git a/server/sonar-web/src/main/js/apps/settings/utils.ts b/server/sonar-web/src/main/js/apps/settings/utils.ts index d23d290e956..538c0dceae8 100644 --- a/server/sonar-web/src/main/js/apps/settings/utils.ts +++ b/server/sonar-web/src/main/js/apps/settings/utils.ts @@ -37,8 +37,8 @@ import { Component, Dict } from '../../types/types'; export const DEFAULT_CATEGORY = 'general'; export type DefaultSpecializedInputProps = DefaultInputProps & { - className?: string; autoComplete?: string; + className?: string; isDefault: boolean; name: string; type?: string; @@ -46,15 +46,15 @@ export type DefaultSpecializedInputProps = DefaultInputProps & { export interface DefaultInputProps { autoFocus?: boolean; + hasValueChanged?: boolean; isEditing?: boolean; isInvalid?: boolean; - size?: InputSizeKeys; - hasValueChanged?: boolean; onCancel?: () => void; onChange: (value: any) => void; onEditing?: () => void; onSave?: () => void; setting: Setting; + size?: InputSizeKeys; value: any; } diff --git a/server/sonar-web/src/main/js/apps/system/components/PageHeader.tsx b/server/sonar-web/src/main/js/apps/system/components/PageHeader.tsx index a3b75cbf96d..a9e10bea8af 100644 --- a/server/sonar-web/src/main/js/apps/system/components/PageHeader.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/PageHeader.tsx @@ -28,11 +28,11 @@ import { AppState } from '../../../types/appstate'; import PageActions from './PageActions'; export interface Props { + appState: AppState; isCluster: boolean; loading: boolean; logLevel: string; onLogLevelChange: () => void; - appState: AppState; serverId?: string; version?: string; } diff --git a/server/sonar-web/src/main/js/apps/system/components/info-items/HealthCard.tsx b/server/sonar-web/src/main/js/apps/system/components/info-items/HealthCard.tsx index 73551380dc5..ad723d90ffc 100644 --- a/server/sonar-web/src/main/js/apps/system/components/info-items/HealthCard.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/info-items/HealthCard.tsx @@ -29,9 +29,9 @@ import Section from './Section'; interface Props { health?: HealthTypes; healthCauses?: string[]; + name: string; onClick: (toggledCard: string) => void; open: boolean; - name: string; sysInfoData: SysInfoValueObject; } diff --git a/server/sonar-web/src/main/js/apps/system/components/info-items/HealthItem.tsx b/server/sonar-web/src/main/js/apps/system/components/info-items/HealthItem.tsx index 9b1988e7fab..5b6ffb280e7 100644 --- a/server/sonar-web/src/main/js/apps/system/components/info-items/HealthItem.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/info-items/HealthItem.tsx @@ -26,10 +26,10 @@ import { HealthTypes } from '../../../../types/types'; import HealthCauseItem from './HealthCauseItem'; interface Props { - name?: string; className?: string; health: HealthTypes; healthCauses?: string[]; + name?: string; } export default function HealthItem({ className, name, health, healthCauses }: Readonly) { diff --git a/server/sonar-web/src/main/js/apps/system/components/info-items/Section.tsx b/server/sonar-web/src/main/js/apps/system/components/info-items/Section.tsx index 6c333478732..331249eba2c 100644 --- a/server/sonar-web/src/main/js/apps/system/components/info-items/Section.tsx +++ b/server/sonar-web/src/main/js/apps/system/components/info-items/Section.tsx @@ -24,8 +24,8 @@ import { SysInfoValueObject } from '../../../../types/types'; import SysInfoItem from './SysInfoItem'; interface Props { - name?: string; items: SysInfoValueObject; + name?: string; } const COLUMNS = ['0', 'auto']; diff --git a/server/sonar-web/src/main/js/apps/users/UsersList.tsx b/server/sonar-web/src/main/js/apps/users/UsersList.tsx index 40178bb16e0..05f957b3325 100644 --- a/server/sonar-web/src/main/js/apps/users/UsersList.tsx +++ b/server/sonar-web/src/main/js/apps/users/UsersList.tsx @@ -27,8 +27,8 @@ import UserListItem from './components/UserListItem'; interface Props { identityProviders: IdentityProvider[]; - users: RestUserDetailed[]; manageProvider: Provider | undefined; + users: RestUserDetailed[]; } export default function UsersList({ identityProviders, users, manageProvider }: Props) { diff --git a/server/sonar-web/src/main/js/apps/users/components/TokensForm.tsx b/server/sonar-web/src/main/js/apps/users/components/TokensForm.tsx index ff745df2e81..1fd491db24f 100644 --- a/server/sonar-web/src/main/js/apps/users/components/TokensForm.tsx +++ b/server/sonar-web/src/main/js/apps/users/components/TokensForm.tsx @@ -71,7 +71,7 @@ export function TokensForm(props: Readonly) { ); const [tokenExpirationOptions, setTokenExpirationOptions] = - React.useState<{ value: TokenExpiration; label: string }[]>(EXPIRATION_OPTIONS); + React.useState<{ label: string; value: TokenExpiration }[]>(EXPIRATION_OPTIONS); const { mutateAsync: generate, isPending: generating } = useGenerateTokenMutation(); diff --git a/server/sonar-web/src/main/js/apps/users/components/TokensFormModal.tsx b/server/sonar-web/src/main/js/apps/users/components/TokensFormModal.tsx index 0b0bdcb5702..5404d2b3393 100644 --- a/server/sonar-web/src/main/js/apps/users/components/TokensFormModal.tsx +++ b/server/sonar-web/src/main/js/apps/users/components/TokensFormModal.tsx @@ -26,8 +26,8 @@ import { RestUserDetailed } from '../../../types/users'; import TokensForm from './TokensForm'; interface Props { - user: RestUserDetailed; onClose: () => void; + user: RestUserDetailed; } export default function TokensFormModal(props: Readonly) { diff --git a/server/sonar-web/src/main/js/apps/users/components/UserActions.tsx b/server/sonar-web/src/main/js/apps/users/components/UserActions.tsx index 2bac4faced2..59a775528c1 100644 --- a/server/sonar-web/src/main/js/apps/users/components/UserActions.tsx +++ b/server/sonar-web/src/main/js/apps/users/components/UserActions.tsx @@ -34,8 +34,8 @@ import PasswordForm from './PasswordForm'; import UserForm from './UserForm'; interface Props { - user: RestUserDetailed; manageProvider: Provider | undefined; + user: RestUserDetailed; } export default function UserActions(props: Props) { diff --git a/server/sonar-web/src/main/js/apps/users/components/UserForm.tsx b/server/sonar-web/src/main/js/apps/users/components/UserForm.tsx index 8fd2f938a46..408bf512da0 100644 --- a/server/sonar-web/src/main/js/apps/users/components/UserForm.tsx +++ b/server/sonar-web/src/main/js/apps/users/components/UserForm.tsx @@ -38,9 +38,9 @@ import { RestUserDetailed } from '../../../types/users'; import UserScmAccountInput from './UserScmAccountInput'; export interface Props { + isInstanceManaged: boolean; onClose: () => void; user?: RestUserDetailed; - isInstanceManaged: boolean; } const BAD_REQUEST = 400; diff --git a/server/sonar-web/src/main/js/apps/users/components/UserListItem.tsx b/server/sonar-web/src/main/js/apps/users/components/UserListItem.tsx index c3f434223a0..9d8855acb15 100644 --- a/server/sonar-web/src/main/js/apps/users/components/UserListItem.tsx +++ b/server/sonar-web/src/main/js/apps/users/components/UserListItem.tsx @@ -34,8 +34,8 @@ import UserScmAccounts from './UserScmAccounts'; export interface UserListItemProps { identityProvider?: IdentityProvider; - user: RestUserDetailed; manageProvider: Provider | undefined; + user: RestUserDetailed; } export default function UserListItem(props: Readonly) { diff --git a/server/sonar-web/src/main/js/apps/users/components/UserListItemIdentity.tsx b/server/sonar-web/src/main/js/apps/users/components/UserListItemIdentity.tsx index ce64e3bae55..8d96b903376 100644 --- a/server/sonar-web/src/main/js/apps/users/components/UserListItemIdentity.tsx +++ b/server/sonar-web/src/main/js/apps/users/components/UserListItemIdentity.tsx @@ -29,8 +29,8 @@ import { RestUserDetailed } from '../../../types/users'; export interface Props { identityProvider?: IdentityProvider; - user: RestUserDetailed; manageProvider: Provider | undefined; + user: RestUserDetailed; } export default function UserListItemIdentity({ identityProvider, user, manageProvider }: Props) { diff --git a/server/sonar-web/src/main/js/apps/users/components/UserScmAccountInput.tsx b/server/sonar-web/src/main/js/apps/users/components/UserScmAccountInput.tsx index 0b09928f069..6f2fa92b800 100644 --- a/server/sonar-web/src/main/js/apps/users/components/UserScmAccountInput.tsx +++ b/server/sonar-web/src/main/js/apps/users/components/UserScmAccountInput.tsx @@ -23,9 +23,9 @@ import { translate, translateWithParameters } from '../../../helpers/l10n'; export interface Props { idx: number; - scmAccount: string; onChange: (idx: number, scmAccount: string) => void; onRemove: (idx: number) => void; + scmAccount: string; } export default function UserScmAccountInput(props: Props) { diff --git a/server/sonar-web/src/main/js/apps/users/utils.ts b/server/sonar-web/src/main/js/apps/users/utils.ts index 419131862f5..afd3d42e8f3 100644 --- a/server/sonar-web/src/main/js/apps/users/utils.ts +++ b/server/sonar-web/src/main/js/apps/users/utils.ts @@ -22,8 +22,8 @@ import { RawQuery } from '~sonar-aligned/types/router'; import { cleanQuery, parseAsString, serializeString } from '../../helpers/query'; export interface Query { - search: string; managed?: boolean; + search: string; } export const parseQuery = memoize( diff --git a/server/sonar-web/src/main/js/apps/web-api-v2/components/ApiFilterContext.tsx b/server/sonar-web/src/main/js/apps/web-api-v2/components/ApiFilterContext.tsx index 15ee749833a..01f90af23b7 100644 --- a/server/sonar-web/src/main/js/apps/web-api-v2/components/ApiFilterContext.tsx +++ b/server/sonar-web/src/main/js/apps/web-api-v2/components/ApiFilterContext.tsx @@ -20,8 +20,8 @@ import { Dispatch, SetStateAction, createContext } from 'react'; const ApiFilterContext = createContext<{ - showInternal: boolean; setShowInternal: Dispatch>; + showInternal: boolean; }>({ showInternal: false, setShowInternal: () => {}, diff --git a/server/sonar-web/src/main/js/apps/web-api-v2/components/ApiInformation.tsx b/server/sonar-web/src/main/js/apps/web-api-v2/components/ApiInformation.tsx index d6da453d68e..8ce64e9b22d 100644 --- a/server/sonar-web/src/main/js/apps/web-api-v2/components/ApiInformation.tsx +++ b/server/sonar-web/src/main/js/apps/web-api-v2/components/ApiInformation.tsx @@ -28,10 +28,10 @@ import ApiResponses from './ApiResponses'; import RestMethodPill from './RestMethodPill'; interface Props { - data: ExcludeReferences>; apiUrl: string; - name: string; + data: ExcludeReferences>; method: string; + name: string; } export default function ApiInformation({ name, data, method, apiUrl }: Readonly) { diff --git a/server/sonar-web/src/main/js/apps/web-api/components/Search.tsx b/server/sonar-web/src/main/js/apps/web-api/components/Search.tsx index 9cb06472608..64c2948f6d0 100644 --- a/server/sonar-web/src/main/js/apps/web-api/components/Search.tsx +++ b/server/sonar-web/src/main/js/apps/web-api/components/Search.tsx @@ -24,10 +24,10 @@ import { translate } from '../../../helpers/l10n'; import { Query } from '../utils'; interface Props { - query: Query; onSearch: (search: string) => void; - onToggleInternal: () => void; onToggleDeprecated: () => void; + onToggleInternal: () => void; + query: Query; } export default function Search(props: Props) { diff --git a/server/sonar-web/src/main/js/apps/web-api/components/WebApiApp.tsx b/server/sonar-web/src/main/js/apps/web-api/components/WebApiApp.tsx index 6ee0e211f05..44679081db0 100644 --- a/server/sonar-web/src/main/js/apps/web-api/components/WebApiApp.tsx +++ b/server/sonar-web/src/main/js/apps/web-api/components/WebApiApp.tsx @@ -203,7 +203,7 @@ export class WebApiApp extends React.PureComponent { } } -function WebApiAppWithParams(props: { router: Router; location: Location }) { +function WebApiAppWithParams(props: { location: Location; router: Router }) { const params = useParams(); return ; diff --git a/server/sonar-web/src/main/js/apps/web-api/utils.ts b/server/sonar-web/src/main/js/apps/web-api/utils.ts index 63fb68f4b3f..5a0c87e2e80 100644 --- a/server/sonar-web/src/main/js/apps/web-api/utils.ts +++ b/server/sonar-web/src/main/js/apps/web-api/utils.ts @@ -28,9 +28,9 @@ import { import { WebApi } from '../../types/types'; export interface Query { - search: string; deprecated: boolean; internal: boolean; + search: string; } export function actionsFilter(query: Query, domain: WebApi.Domain, action: WebApi.Action) { diff --git a/server/sonar-web/src/main/js/apps/webhooks/components/App.tsx b/server/sonar-web/src/main/js/apps/webhooks/components/App.tsx index 30065446856..6c9827abee7 100644 --- a/server/sonar-web/src/main/js/apps/webhooks/components/App.tsx +++ b/server/sonar-web/src/main/js/apps/webhooks/components/App.tsx @@ -79,10 +79,10 @@ export function App({ component }: AppProps) { } async function handleUpdate(data: { - webhook: string; name: string; secret?: string; url: string; + webhook: string; }) { await updateWebhook({ ...data }); setWebhooks((webhooks) => diff --git a/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/App-it.tsx b/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/App-it.tsx index 71e222bb722..afd67cec2ef 100644 --- a/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/App-it.tsx +++ b/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/App-it.tsx @@ -295,7 +295,7 @@ function getPageObject() { }, checkWebhookRow: ( index: number, - expected: { name: string; url: string; secret: boolean; lastDeliveryDate?: string }, + expected: { lastDeliveryDate?: string; name: string; secret: boolean; url: string }, ) => { const row = ui.getWebhookRow(index); const [name, url, secret, lastDelivery] = within(row).getAllByRole('cell'); diff --git a/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerCode.tsx b/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerCode.tsx index be701bad8bb..9243f006f31 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerCode.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/SourceViewerCode.tsx @@ -69,17 +69,17 @@ interface Props { issues: Issue[] | undefined; issuesByLine: { [line: number]: Issue[] }; loadDuplications: (line: SourceLine) => void; - loadingSourcesAfter: boolean; - loadingSourcesBefore: boolean; loadSourcesAfter: () => void; loadSourcesBefore: () => void; + loadingSourcesAfter: boolean; + loadingSourcesBefore: boolean; metricKey?: string; onIssueChange: (issue: Issue) => void; onIssuePopupToggle: (issue: string, popupName: string, open?: boolean) => void; - onIssuesClose: (line: SourceLine) => void; onIssueSelect: (issueKey: string) => void; - onIssuesOpen: (line: SourceLine) => void; onIssueUnselect: () => void; + onIssuesClose: (line: SourceLine) => void; + onIssuesOpen: (line: SourceLine) => void; onLocationSelect: ((index: number) => void) | undefined; onSymbolClick: (symbols: string[]) => void; openIssuesByLine: { [line: number]: boolean }; diff --git a/server/sonar-web/src/main/js/components/SourceViewer/components/DuplicationPopup.tsx b/server/sonar-web/src/main/js/components/SourceViewer/components/DuplicationPopup.tsx index 0258c42c04a..98dbcb80733 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/components/DuplicationPopup.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/components/DuplicationPopup.tsx @@ -39,8 +39,8 @@ interface Props { blocks: DuplicationBlock[]; branchLike: BranchLike | undefined; duplicatedFiles?: Dict; - inRemovedComponent: boolean; duplicationHeader: string; + inRemovedComponent: boolean; openComponent: WorkspaceContextShape['openComponent']; sourceViewerFile: SourceViewerFile; } diff --git a/server/sonar-web/src/main/js/components/SourceViewer/components/Line.tsx b/server/sonar-web/src/main/js/components/SourceViewer/components/Line.tsx index 8612925d3cc..93fb8144315 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/components/Line.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/components/Line.tsx @@ -36,14 +36,17 @@ export interface LineProps { children?: React.ReactNode; displayAllIssues?: boolean; displayCoverage: boolean; + displayCoverageUnderline: boolean; displayDuplications: boolean; displayIssues: boolean; displayLineNumberOptions?: boolean; displayLocationMarkers?: boolean; + displayNewCodeUnderline: boolean; displaySCM?: boolean; duplications: number[]; duplicationsCount: number; firstLineNumber: number; + hideLocationIndex?: boolean; highlighted: boolean; highlightedLocationMessage: { index: number; text: string | undefined } | undefined; highlightedSymbols: string[] | undefined; @@ -51,10 +54,12 @@ export interface LineProps { issues: Issue[]; line: SourceLine; loadDuplications: (line: SourceLine) => void; - onIssuesClose: (line: SourceLine) => void; onIssueSelect: (issueKey: string) => void; - onIssuesOpen: (line: SourceLine) => void; onIssueUnselect: () => void; + onIssuesClose: (line: SourceLine) => void; + onIssuesOpen: (line: SourceLine) => void; + onLineMouseEnter: (line: number) => void; + onLineMouseLeave: (line: number) => void; onLocationSelect: ((x: number) => void) | undefined; onSymbolClick: (symbols: string[]) => void; openIssues: boolean; @@ -62,11 +67,6 @@ export interface LineProps { renderDuplicationPopup: (index: number, line: number) => React.ReactNode; scrollToUncoveredLine?: boolean; secondaryIssueLocations: LinearIssueLocation[]; - onLineMouseEnter: (line: number) => void; - onLineMouseLeave: (line: number) => void; - displayCoverageUnderline: boolean; - displayNewCodeUnderline: boolean; - hideLocationIndex?: boolean; } export default function Line(props: LineProps) { diff --git a/server/sonar-web/src/main/js/components/SourceViewer/components/LineIssuesList.tsx b/server/sonar-web/src/main/js/components/SourceViewer/components/LineIssuesList.tsx index 87d2428dde8..492d6313156 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/components/LineIssuesList.tsx +++ b/server/sonar-web/src/main/js/components/SourceViewer/components/LineIssuesList.tsx @@ -26,9 +26,9 @@ export interface LineIssuesListProps { branchLike: BranchLike | undefined; displayAllIssues?: boolean; displayWhyIsThisAnIssue: boolean; - issuesForLine: TypeIssue[]; - issuePopup: { issue: string; name: string } | undefined; issueLocationsByLine: { [line: number]: LinearIssueLocation[] }; + issuePopup: { issue: string; name: string } | undefined; + issuesForLine: TypeIssue[]; line: SourceLine; onIssueChange: (issue: TypeIssue) => void; onIssueClick: (issueKey: string) => void; diff --git a/server/sonar-web/src/main/js/components/activity-graph/DataTableModal.tsx b/server/sonar-web/src/main/js/components/activity-graph/DataTableModal.tsx index dc233d43156..8519a9ccb7c 100644 --- a/server/sonar-web/src/main/js/components/activity-graph/DataTableModal.tsx +++ b/server/sonar-web/src/main/js/components/activity-graph/DataTableModal.tsx @@ -34,8 +34,8 @@ export interface DataTableModalProps { analyses: ParsedAnalysis[]; graphEndDate?: Date; graphStartDate?: Date; - series: Serie[]; onClose: () => void; + series: Serie[]; } type DataTableEntry = { date: Date } & { [x: string]: string | undefined }; diff --git a/server/sonar-web/src/main/js/components/activity-graph/DefinitionChangeEventInner.tsx b/server/sonar-web/src/main/js/components/activity-graph/DefinitionChangeEventInner.tsx index 64b5b6b3ed7..363e77fd65f 100644 --- a/server/sonar-web/src/main/js/components/activity-graph/DefinitionChangeEventInner.tsx +++ b/server/sonar-web/src/main/js/components/activity-graph/DefinitionChangeEventInner.tsx @@ -78,10 +78,10 @@ export class DefinitionChangeEventInner extends React.PureComponent void; - showAreas: boolean; - series: Serie[]; selectedDate?: Date; - graphDescription: string; + series: Serie[]; + showAreas: boolean; updateGraphZoom?: (from?: Date, to?: Date) => void; updateSelectedDate?: (selectedDate?: Date) => void; updateTooltip: (selectedDate?: Date) => void; diff --git a/server/sonar-web/src/main/js/components/activity-graph/GraphsHeader.tsx b/server/sonar-web/src/main/js/components/activity-graph/GraphsHeader.tsx index 4aa49ca4b3f..2997e847dd8 100644 --- a/server/sonar-web/src/main/js/components/activity-graph/GraphsHeader.tsx +++ b/server/sonar-web/src/main/js/components/activity-graph/GraphsHeader.tsx @@ -34,14 +34,14 @@ import AddGraphMetric from './AddGraphMetric'; import { getGraphTypes, isCustomGraph } from './utils'; interface Props { - onAddCustomMetric?: (metric: string) => void; className?: string; - onRemoveCustomMetric?: (metric: string) => void; graph: GraphType; metrics: Metric[]; metricsTypeFilter?: string[]; - selectedMetrics?: string[]; + onAddCustomMetric?: (metric: string) => void; + onRemoveCustomMetric?: (metric: string) => void; onUpdateGraph: (graphType: string) => void; + selectedMetrics?: string[]; } export default function GraphsHeader(props: Props) { diff --git a/server/sonar-web/src/main/js/components/activity-graph/GraphsHistory.tsx b/server/sonar-web/src/main/js/components/activity-graph/GraphsHistory.tsx index 9b51e8a5c14..5bf2137e1d8 100644 --- a/server/sonar-web/src/main/js/components/activity-graph/GraphsHistory.tsx +++ b/server/sonar-web/src/main/js/components/activity-graph/GraphsHistory.tsx @@ -30,9 +30,9 @@ interface Props { ariaLabel?: string; canShowDataAsTable?: boolean; graph: GraphType; - graphs: Serie[][]; graphEndDate?: Date; graphStartDate?: Date; + graphs: Serie[][]; leakPeriodDate?: Date; loading: boolean; measuresHistory: MeasureHistory[]; diff --git a/server/sonar-web/src/main/js/components/activity-graph/GraphsLegendItem.tsx b/server/sonar-web/src/main/js/components/activity-graph/GraphsLegendItem.tsx index 239a868a50d..a701dff7596 100644 --- a/server/sonar-web/src/main/js/components/activity-graph/GraphsLegendItem.tsx +++ b/server/sonar-web/src/main/js/components/activity-graph/GraphsLegendItem.tsx @@ -43,8 +43,8 @@ interface Props { index: number; metric: string; name: string; - showWarning?: boolean; removeMetric?: (metric: string) => void; + showWarning?: boolean; } export function GraphsLegendItem({ diff --git a/server/sonar-web/src/main/js/components/activity-graph/GraphsTooltipsContent.tsx b/server/sonar-web/src/main/js/components/activity-graph/GraphsTooltipsContent.tsx index 8617d043ed5..10386c772c7 100644 --- a/server/sonar-web/src/main/js/components/activity-graph/GraphsTooltipsContent.tsx +++ b/server/sonar-web/src/main/js/components/activity-graph/GraphsTooltipsContent.tsx @@ -21,8 +21,8 @@ import * as React from 'react'; import { ChartLegend } from './ChartLegend'; interface Props { - name: string; index: number; + name: string; translatedName: string; value: string; } diff --git a/server/sonar-web/src/main/js/components/activity-graph/GraphsZoom.tsx b/server/sonar-web/src/main/js/components/activity-graph/GraphsZoom.tsx index c6efe9cb35d..d702f3ebd11 100644 --- a/server/sonar-web/src/main/js/components/activity-graph/GraphsZoom.tsx +++ b/server/sonar-web/src/main/js/components/activity-graph/GraphsZoom.tsx @@ -29,9 +29,9 @@ interface GraphsZoomProps { leakPeriodDate?: Date; loading: boolean; metricsType: string; + onUpdateGraphZoom: (from?: Date, to?: Date) => void; series: Serie[]; showAreas?: boolean; - onUpdateGraphZoom: (from?: Date, to?: Date) => void; } const ZOOM_TIMELINE_PADDING_TOP = 0; diff --git a/server/sonar-web/src/main/js/components/activity-graph/utils.ts b/server/sonar-web/src/main/js/components/activity-graph/utils.ts index 2f769d4e58b..54dbc17e42c 100644 --- a/server/sonar-web/src/main/js/components/activity-graph/utils.ts +++ b/server/sonar-web/src/main/js/components/activity-graph/utils.ts @@ -175,7 +175,7 @@ export function saveActivityGraph( export function getActivityGraph( namespace: string, project: string, -): { graph: GraphType; customGraphs: string[] } { +): { customGraphs: string[]; graph: GraphType } { const customGraphs = get(`${namespace}.custom`, project); return { diff --git a/server/sonar-web/src/main/js/components/charts/AdvancedTimeline.tsx b/server/sonar-web/src/main/js/components/charts/AdvancedTimeline.tsx index 0c9bc7a15a0..d53df833e7b 100644 --- a/server/sonar-web/src/main/js/components/charts/AdvancedTimeline.tsx +++ b/server/sonar-web/src/main/js/components/charts/AdvancedTimeline.tsx @@ -41,15 +41,14 @@ import './AdvancedTimeline.css'; import './LineChart.css'; export interface PropsWithoutTheme { - graphDescription?: string; basisCurve?: boolean; - endDate?: Date; disableZoom?: boolean; + endDate?: Date; formatYTick?: (tick: number | string) => string; + graphDescription?: string; + height: number; hideGrid?: boolean; hideXAxis?: boolean; - height: number; - width: number; leakPeriodDate?: Date; // used to avoid same y ticks labels maxYTicksCount?: number; @@ -62,6 +61,7 @@ export interface PropsWithoutTheme { updateSelectedDate?: (selectedDate?: Date) => void; updateTooltip?: (selectedDate?: Date, tooltipXPos?: number, tooltipIdx?: number) => void; updateZoom?: (start?: Date, endDate?: Date) => void; + width: number; zoomSpeed?: number; } @@ -79,10 +79,10 @@ interface State { maxXRange: number[]; mouseOver?: boolean; selectedDate?: Date; - selectedDateXPos?: number; selectedDateIdx?: number; - yScale: YScale; + selectedDateXPos?: number; xScale: XScale; + yScale: YScale; } export class AdvancedTimelineClass extends React.PureComponent { diff --git a/server/sonar-web/src/main/js/components/charts/ColorGradientLegend.tsx b/server/sonar-web/src/main/js/components/charts/ColorGradientLegend.tsx index 139442b5c52..a5747967937 100644 --- a/server/sonar-web/src/main/js/components/charts/ColorGradientLegend.tsx +++ b/server/sonar-web/src/main/js/components/charts/ColorGradientLegend.tsx @@ -26,9 +26,10 @@ interface Props { className?: string; colorScale: | ScaleOrdinal // used for LEVEL type - | ScaleLinear; // used for RATING or PERCENT type - naColors?: [CSSColor, CSSColor]; + | ScaleLinear; height: number; + // used for RATING or PERCENT type + naColors?: [CSSColor, CSSColor]; padding?: [number, number, number, number]; showColorNA?: boolean; width: number; diff --git a/server/sonar-web/src/main/js/components/charts/ZoomTimeLine.tsx b/server/sonar-web/src/main/js/components/charts/ZoomTimeLine.tsx index d4a023a7239..ddf8eee8e4e 100644 --- a/server/sonar-web/src/main/js/components/charts/ZoomTimeLine.tsx +++ b/server/sonar-web/src/main/js/components/charts/ZoomTimeLine.tsx @@ -46,8 +46,8 @@ export interface Props { export type PropsWithDefaults = Props & typeof ZoomTimeLine.defaultProps; interface State { - overlayLeftPos?: number; newZoomStart?: number; + overlayLeftPos?: number; } type XScale = ScaleTime; @@ -246,12 +246,12 @@ export class ZoomTimeLine extends React.PureComponent { }; renderZoomHandle = (options: { - xScale: XScale; - xPos: number; + direction: string; fixedPos: number; - yDim: number[]; xDim: number[]; - direction: string; + xPos: number; + xScale: XScale; + yDim: number[]; }) => ( React.ReactNode; + disabledReason?: string; + option: { isDisabled?: boolean; label?: string; value?: string | number | boolean }; } export default function DisableableSelectOption(props: DisableableSelectOptionProps) { diff --git a/server/sonar-web/src/main/js/components/common/DocumentationLink.tsx b/server/sonar-web/src/main/js/components/common/DocumentationLink.tsx index b6cdc6a26f8..1942843ef1f 100644 --- a/server/sonar-web/src/main/js/components/common/DocumentationLink.tsx +++ b/server/sonar-web/src/main/js/components/common/DocumentationLink.tsx @@ -23,7 +23,7 @@ import * as React from 'react'; import { DocLink } from '../../helpers/doc-links'; import { useDocUrl } from '../../helpers/docs'; -type Props = Omit & { to: DocLink; innerRef?: React.Ref }; +type Props = Omit & { innerRef?: React.Ref; to: DocLink }; export default function DocumentationLink({ to, innerRef, ...props }: Props) { const toStatic = useDocUrl(to); diff --git a/server/sonar-web/src/main/js/components/common/ScreenPositionHelper.tsx b/server/sonar-web/src/main/js/components/common/ScreenPositionHelper.tsx index 999082de042..e155cd1f508 100644 --- a/server/sonar-web/src/main/js/components/common/ScreenPositionHelper.tsx +++ b/server/sonar-web/src/main/js/components/common/ScreenPositionHelper.tsx @@ -21,8 +21,8 @@ import { debounce } from 'lodash'; import * as React from 'react'; interface Props { + children: (position: { left: number; top: number }) => React.ReactElement; className?: string; - children: (position: { top: number; left: number }) => React.ReactElement; } export const SCREEN_POSITION_COMPUTE_DELAY = 250; diff --git a/server/sonar-web/src/main/js/components/common/VisibilitySelector.tsx b/server/sonar-web/src/main/js/components/common/VisibilitySelector.tsx index 71c9b0e7242..ab68ccc44c1 100644 --- a/server/sonar-web/src/main/js/components/common/VisibilitySelector.tsx +++ b/server/sonar-web/src/main/js/components/common/VisibilitySelector.tsx @@ -26,10 +26,10 @@ import { translate } from '../../helpers/l10n'; export interface VisibilitySelectorProps { canTurnToPrivate?: boolean; className?: string; - onChange: (visibility: Visibility) => void; - visibility?: Visibility; disabled?: boolean; loading?: boolean; + onChange: (visibility: Visibility) => void; + visibility?: Visibility; } export default function VisibilitySelector(props: Readonly) { diff --git a/server/sonar-web/src/main/js/components/controls/ComponentReportActions.tsx b/server/sonar-web/src/main/js/components/controls/ComponentReportActions.tsx index b4877182d8d..661b6a255e4 100644 --- a/server/sonar-web/src/main/js/components/controls/ComponentReportActions.tsx +++ b/server/sonar-web/src/main/js/components/controls/ComponentReportActions.tsx @@ -38,8 +38,8 @@ import ComponentReportActionsRenderer from './ComponentReportActionsRenderer'; interface Props { appState: AppState; - component: Component; branch?: Branch; + component: Component; currentUser: CurrentUser; } diff --git a/server/sonar-web/src/main/js/components/controls/ComponentReportActionsRenderer.tsx b/server/sonar-web/src/main/js/components/controls/ComponentReportActionsRenderer.tsx index cb50c7fff82..222c3668d57 100644 --- a/server/sonar-web/src/main/js/components/controls/ComponentReportActionsRenderer.tsx +++ b/server/sonar-web/src/main/js/components/controls/ComponentReportActionsRenderer.tsx @@ -33,14 +33,14 @@ import { Branch } from '../../types/branch-like'; import { Component } from '../../types/types'; export interface ComponentReportActionsRendererProps { - component: Component; branch?: Branch; - frequency: string; - subscribed: boolean; canSubscribe: boolean; + component: Component; currentUserHasEmail: boolean; + frequency: string; handleSubscription: () => void; handleUnsubscription: () => void; + subscribed: boolean; } const getSubscriptionText = ({ diff --git a/server/sonar-web/src/main/js/components/controls/Favorite.tsx b/server/sonar-web/src/main/js/components/controls/Favorite.tsx index 07e81ed4619..c5f7941da77 100644 --- a/server/sonar-web/src/main/js/components/controls/Favorite.tsx +++ b/server/sonar-web/src/main/js/components/controls/Favorite.tsx @@ -28,8 +28,8 @@ interface Props { component: string; componentName?: string; favorite: boolean; - qualifier: string; handleFavorite?: (component: string, isFavorite: boolean) => void; + qualifier: string; } interface State { diff --git a/server/sonar-web/src/main/js/components/controls/FocusOutHandler.tsx b/server/sonar-web/src/main/js/components/controls/FocusOutHandler.tsx index 37423d03337..f1ba687b826 100644 --- a/server/sonar-web/src/main/js/components/controls/FocusOutHandler.tsx +++ b/server/sonar-web/src/main/js/components/controls/FocusOutHandler.tsx @@ -20,8 +20,8 @@ import * as React from 'react'; interface Props extends React.BaseHTMLAttributes { - onFocusOut: () => void; innerRef?: (instance: HTMLDivElement) => void; + onFocusOut: () => void; } export default class FocusOutHandler extends React.PureComponent> { diff --git a/server/sonar-web/src/main/js/components/controls/InputValidationField.tsx b/server/sonar-web/src/main/js/components/controls/InputValidationField.tsx index cdcc08970a6..de41934095f 100644 --- a/server/sonar-web/src/main/js/components/controls/InputValidationField.tsx +++ b/server/sonar-web/src/main/js/components/controls/InputValidationField.tsx @@ -34,10 +34,10 @@ interface Props { onBlur: (event: React.FocusEvent) => void; onChange: (event: React.ChangeEvent) => void; placeholder?: string; + required?: boolean; touched: boolean | undefined; type?: string; value: string; - required?: boolean; } export default function InputValidationField({ ...props }: Readonly) { diff --git a/server/sonar-web/src/main/js/components/controls/ListFooter.tsx b/server/sonar-web/src/main/js/components/controls/ListFooter.tsx index 8ba6e18feb6..ac622c08ca0 100644 --- a/server/sonar-web/src/main/js/components/controls/ListFooter.tsx +++ b/server/sonar-web/src/main/js/components/controls/ListFooter.tsx @@ -26,15 +26,15 @@ import { MetricType } from '~sonar-aligned/types/metrics'; import { translate, translateWithParameters } from '../../helpers/l10n'; export interface ListFooterProps { - loadMoreAriaLabel?: string; - count: number; className?: string; - loading?: boolean; + count: number; loadMore?: () => void; + loadMoreAriaLabel?: string; + loading?: boolean; needReload?: boolean; pageSize?: number; - reload?: () => void; ready?: boolean; + reload?: () => void; total?: number; } diff --git a/server/sonar-web/src/main/js/components/controls/ManagedFilter.tsx b/server/sonar-web/src/main/js/components/controls/ManagedFilter.tsx index 1f3e82c8f2a..533c3673e3f 100644 --- a/server/sonar-web/src/main/js/components/controls/ManagedFilter.tsx +++ b/server/sonar-web/src/main/js/components/controls/ManagedFilter.tsx @@ -23,8 +23,8 @@ import { translate } from '../../helpers/l10n'; import { Provider } from '../../types/types'; interface ManagedFilterProps { - manageProvider: Provider | undefined; loading: boolean; + manageProvider: Provider | undefined; managed: boolean | undefined; setManaged: (managed: boolean | undefined) => void; } diff --git a/server/sonar-web/src/main/js/components/controls/SelectList.tsx b/server/sonar-web/src/main/js/components/controls/SelectList.tsx index 2ae7e857c6f..94fe045a27a 100644 --- a/server/sonar-web/src/main/js/components/controls/SelectList.tsx +++ b/server/sonar-web/src/main/js/components/controls/SelectList.tsx @@ -31,12 +31,13 @@ export enum SelectListFilter { type Props = { allowBulkSelection?: boolean; + autoFocusSearch?: boolean; + disabledElements?: string[]; elements: string[]; elementsTotalCount?: number; - disabledElements?: string[]; + labelAll?: string; labelSelected?: string; labelUnselected?: string; - labelAll?: string; needToReload?: boolean; onSelect: (element: string) => Promise; onUnselect: (element: string) => Promise; @@ -45,11 +46,10 @@ type Props = { renderElement: (element: string) => React.ReactNode; selectedElements: string[]; withPaging?: boolean; - autoFocusSearch?: boolean; } & ( | { - onSearch: (searchParams: SelectListSearchParams) => Promise; loading?: never; + onSearch: (searchParams: SelectListSearchParams) => Promise; } | { loading: boolean; diff --git a/server/sonar-web/src/main/js/components/controls/SelectListListContainer.tsx b/server/sonar-web/src/main/js/components/controls/SelectListListContainer.tsx index 7bc0a07e075..c718565b9d9 100644 --- a/server/sonar-web/src/main/js/components/controls/SelectListListContainer.tsx +++ b/server/sonar-web/src/main/js/components/controls/SelectListListContainer.tsx @@ -26,8 +26,8 @@ import SelectListListElement from './SelectListListElement'; interface Props { allowBulkSelection?: boolean; - elements: string[]; disabledElements: string[]; + elements: string[]; filter: SelectListFilter; onSelect: (element: string) => Promise; onUnselect: (element: string) => Promise; diff --git a/server/sonar-web/src/main/js/components/controls/Tooltip.tsx b/server/sonar-web/src/main/js/components/controls/Tooltip.tsx index ad75ca864d3..13f2648015a 100644 --- a/server/sonar-web/src/main/js/components/controls/Tooltip.tsx +++ b/server/sonar-web/src/main/js/components/controls/Tooltip.tsx @@ -32,20 +32,20 @@ import './Tooltip.css'; export type Placement = 'bottom' | 'right' | 'left' | 'top'; interface TooltipProps { - classNameSpace?: string; children: React.ReactElement; - mouseEnterDelay?: number; - mouseLeaveDelay?: number; - onShow?: () => void; - onHide?: () => void; + classNameInner?: string; + classNameSpace?: string; content: React.ReactNode; - side?: Placement; - isOpen?: boolean; // If tooltip overlay has interactive content (links for instance) we may set this to true to stop // default behavior of tabbing (other changes should be done outside of this component to make it work) // See example DocHelpTooltip isInteractive?: boolean; - classNameInner?: string; + isOpen?: boolean; + mouseEnterDelay?: number; + mouseLeaveDelay?: number; + onHide?: () => void; + onShow?: () => void; + side?: Placement; } interface Measurements { diff --git a/server/sonar-web/src/main/js/components/devops-platform/AlmSettingsInstanceSelector.tsx b/server/sonar-web/src/main/js/components/devops-platform/AlmSettingsInstanceSelector.tsx index 3375b2f1bf1..761920d4b19 100644 --- a/server/sonar-web/src/main/js/components/devops-platform/AlmSettingsInstanceSelector.tsx +++ b/server/sonar-web/src/main/js/components/devops-platform/AlmSettingsInstanceSelector.tsx @@ -51,11 +51,11 @@ function orgToOption(alm: AlmInstanceBase) { } interface Props { - instances: AlmInstanceBase[]; - initialValue?: string; - onChange: (instance: AlmInstanceBase) => void; className: string; + initialValue?: string; inputId: string; + instances: AlmInstanceBase[]; + onChange: (instance: AlmInstanceBase) => void; } export default function AlmSettingsInstanceSelector(props: Props) { diff --git a/server/sonar-web/src/main/js/components/icon-mappers/SoftwareImpactSeverityIcon.tsx b/server/sonar-web/src/main/js/components/icon-mappers/SoftwareImpactSeverityIcon.tsx index 6e3102a68ae..61251a5db8c 100644 --- a/server/sonar-web/src/main/js/components/icon-mappers/SoftwareImpactSeverityIcon.tsx +++ b/server/sonar-web/src/main/js/components/icon-mappers/SoftwareImpactSeverityIcon.tsx @@ -29,8 +29,8 @@ import { SoftwareImpactSeverity } from '../../types/clean-code-taxonomy'; import { Dict } from '../../types/types'; interface Props extends IconProps { - severity: string | null | undefined; disabled?: boolean; + severity: string | null | undefined; } const severityIcons: Dict<(props: IconProps) => React.ReactElement> = { diff --git a/server/sonar-web/src/main/js/components/issue/Issue.tsx b/server/sonar-web/src/main/js/components/issue/Issue.tsx index 8cafe6ba36b..980f08ef931 100644 --- a/server/sonar-web/src/main/js/components/issue/Issue.tsx +++ b/server/sonar-web/src/main/js/components/issue/Issue.tsx @@ -37,8 +37,8 @@ interface Props { issue: TypeIssue; onChange: (issue: TypeIssue) => void; onCheck?: (issue: string) => void; - onSelect: (issueKey: string) => void; onPopupToggle: (issue: string, popupName: string, open?: boolean) => void; + onSelect: (issueKey: string) => void; openPopup?: string; selected: boolean; } diff --git a/server/sonar-web/src/main/js/components/issue/components/IssueActionsBar.tsx b/server/sonar-web/src/main/js/components/issue/components/IssueActionsBar.tsx index 6daa8e98ec9..10b2c7336a1 100644 --- a/server/sonar-web/src/main/js/components/issue/components/IssueActionsBar.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/IssueActionsBar.tsx @@ -27,14 +27,14 @@ import IssueTransition from './IssueTransition'; import SonarLintBadge from './SonarLintBadge'; interface Props { - issue: Issue; + canSetTags?: boolean; currentPopup?: string; + issue: Issue; onAssign: (login: string) => void; onChange: (issue: Issue) => void; - togglePopup: (popup: string, show?: boolean) => void; showSonarLintBadge?: boolean; showTags?: boolean; - canSetTags?: boolean; + togglePopup: (popup: string, show?: boolean) => void; } export default function IssueActionsBar(props: Readonly) { diff --git a/server/sonar-web/src/main/js/components/issue/components/IssueAssign.tsx b/server/sonar-web/src/main/js/components/issue/components/IssueAssign.tsx index b7a778f6c00..25b64de6e52 100644 --- a/server/sonar-web/src/main/js/components/issue/components/IssueAssign.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/IssueAssign.tsx @@ -28,9 +28,9 @@ import { RestUser, isLoggedIn, isUserActive } from '../../../types/users'; import Avatar from '../../ui/Avatar'; interface Props { - issue: Issue; - isOpen: boolean; canAssign: boolean; + isOpen: boolean; + issue: Issue; onAssign: (login: string) => void; togglePopup: (popup: string, show?: boolean) => void; } diff --git a/server/sonar-web/src/main/js/components/issue/components/IssueMessage.tsx b/server/sonar-web/src/main/js/components/issue/components/IssueMessage.tsx index f3e26bb78a2..f01da238768 100644 --- a/server/sonar-web/src/main/js/components/issue/components/IssueMessage.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/IssueMessage.tsx @@ -30,9 +30,9 @@ import { BranchLike } from '../../../types/branch-like'; import { Issue } from '../../../types/types'; export interface IssueMessageProps { - issue: Issue; branchLike?: BranchLike; displayWhyIsThisAnIssue?: boolean; + issue: Issue; } export default function IssueMessage(props: IssueMessageProps) { diff --git a/server/sonar-web/src/main/js/components/issue/components/IssueTags.tsx b/server/sonar-web/src/main/js/components/issue/components/IssueTags.tsx index 5a5e35a177b..0e16b83a796 100644 --- a/server/sonar-web/src/main/js/components/issue/components/IssueTags.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/IssueTags.tsx @@ -33,8 +33,8 @@ interface Props extends ComponentContextShape { issue: Pick; onChange: (issue: Issue) => void; open?: boolean; - togglePopup: (popup: string, show?: boolean) => void; tagsToDisplay?: number; + togglePopup: (popup: string, show?: boolean) => void; } export class IssueTags extends React.PureComponent { diff --git a/server/sonar-web/src/main/js/components/issue/components/IssueTransitionItem.tsx b/server/sonar-web/src/main/js/components/issue/components/IssueTransitionItem.tsx index 3777c8b68ad..7fadcb6fa4f 100644 --- a/server/sonar-web/src/main/js/components/issue/components/IssueTransitionItem.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/IssueTransitionItem.tsx @@ -26,9 +26,9 @@ import HelpTooltip from '../../../sonar-aligned/components/controls/HelpTooltip' import { IssueTransition } from '../../../types/issues'; type Props = { - transition: IssueTransition; - selected: boolean; onSelectTransition: (transition: IssueTransition) => void; + selected: boolean; + transition: IssueTransition; }; export function IssueTransitionItem({ transition, selected, onSelectTransition }: Readonly) { diff --git a/server/sonar-web/src/main/js/components/issue/components/IssueTransitionOverlay.tsx b/server/sonar-web/src/main/js/components/issue/components/IssueTransitionOverlay.tsx index 8d24a2174f2..efbceff8d45 100644 --- a/server/sonar-web/src/main/js/components/issue/components/IssueTransitionOverlay.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/IssueTransitionOverlay.tsx @@ -36,11 +36,11 @@ import { isTransitionDeprecated, isTransitionHidden, transitionRequiresComment } import { IssueTransitionItem } from './IssueTransitionItem'; export type Props = { + guideStepIndex: number; issue: Pick; + loading?: boolean; onClose: () => void; onSetTransition: (transition: IssueTransition, comment?: string) => void; - guideStepIndex: number; - loading?: boolean; }; export function IssueTransitionOverlay(props: Readonly) { diff --git a/server/sonar-web/src/main/js/components/locations/SingleFileLocationNavigator.tsx b/server/sonar-web/src/main/js/components/locations/SingleFileLocationNavigator.tsx index 20a8dff1469..ae799a3e19f 100644 --- a/server/sonar-web/src/main/js/components/locations/SingleFileLocationNavigator.tsx +++ b/server/sonar-web/src/main/js/components/locations/SingleFileLocationNavigator.tsx @@ -27,12 +27,12 @@ import LocationMessage from '../common/LocationMessage'; import './SingleFileLocationNavigator.css'; interface Props { + concealedMarker?: boolean; index: number; message: string | undefined; messageFormattings?: MessageFormatting[]; onClick: (index: number) => void; selected: boolean; - concealedMarker?: boolean; } export default class SingleFileLocationNavigator extends React.PureComponent { diff --git a/server/sonar-web/src/main/js/components/logos/SonarLintLogo.tsx b/server/sonar-web/src/main/js/components/logos/SonarLintLogo.tsx index b8949c702f0..460ca3b7fd8 100644 --- a/server/sonar-web/src/main/js/components/logos/SonarLintLogo.tsx +++ b/server/sonar-web/src/main/js/components/logos/SonarLintLogo.tsx @@ -23,8 +23,8 @@ import { isDefined } from '../../helpers/types'; interface Props { className?: string; - size?: number; description?: React.ReactNode; + size?: number; } export function SonarLintLogo({ className, description, size }: Readonly) { diff --git a/server/sonar-web/src/main/js/components/new-code-definition/NewCodeDefinitionDaysOption.tsx b/server/sonar-web/src/main/js/components/new-code-definition/NewCodeDefinitionDaysOption.tsx index 923953e56e9..f49479708df 100644 --- a/server/sonar-web/src/main/js/components/new-code-definition/NewCodeDefinitionDaysOption.tsx +++ b/server/sonar-web/src/main/js/components/new-code-definition/NewCodeDefinitionDaysOption.tsx @@ -43,18 +43,18 @@ import { NewCodeDefinitionLevels } from './utils'; export interface Props { className?: string; - days: string; currentDaysValue?: string; - previousNonCompliantValue?: string; - projectKey?: string; - updatedAt?: number; + days: string; disabled?: boolean; isChanged: boolean; isValid: boolean; onChangeDays: (value: string) => void; onSelect: (selection: NewCodeDefinitionType) => void; + previousNonCompliantValue?: string; + projectKey?: string; selected: boolean; settingLevel: NewCodeDefinitionLevels; + updatedAt?: number; } export default function NewCodeDefinitionDaysOption(props: Props) { diff --git a/server/sonar-web/src/main/js/components/new-code-definition/NewCodeDefinitionSelector.tsx b/server/sonar-web/src/main/js/components/new-code-definition/NewCodeDefinitionSelector.tsx index 5e04198f0a5..0a1a5384b8a 100644 --- a/server/sonar-web/src/main/js/components/new-code-definition/NewCodeDefinitionSelector.tsx +++ b/server/sonar-web/src/main/js/components/new-code-definition/NewCodeDefinitionSelector.tsx @@ -44,8 +44,8 @@ import NewCodeDefinitionPreviousVersionOption from './NewCodeDefinitionPreviousV import { NewCodeDefinitionLevels } from './utils'; interface Props { - onNcdChanged: (ncd: NewCodeDefinitiondWithCompliance) => void; isMultipleProjects?: boolean; + onNcdChanged: (ncd: NewCodeDefinitiondWithCompliance) => void; } export default function NewCodeDefinitionSelector(props: Props) { diff --git a/server/sonar-web/src/main/js/components/permissions/AllHoldersList.tsx b/server/sonar-web/src/main/js/components/permissions/AllHoldersList.tsx index 5350a3ea9c3..9ee04386a93 100644 --- a/server/sonar-web/src/main/js/components/permissions/AllHoldersList.tsx +++ b/server/sonar-web/src/main/js/components/permissions/AllHoldersList.tsx @@ -32,22 +32,22 @@ import SearchForm, { FilterOption } from './SearchForm'; interface Props { filter: FilterOption; - query: string; - onFilter: (filter: string) => void; - onQuery: (query: string) => void; groups: PermissionGroup[]; groupsPaging?: Paging; - onRevokePermissionFromGroup: (group: string, permission: string) => Promise; + loading?: boolean; + onFilter: (filter: string) => void; onGrantPermissionToGroup: (group: string, permission: string) => Promise; - users: PermissionUser[]; - usersPaging?: Paging; - onRevokePermissionFromUser: (user: string, permission: string) => Promise; onGrantPermissionToUser: (user: string, permission: string) => Promise; - permissions: Array; onLoadMore: () => void; - selectedPermission?: string; + onQuery: (query: string) => void; + onRevokePermissionFromGroup: (group: string, permission: string) => Promise; + onRevokePermissionFromUser: (user: string, permission: string) => Promise; onSelectPermission?: (permissions?: string) => void; - loading?: boolean; + permissions: Array; + query: string; + selectedPermission?: string; + users: PermissionUser[]; + usersPaging?: Paging; } export default class AllHoldersList extends React.PureComponent { diff --git a/server/sonar-web/src/main/js/components/permissions/GroupHolder.tsx b/server/sonar-web/src/main/js/components/permissions/GroupHolder.tsx index fb2d9b3e382..2ced9099bdb 100644 --- a/server/sonar-web/src/main/js/components/permissions/GroupHolder.tsx +++ b/server/sonar-web/src/main/js/components/permissions/GroupHolder.tsx @@ -30,13 +30,13 @@ import PermissionCell from './PermissionCell'; import usePermissionChange from './usePermissionChange'; interface Props { + disabled?: boolean; group: PermissionGroup; isComponentPrivate?: boolean; onToggle: (group: PermissionGroup, permission: string) => Promise; permissions: PermissionDefinitions; - selectedPermission?: string; - disabled?: boolean; removeOnly?: boolean; + selectedPermission?: string; } export const ANYONE = 'Anyone'; diff --git a/server/sonar-web/src/main/js/components/permissions/PermissionCell.tsx b/server/sonar-web/src/main/js/components/permissions/PermissionCell.tsx index 7d4d56c78ab..5146ce3bead 100644 --- a/server/sonar-web/src/main/js/components/permissions/PermissionCell.tsx +++ b/server/sonar-web/src/main/js/components/permissions/PermissionCell.tsx @@ -31,13 +31,13 @@ import { export interface PermissionCellProps { disabled?: boolean; - removeOnly?: boolean; loading: string[]; onCheck: (checked: boolean, permission?: string) => void; permission: PermissionDefinition | PermissionDefinitionGroup; permissionItem: PermissionGroup | PermissionUser; - selectedPermission?: string; prefixID: string; + removeOnly?: boolean; + selectedPermission?: string; } export default function PermissionCell(props: PermissionCellProps) { diff --git a/server/sonar-web/src/main/js/components/permissions/UserHolder.tsx b/server/sonar-web/src/main/js/components/permissions/UserHolder.tsx index de523fdd992..34d2dd9eb03 100644 --- a/server/sonar-web/src/main/js/components/permissions/UserHolder.tsx +++ b/server/sonar-web/src/main/js/components/permissions/UserHolder.tsx @@ -29,12 +29,12 @@ import PermissionCell from './PermissionCell'; import usePermissionChange from './usePermissionChange'; interface Props { + disabled?: boolean; onToggle: (user: PermissionUser, permission: string) => Promise; permissions: PermissionDefinitions; + removeOnly?: boolean; selectedPermission?: string; user: PermissionUser; - disabled?: boolean; - removeOnly?: boolean; } export default function UserHolder(props: Props) { diff --git a/server/sonar-web/src/main/js/components/permissions/usePermissionChange.tsx b/server/sonar-web/src/main/js/components/permissions/usePermissionChange.tsx index 227d8d96ef9..2bfb7c3a384 100644 --- a/server/sonar-web/src/main/js/components/permissions/usePermissionChange.tsx +++ b/server/sonar-web/src/main/js/components/permissions/usePermissionChange.tsx @@ -32,9 +32,9 @@ import ConfirmModal from '../controls/ConfirmModal'; interface Props { holder: T; - removeOnly?: boolean; - permissions: PermissionDefinitions; onToggle: (holder: T, permission: string) => Promise; + permissions: PermissionDefinitions; + removeOnly?: boolean; } export default function usePermissionChange( diff --git a/server/sonar-web/src/main/js/components/rules/IssueTabViewer.tsx b/server/sonar-web/src/main/js/components/rules/IssueTabViewer.tsx index 39eef8e6f55..b43525899e8 100644 --- a/server/sonar-web/src/main/js/components/rules/IssueTabViewer.tsx +++ b/server/sonar-web/src/main/js/components/rules/IssueTabViewer.tsx @@ -39,30 +39,30 @@ import MoreInfoRuleDescription from './MoreInfoRuleDescription'; import RuleDescription from './RuleDescription'; interface IssueTabViewerProps extends CurrentUserContextInterface { - ruleDetails: RuleDetails; - extendedDescription?: string; - ruleDescriptionContextKey?: string; - codeTabContent?: React.ReactNode; activityTabContent?: React.ReactNode; + codeTabContent?: React.ReactNode; + extendedDescription?: string; + issue: Issue; location: Location; + onIssueChange: (issue: Issue) => void; + ruleDescriptionContextKey?: string; + ruleDetails: RuleDetails; selectedFlowIndex?: number; selectedLocationIndex?: number; - issue: Issue; - onIssueChange: (issue: Issue) => void; } interface State { - tabs: Tab[]; - selectedTab?: Tab; displayEducationalPrinciplesNotification?: boolean; educationalPrinciplesNotificationHasBeenDismissed?: boolean; + selectedTab?: Tab; + tabs: Tab[]; } export interface Tab { - value: TabKeys; - key: TabKeys; - label: string; content: React.ReactNode; counter?: number; + key: TabKeys; + label: string; + value: TabKeys; } export enum TabKeys { diff --git a/server/sonar-web/src/main/js/components/rules/RuleDescription.tsx b/server/sonar-web/src/main/js/components/rules/RuleDescription.tsx index 35796367804..2f0f9f34f49 100644 --- a/server/sonar-web/src/main/js/components/rules/RuleDescription.tsx +++ b/server/sonar-web/src/main/js/components/rules/RuleDescription.tsx @@ -50,8 +50,8 @@ interface State { } interface RuleDescriptionContextDisplay { - displayName: string; content: string; + displayName: string; key: string; } diff --git a/server/sonar-web/src/main/js/components/rules/RuleTabViewer.tsx b/server/sonar-web/src/main/js/components/rules/RuleTabViewer.tsx index 2b17144f473..b400b60359c 100644 --- a/server/sonar-web/src/main/js/components/rules/RuleTabViewer.tsx +++ b/server/sonar-web/src/main/js/components/rules/RuleTabViewer.tsx @@ -34,22 +34,22 @@ import MoreInfoRuleDescription from './MoreInfoRuleDescription'; import RuleDescription from './RuleDescription'; interface RuleTabViewerProps extends CurrentUserContextInterface { - ruleDetails: RuleDetails; location: Location; + ruleDetails: RuleDetails; } interface State { - tabs: Tab[]; - selectedTab?: Tab; displayEducationalPrinciplesNotification?: boolean; educationalPrinciplesNotificationHasBeenDismissed?: boolean; + selectedTab?: Tab; + tabs: Tab[]; } export interface Tab { - value: TabKeys; - label: string; content: React.ReactNode; counter?: number; + label: string; + value: TabKeys; } export enum TabKeys { diff --git a/server/sonar-web/src/main/js/components/shared/AnalysisMissingInfoMessage.tsx b/server/sonar-web/src/main/js/components/shared/AnalysisMissingInfoMessage.tsx index c1d0c4ea32e..f625d4f7c26 100644 --- a/server/sonar-web/src/main/js/components/shared/AnalysisMissingInfoMessage.tsx +++ b/server/sonar-web/src/main/js/components/shared/AnalysisMissingInfoMessage.tsx @@ -25,9 +25,9 @@ import { DocLink } from '../../helpers/doc-links'; import DocumentationLink from '../common/DocumentationLink'; interface AnalysisMissingInfoMessageProps { + className?: string; hide?: boolean; qualifier: string; - className?: string; } export default function AnalysisMissingInfoMessage({ diff --git a/server/sonar-web/src/main/js/components/shared/CleanCodeAttributePill.tsx b/server/sonar-web/src/main/js/components/shared/CleanCodeAttributePill.tsx index ca2aed6d416..20ec0c2b7df 100644 --- a/server/sonar-web/src/main/js/components/shared/CleanCodeAttributePill.tsx +++ b/server/sonar-web/src/main/js/components/shared/CleanCodeAttributePill.tsx @@ -27,9 +27,9 @@ import { CleanCodeAttribute, CleanCodeAttributeCategory } from '../../types/clea export interface Props { className?: string; - type?: 'issue' | 'rule'; - cleanCodeAttributeCategory: CleanCodeAttributeCategory; cleanCodeAttribute?: CleanCodeAttribute; + cleanCodeAttributeCategory: CleanCodeAttributeCategory; + type?: 'issue' | 'rule'; } export function CleanCodeAttributePill(props: Readonly) { diff --git a/server/sonar-web/src/main/js/components/shared/DrilldownLink.tsx b/server/sonar-web/src/main/js/components/shared/DrilldownLink.tsx index c72a4c72373..e1687e5e53a 100644 --- a/server/sonar-web/src/main/js/components/shared/DrilldownLink.tsx +++ b/server/sonar-web/src/main/js/components/shared/DrilldownLink.tsx @@ -31,8 +31,8 @@ interface Props { children?: React.ReactNode; className?: string; component: string; - metric: string; inNewCodePeriod?: boolean; + metric: string; } export default class DrilldownLink extends React.PureComponent { diff --git a/server/sonar-web/src/main/js/components/shared/SoftwareImpactPill.tsx b/server/sonar-web/src/main/js/components/shared/SoftwareImpactPill.tsx index c40f58220b2..f0ae5848ac2 100644 --- a/server/sonar-web/src/main/js/components/shared/SoftwareImpactPill.tsx +++ b/server/sonar-web/src/main/js/components/shared/SoftwareImpactPill.tsx @@ -30,9 +30,9 @@ import SoftwareImpactSeverityIcon from '../icon-mappers/SoftwareImpactSeverityIc export interface Props { className?: string; + quality: string; severity: SoftwareImpactSeverity; type?: 'issue' | 'rule'; - quality: string; } export default function SoftwareImpactPill(props: Props) { diff --git a/server/sonar-web/src/main/js/components/shared/SoftwareImpactPillList.tsx b/server/sonar-web/src/main/js/components/shared/SoftwareImpactPillList.tsx index e031f03e73f..3bc09b6b130 100644 --- a/server/sonar-web/src/main/js/components/shared/SoftwareImpactPillList.tsx +++ b/server/sonar-web/src/main/js/components/shared/SoftwareImpactPillList.tsx @@ -28,8 +28,8 @@ import { import SoftwareImpactPill from './SoftwareImpactPill'; interface SoftwareImpactPillListProps extends React.HTMLAttributes { - softwareImpacts: SoftwareImpact[]; className?: string; + softwareImpacts: SoftwareImpact[]; type?: Parameters[0]['type']; } diff --git a/server/sonar-web/src/main/js/components/tags/TagsList.tsx b/server/sonar-web/src/main/js/components/tags/TagsList.tsx index a24db5de119..888f95d7a16 100644 --- a/server/sonar-web/src/main/js/components/tags/TagsList.tsx +++ b/server/sonar-web/src/main/js/components/tags/TagsList.tsx @@ -25,8 +25,8 @@ import Tooltip from '../controls/Tooltip'; interface Props { allowUpdate?: boolean; className?: string; - tags: string[]; overlay?: React.ReactNode; + tags: string[]; tagsClassName?: string; tagsToDisplay?: number; } diff --git a/server/sonar-web/src/main/js/components/tutorials/TutorialSelection.tsx b/server/sonar-web/src/main/js/components/tutorials/TutorialSelection.tsx index 71e77125e2b..de5310699d2 100644 --- a/server/sonar-web/src/main/js/components/tutorials/TutorialSelection.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/TutorialSelection.tsx @@ -37,8 +37,8 @@ import { TutorialModes } from './types'; export interface TutorialSelectionProps { component: Component; currentUser: LoggedInUser; - willRefreshAutomatically?: boolean; location: Location; + willRefreshAutomatically?: boolean; } export function TutorialSelection(props: Readonly) { diff --git a/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/BranchAnalysisStepContent.tsx b/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/BranchAnalysisStepContent.tsx index 5335b08ffbf..e4f852ffa28 100644 --- a/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/BranchAnalysisStepContent.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/BranchAnalysisStepContent.tsx @@ -27,8 +27,8 @@ import { BuildTools } from '../types'; import AnalysisCommand from './commands/AnalysisCommand'; export interface BranchesAnalysisStepProps { - languages: Languages; component: Component; + languages: Languages; onDone: (done: boolean) => void; } diff --git a/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/commands/AnalysisCommand.tsx b/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/commands/AnalysisCommand.tsx index 889d705ad0f..d87b5abfcbe 100644 --- a/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/commands/AnalysisCommand.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/commands/AnalysisCommand.tsx @@ -26,10 +26,10 @@ import JavaMaven from './JavaMaven'; import Other from './Other'; export interface AnalysisCommandProps { - projectKey: string; - projectName: string; buildTool?: BuildTools; onStepValidationChange: (isValid: boolean) => void; + projectKey: string; + projectName: string; } export default function AnalysisCommand(props: AnalysisCommandProps) { diff --git a/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/commands/ClangGCC.tsx b/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/commands/ClangGCC.tsx index 9dc7432201c..01f1ed48956 100644 --- a/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/commands/ClangGCC.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/commands/ClangGCC.tsx @@ -37,8 +37,8 @@ import PrepareAnalysisCommand, { PrepareType } from './PrepareAnalysisCommand'; import PublishSteps from './PublishSteps'; export interface ClangGCCProps { - projectKey: string; onStepValidationChange: (isValid: boolean) => void; + projectKey: string; } type OsConstant = { diff --git a/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/AnalysisCommand.tsx b/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/AnalysisCommand.tsx index b30a010816c..fbcc35f2633 100644 --- a/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/AnalysisCommand.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/AnalysisCommand.tsx @@ -36,8 +36,8 @@ import othersExample from './commands/Others'; export interface AnalysisCommandProps extends WithAvailableFeaturesProps { buildTool: BuildTools; - mainBranchName: string; component: Component; + mainBranchName: string; } const YamlTemplate: Dictionary< diff --git a/server/sonar-web/src/main/js/components/tutorials/components/EditTokenModal.tsx b/server/sonar-web/src/main/js/components/tutorials/components/EditTokenModal.tsx index 302acfd01ca..72316591853 100644 --- a/server/sonar-web/src/main/js/components/tutorials/components/EditTokenModal.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/components/EditTokenModal.tsx @@ -52,9 +52,9 @@ import ProjectTokenScopeInfo from './ProjectTokenScopeInfo'; interface State { loading: boolean; token?: string; - tokenName: string; tokenExpiration: TokenExpiration; - tokenExpirationOptions: { value: TokenExpiration; label: string }[]; + tokenExpirationOptions: { label: string; value: TokenExpiration }[]; + tokenName: string; } interface Props { diff --git a/server/sonar-web/src/main/js/components/tutorials/components/GithubCFamilyExampleRepositories.tsx b/server/sonar-web/src/main/js/components/tutorials/components/GithubCFamilyExampleRepositories.tsx index a22c87b5e66..b7c07a68335 100644 --- a/server/sonar-web/src/main/js/components/tutorials/components/GithubCFamilyExampleRepositories.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/components/GithubCFamilyExampleRepositories.tsx @@ -27,9 +27,9 @@ import { Image } from '../../common/Image'; import { OSs, TutorialModes } from '../types'; export interface GithubCFamilyExampleRepositoriesProps { + ci?: TutorialModes; className?: string; os?: OSs; - ci?: TutorialModes; } const OS_SEARCH_MAP = { diff --git a/server/sonar-web/src/main/js/components/tutorials/components/GradleBuildSelection.tsx b/server/sonar-web/src/main/js/components/tutorials/components/GradleBuildSelection.tsx index 5b13102ac22..0b6a70584c9 100644 --- a/server/sonar-web/src/main/js/components/tutorials/components/GradleBuildSelection.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/components/GradleBuildSelection.tsx @@ -22,8 +22,8 @@ import React from 'react'; import { GradleBuildDSL } from '../types'; interface Props { - className?: string; children: (build: GradleBuildDSL) => React.ReactNode; + className?: string; } export default function GradleBuildSelection({ children, className }: Props) { diff --git a/server/sonar-web/src/main/js/components/tutorials/components/RenderOptions.tsx b/server/sonar-web/src/main/js/components/tutorials/components/RenderOptions.tsx index 7a2c9bc3986..b972264dfc2 100644 --- a/server/sonar-web/src/main/js/components/tutorials/components/RenderOptions.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/components/RenderOptions.tsx @@ -27,8 +27,8 @@ export interface RenderOptionsProps { onCheck: (checked: string) => void; optionLabelKey: string; options: string[]; - titleLabelKey?: string; setDone?: (doneStatus: boolean) => void; + titleLabelKey?: string; } export default function RenderOptions({ diff --git a/server/sonar-web/src/main/js/components/tutorials/components/SentenceWithHighlights.tsx b/server/sonar-web/src/main/js/components/tutorials/components/SentenceWithHighlights.tsx index 836a6e89abb..9769acf5faa 100644 --- a/server/sonar-web/src/main/js/components/tutorials/components/SentenceWithHighlights.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/components/SentenceWithHighlights.tsx @@ -24,8 +24,8 @@ import { Dict } from '../../../types/types'; export interface SentenceWithHighlightsProps { highlightKeys: string[]; - translationKey: string; highlightPrefixKeys?: string; + translationKey: string; } export default function SentenceWithHighlights({ diff --git a/server/sonar-web/src/main/js/components/tutorials/github-action/AnalysisCommand.tsx b/server/sonar-web/src/main/js/components/tutorials/github-action/AnalysisCommand.tsx index 63b119c5516..81cc14e14af 100644 --- a/server/sonar-web/src/main/js/components/tutorials/github-action/AnalysisCommand.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/github-action/AnalysisCommand.tsx @@ -32,8 +32,8 @@ import Others from './commands/Others'; export interface AnalysisCommandProps extends WithAvailableFeaturesProps { buildTool: BuildTools; - mainBranchName: string; component: Component; + mainBranchName: string; monorepo?: boolean; } diff --git a/server/sonar-web/src/main/js/components/tutorials/github-action/GitHubActionTutorial.tsx b/server/sonar-web/src/main/js/components/tutorials/github-action/GitHubActionTutorial.tsx index 013652103b2..bbb62cc3dfa 100644 --- a/server/sonar-web/src/main/js/components/tutorials/github-action/GitHubActionTutorial.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/github-action/GitHubActionTutorial.tsx @@ -33,8 +33,8 @@ export interface GitHubActionTutorialProps { baseUrl: string; component: Component; currentUser: LoggedInUser; - monorepo?: boolean; mainBranchName: string; + monorepo?: boolean; willRefreshAutomatically?: boolean; } diff --git a/server/sonar-web/src/main/js/components/tutorials/github-action/commands/CFamily.tsx b/server/sonar-web/src/main/js/components/tutorials/github-action/commands/CFamily.tsx index cfe75e6fe70..9f01849c1e2 100644 --- a/server/sonar-web/src/main/js/components/tutorials/github-action/commands/CFamily.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/github-action/commands/CFamily.tsx @@ -32,9 +32,9 @@ import MonorepoDocLinkFallback from './MonorepoDocLinkFallback'; export interface CFamilyProps { branchesEnabled?: boolean; + component: Component; mainBranchName: string; monorepo?: boolean; - component: Component; } const STEPS = { diff --git a/server/sonar-web/src/main/js/components/tutorials/github-action/commands/DotNet.tsx b/server/sonar-web/src/main/js/components/tutorials/github-action/commands/DotNet.tsx index 98f02aac2a4..3478dfa49d4 100644 --- a/server/sonar-web/src/main/js/components/tutorials/github-action/commands/DotNet.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/github-action/commands/DotNet.tsx @@ -26,9 +26,9 @@ import MonorepoDocLinkFallback from './MonorepoDocLinkFallback'; export interface DotNetProps { branchesEnabled?: boolean; + component: Component; mainBranchName: string; monorepo?: boolean; - component: Component; } function dotnetYamlSteps(projectKey: string) { diff --git a/server/sonar-web/src/main/js/components/tutorials/github-action/commands/Gradle.tsx b/server/sonar-web/src/main/js/components/tutorials/github-action/commands/Gradle.tsx index 0aaaa78d00f..85ae9f9b7c2 100644 --- a/server/sonar-web/src/main/js/components/tutorials/github-action/commands/Gradle.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/github-action/commands/Gradle.tsx @@ -27,9 +27,9 @@ import MonorepoDocLinkFallback from './MonorepoDocLinkFallback'; export interface GradleProps { branchesEnabled?: boolean; + component: Component; mainBranchName: string; monorepo?: boolean; - component: Component; } const GRADLE_YAML_STEPS = ` diff --git a/server/sonar-web/src/main/js/components/tutorials/github-action/commands/JavaMaven.tsx b/server/sonar-web/src/main/js/components/tutorials/github-action/commands/JavaMaven.tsx index 2b3f89d7fcd..946766e52f7 100644 --- a/server/sonar-web/src/main/js/components/tutorials/github-action/commands/JavaMaven.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/github-action/commands/JavaMaven.tsx @@ -26,9 +26,9 @@ import MonorepoDocLinkFallback from './MonorepoDocLinkFallback'; export interface JavaMavenProps { branchesEnabled?: boolean; + component: Component; mainBranchName: string; monorepo?: boolean; - component: Component; } function mavenYamlSteps(projectKey: string, projectName: string) { diff --git a/server/sonar-web/src/main/js/components/tutorials/github-action/commands/Others.tsx b/server/sonar-web/src/main/js/components/tutorials/github-action/commands/Others.tsx index b4e5bbc07fb..44381ff0716 100644 --- a/server/sonar-web/src/main/js/components/tutorials/github-action/commands/Others.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/github-action/commands/Others.tsx @@ -27,9 +27,9 @@ import MonorepoDocLinkFallback from './MonorepoDocLinkFallback'; export interface OthersProps { branchesEnabled?: boolean; + component: Component; mainBranchName: string; monorepo?: boolean; - component: Component; } function otherYamlSteps(branchesEnabled: boolean) { diff --git a/server/sonar-web/src/main/js/components/tutorials/jenkins/JenkinsStep.tsx b/server/sonar-web/src/main/js/components/tutorials/jenkins/JenkinsStep.tsx index 22148f40f3a..4090603fe7c 100644 --- a/server/sonar-web/src/main/js/components/tutorials/jenkins/JenkinsStep.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/jenkins/JenkinsStep.tsx @@ -54,9 +54,9 @@ export interface JenkinsfileStepProps { } export interface LanguageProps { - onDone: (done: boolean) => void; - component: Component; baseUrl: string; + component: Component; + onDone: (done: boolean) => void; } export function JenkinsfileStep(props: JenkinsfileStepProps) { diff --git a/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/DotNetCore.tsx b/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/DotNetCore.tsx index b4690eb0507..61287f945f1 100644 --- a/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/DotNetCore.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/DotNetCore.tsx @@ -24,7 +24,7 @@ import { OSs } from '../../types'; import { DotNetCoreFrameworkProps, OSDotNet } from './DotNet'; import DotNetPrereqsScanner from './DotNetPrereqsScanner'; -const OSS_DEP: { [key in OSDotNet]: { shell: string; pathSeparator: string } } = { +const OSS_DEP: { [key in OSDotNet]: { pathSeparator: string; shell: string } } = { [OSs.Linux]: { shell: 'sh', pathSeparator: '/' }, [OSs.Windows]: { shell: 'bat', pathSeparator: '\\\\' }, }; diff --git a/server/sonar-web/src/main/js/components/tutorials/other/BuildToolForm.tsx b/server/sonar-web/src/main/js/components/tutorials/other/BuildToolForm.tsx index 79cbc2aec68..f790489a03c 100644 --- a/server/sonar-web/src/main/js/components/tutorials/other/BuildToolForm.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/other/BuildToolForm.tsx @@ -26,8 +26,8 @@ import RenderOptions from '../components/RenderOptions'; import { BuildTools, ManualTutorialConfig, OSs, TutorialModes } from '../types'; interface Props { - hasCLanguageFeature: boolean; config?: ManualTutorialConfig; + hasCLanguageFeature: boolean; onDone: (config: ManualTutorialConfig) => void; } diff --git a/server/sonar-web/src/main/js/components/tutorials/other/OtherTutorial.tsx b/server/sonar-web/src/main/js/components/tutorials/other/OtherTutorial.tsx index d5a39161ef9..8f01f1ff9e9 100644 --- a/server/sonar-web/src/main/js/components/tutorials/other/OtherTutorial.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/other/OtherTutorial.tsx @@ -31,9 +31,9 @@ export enum Steps { } interface Props { + baseUrl: string; component: Component; currentUser: LoggedInUser; - baseUrl: string; isLocal?: boolean; } diff --git a/server/sonar-web/src/main/js/components/tutorials/other/ProjectAnalysisStep.tsx b/server/sonar-web/src/main/js/components/tutorials/other/ProjectAnalysisStep.tsx index d615847448b..799135f27b5 100644 --- a/server/sonar-web/src/main/js/components/tutorials/other/ProjectAnalysisStep.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/other/ProjectAnalysisStep.tsx @@ -27,12 +27,12 @@ import BuildToolForm from './BuildToolForm'; import AnalysisCommand from './commands/AnalysisCommand'; interface Props { + baseUrl: string; component: Component; + isLocal: boolean; onFinish?: (projectKey?: string) => void; open: boolean; - baseUrl: string; stepNumber: number; - isLocal: boolean; token?: string; } diff --git a/server/sonar-web/src/main/js/components/tutorials/other/TokenStep.tsx b/server/sonar-web/src/main/js/components/tutorials/other/TokenStep.tsx index 417e999a5f1..3045d4a407c 100644 --- a/server/sonar-web/src/main/js/components/tutorials/other/TokenStep.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/other/TokenStep.tsx @@ -58,24 +58,24 @@ import { getUniqueTokenName } from '../utils'; interface Props { currentUser: Pick; - projectKey: string; finished: boolean; initialTokenName?: string; - stepNumber: number; - open: boolean; onContinue: (token: string) => void; onOpen: VoidFunction; + open: boolean; + projectKey: string; + stepNumber: number; } interface State { existingToken: string; loading: boolean; selection: string; - tokenName?: string; token?: string; - tokens?: UserToken[]; tokenExpiration: TokenExpiration; - tokenExpirationOptions: { value: TokenExpiration; label: string }[]; + tokenExpirationOptions: { label: string; value: TokenExpiration }[]; + tokenName?: string; + tokens?: UserToken[]; } const TOKEN_FORMAT_REGEX = /^[_a-z0-9]+$/; diff --git a/server/sonar-web/src/main/js/components/tutorials/other/commands/AnalysisCommand.tsx b/server/sonar-web/src/main/js/components/tutorials/other/commands/AnalysisCommand.tsx index 78aff6019a5..bae1666034f 100644 --- a/server/sonar-web/src/main/js/components/tutorials/other/commands/AnalysisCommand.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/other/commands/AnalysisCommand.tsx @@ -27,8 +27,8 @@ import JavaMaven from './JavaMaven'; import Other from './Other'; export interface AnalysisCommandProps { - component: Component; baseUrl: string; + component: Component; isLocal: boolean; languageConfig: ManualTutorialConfig; token?: string; diff --git a/server/sonar-web/src/main/js/components/tutorials/other/commands/ClangGCCCommand.tsx b/server/sonar-web/src/main/js/components/tutorials/other/commands/ClangGCCCommand.tsx index 9a5fb3febab..5e785c9ab0f 100644 --- a/server/sonar-web/src/main/js/components/tutorials/other/commands/ClangGCCCommand.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/other/commands/ClangGCCCommand.tsx @@ -27,8 +27,8 @@ import ExecBuildWrapper from './ExecBuildWrapper'; import ExecScanner from './ExecScanner'; export interface ClangGCCCustomProps { - component: Component; baseUrl: string; + component: Component; isLocal: boolean; os: OSs; token: string; diff --git a/server/sonar-web/src/main/js/components/tutorials/other/commands/DotNet.tsx b/server/sonar-web/src/main/js/components/tutorials/other/commands/DotNet.tsx index 37ab68aab39..6ff8bda1751 100644 --- a/server/sonar-web/src/main/js/components/tutorials/other/commands/DotNet.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/other/commands/DotNet.tsx @@ -25,8 +25,8 @@ import DotNetCore from './DotNetCore'; import DotNetFramework from './DotNetFramework'; export interface DotNetProps { - component: Component; baseUrl: string; + component: Component; token: string; } diff --git a/server/sonar-web/src/main/js/components/tutorials/other/commands/DownloadBuildWrapper.tsx b/server/sonar-web/src/main/js/components/tutorials/other/commands/DownloadBuildWrapper.tsx index ae24bfb34df..4aef7392bc3 100644 --- a/server/sonar-web/src/main/js/components/tutorials/other/commands/DownloadBuildWrapper.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/other/commands/DownloadBuildWrapper.tsx @@ -26,9 +26,9 @@ import { InlineSnippet } from '../../components/InlineSnippet'; import { OSs } from '../../types'; export interface DownloadBuildWrapperProps { + baseUrl: string; isLocal: boolean; os: OSs; - baseUrl: string; } const FILENAMES: { [x in OSs]: string } = { diff --git a/server/sonar-web/src/main/js/components/tutorials/other/commands/ExecScanner.tsx b/server/sonar-web/src/main/js/components/tutorials/other/commands/ExecScanner.tsx index c208abb4b73..41780dda9e6 100644 --- a/server/sonar-web/src/main/js/components/tutorials/other/commands/ExecScanner.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/other/commands/ExecScanner.tsx @@ -31,12 +31,12 @@ import { quote } from '../../utils'; import DoneNextSteps from '../DoneNextSteps'; export interface ExecScannerProps { - component: Component; baseUrl: string; + cfamily?: boolean; + component: Component; isLocal: boolean; os: OSs; token: string; - cfamily?: boolean; } export default function ExecScanner(props: ExecScannerProps) { diff --git a/server/sonar-web/src/main/js/components/tutorials/other/commands/JavaGradle.tsx b/server/sonar-web/src/main/js/components/tutorials/other/commands/JavaGradle.tsx index 858302848b4..21270d3a3d8 100644 --- a/server/sonar-web/src/main/js/components/tutorials/other/commands/JavaGradle.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/other/commands/JavaGradle.tsx @@ -33,8 +33,8 @@ import { GradleBuildDSL } from '../../types'; import DoneNextSteps from '../DoneNextSteps'; export interface JavaGradleProps { - component: Component; baseUrl: string; + component: Component; token: string; } diff --git a/server/sonar-web/src/main/js/components/tutorials/other/commands/JavaMaven.tsx b/server/sonar-web/src/main/js/components/tutorials/other/commands/JavaMaven.tsx index 9fb6c716943..8b51d1b33fa 100644 --- a/server/sonar-web/src/main/js/components/tutorials/other/commands/JavaMaven.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/other/commands/JavaMaven.tsx @@ -29,8 +29,8 @@ import InstanceMessage from '../../../common/InstanceMessage'; import DoneNextSteps from '../DoneNextSteps'; export interface JavaMavenProps { - component: Component; baseUrl: string; + component: Component; token: string; } diff --git a/server/sonar-web/src/main/js/components/tutorials/other/commands/Other.tsx b/server/sonar-web/src/main/js/components/tutorials/other/commands/Other.tsx index c2bbeeb83a3..81b72ded5e9 100644 --- a/server/sonar-web/src/main/js/components/tutorials/other/commands/Other.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/other/commands/Other.tsx @@ -24,9 +24,9 @@ import DownloadScanner from './DownloadScanner'; import ExecScanner from './ExecScanner'; export interface OtherProps { + baseUrl: string; component: Component; isLocal: boolean; - baseUrl: string; os: OSs; token: string; } diff --git a/server/sonar-web/src/main/js/components/upgrade/SystemUpgradeForm.tsx b/server/sonar-web/src/main/js/components/upgrade/SystemUpgradeForm.tsx index c10de327d07..b378248c135 100644 --- a/server/sonar-web/src/main/js/components/upgrade/SystemUpgradeForm.tsx +++ b/server/sonar-web/src/main/js/components/upgrade/SystemUpgradeForm.tsx @@ -28,9 +28,9 @@ import SystemUpgradeItem from './SystemUpgradeItem'; import { SYSTEM_VERSION_REGEXP, UpdateUseCase } from './utils'; interface Props { + latestLTA?: string; onClose: () => void; systemUpgrades: SystemUpgrade[][]; - latestLTA?: string; updateUseCase: UpdateUseCase; } diff --git a/server/sonar-web/src/main/js/components/workspace/__tests__/Workspace-test.tsx b/server/sonar-web/src/main/js/components/workspace/__tests__/Workspace-test.tsx index 51fbcdd6601..f3762a582b3 100644 --- a/server/sonar-web/src/main/js/components/workspace/__tests__/Workspace-test.tsx +++ b/server/sonar-web/src/main/js/components/workspace/__tests__/Workspace-test.tsx @@ -156,8 +156,8 @@ function TestComponent({ componentKey, branchLike, }: { - componentKey: string; branchLike?: BranchLike; + componentKey: string; }) { const { openComponent } = React.useContext(WorkspaceContext); diff --git a/server/sonar-web/src/main/js/helpers/UseQuery.tsx b/server/sonar-web/src/main/js/helpers/UseQuery.tsx index 3c6281a6a05..570a9872d00 100644 --- a/server/sonar-web/src/main/js/helpers/UseQuery.tsx +++ b/server/sonar-web/src/main/js/helpers/UseQuery.tsx @@ -23,9 +23,9 @@ import { ReactElement } from 'react'; type QueryHook = (...args: TArgs) => UseQueryResult; interface Props { - query: QueryHook; args?: TArgs; children: (value: UseQueryResult) => ReactElement | null; + query: QueryHook; } export default function UseQuery(props: Props) { diff --git a/server/sonar-web/src/main/js/helpers/code-difference.ts b/server/sonar-web/src/main/js/helpers/code-difference.ts index 41474a5f4e5..ff7653546b2 100644 --- a/server/sonar-web/src/main/js/helpers/code-difference.ts +++ b/server/sonar-web/src/main/js/helpers/code-difference.ts @@ -23,7 +23,7 @@ import { sanitizeString } from './sanitize'; const NUMBER_OF_EXAMPLES = 2; -type DiffBlock = { noncompliant: Element; compliant: Element }; +type DiffBlock = { compliant: Element; noncompliant: Element }; export default function applyCodeDifferences(element: Element | null) { if (element === null) { diff --git a/server/sonar-web/src/main/js/helpers/editions.ts b/server/sonar-web/src/main/js/helpers/editions.ts index ee5a816cfd4..9101c6cd327 100644 --- a/server/sonar-web/src/main/js/helpers/editions.ts +++ b/server/sonar-web/src/main/js/helpers/editions.ts @@ -60,7 +60,7 @@ export function getAllEditionsAbove(currentEdition?: EditionKey) { export function getEditionUrl( edition: Edition, - data: { serverId?: string; ncloc?: number; sourceEdition?: EditionKey }, + data: { ncloc?: number; serverId?: string; sourceEdition?: EditionKey }, ) { let url = edition.homeUrl; const query = new URLSearchParams(omitNil(data)).toString(); diff --git a/server/sonar-web/src/main/js/helpers/issues.ts b/server/sonar-web/src/main/js/helpers/issues.ts index a86bed577dd..1a9d364edcc 100644 --- a/server/sonar-web/src/main/js/helpers/issues.ts +++ b/server/sonar-web/src/main/js/helpers/issues.ts @@ -104,7 +104,7 @@ const FLOW_ORDER_MAP = { function splitFlows( issue: RawIssue, components: Component[] = [], -): { secondaryLocations: FlowLocation[]; flows: FlowLocation[][]; flowsWithType: Flow[] } { +): { flows: FlowLocation[][]; flowsWithType: Flow[]; secondaryLocations: FlowLocation[] } { if (issue.flows?.some((flow) => flow.type !== undefined)) { const flowsWithType = issue.flows.filter((flow) => flow.type !== undefined) as Flow[]; flowsWithType.sort((f1, f2) => FLOW_ORDER_MAP[f1.type] - FLOW_ORDER_MAP[f2.type]); diff --git a/server/sonar-web/src/main/js/helpers/request.ts b/server/sonar-web/src/main/js/helpers/request.ts index cd437aac6f3..ee23d40b0c2 100644 --- a/server/sonar-web/src/main/js/helpers/request.ts +++ b/server/sonar-web/src/main/js/helpers/request.ts @@ -88,7 +88,7 @@ class Request { private readonly options: { method?: string } = {}, ) {} - getSubmitData(customHeaders: any = {}): { url: string; options: RequestInit } { + getSubmitData(customHeaders: any = {}): { options: RequestInit; url: string } { let { url } = this; const options: RequestInit = { ...DEFAULT_OPTIONS, ...this.options }; diff --git a/server/sonar-web/src/main/js/helpers/testMocks.ts b/server/sonar-web/src/main/js/helpers/testMocks.ts index d4fc042a594..255e7ebf9a2 100644 --- a/server/sonar-web/src/main/js/helpers/testMocks.ts +++ b/server/sonar-web/src/main/js/helpers/testMocks.ts @@ -799,7 +799,7 @@ export function mockUserGroupMember(overrides: Partial = {}): U } export function mockDocumentationMarkdown( - overrides: Partial<{ content: string; title: string; key: string }> = {}, + overrides: Partial<{ content: string; key: string; title: string }> = {}, ): string { const content = overrides.content || diff --git a/server/sonar-web/src/main/js/helpers/testReactTestingUtils.tsx b/server/sonar-web/src/main/js/helpers/testReactTestingUtils.tsx index e4eb8400ac5..0dd27c4218d 100644 --- a/server/sonar-web/src/main/js/helpers/testReactTestingUtils.tsx +++ b/server/sonar-web/src/main/js/helpers/testReactTestingUtils.tsx @@ -56,19 +56,19 @@ import { DEFAULT_METRICS } from './mocks/metrics'; import { mockAppState, mockCurrentUser } from './testMocks'; export interface RenderContext { - metrics?: Dict; appState?: AppState; - languages?: Languages; currentUser?: CurrentUser; - navigateTo?: string; featureList?: Feature[]; + languages?: Languages; + metrics?: Dict; + navigateTo?: string; } export function renderAppWithAdminContext( indexPath: string, routes: () => JSX.Element, context: RenderContext = {}, - overrides: { systemStatus?: SysStatus; adminPages?: Extension[] } = {}, + overrides: { adminPages?: Extension[]; systemStatus?: SysStatus } = {}, ): RenderResult { function MockAdminContainer() { return ( diff --git a/server/sonar-web/src/main/js/helpers/urls.ts b/server/sonar-web/src/main/js/helpers/urls.ts index 07e8c76ff0d..bb9ed3be926 100644 --- a/server/sonar-web/src/main/js/helpers/urls.ts +++ b/server/sonar-web/src/main/js/helpers/urls.ts @@ -174,13 +174,13 @@ export function getIssuesUrl(query: Query): To { * Generate URL for a component's drilldown page */ export function getComponentDrilldownUrl(options: { + asc?: boolean; + branchLike?: BranchLike; componentKey: string; + listView?: boolean; metric: string; - branchLike?: BranchLike; selectionKey?: string; treemapView?: boolean; - listView?: boolean; - asc?: boolean; }): To { const { componentKey, metric, branchLike, selectionKey, treemapView, listView, asc } = options; const query: Query = { id: componentKey, metric, ...getBranchLikeQuery(branchLike) }; diff --git a/server/sonar-web/src/main/js/hooks/__tests__/useLocalStorage-test.tsx b/server/sonar-web/src/main/js/hooks/__tests__/useLocalStorage-test.tsx index 7f1a3ad04a9..c00cab766ca 100644 --- a/server/sonar-web/src/main/js/hooks/__tests__/useLocalStorage-test.tsx +++ b/server/sonar-web/src/main/js/hooks/__tests__/useLocalStorage-test.tsx @@ -61,10 +61,10 @@ function LSComponent({ initialValue, valueToSet, }: Readonly<{ - lsKey: string; condition: (value: boolean | string) => boolean; - valueToSet: boolean | string; initialValue?: boolean | string; + lsKey: string; + valueToSet: boolean | string; }>) { const [value, setValue] = useLocalStorage(lsKey, initialValue); diff --git a/server/sonar-web/src/main/js/queries/branch.tsx b/server/sonar-web/src/main/js/queries/branch.tsx index 5bca3426de3..5b6fd07edbc 100644 --- a/server/sonar-web/src/main/js/queries/branch.tsx +++ b/server/sonar-web/src/main/js/queries/branch.tsx @@ -228,7 +228,7 @@ export function useExcludeFromPurgeMutation() { const queryClient = useQueryClient(); const invalidateKey = useMutateBranchQueryKey(); - type ExcludeFromPurgeArg = { component: Component; key: string; exclude: boolean }; + type ExcludeFromPurgeArg = { component: Component; exclude: boolean; key: string }; return useMutation({ mutationFn: async ({ component, key, exclude }: ExcludeFromPurgeArg) => { @@ -286,7 +286,7 @@ export function useDeletBranchMutation() { } export function useRenameMainBranchMutation() { - type RenameMainBranchArg = { name: string; component: Component }; + type RenameMainBranchArg = { component: Component; name: string }; const queryClient = useQueryClient(); const invalidateKey = useMutateBranchQueryKey(); @@ -349,8 +349,8 @@ export function useRefreshBranches() { } export interface WithBranchLikesProps { - branchLikes?: BranchLike[]; branchLike?: BranchLike; + branchLikes?: BranchLike[]; isFetchingBranch?: boolean; } diff --git a/server/sonar-web/src/main/js/queries/component.ts b/server/sonar-web/src/main/js/queries/component.ts index 3a45dbda571..fca3618a211 100644 --- a/server/sonar-web/src/main/js/queries/component.ts +++ b/server/sonar-web/src/main/js/queries/component.ts @@ -27,8 +27,8 @@ import { Component } from '../types/types'; const TASK_RETRY = 10_000; type QueryKeyData = { - metricKeys: string[]; branchParameters: BranchParameters; + metricKeys: string[]; }; function getComponentQueryKey(key: string, type: 'tasks'): string[]; @@ -37,7 +37,7 @@ function getComponentQueryKey(key: string, type: string, data?: QueryKeyData): s return ['component', key, type, JSON.stringify(data)]; } -function extractQueryKeyData(queryKey: string[]): { key: string; data?: QueryKeyData } { +function extractQueryKeyData(queryKey: string[]): { data?: QueryKeyData; key: string } { const [, key, , data] = queryKey; return { key, data: JSON.parse(data ?? 'null') }; } diff --git a/server/sonar-web/src/main/js/queries/devops-integration.ts b/server/sonar-web/src/main/js/queries/devops-integration.ts index 6c487127bf8..344ba6c029a 100644 --- a/server/sonar-web/src/main/js/queries/devops-integration.ts +++ b/server/sonar-web/src/main/js/queries/devops-integration.ts @@ -155,7 +155,7 @@ type SetBindingParams = ProjectAlmBindingParams & { repository: string; } & ( | { alm: AlmKeys.Azure | AlmKeys.BitbucketServer; slug: string; summaryCommentEnabled?: never } - | { alm: AlmKeys.GitHub; summaryCommentEnabled: boolean; slug?: never } + | { alm: AlmKeys.GitHub; slug?: never; summaryCommentEnabled: boolean } | { alm: Exclude; slug?: never; diff --git a/server/sonar-web/src/main/js/queries/group-memberships.ts b/server/sonar-web/src/main/js/queries/group-memberships.ts index 457040f34cf..26ffbb911f7 100644 --- a/server/sonar-web/src/main/js/queries/group-memberships.ts +++ b/server/sonar-web/src/main/js/queries/group-memberships.ts @@ -36,9 +36,9 @@ const USER_SUB_DOMAIN = 'groups-of-user'; export function useGroupMembersQuery(params: { filter?: SelectListFilter; - q?: string; groupId: string; pageIndex?: number; + q?: string; }) { return useInfiniteQuery({ queryKey: [DOMAIN, GROUP_SUB_DOMAIN, 'list', params], @@ -187,7 +187,7 @@ export function useRemoveGroupMembershipMutation() { const queryClient = useQueryClient(); return useMutation({ - mutationFn: async ({ userId, groupId }: { userId: string; groupId: string }) => { + mutationFn: async ({ userId, groupId }: { groupId: string; userId: string }) => { const memberships = await getGroupMemberships({ userId, groupId, pageSize: 1 }); if (!memberships.page.total) { throw new Error( diff --git a/server/sonar-web/src/main/js/queries/groups.ts b/server/sonar-web/src/main/js/queries/groups.ts index ac331a70473..e41ea23d850 100644 --- a/server/sonar-web/src/main/js/queries/groups.ts +++ b/server/sonar-web/src/main/js/queries/groups.ts @@ -52,8 +52,8 @@ export function useUpdateGroupMutation() { id, data, }: { - id: Parameters[0]; data: Parameters[1]; + id: Parameters[0]; }) => updateGroup(id, data), onSuccess() { queryClient.invalidateQueries({ queryKey: ['group', 'list'] }); diff --git a/server/sonar-web/src/main/js/queries/identity-provider/gitlab.ts b/server/sonar-web/src/main/js/queries/identity-provider/gitlab.ts index 4af3d08e285..02ed747445c 100644 --- a/server/sonar-web/src/main/js/queries/identity-provider/gitlab.ts +++ b/server/sonar-web/src/main/js/queries/identity-provider/gitlab.ts @@ -63,8 +63,8 @@ export function useUpdateGitLabConfigurationMutation() { id, data, }: { - id: Parameters[0]; data: Parameters[1]; + id: Parameters[0]; }) => updateGitLabConfiguration(id, data), onSuccess(data) { client.invalidateQueries({ queryKey: ['identity_provider', 'users_and_groups_provider'] }); diff --git a/server/sonar-web/src/main/js/queries/import-projects.ts b/server/sonar-web/src/main/js/queries/import-projects.ts index 996fdf94b24..5de84a7428d 100644 --- a/server/sonar-web/src/main/js/queries/import-projects.ts +++ b/server/sonar-web/src/main/js/queries/import-projects.ts @@ -32,19 +32,19 @@ import { CreateProjectModes } from '../apps/create/project/types'; export type MutationArg = AlmImport extends { - creationMode: infer A; almSetting: string; + creationMode: infer A; monorepo: false; projects: (infer R)[]; } - ? { creationMode: A; almSetting: string; monorepo: false } & R + ? { almSetting: string; creationMode: A; monorepo: false } & R : | { creationMode: CreateProjectModes.Manual; - project: string; - name: string; mainBranch: string; monorepo: false; + name: string; + project: string; } | { creationMode: CreateProjectModes; diff --git a/server/sonar-web/src/main/js/queries/newCodeDefinition.ts b/server/sonar-web/src/main/js/queries/newCodeDefinition.ts index cf00c317e0e..f3574e8defc 100644 --- a/server/sonar-web/src/main/js/queries/newCodeDefinition.ts +++ b/server/sonar-web/src/main/js/queries/newCodeDefinition.ts @@ -50,8 +50,8 @@ export function useNewCodeDefinitionMutation() { return useMutation({ mutationFn: (newCodeDefinition: { - project?: string; branch?: string; + project?: string; type?: NewCodeDefinitionType; value?: string; }) => { diff --git a/server/sonar-web/src/main/js/queries/quality-gates.ts b/server/sonar-web/src/main/js/queries/quality-gates.ts index 4f007a94a99..9ba74178359 100644 --- a/server/sonar-web/src/main/js/queries/quality-gates.ts +++ b/server/sonar-web/src/main/js/queries/quality-gates.ts @@ -167,8 +167,8 @@ export function useFixQualityGateMutation(gateName: string) { weakConditions, missingConditions, }: { - weakConditions: Condition[]; missingConditions: Condition[]; + weakConditions: Condition[]; }) => { const promiseArr = weakConditions .map((condition) => { diff --git a/server/sonar-web/src/main/js/queries/rules.ts b/server/sonar-web/src/main/js/queries/rules.ts index 2d81f77f470..47294f6124f 100644 --- a/server/sonar-web/src/main/js/queries/rules.ts +++ b/server/sonar-web/src/main/js/queries/rules.ts @@ -46,7 +46,7 @@ export function useSearchRulesQuery(data: SearchRulesQuery) { } export function useRuleDetailsQuery>>( - data: { key: string; actives?: boolean }, + data: { actives?: boolean; key: string }, options?: Omit< UseQueryOptions>, Error, T>, 'queryKey' | 'queryFn' diff --git a/server/sonar-web/src/main/js/queries/settings.ts b/server/sonar-web/src/main/js/queries/settings.ts index 225957e384f..164ee2a950a 100644 --- a/server/sonar-web/src/main/js/queries/settings.ts +++ b/server/sonar-web/src/main/js/queries/settings.ts @@ -46,7 +46,7 @@ export function useGetValueQuery(key: string, component?: string) { export function useResetSettingsMutation() { const queryClient = useQueryClient(); return useMutation({ - mutationFn: ({ keys, component }: { keys: string[]; component?: string }) => + mutationFn: ({ keys, component }: { component?: string; keys: string[] }) => resetSettingValue({ keys: keys.join(','), component }), onSuccess: (_, { keys }) => { keys.forEach((key) => { @@ -62,8 +62,8 @@ export function useSaveValuesMutation() { return useMutation({ mutationFn: ( values: { - newValue?: SettingValue; definition: ExtendedSettingDefinition; + newValue?: SettingValue; }[], ) => { return Promise.all( @@ -103,9 +103,9 @@ export function useSaveValueMutation() { definition, component, }: { - newValue: SettingValue; - definition: ExtendedSettingDefinition; component?: string; + definition: ExtendedSettingDefinition; + newValue: SettingValue; }) => { if (isDefaultValue(newValue, definition)) { return resetSettingValue({ keys: definition.key, component }); diff --git a/server/sonar-web/src/main/js/queries/users.ts b/server/sonar-web/src/main/js/queries/users.ts index c7391c0b002..9d7749d013e 100644 --- a/server/sonar-web/src/main/js/queries/users.ts +++ b/server/sonar-web/src/main/js/queries/users.ts @@ -68,8 +68,8 @@ export function useUpdateUserMutation() { id, data, }: { - id: Parameters[0]; data: Parameters[1]; + id: Parameters[0]; }) => updateUser(id, data), onSuccess() { queryClient.invalidateQueries({ queryKey: ['user', 'list'] }); diff --git a/server/sonar-web/src/main/js/sonar-aligned/components/a11y/A11yContext.tsx b/server/sonar-web/src/main/js/sonar-aligned/components/a11y/A11yContext.tsx index ba6908b1731..74a82833b54 100644 --- a/server/sonar-web/src/main/js/sonar-aligned/components/a11y/A11yContext.tsx +++ b/server/sonar-web/src/main/js/sonar-aligned/components/a11y/A11yContext.tsx @@ -22,8 +22,8 @@ import { A11ySkipLink } from '../../../types/types'; export interface A11yContextShape { addA11ySkipLink: (link: A11ySkipLink) => void; - removeA11ySkipLink: (link: A11ySkipLink) => void; links: A11ySkipLink[]; + removeA11ySkipLink: (link: A11ySkipLink) => void; } export const A11yContext = createContext({ diff --git a/server/sonar-web/src/main/js/sonar-aligned/components/controls/DocHelpTooltip.tsx b/server/sonar-web/src/main/js/sonar-aligned/components/controls/DocHelpTooltip.tsx index 70b391f9ef6..1729843f78f 100644 --- a/server/sonar-web/src/main/js/sonar-aligned/components/controls/DocHelpTooltip.tsx +++ b/server/sonar-web/src/main/js/sonar-aligned/components/controls/DocHelpTooltip.tsx @@ -35,7 +35,7 @@ export interface DocHelpTooltipProps { content?: React.ReactNode; linkTextLabel?: string; links?: Array< - { label?: string; inPlace?: boolean } & ( + { inPlace?: boolean; label?: string } & ( | { doc?: true; href: DocLink } | { doc: false; href: string } ) diff --git a/server/sonar-web/src/main/js/sonar-aligned/components/measure/Measure.tsx b/server/sonar-web/src/main/js/sonar-aligned/components/measure/Measure.tsx index 0ab20b45acf..8af8804f9ac 100644 --- a/server/sonar-web/src/main/js/sonar-aligned/components/measure/Measure.tsx +++ b/server/sonar-web/src/main/js/sonar-aligned/components/measure/Measure.tsx @@ -28,8 +28,8 @@ import { MetricType } from '~sonar-aligned/types/metrics'; import RatingTooltipContent from '../../../components/measure/RatingTooltipContent'; interface Props { - className?: string; badgeSize?: 'xs' | 'sm' | 'md'; + className?: string; decimals?: number; fontClassName?: `sw-body-${string}` | `sw-heading-lg`; metricKey: string; diff --git a/server/sonar-web/src/main/js/sonar-aligned/types/router.ts b/server/sonar-web/src/main/js/sonar-aligned/types/router.ts index 5043d5ab1e9..c31351b6578 100644 --- a/server/sonar-web/src/main/js/sonar-aligned/types/router.ts +++ b/server/sonar-web/src/main/js/sonar-aligned/types/router.ts @@ -31,8 +31,8 @@ export interface Location extends LocationRouter { export interface Router { navigate: NavigateFunction; - replace: (location: string | Partial) => void; push: (location: string | Partial) => void; + replace: (location: string | Partial) => void; searchParams: URLSearchParams; setSearchParams: ( nextInit: URLSearchParamsInit, diff --git a/server/sonar-web/src/main/js/types/alm-integration.ts b/server/sonar-web/src/main/js/types/alm-integration.ts index 0e6060673ec..1932b08ffd6 100644 --- a/server/sonar-web/src/main/js/types/alm-integration.ts +++ b/server/sonar-web/src/main/js/types/alm-integration.ts @@ -20,8 +20,8 @@ import { Dict } from './types'; export interface AzureProject { - name: string; description: string; + name: string; } export interface AzureRepository { @@ -41,16 +41,16 @@ export interface BitbucketRepository { id: number; name: string; projectKey: string; - sqProjectKey?: string; slug: string; + sqProjectKey?: string; } export interface BitbucketCloudRepository { - uuid: number; name: string; projectKey: string; - sqProjectKey?: string; slug: string; + sqProjectKey?: string; + uuid: number; workspace: string; } @@ -68,8 +68,8 @@ export interface GithubRepository { id: string; key: string; name: string; - url: string; sqProjectKey?: string; + url: string; } export interface GitlabProject { @@ -77,8 +77,8 @@ export interface GitlabProject { name: string; pathName: string; pathSlug: string; + slug: string; sqProjectKey?: string; sqProjectName?: string; - slug: string; url: string; } diff --git a/server/sonar-web/src/main/js/types/alm-settings.ts b/server/sonar-web/src/main/js/types/alm-settings.ts index 0a9b89b5763..845ba04b188 100644 --- a/server/sonar-web/src/main/js/types/alm-settings.ts +++ b/server/sonar-web/src/main/js/types/alm-settings.ts @@ -70,11 +70,11 @@ export interface GitlabBindingDefinition extends AlmBindingDefinitionBase { export interface ProjectAlmBindingResponse { alm: AlmKeys; key: string; + monorepo: boolean; repository: string; slug?: string; - url?: string; summaryCommentEnabled?: boolean; - monorepo: boolean; + url?: string; } export interface ProjectAzureBindingResponse extends ProjectAlmBindingResponse { @@ -103,8 +103,8 @@ export interface ProjectGitLabBindingResponse extends ProjectAlmBindingResponse export interface ProjectAlmBindingParams { almSetting: string; - project: string; monorepo: boolean; + project: string; } export interface AzureProjectAlmBindingParams extends ProjectAlmBindingParams { @@ -167,8 +167,8 @@ export enum ProjectAlmBindingConfigurationErrorScope { } export interface ProjectAlmBindingConfigurationErrors { - scope: ProjectAlmBindingConfigurationErrorScope; errors: { msg: string }[]; + scope: ProjectAlmBindingConfigurationErrorScope; } export function isProjectBitbucketBindingResponse( diff --git a/server/sonar-web/src/main/js/types/application.ts b/server/sonar-web/src/main/js/types/application.ts index 1684dab86f2..73400e894d4 100644 --- a/server/sonar-web/src/main/js/types/application.ts +++ b/server/sonar-web/src/main/js/types/application.ts @@ -36,19 +36,19 @@ export interface Application { } export interface ApplicationProject { + accessible?: boolean; enabled?: boolean; key: string; name: string; selected?: boolean; - accessible?: boolean; } export interface ApplicationProjectBranch { + accessible?: boolean; branch: string; enabled?: boolean; isMain: boolean; key: string; name: string; selected?: boolean; - accessible?: boolean; } diff --git a/server/sonar-web/src/main/js/types/appstate.ts b/server/sonar-web/src/main/js/types/appstate.ts index 308a01fa688..7f284ac3628 100644 --- a/server/sonar-web/src/main/js/types/appstate.ts +++ b/server/sonar-web/src/main/js/types/appstate.ts @@ -25,6 +25,7 @@ export interface AppState { authenticationError?: boolean; authorizationError?: boolean; canAdmin?: boolean; + documentationUrl: string; edition?: EditionKey; globalPages?: Extension[]; instanceUsesDefaultAdminCredentials?: boolean; @@ -36,5 +37,4 @@ export interface AppState { version: string; versionEOL: string; webAnalyticsJsPath?: string; - documentationUrl: string; } diff --git a/server/sonar-web/src/main/js/types/axios.d.ts b/server/sonar-web/src/main/js/types/axios.d.ts index 3b17f442de7..340dc60e67e 100644 --- a/server/sonar-web/src/main/js/types/axios.d.ts +++ b/server/sonar-web/src/main/js/types/axios.d.ts @@ -30,19 +30,19 @@ type OmitReadonly = Pick>; declare module 'axios' { export interface AxiosInstance { - get(url: string, config?: AxiosRequestConfig): Promise; + defaults: Omit & { + headers: HeadersDefaults & { + [key: string]: AxiosHeaderValue; + }; + }; delete(url: string, config?: AxiosRequestConfig): Promise; - post(url: string, data?: D, config?: AxiosRequestConfig): Promise; + get(url: string, config?: AxiosRequestConfig): Promise; patch>>( url: string, data?: D, config?: AxiosRequestConfig, ): Promise; - defaults: Omit & { - headers: HeadersDefaults & { - [key: string]: AxiosHeaderValue; - }; - }; + post(url: string, data?: D, config?: AxiosRequestConfig): Promise; } } diff --git a/server/sonar-web/src/main/js/types/branch-like.ts b/server/sonar-web/src/main/js/types/branch-like.ts index 653490301d0..ee9b112f073 100644 --- a/server/sonar-web/src/main/js/types/branch-like.ts +++ b/server/sonar-web/src/main/js/types/branch-like.ts @@ -40,10 +40,10 @@ export interface BranchTree { } export interface BranchLikeTree { - mainBranchTree?: BranchTree; branchTree: BranchTree[]; - parentlessPullRequests: PullRequest[]; + mainBranchTree?: BranchTree; orphanPullRequests: PullRequest[]; + parentlessPullRequests: PullRequest[]; } export interface BranchWithNewCodePeriod extends Branch { diff --git a/server/sonar-web/src/main/js/types/browser.ts b/server/sonar-web/src/main/js/types/browser.ts index 602084e817f..dbcbb4543ba 100644 --- a/server/sonar-web/src/main/js/types/browser.ts +++ b/server/sonar-web/src/main/js/types/browser.ts @@ -23,11 +23,11 @@ import { SysStatus } from './types'; export interface EnhancedWindow extends Window { baseUrl: string; - serverStatus: SysStatus; instance: InstanceType; official: boolean; - registerExtension: (key: string, start: ExtensionStartMethod, providesCSSFile?: boolean) => void; + + serverStatus: SysStatus; setWebAnalyticsPageChangeHandler: (pageHandler: (pathname: string) => void) => void; t: (...keys: string[]) => string; tp: (messageKey: string, ...parameters: Array) => string; @@ -36,8 +36,8 @@ export interface EnhancedWindow extends Window { export interface AppVariablesElement extends HTMLElement { dataset: { baseUrl: string; - serverStatus: SysStatus; instance: InstanceType; official: string; + serverStatus: SysStatus; }; } diff --git a/server/sonar-web/src/main/js/types/clean-code-taxonomy.ts b/server/sonar-web/src/main/js/types/clean-code-taxonomy.ts index 120a753bc91..13bea9be601 100644 --- a/server/sonar-web/src/main/js/types/clean-code-taxonomy.ts +++ b/server/sonar-web/src/main/js/types/clean-code-taxonomy.ts @@ -54,8 +54,8 @@ export enum SoftwareQuality { } export interface SoftwareImpact { - softwareQuality: SoftwareQuality; severity: SoftwareImpactSeverity; + softwareQuality: SoftwareQuality; } export interface SoftwareImpactMeasureData { diff --git a/server/sonar-web/src/main/js/types/coding-rules.ts b/server/sonar-web/src/main/js/types/coding-rules.ts index c85e4461a42..40e31dd5d8c 100644 --- a/server/sonar-web/src/main/js/types/coding-rules.ts +++ b/server/sonar-web/src/main/js/types/coding-rules.ts @@ -33,6 +33,6 @@ export interface GetRulesAppResponse { export interface SearchRulesResponse { actives?: Dict; facets?: { property: string; values: { count: number; val: string }[] }[]; - rules: Rule[]; paging: Paging; + rules: Rule[]; } diff --git a/server/sonar-web/src/main/js/types/component.ts b/server/sonar-web/src/main/js/types/component.ts index 0855d59b3de..5553887957a 100644 --- a/server/sonar-web/src/main/js/types/component.ts +++ b/server/sonar-web/src/main/js/types/component.ts @@ -75,8 +75,8 @@ export function isView( export interface ComponentContextShape { component?: Component; currentTask?: Task; + fetchComponent: () => Promise; isInProgress?: boolean; isPending?: boolean; onComponentChange: (changes: Partial) => void; - fetchComponent: () => Promise; } diff --git a/server/sonar-web/src/main/js/types/editions.ts b/server/sonar-web/src/main/js/types/editions.ts index 48b5b1d9ab3..0caa7eea7c0 100644 --- a/server/sonar-web/src/main/js/types/editions.ts +++ b/server/sonar-web/src/main/js/types/editions.ts @@ -34,9 +34,12 @@ export interface Edition { } export interface License { + canActivateGracePeriod: boolean; contactEmail: string; edition: string; expiresAt: string; + gracePeriodEndDate?: string; + gracePeriodExpired?: boolean; isExpired: boolean; isOfficialDistribution: boolean; isSupported: boolean; @@ -48,7 +51,4 @@ export interface License { remainingLocThreshold: number; serverId: string; type: string; - canActivateGracePeriod: boolean; - gracePeriodEndDate?: string; - gracePeriodExpired?: boolean; } diff --git a/server/sonar-web/src/main/js/types/issues.ts b/server/sonar-web/src/main/js/types/issues.ts index 593abc3b915..ff6401e089b 100644 --- a/server/sonar-web/src/main/js/types/issues.ts +++ b/server/sonar-web/src/main/js/types/issues.ts @@ -101,8 +101,8 @@ interface Comment { } export interface MessageFormatting { - start: number; end: number; + start: number; type: MessageFormattingType; } @@ -120,39 +120,39 @@ export interface RawFlowLocation { export interface RawIssue { actions: string[]; - transitions: IssueTransition[]; - tags?: string[]; assignee?: string; author?: string; - cleanCodeAttributeCategory: CleanCodeAttributeCategory; cleanCodeAttribute: CleanCodeAttribute; - impacts: SoftwareImpact[]; + cleanCodeAttributeCategory: CleanCodeAttributeCategory; codeVariants?: string[]; comments?: Comment[]; - creationDate: string; component: string; + creationDate: string; flows?: Array<{ - type?: string; description?: string; locations?: RawFlowLocation[]; + type?: string; }>; + impacts: SoftwareImpact[]; + issueStatus: IssueStatus; key: string; line?: number; + message?: string; messageFormattings?: MessageFormatting[]; prioritizedRule?: boolean; project: string; - rule: string; + quickFixAvailable?: boolean; resolution?: string; - message?: string; + rule: string; + ruleDescriptionContextKey?: string; + ruleStatus?: string; + scope: string; severity: string; status: string; - issueStatus: IssueStatus; + tags?: string[]; textRange?: TextRange; + transitions: IssueTransition[]; type: IssueType; - scope: string; - ruleDescriptionContextKey?: string; - ruleStatus?: string; - quickFixAvailable?: boolean; } export interface IssueResponse { @@ -198,11 +198,11 @@ export interface ListIssuesPromise { } export interface ReferencedComponent { + enabled?: boolean; key: string; + longName?: string; name: string; path?: string; - enabled?: boolean; - longName?: string; uuid: string; } @@ -217,7 +217,7 @@ export interface ReferencedRule { export interface RawFacet { property: string; - values: Array<{ val: string; count: number }>; + values: Array<{ count: number; val: string }>; } export interface Facet { diff --git a/server/sonar-web/src/main/js/types/l10nBundle.ts b/server/sonar-web/src/main/js/types/l10nBundle.ts index 07cd6107985..86d1c6c835d 100644 --- a/server/sonar-web/src/main/js/types/l10nBundle.ts +++ b/server/sonar-web/src/main/js/types/l10nBundle.ts @@ -30,7 +30,7 @@ export interface L10nBundleRequestResponse { } export interface L10nBundle { - timestamp?: string; locale?: string; messages?: Dict; + timestamp?: string; } diff --git a/server/sonar-web/src/main/js/types/new-code-definition.ts b/server/sonar-web/src/main/js/types/new-code-definition.ts index 50fd81832d8..43508d55a78 100644 --- a/server/sonar-web/src/main/js/types/new-code-definition.ts +++ b/server/sonar-web/src/main/js/types/new-code-definition.ts @@ -26,22 +26,22 @@ export enum NewCodeDefinitionType { } export interface NewCodeDefinition { - projectKey?: string; - type: NewCodeDefinitionType; - value?: string; effectiveValue?: string; inherited?: boolean; previousNonCompliantValue?: string; + projectKey?: string; + type: NewCodeDefinitionType; updatedAt?: number; + value?: string; } export interface NewCodeDefinitiondWithCompliance { + isCompliant: boolean; type?: NewCodeDefinitionType; value?: string; - isCompliant: boolean; } export interface NewCodeDefinitionBranch extends NewCodeDefinition { - projectKey: string; branchKey: string; + projectKey: string; } diff --git a/server/sonar-web/src/main/js/types/notifications.ts b/server/sonar-web/src/main/js/types/notifications.ts index 5f7c69a193a..5a8dc969a88 100644 --- a/server/sonar-web/src/main/js/types/notifications.ts +++ b/server/sonar-web/src/main/js/types/notifications.ts @@ -54,6 +54,6 @@ export interface NotificationsResponse { export interface AddRemoveNotificationParameters { channel: string; - type: string; project?: string; + type: string; } diff --git a/server/sonar-web/src/main/js/types/plugins.ts b/server/sonar-web/src/main/js/types/plugins.ts index c8fd4b1d9c3..4e0f98ee72f 100644 --- a/server/sonar-web/src/main/js/types/plugins.ts +++ b/server/sonar-web/src/main/js/types/plugins.ts @@ -18,23 +18,23 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ export interface Plugin { - key: string; - name: string; category?: string; description?: string; editionBundled?: boolean; + homepageUrl?: string; + issueTrackerUrl?: string; + key: string; license?: string; + name: string; organizationName?: string; - homepageUrl?: string; organizationUrl?: string; - issueTrackerUrl?: string; termsAndConditionsUrl?: string; } export interface PendingPluginResult { installing: PendingPlugin[]; - updating: PendingPlugin[]; removing: PendingPlugin[]; + updating: PendingPlugin[]; } export interface AvailablePlugin extends Plugin { @@ -43,32 +43,32 @@ export interface AvailablePlugin extends Plugin { } export interface PendingPlugin extends Plugin { - version: string; implementationBuild: string; + version: string; } export interface InstalledPlugin extends PendingPlugin { documentationPath?: string; - issueTrackerUrl?: string; filename: string; hash: string; + issueTrackerUrl?: string; sonarLintSupported: boolean; updatedAt: number; updates?: Update[]; } export interface Release { - version: string; + changeLogUrl?: string; date: string; description?: string; - changeLogUrl?: string; + version: string; } export interface Update { - status: string; + previousUpdates?: Update[]; release?: Release; requires: Plugin[]; - previousUpdates?: Update[]; + status: string; } export enum PluginType { diff --git a/server/sonar-web/src/main/js/types/project-activity.ts b/server/sonar-web/src/main/js/types/project-activity.ts index 986484e5712..16611694225 100644 --- a/server/sonar-web/src/main/js/types/project-activity.ts +++ b/server/sonar-web/src/main/js/types/project-activity.ts @@ -39,14 +39,6 @@ export interface ParsedAnalysis extends BaseAnalysis { export interface AnalysisEvent { category: ProjectAnalysisEventCategory | ApplicationAnalysisEventCategory; - description?: string; - key: string; - name: string; - qualityGate?: { - failing: Array<{ branch: string; key: string; name: string }>; - status: Status; - stillFailing: boolean; - }; definitionChange?: { projects: Array<{ branch?: string; @@ -57,6 +49,14 @@ export interface AnalysisEvent { oldBranch?: string; }>; }; + description?: string; + key: string; + name: string; + qualityGate?: { + failing: Array<{ branch: string; key: string; name: string }>; + status: Status; + stillFailing: boolean; + }; qualityProfile?: { key: string; languageKey: string; @@ -97,8 +97,8 @@ export interface HistoryItem { } export interface MeasureHistory { - metric: MetricKey; history: HistoryItem[]; + metric: MetricKey; } export interface Serie { diff --git a/server/sonar-web/src/main/js/types/provisioning.ts b/server/sonar-web/src/main/js/types/provisioning.ts index c9b818c75fa..26d8f5af5c0 100644 --- a/server/sonar-web/src/main/js/types/provisioning.ts +++ b/server/sonar-web/src/main/js/types/provisioning.ts @@ -21,15 +21,14 @@ import { TaskStatuses } from './tasks'; export type GithubStatusDisabled = { enabled: false; - nextSync?: never; lastSync?: never; + nextSync?: never; }; export interface GithubStatusEnabled extends AlmSyncStatus { enabled: true; } export interface AlmSyncStatus { - nextSync?: { status: TaskStatuses.Pending | TaskStatuses.InProgress }; lastSync?: { executionTimeMs: number; finishedAt: number; @@ -37,16 +36,17 @@ export interface AlmSyncStatus { warningMessage?: string; } & ( | { + errorMessage?: never; status: TaskStatuses.Success; summary?: string; - errorMessage?: never; } | { + errorMessage?: string; status: TaskStatuses.Canceled | TaskStatuses.Failed; summary?: never; - errorMessage?: string; } ); + nextSync?: { status: TaskStatuses.Pending | TaskStatuses.InProgress }; } export type GithubStatus = GithubStatusDisabled | GithubStatusEnabled; @@ -58,70 +58,70 @@ export enum GitHubProvisioningStatus { type GitHubProvisioning = | { - status: GitHubProvisioningStatus.Success; errorMessage?: never; + status: GitHubProvisioningStatus.Success; } | { - status: GitHubProvisioningStatus.Failed; errorMessage: string; + status: GitHubProvisioningStatus.Failed; }; export interface GitHubConfigurationStatus { application: { - jit: GitHubProvisioning; autoProvisioning: GitHubProvisioning; + jit: GitHubProvisioning; }; installations: { - organization: string; - jit: GitHubProvisioning; autoProvisioning: GitHubProvisioning; + jit: GitHubProvisioning; + organization: string; }[]; } export interface GitHubMapping { - readonly id: string; - readonly githubRole: string; readonly baseRole?: boolean; + readonly githubRole: string; + readonly id: string; permissions: { - user: boolean; + admin: boolean; codeViewer: boolean; issueAdmin: boolean; - securityHotspotAdmin: boolean; - admin: boolean; scan: boolean; + securityHotspotAdmin: boolean; + user: boolean; }; } export interface GitLabConfigurationCreateBody { applicationId: string; - url: string; secret: string; synchronizeGroups: boolean; + url: string; } export type GitLabConfigurationUpdateBody = { + allowUsersToSignUp?: boolean; + allowedGroups?: string[]; applicationId?: string; - url?: string; - secret?: string; - synchronizeGroups?: boolean; enabled?: boolean; - provisioningType?: ProvisioningType; provisioningToken?: string; - allowedGroups?: string[]; - allowUsersToSignUp?: boolean; + provisioningType?: ProvisioningType; + secret?: string; + synchronizeGroups?: boolean; + url?: string; }; export type GitlabConfiguration = { - id: string; - enabled: boolean; - applicationId: string; - synchronizeGroups: boolean; - url: string; - provisioningType: ProvisioningType; - allowedGroups: string[]; allowUsersToSignUp: boolean; + allowedGroups: string[]; + applicationId: string; + enabled: boolean; errorMessage?: string; + id: string; isProvisioningTokenSet: boolean; + provisioningType: ProvisioningType; + synchronizeGroups: boolean; + url: string; }; export enum ProvisioningType { diff --git a/server/sonar-web/src/main/js/types/quality-gates.ts b/server/sonar-web/src/main/js/types/quality-gates.ts index 308147bad96..a936351815d 100644 --- a/server/sonar-web/src/main/js/types/quality-gates.ts +++ b/server/sonar-web/src/main/js/types/quality-gates.ts @@ -24,10 +24,10 @@ import { CaycStatus, MeasureEnhanced, Metric } from './types'; import { UserBase } from './users'; export interface QualityGateProjectStatus { + caycStatus: CaycStatus; conditions?: QualityGateProjectStatusCondition[]; ignoredConditions: boolean; status: Status; - caycStatus: CaycStatus; } export interface QualityGateProjectStatusCondition { @@ -49,30 +49,30 @@ export interface QualityGateApplicationStatusCondition { comparator: string; errorThreshold?: string; metric: string; - periodIndex?: number; onLeak?: boolean; + periodIndex?: number; status: Status; value: string; warningThreshold?: string; } export interface QualityGateApplicationStatusChildProject { + caycStatus: CaycStatus; conditions: QualityGateApplicationStatusCondition[]; key: string; name: string; status: Status; - caycStatus: CaycStatus; } export interface QualityGateStatus { + branchLike?: BranchLike; + caycStatus: CaycStatus; conditions: QualityGateStatusConditionEnhanced[]; failedConditions: QualityGateStatusConditionEnhanced[]; ignoredConditions?: boolean; - caycStatus: CaycStatus; key: string; name: string; status: Status; - branchLike?: BranchLike; } export interface QualityGateStatusCondition { diff --git a/server/sonar-web/src/main/js/types/rules.ts b/server/sonar-web/src/main/js/types/rules.ts index 761548feb9f..1f5ca870388 100644 --- a/server/sonar-web/src/main/js/types/rules.ts +++ b/server/sonar-web/src/main/js/types/rules.ts @@ -33,6 +33,8 @@ export interface SearchRulesQuery { cwe?: string; f?: string; facets?: string; + impactSeverities?: string; + impactSoftwareQualities?: string; include_external?: boolean | string; inheritance?: string; is_template?: boolean | string; @@ -40,20 +42,18 @@ export interface SearchRulesQuery { owaspTop10?: string; ['owaspTop10-2021']?: string; p?: number; + prioritizedRule?: boolean | string; ps?: number; q?: string; qprofile?: string; repositories?: string; rule_key?: string; s?: string; - impactSoftwareQualities?: string; - impactSeverities?: string; sonarsourceSecurity?: string; statuses?: string; tags?: string; template_key?: string; types?: string; - prioritizedRule?: boolean | string; } export enum RulesFacetName { diff --git a/server/sonar-web/src/main/js/types/security-hotspots.ts b/server/sonar-web/src/main/js/types/security-hotspots.ts index 9b9934f19dd..4c5c556ac75 100644 --- a/server/sonar-web/src/main/js/types/security-hotspots.ts +++ b/server/sonar-web/src/main/js/types/security-hotspots.ts @@ -59,6 +59,9 @@ export interface RawHotspot { author?: string; component: string; creationDate: string; + flows?: Array<{ + locations?: Array>; + }>; key: string; line?: number; message: string; @@ -70,9 +73,6 @@ export interface RawHotspot { status: HotspotStatus; updateDate: string; vulnerabilityProbability: HotspotRatingEnum; - flows?: Array<{ - locations?: Array>; - }>; } export interface Hotspot { @@ -101,18 +101,18 @@ export interface Hotspot { } export interface HotspotComponent { + branch?: string; key: string; - qualifier: ComponentQualifier; - name: string; longName: string; + name: string; path: string; - branch?: string; pullRequest?: string; + qualifier: ComponentQualifier; } export interface HotspotUpdateFields { - status: HotspotStatus; resolution?: HotspotResolution; + status: HotspotStatus; } export interface HotspotUpdate extends HotspotUpdateFields { @@ -127,24 +127,24 @@ export interface HotspotRule { } export interface HotspotComment { - key: string; + createdAt: string; htmlText: string; + key: string; + login: string; markdown: string; updatable: boolean; - createdAt: string; - login: string; user: UserBase; } export interface ReviewHistoryElement { - type: ReviewHistoryType; date: string; - user: Pick; diffs?: IssueChangelogDiff[]; html?: string; key?: string; - updatable?: boolean; markdown?: string; + type: ReviewHistoryType; + updatable?: boolean; + user: Pick; } export enum ReviewHistoryType { @@ -154,15 +154,15 @@ export enum ReviewHistoryType { } export interface HotspotSearchResponse { - components?: { key: string; qualifier: string; name: string }[]; + components?: { key: string; name: string; qualifier: string }[]; hotspots: RawHotspot[]; paging: Paging; } export interface HotspotSetStatusRequest { - status: HotspotStatus; - resolution?: HotspotResolution; comment?: string; + resolution?: HotspotResolution; + status: HotspotStatus; } export interface HotspotAssignRequest { diff --git a/server/sonar-web/src/main/js/types/security.ts b/server/sonar-web/src/main/js/types/security.ts index 200a9bf562b..2c4aff9923a 100644 --- a/server/sonar-web/src/main/js/types/security.ts +++ b/server/sonar-web/src/main/js/types/security.ts @@ -32,5 +32,5 @@ export enum SecurityStandard { export type StandardType = SecurityStandard; export type Standards = { - [key in StandardType]: Dict<{ title: string; description?: string; level?: string }>; + [key in StandardType]: Dict<{ description?: string; level?: string; title: string }>; }; diff --git a/server/sonar-web/src/main/js/types/settings.ts b/server/sonar-web/src/main/js/types/settings.ts index bf4720a3968..7722625a5ea 100644 --- a/server/sonar-web/src/main/js/types/settings.ts +++ b/server/sonar-web/src/main/js/types/settings.ts @@ -90,17 +90,17 @@ export interface ExtendedSettingDefinition extends SettingDefinition { } export interface DefinitionV2 { - name: string; - key: string; description?: string; - secured: boolean; + key: string; multiValues?: boolean; + name: string; + secured: boolean; type?: SettingType; } export interface SettingValueResponse { - settings: SettingValue[]; setSecuredSettings: string[]; + settings: SettingValue[]; } export interface SettingValue { diff --git a/server/sonar-web/src/main/js/types/system.ts b/server/sonar-web/src/main/js/types/system.ts index a7f3912f2a9..12ec0ea7bc8 100644 --- a/server/sonar-web/src/main/js/types/system.ts +++ b/server/sonar-web/src/main/js/types/system.ts @@ -46,10 +46,10 @@ export enum MigrationStatus { } export interface MigrationsStatusResponse { - status: MigrationStatus; completedSteps?: number; - totalSteps?: number; - startedAt?: string; - message?: string; expectedFinishTimestamp?: string; + message?: string; + startedAt?: string; + status: MigrationStatus; + totalSteps?: number; } diff --git a/server/sonar-web/src/main/js/types/tasks.ts b/server/sonar-web/src/main/js/types/tasks.ts index 0208c9bee70..83d73da3cc1 100644 --- a/server/sonar-web/src/main/js/types/tasks.ts +++ b/server/sonar-web/src/main/js/types/tasks.ts @@ -42,7 +42,6 @@ export enum TaskStatuses { export interface Task { analysisId?: string; branch?: string; - nodeName?: string; componentKey?: string; componentName?: string; componentQualifier?: string; @@ -54,6 +53,8 @@ export interface Task { hasErrorStacktrace?: boolean; hasScannerContext?: boolean; id: string; + infoMessages?: string[]; + nodeName?: string; pullRequest?: string; pullRequestTitle?: string; scannerContext?: string; @@ -64,23 +65,22 @@ export interface Task { type: TaskTypes; warningCount?: number; warnings?: string[]; - infoMessages?: string[]; } export interface TaskWarning { + dismissable: boolean; key: string; message: string; - dismissable: boolean; } export interface ActivityRequestParameters { component?: string; + maxExecutedAt?: string; + minSubmittedAt?: string; + onlyCurrents?: boolean; p?: number; ps?: number; + q?: string; status?: string; type?: string; - onlyCurrents?: boolean; - minSubmittedAt?: string; - maxExecutedAt?: string; - q?: string; } diff --git a/server/sonar-web/src/main/js/types/token.ts b/server/sonar-web/src/main/js/types/token.ts index 1a397a6d47f..7f6beac4171 100644 --- a/server/sonar-web/src/main/js/types/token.ts +++ b/server/sonar-web/src/main/js/types/token.ts @@ -31,13 +31,13 @@ export enum TokenExpiration { } export interface UserToken { - name: string; createdAt: string; - lastConnectionDate?: string; expirationDate?: string; isExpired: boolean; + lastConnectionDate?: string; + name: string; + project?: { key: string; name: string }; type: TokenType; - project?: { name: string; key: string }; } export interface NewUserToken extends UserToken { diff --git a/server/sonar-web/src/main/js/types/types.ts b/server/sonar-web/src/main/js/types/types.ts index ea0fe08df08..cfa5888abec 100644 --- a/server/sonar-web/src/main/js/types/types.ts +++ b/server/sonar-web/src/main/js/types/types.ts @@ -44,8 +44,8 @@ export interface AlmApplication extends IdentityProvider { } export interface AlmRepository { - label: string; installationKey: string; + label: string; linkedProjectKey?: string; linkedProjectName?: string; private?: boolean; @@ -90,9 +90,9 @@ interface ComponentConfiguration { showBackgroundTasks?: boolean; showHistory?: boolean; showLinks?: boolean; + showPermissions?: boolean; showQualityGates?: boolean; showQualityProfiles?: boolean; - showPermissions?: boolean; showSettings?: boolean; showUpdateKey?: boolean; } @@ -100,10 +100,10 @@ interface ComponentConfiguration { export interface ComponentMeasureIntern { analysisDate?: string; branch?: string; + canBrowseAllChildProjects?: boolean; description?: string; isFavorite?: boolean; isRecentlyBrowsed?: boolean; - canBrowseAllChildProjects?: boolean; key: string; match?: string; name: string; @@ -118,17 +118,17 @@ export interface ComponentMeasure extends ComponentMeasureIntern { } export interface ComponentMeasureEnhanced extends ComponentMeasureIntern { - value?: string; leak?: string; measures: MeasureEnhanced[]; + value?: string; } export interface Condition { error: string; id: string; + isCaycCondition?: boolean; metric: string; op?: string; - isCaycCondition?: boolean; } export interface CustomMeasure { @@ -136,16 +136,16 @@ export interface CustomMeasure { description?: string; id: string; metric: { + domain?: string; key: string; name: string; - domain?: string; type: string; }; - projectKey: string; pending?: boolean; + projectKey: string; + updatedAt?: string; user: UserBase; value: string; - updatedAt?: string; } export interface Duplication { @@ -183,9 +183,9 @@ export enum FlowType { } export interface Flow { - type: FlowType; description?: string; locations: FlowLocation[]; + type: FlowType; } export interface FlowLocation { @@ -198,16 +198,16 @@ export interface FlowLocation { } export interface Group { - id: string; default?: boolean; - name: string; description?: string; + id: string; managed: boolean; + name: string; } export interface GroupMembership { - id: string; groupId: string; + id: string; userId: string; } @@ -222,8 +222,8 @@ export interface IdentityProvider { helpMessage?: string; iconPath: string; key: string; - name: string; manage?: boolean; + name: string; } export interface Issue extends Omit { @@ -239,12 +239,12 @@ export interface Issue extends Omit { componentUuid: string; effort?: string; externalRuleEngine?: string; - fromExternalRule?: boolean; flows: FlowLocation[][]; flowsWithType: Flow[]; + fromExternalRule?: boolean; message: string; - projectName: string; projectKey: string; + projectName: string; pullRequest?: string; ruleName: string; secondaryLocations: FlowLocation[]; @@ -254,10 +254,10 @@ export interface IssueChangelog { avatar?: string; creationDate: string; diffs: IssueChangelogDiff[]; - user: string; + externalUser?: string; isUserActive: boolean; + user: string; userName: string; - externalUser?: string; webhookSource?: string; } @@ -319,8 +319,8 @@ export interface Measure extends MeasureIntern { } export interface MeasureEnhanced extends MeasureIntern { - metric: Metric; leak?: string; + metric: Metric; } export interface MeasureIntern { @@ -350,9 +350,9 @@ export interface MyProject { key: string; lastAnalysisDate?: string; links: Array<{ + href: string; name: string; type: string; - href: string; }>; name: string; qualityGate?: string; @@ -397,9 +397,9 @@ export interface Permission { } export interface PermissionDefinition { + description: string; key: string; name: string; - description: string; } export type PermissionDefinitions = Array; @@ -412,32 +412,32 @@ export interface PermissionDefinitionGroup { export interface PermissionGroup { description?: string; id?: string; + managed?: boolean; name: string; permissions: string[]; - managed?: boolean; } export interface PermissionUser extends UserActive { - permissions: string[]; managed?: boolean; + permissions: string[]; } export interface PermissionTemplateGroup { + groupsCount: number; key: string; usersCount: number; - groupsCount: number; withProjectCreator?: boolean; } export interface PermissionTemplate { + createdAt: string; defaultFor: string[]; + description?: string; id: string; name: string; - description?: string; + permissions: Array; projectKeyPattern?: string; - createdAt: string; updatedAt?: string; - permissions: Array; } export interface ProfileInheritanceDetails { @@ -477,14 +477,14 @@ export interface QualityGate extends QualityGatePreview { rename?: boolean; setAsDefault?: boolean; }; + caycStatus?: CaycStatus; conditions?: Condition[]; isBuiltIn?: boolean; - caycStatus?: CaycStatus; } export interface Rule { - cleanCodeAttributeCategory?: CleanCodeAttributeCategory; cleanCodeAttribute?: CleanCodeAttribute; + cleanCodeAttributeCategory?: CleanCodeAttributeCategory; impacts: SoftwareImpact[]; isTemplate?: boolean; key: string; @@ -500,10 +500,9 @@ export interface Rule { } export interface RestRule { - cleanCodeAttributeCategory?: CleanCodeAttributeCategory; cleanCodeAttribute?: CleanCodeAttribute; + cleanCodeAttributeCategory?: CleanCodeAttributeCategory; impacts: SoftwareImpact[]; - template?: boolean; key: string; language?: string; languageName?: string; @@ -513,6 +512,7 @@ export interface RestRule { status: string; systemTags?: string[]; tags?: string[]; + template?: boolean; type: RuleType; } @@ -520,8 +520,8 @@ export interface RuleActivation { createdAt: string; inherit: RuleInheritance; params: { key: string; value: string }[]; - qProfile: string; prioritizedRule: boolean; + qProfile: string; severity: string; } @@ -564,11 +564,11 @@ export interface RestRuleDetails extends RestRule { createdAt: string; descriptionSections?: RuleDescriptionSection[]; educationPrinciples?: string[]; + external?: boolean; gapDescription?: string; htmlDesc?: string; htmlNote?: string; internalKey?: string; - external?: boolean; markdownDescription?: string; markdownNote?: string; remFnBaseEffort?: string; @@ -600,9 +600,9 @@ export type RuleScope = 'MAIN' | 'TEST' | 'ALL'; export type RuleType = 'BUG' | 'VULNERABILITY' | 'CODE_SMELL' | 'SECURITY_HOTSPOT' | 'UNKNOWN'; export interface Snippet { - start: number; end: number; index: number; + start: number; toDelete?: boolean; } @@ -634,9 +634,11 @@ export interface SourceLine { export type SourceLineCoverageStatus = 'uncovered' | 'partially-covered' | 'covered'; export interface SourceViewerFile { + canMarkAsFavorite?: boolean; fav?: boolean; key: string; leakPeriodDate?: string; + longName?: string; measures: { coverage?: string; duplicationDensity?: string; @@ -644,17 +646,15 @@ export interface SourceViewerFile { lines?: string; tests?: string; }; - canMarkAsFavorite?: boolean; - path: string; name?: string; - longName?: string; + path: string; project: string; projectName: string; q: ComponentQualifier; uuid: string; } -export type StandardSecurityCategories = Dict<{ title: string; description?: string }>; +export type StandardSecurityCategories = Dict<{ description?: string; title: string }>; export interface SubscriptionPlan { maxNcloc: number; @@ -695,10 +695,10 @@ export interface SysInfoCluster extends SysInfoBase { ncloc: number; }; System: { + 'External Users and Groups Provisioning'?: Provider; 'High Availability': true; 'Server ID': string; Version: string; - 'External Users and Groups Provisioning'?: Provider; }; } @@ -761,10 +761,10 @@ export interface TestCase { } export interface TextRange { - startLine: number; - startOffset: number; endLine: number; endOffset: number; + startLine: number; + startOffset: number; } export interface UserSelected extends UserActive { @@ -772,20 +772,20 @@ export interface UserSelected extends UserActive { } export interface UserGroupMember { - selected: boolean; login: string; - name: string; managed: boolean; + name: string; + selected: boolean; } export namespace WebApi { export interface Action { - key: string; changelog: Changelog[]; - description: string; deprecatedSince?: string; + description: string; hasResponseExample: boolean; internal: boolean; + key: string; params?: Param[]; post: boolean; since?: string; @@ -819,9 +819,9 @@ export namespace WebApi { exampleValue?: string; internal: boolean; key: string; + maxValuesAllowed?: number; maximumLength?: number; maximumValue?: number; - maxValuesAllowed?: number; minimumLength?: number; minimumValue?: number; possibleValues?: string[]; diff --git a/server/sonar-web/src/main/js/types/users.ts b/server/sonar-web/src/main/js/types/users.ts index e58243d7a79..b7090267fdf 100644 --- a/server/sonar-web/src/main/js/types/users.ts +++ b/server/sonar-web/src/main/js/types/users.ts @@ -18,10 +18,10 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ export interface CurrentUser { + dismissedNotices: { [key: string]: boolean }; isLoggedIn: boolean; permissions?: { global: string[] }; usingSonarLintConnectedMode?: boolean; - dismissedNotices: { [key: string]: boolean }; } export interface Notice { @@ -52,13 +52,13 @@ export interface LoggedInUser extends CurrentUser, UserActive { } export type HomePage = - | { type: 'APPLICATION'; branch: string | undefined; component: string } + | { branch: string | undefined; component: string; type: 'APPLICATION' } | { type: 'ISSUES' } | { type: 'MY_ISSUES' } | { type: 'MY_PROJECTS' } - | { type: 'PORTFOLIO'; component: string } + | { component: string; type: 'PORTFOLIO' } | { type: 'PORTFOLIOS' } - | { type: 'PROJECT'; branch: string | undefined; component: string } + | { branch: string | undefined; component: string; type: 'PROJECT' } | { type: 'PROJECTS' }; export interface CurrentUserSetting { @@ -81,10 +81,10 @@ export interface User extends UserBase { externalProvider?: string; groups?: string[]; lastConnectionDate?: string; - sonarLintLastConnectionDate?: string; local: boolean; managed: boolean; scmAccounts?: string[]; + sonarLintLastConnectionDate?: string; tokensCount?: number; } @@ -103,19 +103,19 @@ export interface RestUserBase { } export interface RestUser extends RestUserBase { - email: string | null; active: boolean; - local: boolean; - externalProvider: string; avatar: string; + email: string | null; + externalProvider: string; + local: boolean; } export interface RestUserDetailed extends RestUser { - managed: boolean; externalLogin: string; - sonarQubeLastConnectionDate: string | null; - sonarLintLastConnectionDate: string | null; + managed: boolean; scmAccounts: string[]; + sonarLintLastConnectionDate: string | null; + sonarQubeLastConnectionDate: string | null; } export const enum ChangePasswordResults { diff --git a/server/sonar-web/src/main/js/types/webhook.ts b/server/sonar-web/src/main/js/types/webhook.ts index 2e3e25ddce3..06d52535e28 100644 --- a/server/sonar-web/src/main/js/types/webhook.ts +++ b/server/sonar-web/src/main/js/types/webhook.ts @@ -50,7 +50,7 @@ export interface WebhookDelivery { export type WebhookSearchDeliveriesPayload = { ceTaskId?: string; componentKey?: string; - webhook?: string; p?: number; ps?: number; + webhook?: string; }; diff --git a/server/sonar-web/yarn.lock b/server/sonar-web/yarn.lock index a63a10564b4..0f29b3d97d7 100644 --- a/server/sonar-web/yarn.lock +++ b/server/sonar-web/yarn.lock @@ -6025,6 +6025,7 @@ __metadata: eslint-plugin-react: "npm:7.33.2" eslint-plugin-react-hooks: "npm:4.6.0" eslint-plugin-testing-library: "npm:6.2.0" + eslint-plugin-typescript-sort-keys: "npm:3.2.0" formik: "npm:2.4.5" fs-extra: "npm:11.2.0" http-proxy: "npm:1.18.1" @@ -8878,6 +8879,21 @@ __metadata: languageName: node linkType: hard +"eslint-plugin-typescript-sort-keys@npm:3.2.0": + version: 3.2.0 + resolution: "eslint-plugin-typescript-sort-keys@npm:3.2.0" + dependencies: + "@typescript-eslint/experimental-utils": "npm:^5.0.0" + json-schema: "npm:^0.4.0" + natural-compare-lite: "npm:^1.4.0" + peerDependencies: + "@typescript-eslint/parser": ^6 || ^7 + eslint: ^7 || ^8 + typescript: ^3 || ^4 || ^5 + checksum: 10/6ef3273ed1a0a1c60dd6750b4c9884f6c43668f552021d622492c26f2f2d8f7d86ca7f9fbfff23e3b756854bf1014e5f8e690eddccfb6ad569987b88650a9d55 + languageName: node + linkType: hard + "eslint-scope@npm:^5.1.1": version: 5.1.1 resolution: "eslint-scope@npm:5.1.1" -- 2.39.5