From bdf5a70ff1b33e143c929c91ac41a4495995ee66 Mon Sep 17 00:00:00 2001 From: Viktor Vorona Date: Mon, 5 Jun 2023 17:20:05 +0200 Subject: [PATCH] [NO-JIRA] react/jsx-boolean-value -> never --- server/sonar-web/.eslintrc | 1 + server/sonar-web/design-system/.eslintrc | 1 + .../src/components/Accordion.tsx | 2 +- .../src/components/Breadcrumbs.tsx | 2 +- .../src/components/BubbleChart.tsx | 2 +- .../design-system/src/components/Checkbox.tsx | 2 +- .../src/components/DatePicker.tsx | 4 +-- .../design-system/src/components/FacetBox.tsx | 2 +- .../src/components/InteractiveIcon.tsx | 2 +- .../src/components/MultiSelect.tsx | 6 ++--- .../src/components/MultiSelectOption.tsx | 2 +- .../src/components/SearchHighlighter.tsx | 2 +- .../src/components/SearchSelectDropdown.tsx | 8 +++--- .../design-system/src/components/Tags.tsx | 2 +- .../src/components/__tests__/Avatar-test.tsx | 2 +- .../components/__tests__/Dropdown-test.tsx | 2 +- .../__tests__/DropdownMenu-test.tsx | 4 +-- .../components/__tests__/LineNumber-test.tsx | 2 +- .../components/__tests__/LineWrapper-test.tsx | 4 +-- .../src/components/__tests__/Link-test.tsx | 8 +++--- .../src/components/__tests__/NavLink-test.tsx | 8 +++--- .../__tests__/SearchSelectDropdown-test.tsx | 2 +- .../__tests__/SelectionCard-test.tsx | 2 +- .../src/components/__tests__/Table-test.tsx | 2 +- .../src/components/modal/Modal.tsx | 6 ++--- .../js/app/components/GlobalContainer.tsx | 2 +- .../src/main/js/app/components/Landing.tsx | 2 +- .../components/SimpleSessionsContainer.tsx | 2 +- .../js/app/components/SonarLintConnection.tsx | 8 +++--- .../extensions/CreateApplicationForm.tsx | 2 +- .../components/global-search/GlobalSearch.tsx | 4 +-- .../global-search/GlobalSearchResult.tsx | 2 +- .../nav/component/AnalysisStatus.tsx | 16 ++---------- .../components/nav/component/Breadcrumb.tsx | 2 +- .../js/app/components/nav/component/Menu.tsx | 8 +++--- .../__tests__/AnalysisErrorMessage-test.tsx | 2 +- .../branch-like/BranchLikeNavigation.tsx | 2 +- .../nav/component/branch-like/Menu.tsx | 2 +- .../nav/component/branch-like/MenuItem.tsx | 2 +- .../badges/ProjectBadges.tsx | 5 +--- .../projectInformation/meta/MetaKey.tsx | 2 +- .../projectInformation/meta/MetaLink.tsx | 2 +- .../projectInformation/meta/MetaTags.tsx | 6 ++--- .../notifications/ProjectNotifications.tsx | 2 +- .../nav/global/GlobalNavUserMenu.tsx | 2 +- .../components/nav/settings/SettingsNav.tsx | 26 +++++++++---------- .../__tests__/UpdateNotification-test.tsx | 2 +- .../main/js/app/utils/NavigateWithParams.tsx | 5 +--- .../app/utils/NavigateWithSearchAndHash.tsx | 2 +- .../src/main/js/app/utils/startReactApp.tsx | 2 +- .../main/js/apps/account/components/Nav.tsx | 2 +- .../account/notifications/ProjectModal.tsx | 4 +-- .../notifications/ProjectNotifications.tsx | 2 +- .../js/apps/account/projects/ProjectCard.tsx | 2 +- .../src/main/js/apps/account/routes.tsx | 2 +- .../main/js/apps/account/security/Tokens.tsx | 2 +- .../components/BackgroundTasksApp.tsx | 2 +- .../components/StatPendingCount.tsx | 2 +- .../components/TaskActions.tsx | 4 +-- .../background-tasks/components/TaskDate.tsx | 2 +- .../background-tasks/components/TaskDay.tsx | 2 +- .../ChangeAdminPasswordAppRenderer.tsx | 4 +-- .../js/apps/code/components/Breadcrumbs.tsx | 2 +- .../main/js/apps/code/components/CodeApp.tsx | 4 +-- .../js/apps/code/components/ComponentPin.tsx | 2 +- .../js/apps/code/components/Components.tsx | 4 +-- .../js/apps/code/components/SearchResults.tsx | 2 +- .../code/components/SourceViewerWrapper.tsx | 2 +- .../components/ActivationSeverityFacet.tsx | 2 +- .../coding-rules/components/BulkChange.tsx | 2 +- .../components/BulkChangeModal.tsx | 4 +-- .../components/CodingRulesApp.tsx | 2 +- .../components/CustomRuleFormModal.tsx | 8 +++--- .../components/DefaultSeverityFacet.tsx | 2 +- .../components/InheritanceFacet.tsx | 2 +- .../coding-rules/components/RuleDetails.tsx | 2 +- .../components/RuleDetailsCustomRules.tsx | 2 +- .../components/RuleDetailsDescription.tsx | 2 +- .../components/RuleDetailsMeta.tsx | 2 +- .../coding-rules/components/TemplateFacet.tsx | 2 +- .../__tests__/RuleDetailsMeta-test.tsx | 2 +- .../__tests__/RuleListItem-test.tsx | 2 +- .../components/LeakPeriodLegend.tsx | 2 +- .../components/MeasureContent.tsx | 2 +- .../components/MeasureOverview.tsx | 4 +-- .../components/MeasureViewSelect.tsx | 2 +- .../drilldown/ComponentCell.tsx | 2 +- .../drilldown/MeasureCell.tsx | 2 +- .../drilldown/TreeMapView.tsx | 4 +-- .../js/apps/component-measures/routes.tsx | 6 ++--- .../Azure/AzurePersonalAccessTokenForm.tsx | 4 +-- .../project/Azure/AzureProjectAccordion.tsx | 2 +- .../BitbucketSearchResults.tsx | 8 +++--- .../apps/create/project/CreateProjectPage.tsx | 2 +- .../components/PersonalAccessTokenForm.tsx | 8 +++--- .../project/manual/ManualProjectCreate.tsx | 6 ++--- .../src/main/js/apps/groups/GroupsApp.tsx | 2 +- .../groups/components/EditMembersModal.tsx | 2 +- .../js/apps/groups/components/GroupForm.tsx | 4 +-- .../main/js/apps/groups/components/Header.tsx | 2 +- .../js/apps/groups/components/ListItem.tsx | 2 +- .../apps/issues/components/AssigneeSelect.tsx | 2 +- .../issues/components/BulkChangeModal.tsx | 6 ++--- .../js/apps/issues/components/IssueHeader.tsx | 2 +- .../js/apps/issues/components/IssuesApp.tsx | 2 +- .../ComponentSourceSnippetGroupViewer.tsx | 2 +- .../SnippetViewer.tsx | 4 +-- .../IssueSourceViewerHeader-test.tsx | 2 +- .../apps/issues/sidebar/CreationDateFacet.tsx | 2 +- .../apps/issues/sidebar/ResolutionFacet.tsx | 2 +- .../js/apps/issues/sidebar/ScopeFacet.tsx | 2 +- .../js/apps/issues/sidebar/SeverityFacet.tsx | 2 +- .../js/apps/issues/sidebar/StandardFacet.tsx | 2 +- .../js/apps/issues/sidebar/StatusFacet.tsx | 2 +- .../js/apps/maintenance/components/App.tsx | 2 +- .../components/SetupAppContainer.tsx | 4 +-- .../components/__tests__/App-test.tsx | 6 +---- .../overview/components/EmptyOverview.tsx | 2 +- .../overview/components/LeakPeriodLegend.tsx | 2 +- .../components/QualityGateConditions.tsx | 2 +- .../pullRequests/PullRequestOverview.tsx | 8 +++--- .../components/ActionsCell.tsx | 6 +---- .../permission-templates/components/Form.tsx | 4 +-- .../components/TemplateHeader.tsx | 2 +- .../apps/projectActivity/components/Event.tsx | 4 +-- .../ProjectActivityAnalysesList.tsx | 2 +- .../components/ProjectActivityAnalysis.tsx | 4 +-- .../components/ProjectActivityPageFilters.tsx | 2 +- .../components/forms/AddEventForm.tsx | 2 +- .../components/forms/ChangeEventForm.tsx | 2 +- .../components/forms/RemoveAnalysisForm.tsx | 2 +- .../components/forms/RemoveEventForm.tsx | 2 +- .../components/BaselineSettingAnalysis.tsx | 2 +- .../components/BaselineSettingDays.tsx | 2 +- .../components/BranchAnalysisListRenderer.tsx | 6 ++--- .../components/BranchBaselineSettingModal.tsx | 2 +- .../components/BranchLikeRow.tsx | 2 +- .../components/RenameBranchModal.tsx | 4 +-- .../LifetimeInformationRenderer-test.tsx | 6 +---- .../src/main/js/apps/projectDeletion/Form.tsx | 2 +- .../components/__tests__/Import-test.tsx | 2 +- .../main/js/apps/projectKey/UpdateForm.tsx | 2 +- .../js/apps/projectLinks/CreationModal.tsx | 6 ++--- .../src/main/js/apps/projectLinks/LinkRow.tsx | 2 +- .../components/FavoriteProjectsContainer.tsx | 2 +- .../apps/projects/components/ProjectsList.tsx | 4 +-- .../__tests__/DefaultPageSelector-test.tsx | 2 +- .../components/__tests__/PageSidebar-test.tsx | 2 +- .../project-card/ProjectCardQualityGate.tsx | 2 +- .../projects/filters/QualityGateFilter.tsx | 2 +- .../src/main/js/apps/projects/routes.tsx | 4 +-- .../projectsManagement/CreateProjectForm.tsx | 8 +++--- .../__tests__/BulkApplyTemplateModal-test.tsx | 2 +- .../__tests__/Header-test.tsx | 2 +- .../__tests__/ProjectRow-test.tsx | 2 +- .../__tests__/Search-test.tsx | 2 +- .../quality-gates/components/Condition.tsx | 2 +- .../components/ConditionOperator.tsx | 2 +- .../ConditionReviewAndUpdateModal.tsx | 4 +-- .../components/CopyQualityGateForm.tsx | 4 +-- .../components/CreateQualityGateForm.tsx | 4 +-- .../components/DeleteQualityGateForm.tsx | 2 +- .../quality-gates/components/Projects.tsx | 2 +- ...QualityGatePermissionsAddModalRenderer.tsx | 6 ++--- .../QualityGatePermissionsRenderer.tsx | 2 +- .../components/RenameQualityGateForm.tsx | 4 +-- .../src/main/js/apps/quality-gates/routes.tsx | 2 +- .../compare/ComparisonForm.tsx | 4 +-- .../components/ProfileActions.tsx | 2 +- .../components/ProfileModalForm.tsx | 4 +-- .../components/ProfileNotFound.tsx | 2 +- .../__tests__/ProfileActions-test.tsx | 2 +- .../details/ChangeParentForm.tsx | 4 +-- .../details/ChangeProjectsForm.tsx | 4 +-- .../details/ProfileHeader.tsx | 2 +- .../details/ProfilePermissionsFormSelect.tsx | 6 ++--- .../home/CreateProfileForm.tsx | 22 ++++++++-------- .../home/EvolutionStagnant.tsx | 2 +- .../home/ProfilesListHeader.tsx | 6 ++--- .../home/RestoreProfileForm.tsx | 2 +- .../main/js/apps/quality-profiles/routes.tsx | 2 +- .../security-hotspots/components/Assignee.tsx | 2 +- .../components/HotspotHeader.tsx | 2 +- .../components/HotspotListItem.tsx | 2 +- .../components/HotspotOpenInIdeButton.tsx | 4 +-- .../components/HotspotPrimaryLocationBox.tsx | 2 +- .../components/HotspotSidebarHeader.tsx | 4 +-- .../components/HotspotSimpleList.tsx | 2 +- .../components/HotspotStatusFilter.tsx | 2 +- .../status/StatusSelectionRenderer.tsx | 4 +-- .../js/apps/sessions/components/LoginForm.tsx | 6 ++--- .../settings/components/AllCategoriesList.tsx | 2 +- .../js/apps/settings/components/EmailForm.tsx | 4 +-- .../settings/components/NewCodePeriod.tsx | 2 +- .../components/SettingsSearchRenderer.tsx | 2 +- .../components/almIntegration/AzureForm.tsx | 6 ++--- .../almIntegration/BitbucketCloudForm.tsx | 4 +-- .../almIntegration/BitbucketServerForm.tsx | 6 ++--- .../components/almIntegration/DeleteModal.tsx | 2 +- .../components/almIntegration/GithubForm.tsx | 12 ++++----- .../components/almIntegration/GitlabForm.tsx | 6 ++--- .../AlmBindingDefinitionForm-test.tsx | 2 +- .../authentication/ConfigurationForm.tsx | 2 +- .../settings/encryption/EncryptionForm.tsx | 6 ++--- .../encryption/GenerateSecretKeyForm.tsx | 2 +- .../src/main/js/apps/settings/routes.tsx | 2 +- .../system/components/ClusterSysInfos.tsx | 2 +- .../system/components/StandaloneSysInfos.tsx | 2 +- .../src/main/js/apps/users/UsersApp.tsx | 2 +- .../js/apps/users/components/GroupsForm.tsx | 2 +- .../js/apps/users/components/PasswordForm.tsx | 6 ++--- .../js/apps/users/components/TokensForm.tsx | 2 +- .../apps/users/components/TokensFormItem.tsx | 8 +++--- .../js/apps/users/components/UserActions.tsx | 2 +- .../js/apps/users/components/UserForm.tsx | 8 +++--- .../js/apps/users/components/UserListItem.tsx | 4 +-- .../components/__tests__/Params-test.tsx | 12 +++------ .../src/main/js/apps/web-api/routes.tsx | 2 +- .../webhooks/components/CreateWebhookForm.tsx | 2 +- .../apps/webhooks/components/DeliveryItem.tsx | 2 +- .../webhooks/components/WebhookActions.tsx | 2 +- .../components/__tests__/PageHeader-test.tsx | 2 +- .../SourceViewer/SourceViewerCode.tsx | 2 +- .../__tests__/SourceViewer-it.tsx | 12 ++++----- .../SourceViewer/components/LineCode.tsx | 8 +++--- .../components/LineDuplicationBlock.tsx | 2 +- .../SourceViewer/components/LineSCM.tsx | 2 +- .../components/MeasuresOverlayMeasure.tsx | 2 +- .../__tests__/LineIssueList-test.tsx | 2 +- .../activity-graph/AddGraphMetric.tsx | 2 +- .../activity-graph/DataTableModal.tsx | 8 +++--- .../DefinitionChangeEventInner.tsx | 2 +- .../activity-graph/GraphsTooltips.tsx | 2 +- .../GraphsTooltipsContentEvents.tsx | 2 +- .../components/activity-graph/GraphsZoom.tsx | 4 +-- .../RichQualityGateEventInner.tsx | 8 +++--- .../charts/LanguageDistribution.tsx | 2 +- .../main/js/components/charts/LineChart.tsx | 2 +- .../__tests__/ColorGradientLegend-test.tsx | 2 +- .../js/components/common/BranchStatus.tsx | 2 +- .../common/DocumentationTooltip.tsx | 2 +- .../main/js/components/common/MultiSelect.tsx | 2 +- .../components/common/MultiSelectOption.tsx | 2 +- .../components/common/ResetPasswordForm.tsx | 6 ++--- .../js/components/common/SelectListItem.tsx | 2 +- .../__tests__/VisibilitySelector-test.tsx | 2 +- .../components/controls/ActionsDropdown.tsx | 2 +- .../controls/BoxedGroupAccordion.tsx | 4 +-- .../js/components/controls/ConfirmModal.tsx | 2 +- .../main/js/components/controls/DateInput.tsx | 2 +- .../src/main/js/components/controls/Modal.tsx | 2 +- .../js/components/controls/ValidationForm.tsx | 2 +- .../__tests__/ActionsDropdown-test.tsx | 2 +- .../controls/__tests__/Checkbox-test.tsx | 6 ++--- .../controls/__tests__/Favorite-test.tsx | 2 +- .../__tests__/InputValidationField-test.tsx | 4 +-- .../controls/__tests__/ListFooter-test.tsx | 2 +- .../__tests__/ModalValidationField-test.tsx | 4 +-- .../controls/__tests__/RadioCard-test.tsx | 2 +- .../SelectListListContainer-test.tsx | 2 +- .../controls/__tests__/Toggle-test.tsx | 4 +-- .../controls/__tests__/Tooltip-test.tsx | 2 +- .../__tests__/ValidationInput-test.tsx | 4 +-- .../__tests__/ValidationModal-test.tsx | 2 +- .../main/js/components/controls/buttons.tsx | 2 +- .../embed-docs-modal/EmbedDocsPopup.tsx | 2 +- .../embed-docs-modal/EmbedDocsPopupHelper.tsx | 6 ++--- .../main/js/components/facet/FacetHeader.tsx | 6 +---- .../js/components/facet/ListStyleFacet.tsx | 2 +- .../components/facet/__tests__/Facet-it.tsx | 2 +- .../facet/__tests__/ListStyleFacet-test.tsx | 2 +- .../js/components/icons/ChartLegendIcon.tsx | 2 +- .../issue/components/IssueAssign.tsx | 2 +- .../issue/components/IssueMessage.tsx | 2 +- .../components/issue/popups/CommentForm.tsx | 2 +- .../issue/popups/CommentListPopup.tsx | 2 +- .../components/issue/popups/CommentPopup.tsx | 2 +- .../issue/popups/SetAssigneePopup.tsx | 4 +-- .../issue/popups/SetSeverityPopup.tsx | 2 +- .../issue/popups/SimilarIssuesPopup.tsx | 2 +- .../js/components/locations/FlowsList.tsx | 6 +---- .../js/components/shared/SeverityHelper.tsx | 2 +- .../src/main/js/components/tags/TagsList.tsx | 2 +- .../tags/__tests__/TagsList-test.tsx | 2 +- .../tutorials/TutorialSelectionRenderer.tsx | 7 +---- .../__tests__/AzurePipelinesTutorial-it.tsx | 2 +- .../tutorials/components/EditTokenModal.tsx | 2 +- .../jenkins/MultiBranchPipelineStep.tsx | 5 +--- .../tutorials/jenkins/SelectAlmStep.tsx | 2 +- .../jenkins/WebhookStepBitbucket.tsx | 2 +- .../tutorials/jenkins/WebhookStepGitLab.tsx | 5 +--- .../tutorials/jenkins/WebhookStepGithub.tsx | 2 +- .../components/tutorials/other/TokenStep.tsx | 8 +++--- .../other/commands/ClangGCCCommand.tsx | 2 +- .../js/components/ui/DismissableAlert.tsx | 2 +- .../ui/MandatoryFieldsExplanation.tsx | 2 +- .../js/components/ui/PageShortcutsTooltip.tsx | 2 +- .../ui/__tests__/GenericAvatar-test.tsx | 2 +- .../ui/__tests__/PageActions-test.tsx | 2 +- .../components/ui/__tests__/Rating-test.tsx | 4 +-- .../upgrade/SystemUpgradeIntermediate.tsx | 2 +- .../components/upgrade/SystemUpgradeItem.tsx | 2 +- .../workspace/WorkspaceNavComponent.tsx | 2 +- .../components/workspace/WorkspaceNavRule.tsx | 2 +- .../workspace/WorkspaceRuleDetails.tsx | 2 +- 305 files changed, 469 insertions(+), 528 deletions(-) diff --git a/server/sonar-web/.eslintrc b/server/sonar-web/.eslintrc index fa19918907d..d92184566d1 100644 --- a/server/sonar-web/.eslintrc +++ b/server/sonar-web/.eslintrc @@ -6,6 +6,7 @@ "camelcase": "off", "promise/no-return-wrap": "warn", "react/jsx-curly-brace-presence": "warn", + "react/jsx-boolean-value": ["error", "never"], "testing-library/render-result-naming-convention": "off", /* Local rules, defined in ./eslint-local-rules/ */ "local-rules/use-componentqualifier-enum": "warn", diff --git a/server/sonar-web/design-system/.eslintrc b/server/sonar-web/design-system/.eslintrc index 71f5c0ed042..1b0fba77775 100644 --- a/server/sonar-web/design-system/.eslintrc +++ b/server/sonar-web/design-system/.eslintrc @@ -14,6 +14,7 @@ "no-implicit-coercion": [2, { "boolean": true, "number": true, "string": true }], "jest/no-large-snapshots": ["warn", { "maxSize": 200 }], "import/no-default-export": "warn", + "react/jsx-boolean-value": ["error", "never"], // Local rules "local-rules/use-componentqualifier-enum": "warn", diff --git a/server/sonar-web/design-system/src/components/Accordion.tsx b/server/sonar-web/design-system/src/components/Accordion.tsx index 9dcfb92ab46..84fcdf41571 100644 --- a/server/sonar-web/design-system/src/components/Accordion.tsx +++ b/server/sonar-web/design-system/src/components/Accordion.tsx @@ -57,7 +57,7 @@ export function Accordion(props: AccordionProps) { onClick={handleClick} > {header} - +
{open &&
{props.children}
} diff --git a/server/sonar-web/design-system/src/components/Breadcrumbs.tsx b/server/sonar-web/design-system/src/components/Breadcrumbs.tsx index be9238b0222..901255c3058 100644 --- a/server/sonar-web/design-system/src/components/Breadcrumbs.tsx +++ b/server/sonar-web/design-system/src/components/Breadcrumbs.tsx @@ -144,7 +144,7 @@ export function Breadcrumbs(props: Props) { > {showDropdownMenu && ( ( diff --git a/server/sonar-web/design-system/src/components/BubbleChart.tsx b/server/sonar-web/design-system/src/components/BubbleChart.tsx index 7a2531eb2ce..7a04942488f 100644 --- a/server/sonar-web/design-system/src/components/BubbleChart.tsx +++ b/server/sonar-web/design-system/src/components/BubbleChart.tsx @@ -381,7 +381,7 @@ export function BubbleChart(props: BubbleChartProps) { )}
- {(size) => renderChart(size.width)} + {(size) => renderChart(size.width)} ); } diff --git a/server/sonar-web/design-system/src/components/Checkbox.tsx b/server/sonar-web/design-system/src/components/Checkbox.tsx index 328205b2deb..829e7eb181d 100644 --- a/server/sonar-web/design-system/src/components/Checkbox.tsx +++ b/server/sonar-web/design-system/src/components/Checkbox.tsx @@ -77,7 +77,7 @@ export function Checkbox({ type="checkbox" /> - + diff --git a/server/sonar-web/design-system/src/components/DatePicker.tsx b/server/sonar-web/design-system/src/components/DatePicker.tsx index a09e488afc5..e80795cbad2 100644 --- a/server/sonar-web/design-system/src/components/DatePicker.tsx +++ b/server/sonar-web/design-system/src/components/DatePicker.tsx @@ -167,7 +167,7 @@ export class DatePicker extends React.PureComponent { { onClick={this.openCalendar} onFocus={this.openCalendar} placeholder={placeholder} - readOnly={true} + readOnly ref={inputRef} size={size} title={this.props.valueFormatter(selectedDay)} diff --git a/server/sonar-web/design-system/src/components/FacetBox.tsx b/server/sonar-web/design-system/src/components/FacetBox.tsx index db57773885d..2e100268542 100644 --- a/server/sonar-web/design-system/src/components/FacetBox.tsx +++ b/server/sonar-web/design-system/src/components/FacetBox.tsx @@ -88,7 +88,7 @@ export function FacetBox(props: FacetBoxProps) { } }} > - {expandable && } + {expandable && } {name} diff --git a/server/sonar-web/design-system/src/components/InteractiveIcon.tsx b/server/sonar-web/design-system/src/components/InteractiveIcon.tsx index 0a9b068bd48..8274c3c93f0 100644 --- a/server/sonar-web/design-system/src/components/InteractiveIcon.tsx +++ b/server/sonar-web/design-system/src/components/InteractiveIcon.tsx @@ -86,7 +86,7 @@ export class InteractiveIconBase extends React.PureComponent diff --git a/server/sonar-web/design-system/src/components/MultiSelect.tsx b/server/sonar-web/design-system/src/components/MultiSelect.tsx index 33b2037afe1..8766b057c4e 100644 --- a/server/sonar-web/design-system/src/components/MultiSelect.tsx +++ b/server/sonar-web/design-system/src/components/MultiSelect.tsx @@ -272,7 +272,7 @@ export class MultiSelect extends PureComponent {
(this.container = div)}>
{ key={element} onHover={this.handleElementHover} onSelectChange={this.handleSelectChange} - selected={true} + selected /> ))} {unselectedElements.length > 0 && @@ -317,7 +317,7 @@ export class MultiSelect extends PureComponent { - + + {element} diff --git a/server/sonar-web/design-system/src/components/SearchHighlighter.tsx b/server/sonar-web/design-system/src/components/SearchHighlighter.tsx index b9117155c34..54ff9938766 100644 --- a/server/sonar-web/design-system/src/components/SearchHighlighter.tsx +++ b/server/sonar-web/design-system/src/components/SearchHighlighter.tsx @@ -39,7 +39,7 @@ export function SearchHighlighter({ children = '', term }: Props) { if (searchTerm) { return ( { toggleDropdown(false); }} @@ -131,7 +131,7 @@ export function SearchSelectDropdown< null, @@ -140,7 +140,7 @@ export function SearchSelectDropdown< }} inputValue={inputValue} loadOptions={debouncedLoadOptions.current} - menuIsOpen={true} + menuIsOpen minLength={minLength} onChange={handleChange} onInputChange={handleInputChange} diff --git a/server/sonar-web/design-system/src/components/Tags.tsx b/server/sonar-web/design-system/src/components/Tags.tsx index 8d312aea879..6e4d4491520 100644 --- a/server/sonar-web/design-system/src/components/Tags.tsx +++ b/server/sonar-web/design-system/src/components/Tags.tsx @@ -75,7 +75,7 @@ export function Tags({ > {allowUpdate ? ( { function setupWithProps(props: Partial> = {}) { return render( - + ); } diff --git a/server/sonar-web/design-system/src/components/__tests__/Dropdown-test.tsx b/server/sonar-web/design-system/src/components/__tests__/Dropdown-test.tsx index bc20f7bc0af..da3060dbd72 100644 --- a/server/sonar-web/design-system/src/components/__tests__/Dropdown-test.tsx +++ b/server/sonar-web/design-system/src/components/__tests__/Dropdown-test.tsx @@ -42,7 +42,7 @@ describe('Dropdown with Portal Wrapper', () => { function setupWithChildren(children?: Dropdown['props']['children']) { return renderWithRouter( - }> + }> {children ?? } ); diff --git a/server/sonar-web/design-system/src/components/__tests__/DropdownMenu-test.tsx b/server/sonar-web/design-system/src/components/__tests__/DropdownMenu-test.tsx index 41da9ead332..7ae2d0d1728 100644 --- a/server/sonar-web/design-system/src/components/__tests__/DropdownMenu-test.tsx +++ b/server/sonar-web/design-system/src/components/__tests__/DropdownMenu-test.tsx @@ -81,7 +81,7 @@ function renderDropdownMenu() { My header Test menu item - + Test disabled item } onClick={noop}> @@ -91,7 +91,7 @@ function renderDropdownMenu() { Copy - + Checkbox item diff --git a/server/sonar-web/design-system/src/components/__tests__/LineNumber-test.tsx b/server/sonar-web/design-system/src/components/__tests__/LineNumber-test.tsx index aee31448c74..510934f46f4 100644 --- a/server/sonar-web/design-system/src/components/__tests__/LineNumber-test.tsx +++ b/server/sonar-web/design-system/src/components/__tests__/LineNumber-test.tsx @@ -35,7 +35,7 @@ function setupWithProps(props: Partial> = {}) { return render( Popup
} diff --git a/server/sonar-web/design-system/src/components/__tests__/LineWrapper-test.tsx b/server/sonar-web/design-system/src/components/__tests__/LineWrapper-test.tsx index 0bdc69d22b2..d994e0c0918 100644 --- a/server/sonar-web/design-system/src/components/__tests__/LineWrapper-test.tsx +++ b/server/sonar-web/design-system/src/components/__tests__/LineWrapper-test.tsx @@ -46,8 +46,8 @@ it('should set a highlighted background color in css props', () => { function setupWithProps(props: Partial> = {}) { return render( { // This functionality won't be needed once we update the breadcrumbs it('should remove focus after link is clicked', async () => { const { user } = setupWithMemoryRouter( - Icon
} to="/initial" /> + Icon} to="/initial" /> ); await user.click(screen.getByRole('link')); @@ -46,7 +46,7 @@ it('should remove focus after link is clicked', async () => { }); it('should prevent default when preventDefault is true', async () => { - const { user } = setupWithMemoryRouter(); + const { user } = setupWithMemoryRouter(); expect(screen.getByText('/initial')).toBeVisible(); @@ -62,7 +62,7 @@ it('should stop propagation when stopPropagation is true', async () => { const { user } = setupWithMemoryRouter( ); @@ -74,7 +74,7 @@ it('should stop propagation when stopPropagation is true', async () => { it('should call onClick when one is passed', async () => { const onClick = jest.fn(); const { user } = setupWithMemoryRouter( - + ); await user.click(screen.getByRole('link')); diff --git a/server/sonar-web/design-system/src/components/__tests__/NavLink-test.tsx b/server/sonar-web/design-system/src/components/__tests__/NavLink-test.tsx index 650e5c73037..16e69510b56 100644 --- a/server/sonar-web/design-system/src/components/__tests__/NavLink-test.tsx +++ b/server/sonar-web/design-system/src/components/__tests__/NavLink-test.tsx @@ -35,7 +35,7 @@ beforeEach(() => { }); it('should remove focus after link is clicked', async () => { - const { user } = setupWithMemoryRouter(); + const { user } = setupWithMemoryRouter(); await user.click(screen.getByRole('link')); @@ -43,7 +43,7 @@ it('should remove focus after link is clicked', async () => { }); it('should prevent default when preventDefault is true', async () => { - const { user } = setupWithMemoryRouter(); + const { user } = setupWithMemoryRouter(); expect(screen.getByText('/initial')).toBeVisible(); @@ -59,7 +59,7 @@ it('should stop propagation when stopPropagation is true', async () => { const { user } = setupWithMemoryRouter( ); @@ -71,7 +71,7 @@ it('should stop propagation when stopPropagation is true', async () => { it('should call onClick when one is passed', async () => { const onClick = jest.fn(); const { user } = setupWithMemoryRouter( - + ); await user.click(screen.getByRole('link')); diff --git a/server/sonar-web/design-system/src/components/__tests__/SearchSelectDropdown-test.tsx b/server/sonar-web/design-system/src/components/__tests__/SearchSelectDropdown-test.tsx index 135a9b9f2d1..18ee6f860aa 100644 --- a/server/sonar-web/design-system/src/components/__tests__/SearchSelectDropdown-test.tsx +++ b/server/sonar-web/design-system/src/components/__tests__/SearchSelectDropdown-test.tsx @@ -90,7 +90,7 @@ function renderSearchSelectDropdown(props: Partial { function renderSelectionCard(props: Partial> = {}) { return render( NumericalCell 1 CheckboxCell 1 - + ContentCell 2 NumericalCell 2 CheckboxCell 2 diff --git a/server/sonar-web/design-system/src/components/modal/Modal.tsx b/server/sonar-web/design-system/src/components/modal/Modal.tsx index 385d131d055..e01d519f610 100644 --- a/server/sonar-web/design-system/src/components/modal/Modal.tsx +++ b/server/sonar-web/design-system/src/components/modal/Modal.tsx @@ -93,10 +93,10 @@ export function Modal({ isOpen={isOpen} onRequestClose={onClose} overlayClassName="design-system-modal-overlay" - shouldCloseOnEsc={true} + shouldCloseOnEsc shouldCloseOnOverlayClick={closeOnOverlayClick} - shouldFocusAfterRender={true} - shouldReturnFocusAfterClose={true} + shouldFocusAfterRender + shouldReturnFocusAfterClose > {hasNoChildren(props) ? ( <> diff --git a/server/sonar-web/src/main/js/app/components/GlobalContainer.tsx b/server/sonar-web/src/main/js/app/components/GlobalContainer.tsx index ed2ace43cdf..85fe17a7f6f 100644 --- a/server/sonar-web/src/main/js/app/components/GlobalContainer.tsx +++ b/server/sonar-web/src/main/js/app/components/GlobalContainer.tsx @@ -69,7 +69,7 @@ export default function GlobalContainer() { - + diff --git a/server/sonar-web/src/main/js/app/components/Landing.tsx b/server/sonar-web/src/main/js/app/components/Landing.tsx index 23a7f50b9b9..f4f68c8a1a9 100644 --- a/server/sonar-web/src/main/js/app/components/Landing.tsx +++ b/server/sonar-web/src/main/js/app/components/Landing.tsx @@ -35,7 +35,7 @@ export function Landing({ currentUser }: LandingProps) { redirectUrl = '/projects'; } - return ; + return ; } export default withCurrentUserContext(Landing); diff --git a/server/sonar-web/src/main/js/app/components/SimpleSessionsContainer.tsx b/server/sonar-web/src/main/js/app/components/SimpleSessionsContainer.tsx index c0b1720242b..ae1818d1d04 100644 --- a/server/sonar-web/src/main/js/app/components/SimpleSessionsContainer.tsx +++ b/server/sonar-web/src/main/js/app/components/SimpleSessionsContainer.tsx @@ -31,7 +31,7 @@ export default function SimpleSessionsContainer() {
- + ); diff --git a/server/sonar-web/src/main/js/app/components/SonarLintConnection.tsx b/server/sonar-web/src/main/js/app/components/SonarLintConnection.tsx index ebb94ff75c2..99dd74100d9 100644 --- a/server/sonar-web/src/main/js/app/components/SonarLintConnection.tsx +++ b/server/sonar-web/src/main/js/app/components/SonarLintConnection.tsx @@ -111,7 +111,7 @@ export function SonarLintConnection({ currentUser }: Props) { @@ -133,7 +133,7 @@ export function SonarLintConnection({ currentUser }: Props) { <> @@ -163,7 +163,7 @@ export function SonarLintConnection({ currentUser }: Props) { <> @@ -204,7 +204,7 @@ export function SonarLintConnection({ currentUser }: Props) { 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 450c50989d7..e9608ce2de9 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 @@ -118,7 +118,7 @@ export default class CreateApplicationForm extends React.PureComponent { const search = (
{ className="it__search-icon" Icon={MenuSearchIcon} aria-label={translate('search_verb')} - currentColor={true} + currentColor onClick={this.handleFocus} size="medium" /> diff --git a/server/sonar-web/src/main/js/app/components/global-search/GlobalSearchResult.tsx b/server/sonar-web/src/main/js/app/components/global-search/GlobalSearchResult.tsx index fc86449221d..0c0f3fd4388 100644 --- a/server/sonar-web/src/main/js/app/components/global-search/GlobalSearchResult.tsx +++ b/server/sonar-web/src/main/js/app/components/global-search/GlobalSearchResult.tsx @@ -56,7 +56,7 @@ export default class GlobalSearchResult extends React.PureComponent {
- {component.isFavorite && } + {component.isFavorite && } {!component.isFavorite && component.isRecentlyBrowsed && ( )} diff --git a/server/sonar-web/src/main/js/app/components/nav/component/AnalysisStatus.tsx b/server/sonar-web/src/main/js/app/components/nav/component/AnalysisStatus.tsx index c08700a3702..069ed2dffb3 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/AnalysisStatus.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/AnalysisStatus.tsx @@ -65,13 +65,7 @@ export function AnalysisStatus(props: HeaderMetaProps) { <> {translate('project_navigation.analysis_status.failed')} - + {translate('project_navigation.analysis_status.details_link')} @@ -92,13 +86,7 @@ export function AnalysisStatus(props: HeaderMetaProps) { <> {translate('project_navigation.analysis_status.warnings')} - + {translate('project_navigation.analysis_status.details_link')} diff --git a/server/sonar-web/src/main/js/app/components/nav/component/Breadcrumb.tsx b/server/sonar-web/src/main/js/app/components/nav/component/Breadcrumb.tsx index ed0992e1a0c..6f6ea8fd4d3 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/Breadcrumb.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/Breadcrumb.tsx @@ -49,7 +49,7 @@ export function Breadcrumb(props: BreadcrumbProps) { /> )} { ? translate('layout.settings', component.qualifier) : translate('layout.settings') } - withChevron={true} + withChevron to={{}} {...a11yAttrs} /> @@ -356,7 +356,7 @@ export class Menu extends React.PureComponent {
  • (this.projectInfoLink = node)} to={{}} > @@ -603,9 +603,9 @@ export class Menu extends React.PureComponent { diff --git a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/AnalysisErrorMessage-test.tsx b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/AnalysisErrorMessage-test.tsx index e3be72d3fef..77b79601c60 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/AnalysisErrorMessage-test.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/AnalysisErrorMessage-test.tsx @@ -75,7 +75,7 @@ function renderAnalysisErrorMessage( component={mockComponent()} currentTask={mockTask()} onLeave={jest.fn()} - currentTaskOnSameBranch={true} + currentTaskOnSameBranch {...overrides} /> ); diff --git a/server/sonar-web/src/main/js/app/components/nav/component/branch-like/BranchLikeNavigation.tsx b/server/sonar-web/src/main/js/app/components/nav/component/branch-like/BranchLikeNavigation.tsx index dd9b31a6a4a..4c6d2c54525 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/branch-like/BranchLikeNavigation.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/branch-like/BranchLikeNavigation.tsx @@ -71,7 +71,7 @@ export function BranchLikeNavigation(props: BranchLikeNavigationProps) { return (
    diff --git a/server/sonar-web/src/main/js/app/components/nav/component/branch-like/Menu.tsx b/server/sonar-web/src/main/js/app/components/nav/component/branch-like/Menu.tsx index cbfb3caefb0..ea1bfbc48f6 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/branch-like/Menu.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/branch-like/Menu.tsx @@ -165,7 +165,7 @@ export class Menu extends React.PureComponent { >
    diff --git a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/badges/ProjectBadges.tsx b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/badges/ProjectBadges.tsx index 0d4494259b3..ae60a291df9 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/badges/ProjectBadges.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/badges/ProjectBadges.tsx @@ -151,10 +151,7 @@ export default class ProjectBadges extends React.PureComponent {
  • ) : ( - + )} diff --git a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/MetaKey.tsx b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/MetaKey.tsx index 8a841f7dac7..432b7134f58 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/MetaKey.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/MetaKey.tsx @@ -34,7 +34,7 @@ export default function MetaKey({ componentKey, qualifier }: MetaKeyProps) { diff --git a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/MetaLink.tsx b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/MetaLink.tsx index fd79abc4ce8..03d41acb293 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/MetaLink.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/MetaLink.tsx @@ -71,7 +71,7 @@ export default class MetaLink extends React.PureComponent { diff --git a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/MetaTags.tsx b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/MetaTags.tsx index d5497165c3c..f384bb5531b 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/MetaTags.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/MetaTags.tsx @@ -69,14 +69,14 @@ export default class MetaTags extends React.PureComponent {
    } overlayPlacement={PopupPlacement.BottomLeft} > - - + +
    diff --git a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/notifications/ProjectNotifications.tsx b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/notifications/ProjectNotifications.tsx index 670b2228434..8e666804de8 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/notifications/ProjectNotifications.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/notifications/ProjectNotifications.tsx @@ -92,7 +92,7 @@ export function ProjectNotifications(props: WithNotificationsProps & Props) { notifications={projectNotifications} onAdd={handleAddNotification} onRemove={handleRemoveNotification} - project={true} + project types={perProjectTypes} /> diff --git a/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavUserMenu.tsx b/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavUserMenu.tsx index fbab241261d..ae41cf69a07 100644 --- a/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavUserMenu.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavUserMenu.tsx @@ -56,7 +56,7 @@ export function GlobalNavUserMenu({ currentUser }: UserAccountMenuProps) { )} - + {translate('my_account.page')} diff --git a/server/sonar-web/src/main/js/app/components/nav/settings/SettingsNav.tsx b/server/sonar-web/src/main/js/app/components/nav/settings/SettingsNav.tsx index 4222ac6fc3b..f2bc2de133f 100644 --- a/server/sonar-web/src/main/js/app/components/nav/settings/SettingsNav.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/settings/SettingsNav.tsx @@ -102,17 +102,17 @@ export class SettingsNav extends React.PureComponent { overlay={
    • - + {translate('settings.page')}
    • - + {translate('property.category.security.encryption')}
    • - + {translate('webhooks.page')}
    • @@ -154,12 +154,12 @@ export class SettingsNav extends React.PureComponent { overlay={
      • - + {translate('management')}
      • - + {translate('background_tasks.page')}
      • @@ -190,22 +190,22 @@ export class SettingsNav extends React.PureComponent { overlay={
        • - + {translate('users.page')}
        • - + {translate('user_groups.page')}
        • - + {translate('global_permissions.page')}
        • - + {translate('permission_templates')}
        • @@ -272,20 +272,20 @@ export class SettingsNav extends React.PureComponent { {this.renderProjectsTab()}
        • - + {translate('sidebar.system')}
        • - + {translate('marketplace.page')}
        • {hasGovernanceExtension && (
        • - + {translate('audit_logs.page')}
        • @@ -293,7 +293,7 @@ export class SettingsNav extends React.PureComponent { {hasSupportExtension && (
        • - + {translate('support')}
        • diff --git a/server/sonar-web/src/main/js/app/components/update-notification/__tests__/UpdateNotification-test.tsx b/server/sonar-web/src/main/js/app/components/update-notification/__tests__/UpdateNotification-test.tsx index cf2cae0f9d0..8aefb895618 100644 --- a/server/sonar-web/src/main/js/app/components/update-notification/__tests__/UpdateNotification-test.tsx +++ b/server/sonar-web/src/main/js/app/components/update-notification/__tests__/UpdateNotification-test.tsx @@ -186,7 +186,7 @@ it('should show correct alert when not dismissable', async () => { function shallowRender(props: Partial = {}) { return shallow( + ); } diff --git a/server/sonar-web/src/main/js/app/utils/NavigateWithSearchAndHash.tsx b/server/sonar-web/src/main/js/app/utils/NavigateWithSearchAndHash.tsx index ff4591e9ec6..58be12ddc27 100644 --- a/server/sonar-web/src/main/js/app/utils/NavigateWithSearchAndHash.tsx +++ b/server/sonar-web/src/main/js/app/utils/NavigateWithSearchAndHash.tsx @@ -27,5 +27,5 @@ export interface NavigateWithSearchAndHashProps { export default function NavigateWithSearchAndHash({ pathname }: NavigateWithSearchAndHashProps) { const location = useLocation(); - return ; + return ; } diff --git a/server/sonar-web/src/main/js/app/utils/startReactApp.tsx b/server/sonar-web/src/main/js/app/utils/startReactApp.tsx index c29a16e76d5..6ecd1108c13 100644 --- a/server/sonar-web/src/main/js/app/utils/startReactApp.tsx +++ b/server/sonar-web/src/main/js/app/utils/startReactApp.tsx @@ -205,7 +205,7 @@ export default function startReactApp( {sessionsRoutes()} }> - } /> + } /> }> {accountRoutes()} diff --git a/server/sonar-web/src/main/js/apps/account/components/Nav.tsx b/server/sonar-web/src/main/js/apps/account/components/Nav.tsx index 073e8e75af5..83c7eb4019d 100644 --- a/server/sonar-web/src/main/js/apps/account/components/Nav.tsx +++ b/server/sonar-web/src/main/js/apps/account/components/Nav.tsx @@ -27,7 +27,7 @@ export default function Nav() {
    ); diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/BackgroundTasksApp.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/BackgroundTasksApp.tsx index bc27414d2e9..3d5aa565930 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/BackgroundTasksApp.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/BackgroundTasksApp.tsx @@ -218,7 +218,7 @@ export class BackgroundTasksApp extends React.PureComponent { return (
    - +
    ); } diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/StatPendingCount.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/StatPendingCount.tsx index a6e96160426..48be363a391 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/StatPendingCount.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/StatPendingCount.tsx @@ -46,7 +46,7 @@ function StatPendingCount({ appState, onCancelAllPending, pendingCount }: Props) { {canCancel && ( {translate('background_tasks.cancel_task')} @@ -156,7 +156,7 @@ export default class TaskActions extends React.PureComponent { cancelButtonText={translate('close')} confirmButtonText={translate('background_tasks.cancel_task')} header={translate('background_tasks.cancel_task')} - isDestructive={true} + isDestructive onClose={this.closeCancelTask} onConfirm={this.handleCancelTask} > 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 4cb49e36a00..88ca7c10e58 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 @@ -39,7 +39,7 @@ export default function TaskDate({ date, baseDate }: Props) { {diff > 0 && {`(+${diff}d)`}} - {parsedDate && isValidDate(parsedDate) ? : ''} + {parsedDate && isValidDate(parsedDate) ? : ''} ); } diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/TaskDay.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/TaskDay.tsx index 69c21f5641d..1d076a32b96 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/TaskDay.tsx +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/TaskDay.tsx @@ -33,7 +33,7 @@ export default function TaskDay({ submittedAt, prevSubmittedAt }: Props) { return ( - {shouldDisplay ? : ''} + {shouldDisplay ? : ''} ); } diff --git a/server/sonar-web/src/main/js/apps/change-admin-password/ChangeAdminPasswordAppRenderer.tsx b/server/sonar-web/src/main/js/apps/change-admin-password/ChangeAdminPasswordAppRenderer.tsx index 530ea4ed8ae..e00a649657a 100644 --- a/server/sonar-web/src/main/js/apps/change-admin-password/ChangeAdminPasswordAppRenderer.tsx +++ b/server/sonar-web/src/main/js/apps/change-admin-password/ChangeAdminPasswordAppRenderer.tsx @@ -105,7 +105,7 @@ export default function ChangeAdminPasswordAppRenderer(props: ChangeAdminPasswor onChange={(e: React.SyntheticEvent) => { props.onPasswordChange(e.currentTarget.value); }} - required={true} + required type="password" value={passwordValue} /> @@ -122,7 +122,7 @@ export default function ChangeAdminPasswordAppRenderer(props: ChangeAdminPasswor onChange={(e: React.SyntheticEvent) => { props.onConfirmPasswordChange(e.currentTarget.value); }} - required={true} + required type="password" value={confirmPasswordValue} /> diff --git a/server/sonar-web/src/main/js/apps/code/components/Breadcrumbs.tsx b/server/sonar-web/src/main/js/apps/code/components/Breadcrumbs.tsx index 25cbd5a3f63..b9ce55d2938 100644 --- a/server/sonar-web/src/main/js/apps/code/components/Breadcrumbs.tsx +++ b/server/sonar-web/src/main/js/apps/code/components/Breadcrumbs.tsx @@ -38,7 +38,7 @@ export default function Breadcrumbs({ branchLike, breadcrumbs, rootComponent }: canBrowse={index < breadcrumbs.length - 1} component={component} rootComponent={rootComponent} - unclickable={true} + unclickable /> ))} diff --git a/server/sonar-web/src/main/js/apps/code/components/CodeApp.tsx b/server/sonar-web/src/main/js/apps/code/components/CodeApp.tsx index 281d41988b3..1efd31d8c59 100644 --- a/server/sonar-web/src/main/js/apps/code/components/CodeApp.tsx +++ b/server/sonar-web/src/main/js/apps/code/components/CodeApp.tsx @@ -346,7 +346,7 @@ class CodeApp extends React.Component { baseComponent={baseComponent} branchLike={branchLike} components={components} - cycle={true} + cycle metrics={metrics} onEndOfList={this.handleLoadMore} onGoToParent={this.handleGoToParent} @@ -385,7 +385,7 @@ class CodeApp extends React.Component { branchLike={branchLike} component={sourceViewer.key} componentMeasures={sourceViewer.measures} - isFile={true} + isFile location={location} onGoToParent={this.handleGoToParent} onIssueChange={this.handleIssueChange} diff --git a/server/sonar-web/src/main/js/apps/code/components/ComponentPin.tsx b/server/sonar-web/src/main/js/apps/code/components/ComponentPin.tsx index 057ba1db8bd..05a31151eb0 100644 --- a/server/sonar-web/src/main/js/apps/code/components/ComponentPin.tsx +++ b/server/sonar-web/src/main/js/apps/code/components/ComponentPin.tsx @@ -47,7 +47,7 @@ export default class ComponentPin extends React.PureComponent { return ( 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 159551a7e1e..738cc70f5a9 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 @@ -79,7 +79,7 @@ function Components(props: ComponentsProps) { canBePinned={canBePinned} component={baseComponent} hasBaseComponent={false} - isBaseComponent={true} + isBaseComponent key={baseComponent.key} metrics={metrics} rootComponent={rootComponent} @@ -104,7 +104,7 @@ function Components(props: ComponentsProps) { ); } diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/ActivationSeverityFacet.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/ActivationSeverityFacet.tsx index 1955fd3101f..7754b3efbe3 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/ActivationSeverityFacet.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/ActivationSeverityFacet.tsx @@ -38,7 +38,7 @@ export default class ActivationSeverityFacet extends React.PureComponent {...this.props} disabled={this.props.disabled} disabledHelper={translate('coding_rules.filters.active_severity.inactive')} - halfWidth={true} + halfWidth options={SEVERITIES} property="activationSeverities" renderName={this.renderName} diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/BulkChange.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/BulkChange.tsx index 4dbd78429a1..0961df63e5a 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/BulkChange.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/BulkChange.tsx @@ -82,7 +82,7 @@ export default class BulkChange extends React.PureComponent { if (!canBulkChange) { return ( - diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/BulkChangeModal.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/BulkChangeModal.tsx index e08efd328be..469c2efa63c 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/BulkChangeModal.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/BulkChangeModal.tsx @@ -192,9 +192,9 @@ export class BulkChangeModal extends React.PureComponent { return ( @@ -188,7 +188,7 @@ export default class CustomRuleFormModal extends React.PureComponent @@ -206,7 +206,7 @@ export default class CustomRuleFormModal extends React.PureComponent diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/DefaultSeverityFacet.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/DefaultSeverityFacet.tsx index 56a85679904..da51af94cd6 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/DefaultSeverityFacet.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/DefaultSeverityFacet.tsx @@ -32,7 +32,7 @@ export default class DefaultSeverityFacet extends React.PureComponent { property="inheritance" renderName={this.renderName} renderTextName={this.renderName} - singleSelection={true} + singleSelection values={value ? [value] : []} /> ); 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 445b8aacd43..6eac07780bf 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 @@ -201,7 +201,7 @@ export default class RuleDetails extends React.PureComponent {