From 0899f21d7fe6eae4248cce5fdd65c7043f4e247f Mon Sep 17 00:00:00 2001 From: nicholas-codecov Date: Wed, 11 Dec 2024 12:21:30 -0500 Subject: [PATCH] build: Apply recommended lint rules (#3524) --- .eslintrc.cjs | 72 +- src/App.test.tsx | 30 +- src/index.tsx | 1 + src/layouts/BaseLayout/BaseLayout.test.tsx | 20 +- .../InstallationHelpBanner.test.jsx | 2 +- .../hooks/useUserAccessGate.test.tsx | 6 +- src/layouts/Header/Header.test.tsx | 2 +- .../components/AdminLink/AdminLink.test.tsx | 2 +- .../Navigator/MyContextSwitcher.test.tsx | 4 +- .../components/Navigator/Navigator.test.tsx | 6 +- .../SeatDetails/SeatDetails.test.tsx | 2 +- .../ThemeToggle/ThemeToggle.test.tsx | 2 +- .../UserDropdown/UserDropdown.test.tsx | 4 +- src/layouts/LoginLayout/LoginLayout.test.tsx | 2 +- .../ErrorBoundary/ErrorBoundary.test.tsx | 2 +- src/mocks/handlers.js | 30 +- .../AccountSettings/AccountSettings.test.jsx | 6 +- .../AccountSettingsSideMenu.test.jsx | 6 +- .../tabs/Access/Access.test.tsx | 6 +- .../AccountSettings/tabs/Admin/Admin.test.jsx | 2 +- .../GithubIntegrationSection.test.jsx | 2 +- .../tabs/OktaAccess/OktaAccess.test.tsx | 4 +- .../OktaConfigForm/OktaConfigForm.test.tsx | 2 +- .../OktaAccess/hooks/useOktaConfig.test.tsx | 4 +- .../hooks/useUpdateOktaConfig.test.tsx | 4 +- .../OrgUploadToken/OrgUploadToken.test.jsx | 6 +- .../ActivationBanner.test.jsx | 4 +- .../useSelfActivationMutation.test.jsx | 10 +- .../tabs/Profile/Profile.test.jsx | 4 +- .../AccountSettings/tabs/YAML/YAML.test.jsx | 4 +- .../AdminSettings/AdminAccess/AdminAccess.tsx | 5 +- .../ActivationCount/ActivationCount.test.jsx | 2 +- .../AutoActivateMembers.test.jsx | 2 +- .../MemberList/MemberTable.test.jsx | 2 +- .../AdminMembers/MemberList/MemberTable.tsx | 2 +- .../AdminSettings/AdminSettings.test.jsx | 4 +- src/pages/AnalyticsPage/Chart/Chart.test.tsx | 8 +- .../AnalyticsPage/Chart/useCoverage.test.tsx | 2 +- src/pages/AnalyticsPage/Chart/useCoverage.ts | 2 +- .../ChartSelectors/ChartSelectors.test.jsx | 2 +- .../CodecovAIPage/CodecovAIPage.test.tsx | 4 +- .../BundleMessage/BundleMessage.test.tsx | 2 +- .../CommitBundleAnalysis.test.tsx | 6 +- .../CommitBundleAnalysisTable.test.tsx | 7 +- .../BotErrorBanner/BotErrorBanner.test.jsx | 2 +- .../CommitCoverage/CommitCoverage.test.jsx | 22 +- .../CommitCoverageSummary.test.jsx | 2 +- .../hooks/useCommitForSummary.test.jsx | 15 +- .../CommitCoverageTabs.test.jsx | 11 +- .../CommitCoverage/UploadsCard/UploadItem.tsx | 2 +- .../UploadsCard/UploadReference.tsx | 2 +- .../UploadsCard/UploadsCard.test.tsx | 2 +- .../UploadsCard/UploadsCard.tsx | 2 +- .../useUploads/useUploads.test.tsx | 4 +- .../YamlErrorBanner/YamlErrorBanner.tsx | 4 +- .../YamlModal/YamlModal.test.jsx | 2 +- .../CommitDetailFileExplorer.test.tsx | 2 +- .../CommitDetailFileExplorer.tsx | 2 +- .../CommitDetailFileExplorerTable.test.tsx | 10 +- .../hooks/useRepoCommitContentsTable.tsx | 1 - .../CommitDetailFileViewer.test.jsx | 12 +- .../ComponentsSelector/ComponentsSelector.tsx | 6 +- .../FilesChangedTab/FilesChangedTab.test.tsx | 4 +- .../FilesChangedTable/FilesChangedTable.tsx | 2 +- .../FilesChangedTableTeam.test.tsx | 3 +- .../FilesChangedTableTeam.tsx | 2 +- .../CommitFileDiff/CommitFileDiff.test.tsx | 6 +- .../CommitFileDiff/CommitFileDiff.test.tsx | 6 +- .../CommitDetailPage.test.tsx | 8 +- .../CommitDetailPage/CommitDetailPage.tsx | 2 +- .../Dropdowns/CommitBundleDropdown.test.tsx | 2 +- .../Dropdowns/CommitCoverageDropdown.test.tsx | 2 +- .../Dropdowns/CommitCoverageDropdown.tsx | 2 +- .../CommitDetailPage/Header/Header.test.tsx | 4 +- .../HeaderDefault/HeaderDefault.test.jsx | 2 +- .../CommitHeaderDataQueryOpts.test.tsx | 8 +- .../queries/CommitHeaderDataQueryOpts.tsx | 2 +- .../Header/HeaderTeam/HeaderTeam.test.jsx | 2 +- .../CommitHeaderDataTeamQueryOpts.test.tsx | 8 +- .../queries/CommitHeaderDataTeamQueryOpts.tsx | 2 +- .../queries/CommitPageDataQueryOpts.test.tsx | 8 +- .../queries/CommitPageDataQueryOpts.tsx | 2 +- .../DefaultOrgSelector.test.jsx | 6 +- .../GitHubHelpBanner.test.tsx | 2 +- .../hooks/useMyOrganizations.test.tsx | 2 +- .../EnterpriseLandingPage.test.tsx | 4 +- .../useEnterpriseRedirect.test.tsx | 2 +- .../Activation/Activation.test.jsx | 4 +- .../MembersActivation.test.jsx | 4 +- .../MembersList/MembersList.test.jsx | 6 +- .../MembersTable/MembersTable.test.jsx | 9 +- .../MembersList/MembersTable/MembersTable.tsx | 2 +- .../ExceededUploadsAlert.test.jsx | 2 +- .../HeaderBanners/HeaderBanners.test.jsx | 25 +- .../ReachingUploadLimitAlert.test.jsx | 2 +- src/pages/OwnerPage/OwnerPage.test.jsx | 4 +- .../Tabs/TrialReminder/TrialReminder.test.tsx | 4 +- .../Tabs/TrialReminder/TrialReminder.tsx | 6 +- .../OwnerPage/hooks/useOwnerPageData.test.jsx | 2 +- src/pages/PlanPage/PlanPage.test.jsx | 2 +- .../PlanPage/hooks/usePlanPageData.test.tsx | 2 +- .../CancelPlanPage/CancelPlanPage.test.tsx | 6 +- .../DowngradePlan/CancelButton/utils.js | 4 +- .../DowngradePlan/DowngradePlan.test.jsx | 2 +- .../TeamPlanCard/TeamPlanCard.test.tsx | 2 +- .../AccountOrgs/AccountOrgs.tsx | 5 +- .../Address/AddressCard.test.tsx | 2 +- .../BillingDetails/BillingDetails.test.tsx | 2 +- .../EmailAddress/EmailAddress.test.tsx | 19 +- .../EmailAddress/EmailAddress.tsx | 2 +- .../PaymentCard/PaymentCard.test.jsx | 3 +- .../CurrentOrgPlan/CurrentOrgPlan.tsx | 4 +- .../CurrentPlanCard/CurrentPlanCard.test.tsx | 2 +- .../FreePlanCard/FreePlanCard.test.jsx | 8 +- .../PlanUpgradeTeam/PlanUpgradeTeam.test.jsx | 4 +- .../ProPlanSubheading.test.tsx | 2 +- .../ProPlanSubheading/ProPlanSubheading.tsx | 4 +- .../PaidPlanCard/PaidPlanCard.test.tsx | 6 +- .../ActionsBilling/ActionsBilling.test.jsx | 6 +- .../InfoAlertCancellation.test.tsx | 28 +- .../useEnterpriseAccountDetails.test.tsx | 2 +- .../sections/InvoiceHeader.test.tsx | 8 +- .../PlanDetailsControls.test.tsx | 2 +- .../ProPlanDetails/ProPlanDetails.test.jsx | 6 +- .../SentryPlanDetails.test.jsx | 6 +- .../TeamPlanDetails/TeamPlanDetails.test.jsx | 6 +- .../BillingOptions/BillingOptions.test.tsx | 4 +- .../PriceCallout/PriceCallout.test.tsx | 4 +- .../ProPlanController.test.tsx | 8 +- .../UserCount/UserCount.test.tsx | 2 +- .../BillingOptions/BillingOptions.test.tsx | 4 +- .../PriceCallout/PriceCallout.test.tsx | 4 +- .../SentryPlanController.test.tsx | 8 +- .../UserCount/UserCount.test.tsx | 2 +- .../BillingOptions/BillingOptions.test.tsx | 4 +- .../ErrorBanner/ErrorBanner.test.tsx | 8 +- .../PriceCallout/PriceCallout.test.tsx | 4 +- .../TeamPlanController.test.tsx | 6 +- .../UserCount/UserCount.test.tsx | 2 +- .../PlanTypeOptions/PlanTypeOptions.test.tsx | 4 +- .../UpdateButton/UpdateButton.test.tsx | 2 +- .../UpgradeForm/UpgradeForm.test.tsx | 6 +- .../UpgradePlanPage/UpgradePlanPage.test.jsx | 6 +- .../Dropdowns/PullBundleDropdown.test.tsx | 2 +- .../Dropdowns/PullCoverageDropdown.test.tsx | 2 +- .../PullRequestPage/Header/Header.test.tsx | 4 +- .../HeaderDefault/HeaderDefault.test.tsx | 2 +- .../queries/PullHeadDataQueryOpts.test.tsx | 8 +- .../queries/PullHeadDataQueryOpts.tsx | 2 +- .../Header/HeaderTeam/HeaderTeam.test.tsx | 2 +- .../PullHeadDataTeamQueryOpts.test.tsx | 8 +- .../queries/PullHeadDataTeamQueryOpts.tsx | 2 +- .../BundleMessage/BundleMessage.test.tsx | 2 +- .../PullBundleAnalysis.test.tsx | 6 +- .../PullBundleComparisonTable.test.tsx | 7 +- .../PullBundleHeadTable.test.tsx | 8 +- .../PullCoverage/PullCoverage.test.jsx | 6 +- .../PullCoverageTabs.test.jsx | 14 +- .../PullCoverageTabs/useTabsCounts.test.tsx | 2 +- .../CompareSummary/CompareSummary.test.jsx | 2 +- .../PullCoverage/Summary/Summary.test.tsx | 4 +- .../CommitsTable/CommitsTable.test.tsx | 2 +- .../CommitsTab/CommitsTable/Title/Title.tsx | 4 +- .../ComponentsSelector/ComponentsSelector.tsx | 6 +- .../ComponentComparisonQueryOpts.test.tsx | 6 +- .../queries/ComponentComparisonQueryOpts.tsx | 2 +- .../routes/FileExplorer/FileExplorer.test.tsx | 12 +- .../routes/FileExplorer/FileExplorer.tsx | 2 +- .../routes/FileViewer/FileViewer.test.jsx | 14 +- .../FilesChanged/FilesChanged.test.jsx | 2 +- .../FilesChangedTable/FilesChangedTable.tsx | 2 +- .../FilesChanged/NameColumn/NameColumn.jsx | 2 +- .../NameColumn/NameColumn.test.jsx | 2 +- .../PullFileDiff/PullFileDiff.test.tsx | 6 +- .../FilesChanged/TableTeam/TableTeam.tsx | 2 +- .../FilesChangedTab/FilesChangedTab.test.tsx | 8 +- .../IndirectChangedFiles.test.tsx | 10 +- .../NameColumn/NameColumn.test.jsx | 2 +- .../IndirectChangesTab.test.jsx | 2 +- .../PullFileDiff/PullFileDiff.test.tsx | 6 +- .../PullRequestPage/PullRequestPage.test.tsx | 10 +- src/pages/PullRequestPage/PullRequestPage.tsx | 2 +- .../queries/PullPageDataQueryOpts.test.tsx | 6 +- .../queries/PullPageDataQueryOpts.tsx | 2 +- .../ActivationAlert/ActivationAlert.test.tsx | 2 +- .../ActivationRequiredSelfHosted.test.tsx | 4 +- .../AssetsTable/AssetsTable.test.tsx | 4 +- .../AssetsTable/ModulesTable.test.tsx | 2 +- .../AssetsTable/ModulesTable.tsx | 2 +- .../AssetsTable/useBundleAssetsTable.test.tsx | 2 +- .../BundleChart/BundleChart.test.tsx | 4 +- .../BundleChart/useBundleChartData.test.tsx | 2 +- .../BundleContent/BundleContent.test.tsx | 10 +- .../BundleSelection/BranchSelector.test.tsx | 2 +- .../BundleSelection/BranchSelector.tsx | 2 +- .../BundleSelection/BundleSelection.test.tsx | 8 +- .../BundleSelection/BundleSelector.test.tsx | 4 +- .../BundleSelection/BundleSelector.tsx | 2 +- .../BundleSelection/LoadSelector.test.tsx | 8 +- .../BundleSelection/LoadSelector.tsx | 2 +- .../BundleSelection/TypeSelector.test.tsx | 8 +- .../BundleSelection/TypeSelector.tsx | 2 +- .../BundleOnboarding.test.tsx | 4 +- .../NuxtOnboarding/NuxtOnboarding.test.tsx | 4 +- .../RemixOnboarding/RemixOnboarding.test.tsx | 4 +- .../RollupOnboarding.test.tsx | 4 +- .../SolidStartOnboarding.test.tsx | 4 +- .../SvelteKitOnboarding.test.tsx | 4 +- .../ViteOnboarding/ViteOnboarding.test.tsx | 4 +- .../WebpackOnboarding.test.tsx | 4 +- .../RepoPage/BundlesTab/BundlesTab.test.tsx | 2 +- .../RepoPage/CommitsTab/CommitsTab.test.jsx | 18 +- .../CommitsTable/CommitsTable.test.tsx | 2 +- .../CommitsTab/CommitsTable/Title/Title.tsx | 4 +- .../useCommitsTabBranchSelector.test.tsx | 2 +- .../BadgesAndGraphsTab/Badges/Badges.test.tsx | 2 +- .../tabs/BadgesAndGraphsTab/Badges/Badges.tsx | 2 +- .../BadgesAndGraphsTab.test.tsx | 4 +- .../ConfigurationManager.test.tsx | 2 +- .../useRepoConfigurationStatus.test.tsx | 2 +- .../useRepoConfigurationStatus.tsx | 2 +- .../EraseRepoContent.test.jsx | 2 +- .../DangerZone/RepoState/RepoState.test.jsx | 4 +- .../hooks/useRepoActivation.test.jsx | 2 +- .../tabs/GeneralTab/GeneralTab.test.jsx | 4 +- .../ImpactAnalysisToken.test.jsx | 2 +- .../RepoUploadToken/RepoUploadToken.test.jsx | 11 +- .../StaticAnalysisToken.test.jsx | 2 +- .../tabs/GeneralTab/Tokens/Tokens.test.jsx | 2 +- .../Tokens/TokensTeam/TokensTeam.test.jsx | 2 +- .../hooks/useRepoForTokensTeam.test.tsx | 8 +- .../GeneralTab/hooks/useRepoForTokensTeam.tsx | 2 +- .../ActivationBanner.test.tsx | 2 +- .../ActivationRequiredSelfHosted.test.tsx | 4 +- .../CircleCI/CircleCI.test.tsx | 4 +- .../GitHubActions/GitHubActions.test.tsx | 4 +- .../CoverageOnboarding/NewRepoTab.test.tsx | 4 +- .../OtherCI/OtherCI.test.tsx | 4 +- .../BackfillBanners/BackfillBanners.test.tsx | 2 +- .../useRepoBackfillingStatus.test.tsx | 2 +- .../ComponentsTab/ComponentsTab.test.tsx | 8 +- .../BranchSelector/BranchSelector.test.tsx | 2 +- .../Header/BranchSelector/BranchSelector.tsx | 2 +- .../ComponentsTab/Header/Header.test.tsx | 4 +- .../ComponentsTab/Header/Header.tsx | 2 +- .../ComponentsTable/ComponentsTable.test.tsx | 6 +- .../DeleteComponentModal.test.tsx | 2 +- .../DeleteComponentModal.tsx | 13 +- .../hooks/useRepoComponentsTable.test.tsx | 2 +- .../hooks/useRepoComponentsTable.ts | 4 +- .../RepoPage/CoverageTab/CoverageTab.test.tsx | 4 +- .../CoverageTab/FlagsTab/FlagsTab.test.jsx | 4 +- .../DeleteFlagModal/DeleteFlagModal.test.tsx | 2 +- .../DeleteFlagModal/DeleteFlagModal.tsx | 3 +- .../subroute/FlagsTable/FlagsTable.test.tsx | 4 +- .../FlagsTable/hooks/useRepoFlagsTable.ts | 2 +- .../OverviewTab/OverviewTab.test.tsx | 40 +- .../OverviewTab/Summary/Summary.test.jsx | 8 +- .../SummaryTeamPlan/SummaryTeamPlan.test.tsx | 6 +- .../SummaryTeamPlan/SummaryTeamPlan.tsx | 2 +- .../hooks/useBranchSelector.test.tsx | 2 +- .../OverviewTab/hooks/useBranchSelector.ts | 4 +- .../hooks/useCoverageTabData.test.tsx | 10 +- .../OverviewTab/hooks/useCoverageTabData.tsx | 2 +- .../hooks/useRepoCoverageTimeseries.test.tsx | 4 +- .../hooks/useRepoCoverageTimeseries.ts | 2 +- .../ComponentsMultiSelect.test.tsx | 8 +- .../ComponentsMultiSelect.tsx | 6 +- .../CoverageChart/CoverageChart.test.tsx | 12 +- .../CodeTreeTable/CodeTreeTable.test.tsx | 2 +- .../FileExplorer/FileExplorer.test.jsx | 2 +- .../FileListTable/FileListTable.test.tsx | 2 +- .../FileExplorer/FlagMultiSelect.test.jsx | 6 +- .../hooks/useRepoBranchContentsTable.test.tsx | 2 +- .../hooks/useRepoBranchContentsTable.tsx | 8 +- .../subroute/Fileviewer/Fileviewer.test.jsx | 24 +- .../subroute/Sunburst/Sunburst.test.jsx | 6 +- .../hooks/useConvertD3ToBreadcrumbs.test.jsx | 2 +- .../Sunburst/hooks/useSunburstChart.test.jsx | 2 +- .../summaryHooks/useCoverageRedirect.ts | 2 +- .../summaryHooks/useSummary.test.tsx | 4 +- .../DeactivatedRepo/DeactivatedRepo.test.tsx | 2 +- .../FailedTestsPage/FailedTestsPage.test.tsx | 2 +- .../FailedTestsTable/FailedTestsTable.tsx | 2 +- .../MetricsSection/MetricsSection.test.tsx | 4 +- .../MetricsSection/MetricsSection.tsx | 6 +- .../BranchSelector/BranchSelector.test.tsx | 2 +- .../BranchSelector/BranchSelector.tsx | 2 +- .../SelectorSection/SelectorSection.test.tsx | 10 +- .../SelectorSection/SelectorSection.tsx | 2 +- .../useFlakeAggregates.test.tsx | 2 +- .../useInfiniteTestResults.test.tsx | 8 +- .../useInfiniteTestResults.tsx | 2 +- .../useTestsResultsAggregates.test.tsx | 2 +- .../useTestResultsFlags.test.tsx | 2 +- .../useTestResultsTestSuites.test.tsx | 2 +- .../FailedTestsTab/FailedTestsTab.test.tsx | 2 +- .../PullsTab/PullsTable/PullsTable.test.tsx | 2 +- .../PullsTab/PullsTable/PullsTable.tsx | 4 +- src/pages/RepoPage/RepoPage.test.tsx | 10 +- src/pages/RepoPage/RepoPageTabs.test.tsx | 14 +- src/pages/RepoPage/context.test.tsx | 2 +- .../hooks/useJSorTSPendoTracking.test.tsx | 4 +- .../SyncProviderPage.test.tsx | 6 +- .../TermsOfService/TermsOfService.test.tsx | 2 +- src/pages/TermsOfService/TermsOfService.tsx | 2 +- .../hooks/useTermsOfService.test.tsx | 4 +- src/sentry.ts | 4 +- src/services/access/useDeleteSession.test.tsx | 2 +- src/services/access/useDeleteSession.ts | 2 +- .../access/useGenerateUserToken.test.tsx | 2 +- .../access/useRevokeUserToken.test.tsx | 2 +- src/services/access/useRevokeUserToken.ts | 2 +- src/services/access/useSessions.test.tsx | 2 +- .../account/useAccountDetails.test.tsx | 2 +- src/services/account/useAutoActivate.test.jsx | 18 +- .../account/useAvailablePlans.test.tsx | 2 +- src/services/account/useEraseAccount.test.jsx | 2 +- src/services/account/useInvoice.test.tsx | 2 +- src/services/account/useInvoices.test.tsx | 2 +- src/services/account/usePlanData.test.tsx | 2 +- src/services/account/useSentryToken.test.tsx | 2 +- src/services/account/useUpdateBillingEmail.ts | 2 +- src/services/account/useUpdateCard.test.tsx | 4 +- .../useUpdateSelfHostedSettings.test.tsx | 2 +- src/services/account/useUpgradePlan.test.tsx | 30 +- src/services/ats/useRepoATS.test.tsx | 8 +- src/services/branches/useBranch.test.tsx | 2 +- src/services/branches/useBranch.tsx | 2 +- .../branches/useBranchComponents.test.tsx | 2 +- src/services/branches/useBranchComponents.tsx | 2 +- .../branches/useBranchHasCommits.test.tsx | 2 +- src/services/branches/useBranchHasCommits.tsx | 2 +- src/services/branches/useBranches.test.tsx | 2 +- src/services/branches/useBranches.tsx | 4 +- .../BranchBundlesNamesQueryOpts.tsx | 2 +- .../BundleTrendDataQueryOpts.test.tsx | 2 +- .../BundleTrendDataQueryOpts.tsx | 2 +- .../useBranchBundleSummary.test.tsx | 2 +- .../bundleAnalysis/useBranchBundleSummary.tsx | 2 +- .../bundleAnalysis/useBundleAssetModules.tsx | 2 +- .../bundleAnalysis/useBundleAssets.tsx | 2 +- .../bundleAnalysis/useBundleSummary.test.tsx | 2 +- .../bundleAnalysis/useBundleSummary.tsx | 2 +- src/services/charts/mocks.ts | 4 +- .../useBranchCoverageMeasurements.test.tsx | 2 +- .../charts/useBranchCoverageMeasurements.tsx | 2 +- .../useReposCoverageMeasurements.test.tsx | 2 +- .../charts/useReposCoverageMeasurements.ts | 2 +- .../useCodecovAIInstallation.test.tsx | 4 +- .../useCodecovAIInstalledRepos.test.tsx | 4 +- .../useStoreCodecovEventMetric.test.tsx | 2 +- src/services/commit/mocks.ts | 8 +- src/services/commit/useCommit.test.tsx | 6 +- src/services/commit/useCommit.tsx | 2 +- .../useCommitBADropdownSummary.test.tsx | 8 +- .../commit/useCommitBADropdownSummary.tsx | 2 +- .../commit/useCommitBundleList.test.tsx | 2 +- src/services/commit/useCommitBundleList.tsx | 2 +- .../commit/useCommitComponents.test.tsx | 2 +- .../useCommitCoverageDropdownSummary.test.tsx | 2 +- .../useCommitCoverageDropdownSummary.tsx | 2 +- src/services/commit/useCommitTeam.test.tsx | 8 +- src/services/commit/useCommitTeam.tsx | 2 +- src/services/commit/useCommitYaml.test.tsx | 2 +- src/services/commit/useCommitYaml.tsx | 2 +- src/services/commit/useCompareTotals.test.tsx | 2 +- src/services/commit/useCompareTotals.tsx | 4 +- .../commit/useCompareTotalsTeam.test.tsx | 2 +- src/services/commit/useCompareTotalsTeam.tsx | 4 +- .../commitErrors/useCommitErrors.test.tsx | 2 +- src/services/commitErrors/useCommitErrors.tsx | 2 +- src/services/commits/useCommits.test.tsx | 6 +- src/services/commits/useCommits.tsx | 2 +- .../useComparisonForCommitAndParent.test.tsx | 2 +- .../useComparisonForCommitAndParent.tsx | 2 +- .../config/useLoginProviders.test.tsx | 2 +- src/services/config/useSyncProviders.test.tsx | 2 +- .../useUpdateDefaultOrganization.test.tsx | 2 +- .../useDeleteComponentMeasurements.ts | 2 +- src/services/deleteFlag/useDeleteFlag.js | 2 +- .../deleteFlag/useDeleteFlag.test.jsx | 2 +- ...eCommitBasedCoverageForFileViewer.test.jsx | 9 +- src/services/image/useImage.ts | 2 +- .../orgUploadToken/useOrgUploadToken.test.tsx | 2 +- .../useRegenerateOrgUploadToken.test.jsx | 2 +- .../dir/usePrefetchBranchDirEntry.test.tsx | 4 +- .../branch/dir/usePrefetchBranchDirEntry.tsx | 2 +- .../branch/dir/useRepoBranchContents.test.tsx | 4 +- .../branch/dir/useRepoBranchContents.tsx | 4 +- .../file/usePrefetchBranchFileEntry.test.tsx | 2 +- .../dir/usePrefetchCommitDirEntry.test.tsx | 2 +- .../commit/dir/usePrefetchCommitDirEntry.tsx | 2 +- .../commit/dir/useRepoCommitContents.test.tsx | 8 +- .../commit/dir/useRepoCommitContents.tsx | 2 +- .../file/usePrefetchCommitFileEntry.tsx | 2 +- .../pull/dir/usePrefetchPullDirEntry.test.tsx | 2 +- .../pull/dir/usePrefetchPullDirEntry.tsx | 2 +- .../pull/dir/useRepoPullContents.test.tsx | 2 +- .../pull/dir/useRepoPullContents.tsx | 2 +- .../file/usePrefetchPullFileEntry.test.tsx | 2 +- .../pull/file/usePrefetchPullFileEntry.tsx | 2 +- .../useFileWithMainCoverage.test.tsx | 2 +- .../pathContents/useFileWithMainCoverage.tsx | 2 +- .../pull/usePrefetchSingleFileComp.test.tsx | 2 +- .../pull/usePrefetchSingleFileComp.tsx | 4 +- src/services/pull/usePull.test.tsx | 4 +- src/services/pull/usePull.tsx | 2 +- .../pull/usePullBADropdownSummary.test.tsx | 2 +- .../pull/usePullBADropdownSummary.tsx | 2 +- .../pull/usePullBundleComparisonList.test.tsx | 2 +- .../pull/usePullBundleComparisonList.tsx | 2 +- .../pull/usePullBundleHeadList.test.tsx | 4 +- src/services/pull/usePullBundleHeadList.tsx | 2 +- .../pull/usePullCompareTotalsTeam.test.tsx | 2 +- .../pull/usePullCompareTotalsTeam.tsx | 4 +- src/services/pull/usePullComponents.test.tsx | 2 +- .../usePullCoverageDropdownSummary.test.tsx | 2 +- .../pull/usePullCoverageDropdownSummary.tsx | 2 +- src/services/pull/usePullTeam.test.tsx | 8 +- src/services/pull/usePullTeam.tsx | 2 +- ...useSingularImpactedFileComparison.test.tsx | 2 +- .../useSingularImpactedFileComparison.tsx | 2 +- src/services/pulls/usePulls.test.tsx | 6 +- src/services/pulls/usePulls.tsx | 2 +- src/services/repo/mocks.ts | 99 ++- .../repo/useActivateMeasurements.test.tsx | 6 +- .../repo/useComponentsBackfilled.test.tsx | 6 +- src/services/repo/useEncodeString.test.tsx | 2 +- .../repo/useEraseRepoContent.test.tsx | 2 +- src/services/repo/useRepo.test.tsx | 2 +- src/services/repo/useRepoBackfilled.test.tsx | 2 +- src/services/repo/useRepoBackfilled.tsx | 2 +- src/services/repo/useRepoComponents.test.tsx | 2 +- .../repo/useRepoComponentsSelect.test.tsx | 2 +- src/services/repo/useRepoConfig.test.tsx | 2 +- src/services/repo/useRepoConfig.tsx | 2 +- src/services/repo/useRepoCoverage.test.tsx | 2 +- src/services/repo/useRepoCoverage.tsx | 2 +- src/services/repo/useRepoFlagsSelect.test.tsx | 2 +- src/services/repo/useRepoFlagsSelect.tsx | 2 +- src/services/repo/useRepoOverview.test.tsx | 2 +- .../repo/useRepoRateLimitStatus.test.tsx | 2 +- src/services/repo/useRepoSettings.test.tsx | 2 +- src/services/repo/useRepoSettings.tsx | 2 +- .../repo/useRepoSettingsTeam.test.tsx | 2 +- src/services/repo/useUpdateRepo.test.tsx | 6 +- .../useRegenerateRepoUploadToken.test.tsx | 2 +- .../useRegenerateRepositoryToken.test.jsx | 2 +- .../useSelfHostedCurrentUser.test.tsx | 2 +- .../useSelfHostedHasAdmins.test.tsx | 2 +- .../useSelfHostedSeatsAndLicense.test.tsx | 2 +- .../useSelfHostedSeatsConfig.test.tsx | 2 +- .../selfHosted/useSelfHostedSettings.test.tsx | 2 +- src/services/tier/useTier.test.tsx | 2 +- src/services/tracking/useTracking.test.jsx | 4 +- src/services/user/useInternalUser.test.tsx | 2 +- .../user/useIsCurrentUserAnAdmin.test.tsx | 2 +- src/services/user/useMyContexts.test.tsx | 2 +- src/services/user/useOnboardUser.test.tsx | 2 +- src/services/user/useOwner.test.jsx | 2 +- .../user/useOwnerRateLimitStatus.test.tsx | 2 +- src/services/user/useResyncUser.test.tsx | 4 +- src/services/user/useUser.test.tsx | 4 +- src/services/users/mocks.js | 2 +- src/services/users/useInfiniteUser.test.tsx | 4 +- src/services/users/useUpdateUser.test.jsx | 4 +- src/services/users/useUsers.test.jsx | 2 +- src/services/yaml/useYamlConfig.test.jsx | 2 +- src/setupProxy.js | 6 +- .../TableEntries/BaseEntries/DirEntry.jsx | 2 +- .../TableEntries/BaseEntries/FileEntry.jsx | 6 +- .../BranchEntries/BranchDirEntry.test.jsx | 2 +- .../CommitEntries/CommitDirEntry.test.tsx | 2 +- .../PullEntries/PullFileEntry.test.tsx | 2 +- .../utils/adjustListIfUpDir.test.tsx | 2 +- .../ContentsTable/utils/adjustListIfUpDir.tsx | 2 +- .../MissingDesignatedAdmins.test.jsx | 2 +- .../LicenseExpirationModal.tsx | 8 +- .../SelfHostedLicenseExpiration.test.jsx | 2 +- .../BundleFeedbackBanner.test.tsx | 2 +- .../OktaBanners/OktaBanners.test.tsx | 2 +- .../ProPlanFeedbackBanner.test.tsx | 4 +- .../TeamPlanFeedbackBanner.test.tsx | 2 +- .../TrialBanner/ExpiredBanner.tsx | 2 +- .../TrialBanner/OngoingBanner.tsx | 2 +- .../TrialBanner/TrialBanner.test.tsx | 4 +- src/shared/ListRepo/ListRepo.test.jsx | 4 +- .../RepoOrgNotFound/RepoOrgNotFound.test.tsx | 4 +- .../ListRepo/ReposTable/ReposTable.test.tsx | 8 +- .../ReposTable/getReposColumnsHelper.tsx | 6 +- .../ReposTableTeam/ReposTableTeam.test.jsx | 2 +- .../ReposTableTeam/ReposTableTeam.tsx | 4 +- .../RawFileViewer/RawFileViewer.test.tsx | 10 +- src/shared/RawFileViewer/RawFileViewer.tsx | 6 - src/shared/api/api.test.ts | 16 +- src/shared/api/api.ts | 4 +- src/shared/api/helpers.test.ts | 8 +- src/shared/treePaths/useCommitTreePath.ts | 4 +- src/shared/treePaths/useTreePaths.test.tsx | 2 +- src/shared/useRedirect/hooks.test.js | 3 +- src/shared/utils/animationFrameUtils.ts | 2 +- src/shared/utils/billing.test.ts | 9 +- src/shared/utils/bundleAnalysis.ts | 4 +- src/shared/utils/camelizeKeys.test.ts | 4 +- src/shared/utils/fileviewer.tsx | 4 +- src/shared/utils/graphql.ts | 2 +- src/shared/utils/prism/prismLanguages.ts | 1 + src/shared/utils/provider.test.ts | 6 +- src/shared/utils/provider.ts | 4 +- src/shared/utils/snakeifyKeys.test.ts | 4 +- src/ui/Alert/Alert.tsx | 2 +- src/ui/Button/Button.tsx | 2 +- src/ui/Chart/Chart.test.tsx | 8 +- src/ui/Chart/Chart.tsx | 2 +- .../CriticalFileLabel.stories.jsx | 2 +- .../DiffLine/DiffLine.stories.tsx | 1 + .../CodeRenderer/DiffLine/DiffLine.test.tsx | 32 +- src/ui/CodeRenderer/DiffLine/DiffLine.tsx | 2 +- .../FileHeader/FileHeader.test.jsx | 10 - .../DateRangePicker/DateRangePicker.test.tsx | 2 +- src/ui/Dropdown/Dropdown.tsx | 12 +- src/ui/FileList/FileList.stories.tsx | 4 +- .../ToggleHeader/Title/Title.test.tsx | 4 +- .../ToggleHeader/ToggleHeader.test.tsx | 4 +- src/ui/Icon/Icon.test.tsx | 2 +- src/ui/MetricCard/MetricCard.tsx | 5 +- src/ui/MultiSelect/MultiSelect.jsx | 16 +- src/ui/Select/Select.jsx | 2 +- src/ui/Sparkline/Sparkline.tsx | 2 +- src/ui/SummaryDropdown/SummaryDropdown.tsx | 8 +- src/ui/SunburstChart/SunburstChart.jsx | 2 +- src/ui/TopBanner/TopBanner.tsx | 17 +- .../TruncatedMessage.test.tsx | 2 +- .../hooks/useTruncation.test.ts | 4 +- .../VirtualDiffRenderer.test.tsx | 2 +- .../VirtualFileRenderer.test.tsx | 2 +- .../VirtualRenderers/useIsOverflowing.test.ts | 2 +- .../useSyncScrollMargin.test.ts | 2 +- .../useSyncTotalWidth.test.tsx | 2 +- .../useSyncWrapperWidth.test.ts | 2 +- src/vitest.setup.ts | 2 +- vite.config.mjs | 6 +- yarn.lock | 709 +++++++++++++----- 544 files changed, 1692 insertions(+), 1461 deletions(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 4383b6323f..4aa6e659ed 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -3,12 +3,13 @@ // This is dangerous as it hides accidentally undefined variables. // We blacklist the globals that we deem potentially confusing. // To use them, explicitly reference them, e.g. `window.name` or `window.status`. +// eslint-disable-next-line @typescript-eslint/no-require-imports const restrictedGlobals = require('confusing-browser-globals') module.exports = { extends: [ - // 'eslint:recommended', - // 'plugin:@typescript-eslint/recommended', + 'eslint:recommended', + 'plugin:@typescript-eslint/recommended', 'plugin:tailwindcss/recommended', 'plugin:@tanstack/eslint-plugin-query/recommended', 'plugin:react/recommended', @@ -117,17 +118,6 @@ module.exports = { }, ], 'no-unused-vars': 'off', - '@typescript-eslint/no-unused-vars': [ - 'warn', - { - args: 'none', - ignoreRestSiblings: true, - argsIgnorePattern: '^_', - caughtErrorsIgnorePattern: '^_', - destructuredArrayIgnorePattern: '^_', - varsIgnorePattern: '^_', - }, - ], 'no-useless-constructor': 'off', '@typescript-eslint/no-useless-constructor': 'warn', '@typescript-eslint/no-explicit-any': 'off', @@ -379,42 +369,26 @@ module.exports = { ], // Everything below, copied from https://github.com/facebook/create-react-app/blob/main/packages/eslint-config-react-app/index.js#L97 // http://eslint.org/docs/rules/ - // modified recommended rules - 'no-cond-assign': ['warn', 'except-parens'], - 'no-const-assign': 'warn', - 'no-control-regex': 'warn', - 'no-delete-var': 'warn', - 'no-dupe-args': 'warn', - 'no-dupe-class-members': 'warn', - 'no-dupe-keys': 'warn', - 'no-duplicate-case': 'warn', - 'no-empty-character-class': 'warn', - 'no-empty-pattern': 'warn', - 'no-ex-assign': 'warn', - 'no-fallthrough': 'warn', - 'no-func-assign': 'warn', - 'no-invalid-regexp': 'warn', - 'no-global-assign': 'warn', - 'no-unsafe-negation': 'warn', - 'no-new-symbol': 'warn', - 'no-obj-calls': 'warn', - 'no-octal': 'warn', - 'no-redeclare': 'warn', - 'no-regex-spaces': 'warn', - 'no-self-assign': 'warn', - 'no-shadow-restricted-names': 'warn', - 'no-sparse-arrays': 'warn', - 'no-this-before-super': 'warn', - 'no-undef': 'error', - 'no-unreachable': 'warn', - 'no-unused-labels': 'warn', - 'no-unused-vars': ['warn', { args: 'none', ignoreRestSiblings: true }], - 'no-useless-escape': 'warn', - 'no-with': 'warn', - 'require-yield': 'warn', - 'use-isnan': 'warn', - 'valid-typeof': 'warn', - 'getter-return': 'warn', + 'no-unused-vars': [ + 'error', + { + argsIgnorePattern: '^_', + caughtErrorsIgnorePattern: '^_', + destructuredArrayIgnorePattern: '^_', + varsIgnorePattern: '^_', + ignoreRestSiblings: true, + }, + ], + '@typescript-eslint/no-unused-vars': [ + 'error', + { + argsIgnorePattern: '^_', + caughtErrorsIgnorePattern: '^_', + destructuredArrayIgnorePattern: '^_', + varsIgnorePattern: '^_', + ignoreRestSiblings: true, + }, + ], // custom applied base rules 'array-callback-return': 'warn', diff --git a/src/App.test.tsx b/src/App.test.tsx index 4d817e0c5f..df9baf8032 100644 --- a/src/App.test.tsx +++ b/src/App.test.tsx @@ -195,56 +195,56 @@ describe('App', () => { hasSession?: boolean }) { server.use( - http.get('/internal/user', (info) => { + http.get('/internal/user', () => { if (hasSession) { return HttpResponse.json(internalUser) } else { return HttpResponse.json({}) } }), - http.get('/internal/users/current', (info) => { + http.get('/internal/users/current', () => { return HttpResponse.json({}) }), - graphql.query('DetailOwner', (info) => + graphql.query('DetailOwner', () => HttpResponse.json({ data: { owner: 'codecov' } }) ), - graphql.query('CurrentUser', (info) => { + graphql.query('CurrentUser', () => { if (hasLoggedInUser) { return HttpResponse.json({ data: user }) } HttpResponse.json({ data: {} }) }), - graphql.query('GetPlanData', (info) => { + graphql.query('GetPlanData', () => { return HttpResponse.json({ data: {} }) }), - graphql.query('OwnerTier', (info) => { + graphql.query('OwnerTier', () => { return HttpResponse.json({ data: {} }) }), - graphql.query('Seats', (info) => { + graphql.query('Seats', () => { return HttpResponse.json({ data: {} }) }), - graphql.query('HasAdmins', (info) => { + graphql.query('HasAdmins', () => { return HttpResponse.json({ data: {} }) }), - graphql.query('owner', (info) => { + graphql.query('owner', () => { return HttpResponse.json({ data: { owner: { isAdmin: true } } }) }), - graphql.query('MyContexts', (info) => { + graphql.query('MyContexts', () => { return HttpResponse.json({ data: {} }) }), - graphql.query('GetOktaConfig', (info) => { + graphql.query('GetOktaConfig', () => { return HttpResponse.json({ data: {} }) }), - graphql.query('OwnerPageData', (info) => { + graphql.query('OwnerPageData', () => { return HttpResponse.json({ data: {} }) }), - graphql.mutation('updateDefaultOrganization', (info) => { + graphql.mutation('updateDefaultOrganization', () => { return HttpResponse.json({ data: {} }) }), - graphql.query('GetRepoOverview', (info) => { + graphql.query('GetRepoOverview', () => { return HttpResponse.json({ data: mockRepoOverview }) }), - graphql.query('GetUploadTokenRequired', (info) => { + graphql.query('GetUploadTokenRequired', () => { return HttpResponse.json({ data: { owner: null } }) }), graphql.query('NavigatorData', () => { diff --git a/src/index.tsx b/src/index.tsx index 2310773400..904a79f97f 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -22,6 +22,7 @@ if ( process.env.NODE_ENV === 'development' && process.env.REACT_APP_MSW_BROWSER ) { + // eslint-disable-next-line @typescript-eslint/no-require-imports const { worker } = require('./mocks/browser') worker.start() } diff --git a/src/layouts/BaseLayout/BaseLayout.test.tsx b/src/layouts/BaseLayout/BaseLayout.test.tsx index bc0c4b19db..f914fa9e27 100644 --- a/src/layouts/BaseLayout/BaseLayout.test.tsx +++ b/src/layouts/BaseLayout/BaseLayout.test.tsx @@ -241,29 +241,29 @@ describe('BaseLayout', () => { mockedUseImpersonate.mockReturnValue({ isImpersonating }) server.use( - http.get('/internal/user', (info) => { + http.get('/internal/user', () => { return HttpResponse.json(internalUser) }), - graphql.query('CurrentUser', (info) => { + graphql.query('CurrentUser', () => { return HttpResponse.json({ data: currentUser }) }), - graphql.query('DetailOwner', (info) => { + graphql.query('DetailOwner', () => { return HttpResponse.json({ data: mockOwner }) }), - http.get('/internal/:provider/:owner/account-details', (info) => { + http.get('/internal/:provider/:owner/account-details', () => { return HttpResponse.json({}) }), // Self hosted only - graphql.query('HasAdmins', (info) => { + graphql.query('HasAdmins', () => { return HttpResponse.json({ data: { config: null } }) }), - graphql.query('Seats', (info) => { + graphql.query('Seats', () => { return HttpResponse.json({ data: {} }) }), - graphql.query('TermsOfService', (info) => { + graphql.query('TermsOfService', () => { return HttpResponse.json({ data: {} }) }), - graphql.query('UseMyOrganizations', (info) => { + graphql.query('UseMyOrganizations', () => { return HttpResponse.json({ data: { myOrganizationsData: { @@ -277,13 +277,13 @@ describe('BaseLayout', () => { }, }) }), - graphql.mutation('updateDefaultOrganization', (info) => { + graphql.mutation('updateDefaultOrganization', () => { return HttpResponse.json({ data: {} }) }), graphql.query('NavigatorData', () => { return HttpResponse.json({ data: mockNavigatorData }) }), - http.get('/internal/users/current', (info) => { + http.get('/internal/users/current', () => { return HttpResponse.json({}) }) ) diff --git a/src/layouts/BaseLayout/InstallationHelpBanner/InstallationHelpBanner.test.jsx b/src/layouts/BaseLayout/InstallationHelpBanner/InstallationHelpBanner.test.jsx index 162fcd33a2..ecad2b3b54 100644 --- a/src/layouts/BaseLayout/InstallationHelpBanner/InstallationHelpBanner.test.jsx +++ b/src/layouts/BaseLayout/InstallationHelpBanner/InstallationHelpBanner.test.jsx @@ -48,7 +48,7 @@ describe('InstallationHelpBanner', () => { const mockGetItem = vi.spyOn(window.localStorage.__proto__, 'getItem') server.use( - graphql.query('IsSyncing', (info) => { + graphql.query('IsSyncing', () => { return HttpResponse.json({ data: { me: { diff --git a/src/layouts/BaseLayout/hooks/useUserAccessGate.test.tsx b/src/layouts/BaseLayout/hooks/useUserAccessGate.test.tsx index de6d2b723a..74dcbd903b 100644 --- a/src/layouts/BaseLayout/hooks/useUserAccessGate.test.tsx +++ b/src/layouts/BaseLayout/hooks/useUserAccessGate.test.tsx @@ -31,7 +31,7 @@ const queryClient = new QueryClient({ }) const server = setupServer() -let testLocation: { pathname: string; search: string } = { +const testLocation: { pathname: string; search: string } = { pathname: '', search: '', } @@ -255,11 +255,11 @@ describe('useUserAccessGate', () => { const mockMutationVariables = vi.fn() server.use( - http.get('/internal/user', (info) => { + http.get('/internal/user', () => { return HttpResponse.json(internalUser) }), - graphql.query('CurrentUser', (info) => { + graphql.query('CurrentUser', () => { return HttpResponse.json({ data: user }) }), graphql.mutation('updateDefaultOrganization', async (info) => { diff --git a/src/layouts/Header/Header.test.tsx b/src/layouts/Header/Header.test.tsx index 3c7750e6b8..fa0b7c4c30 100644 --- a/src/layouts/Header/Header.test.tsx +++ b/src/layouts/Header/Header.test.tsx @@ -121,7 +121,7 @@ describe('Header', () => { function setup({ user = mockUser }: SetupArgs) { mockedUseImpersonate.mockReturnValue({ isImpersonating: false }) server.use( - graphql.query('CurrentUser', (info) => { + graphql.query('CurrentUser', () => { return HttpResponse.json({ data: user }) }) ) diff --git a/src/layouts/Header/components/AdminLink/AdminLink.test.tsx b/src/layouts/Header/components/AdminLink/AdminLink.test.tsx index 934caca4b2..89f65a1f7c 100644 --- a/src/layouts/Header/components/AdminLink/AdminLink.test.tsx +++ b/src/layouts/Header/components/AdminLink/AdminLink.test.tsx @@ -43,7 +43,7 @@ afterAll(() => { describe('AdminLink', () => { function setup(data = {}) { server.use( - http.get('/internal/users/current', (info) => { + http.get('/internal/users/current', () => { return HttpResponse.json(data) }) ) diff --git a/src/layouts/Header/components/Navigator/MyContextSwitcher.test.tsx b/src/layouts/Header/components/Navigator/MyContextSwitcher.test.tsx index d9e3b1d78e..31d8ff60ce 100644 --- a/src/layouts/Header/components/Navigator/MyContextSwitcher.test.tsx +++ b/src/layouts/Header/components/Navigator/MyContextSwitcher.test.tsx @@ -82,7 +82,7 @@ describe('MyContextSwitcher', () => { return HttpResponse.json({ data: { me: null } }) } - const orgList = !!info.variables?.after ? org2 : org1 + const orgList = info.variables?.after ? org2 : org1 const hasNextPage = info.variables?.after ? false : true const endCursor = info.variables?.after ? 'second' : 'first' @@ -105,7 +105,7 @@ describe('MyContextSwitcher', () => { return HttpResponse.json({ data: queryData }) }), - graphql.query('DetailOwner', (info) => { + graphql.query('DetailOwner', () => { if (noData) { return HttpResponse.json({ data: { me: null } }) } diff --git a/src/layouts/Header/components/Navigator/Navigator.test.tsx b/src/layouts/Header/components/Navigator/Navigator.test.tsx index 001870b128..8a3bd1fce4 100644 --- a/src/layouts/Header/components/Navigator/Navigator.test.tsx +++ b/src/layouts/Header/components/Navigator/Navigator.test.tsx @@ -174,10 +174,10 @@ interface SetupArgs { describe('Header Navigator', () => { function setup({ isMyOrg = true, orgDoesNotExist = false }: SetupArgs) { server.use( - graphql.query('MyContexts', (info) => { + graphql.query('MyContexts', () => { return HttpResponse.json({ data: mockMyContexts }) }), - graphql.query('DetailOwner', (info) => { + graphql.query('DetailOwner', () => { if (orgDoesNotExist) { return HttpResponse.json({ data: { owner: null } }) } @@ -188,7 +188,7 @@ describe('Header Navigator', () => { return HttpResponse.json({ data: mockDetailOwner }) }), - graphql.query('OwnerPageData', (info) => { + graphql.query('OwnerPageData', () => { if (isMyOrg) { return HttpResponse.json({ data: mockOwnerPageData }) } diff --git a/src/layouts/Header/components/SeatDetails/SeatDetails.test.tsx b/src/layouts/Header/components/SeatDetails/SeatDetails.test.tsx index d01ce8bdd5..893bf56189 100644 --- a/src/layouts/Header/components/SeatDetails/SeatDetails.test.tsx +++ b/src/layouts/Header/components/SeatDetails/SeatDetails.test.tsx @@ -54,7 +54,7 @@ afterAll(() => { describe('SeatDetails', () => { function setup({ data = mockData }: { data?: any }) { server.use( - graphql.query('Seats', (info) => { + graphql.query('Seats', () => { return HttpResponse.json({ data }) }) ) diff --git a/src/layouts/Header/components/ThemeToggle/ThemeToggle.test.tsx b/src/layouts/Header/components/ThemeToggle/ThemeToggle.test.tsx index 976acd0214..18102b3720 100644 --- a/src/layouts/Header/components/ThemeToggle/ThemeToggle.test.tsx +++ b/src/layouts/Header/components/ThemeToggle/ThemeToggle.test.tsx @@ -73,7 +73,7 @@ describe('ThemeToggle', () => { it('assumes light mode when there is no theme in local storage', () => { setup({ isMediaPrefersDark: false }) - mockGetItem.mockImplementation((key) => null) + mockGetItem.mockImplementation(() => null) render( diff --git a/src/layouts/Header/components/UserDropdown/UserDropdown.test.tsx b/src/layouts/Header/components/UserDropdown/UserDropdown.test.tsx index e3938bc1a6..be41d8c94e 100644 --- a/src/layouts/Header/components/UserDropdown/UserDropdown.test.tsx +++ b/src/layouts/Header/components/UserDropdown/UserDropdown.test.tsx @@ -114,10 +114,10 @@ describe('UserDropdown', () => { config.API_URL = '' server.use( - http.post('/logout', (info) => { + http.post('/logout', () => { return HttpResponse.json({}, { status: 205 }) }), - graphql.query('CurrentUser', (info) => { + graphql.query('CurrentUser', () => { return HttpResponse.json({ data: mockUser }) }) ) diff --git a/src/layouts/LoginLayout/LoginLayout.test.tsx b/src/layouts/LoginLayout/LoginLayout.test.tsx index 6745ac655e..1548e68dc5 100644 --- a/src/layouts/LoginLayout/LoginLayout.test.tsx +++ b/src/layouts/LoginLayout/LoginLayout.test.tsx @@ -59,7 +59,7 @@ afterAll(() => { describe('LoginLayout', () => { function setup() { server.use( - graphql.query('CurrentUser', (info) => { + graphql.query('CurrentUser', () => { return HttpResponse.json({ data: { me: null } }) }) ) diff --git a/src/layouts/shared/ErrorBoundary/ErrorBoundary.test.tsx b/src/layouts/shared/ErrorBoundary/ErrorBoundary.test.tsx index 0561a52823..b433a8c02e 100644 --- a/src/layouts/shared/ErrorBoundary/ErrorBoundary.test.tsx +++ b/src/layouts/shared/ErrorBoundary/ErrorBoundary.test.tsx @@ -117,7 +117,7 @@ describe('Error Boundary', () => { beforeEach(() => { const spySentry = vi.spyOn(Sentry, 'withScope') spySentry.mockImplementation((callback) => { - // @ts-ignore - this test is skipped + // @ts-expect-error - this test is skipped callback({ setTag: sentryMockScope }) }) }) diff --git a/src/mocks/handlers.js b/src/mocks/handlers.js index 0b553cc001..092516529b 100644 --- a/src/mocks/handlers.js +++ b/src/mocks/handlers.js @@ -20,7 +20,7 @@ export const handlers = [ ] // pr page that never is left hanging in a "no files covered" when its stuck in a pending state -graphql.query('CurrentUser', (info) => { +graphql.query('CurrentUser', () => { return HttpResponse.json({ data: { me: { @@ -65,7 +65,7 @@ graphql.query('CurrentUser', (info) => { }) }) -graphql.query('DetailOwner', (info) => { +graphql.query('DetailOwner', () => { return HttpResponse.json({ data: { owner: { @@ -80,7 +80,7 @@ graphql.query('DetailOwner', (info) => { }) }) -graphql.query('DetailOwner2', (info) => { +graphql.query('DetailOwner2', () => { return HttpResponse.json({ data: { owner: { @@ -95,7 +95,7 @@ graphql.query('DetailOwner2', (info) => { }) }) -graphql.query('PullPageData', (info) => { +graphql.query('PullPageData', () => { return HttpResponse.json({ data: { owner: { @@ -120,7 +120,7 @@ graphql.query('PullPageData', (info) => { }) }) -graphql.query('PullHeadData', (info) => { +graphql.query('PullHeadData', () => { return HttpResponse.json({ data: { owner: { @@ -139,7 +139,7 @@ graphql.query('PullHeadData', (info) => { }) }) -graphql.query('Pull', (info) => { +graphql.query('Pull', () => { return HttpResponse.json({ data: { owner: { @@ -223,7 +223,7 @@ graphql.query('Pull', (info) => { }) }) -graphql.query('Pull2', (info) => { +graphql.query('Pull2', () => { return HttpResponse.json({ data: { owner: { @@ -307,7 +307,7 @@ graphql.query('Pull2', (info) => { }) }) -graphql.query('GetCommits', (info) => { +graphql.query('GetCommits', () => { return HttpResponse.json({ data: { owner: { @@ -323,11 +323,11 @@ graphql.query('GetCommits', (info) => { }) }) -graphql.query('CurrentUser', (info) => { +graphql.query('CurrentUser', () => { return HttpResponse.json({ data: {} }) }) -graphql.query('CommitDropdownSummary', (info) => { +graphql.query('CommitDropdownSummary', () => { return HttpResponse.json({ data: { owner: { @@ -348,7 +348,7 @@ graphql.query('CommitDropdownSummary', (info) => { }) }) -graphql.query('PullDropdownSummary', (info) => { +graphql.query('PullDropdownSummary', () => { return HttpResponse.json({ data: { owner: { @@ -369,7 +369,7 @@ graphql.query('PullDropdownSummary', (info) => { }) }) -graphql.query('CommitBADropdownSummary', (info) => { +graphql.query('CommitBADropdownSummary', () => { return HttpResponse.json({ data: { owner: { @@ -390,7 +390,7 @@ graphql.query('CommitBADropdownSummary', (info) => { }) }) -graphql.query('PullBADropdownSummary', (info) => { +graphql.query('PullBADropdownSummary', () => { return HttpResponse.json({ data: { owner: { @@ -412,7 +412,7 @@ graphql.query('PullBADropdownSummary', (info) => { }) }) -graphql.query('CommitBundleList', (info) => { +graphql.query('CommitBundleList', () => { return HttpResponse.json({ data: { owner: { @@ -449,7 +449,7 @@ graphql.query('CommitBundleList', (info) => { }) }) -graphql.query('PullBundleComparisonList', (info) => { +graphql.query('PullBundleComparisonList', () => { return HttpResponse.json({ data: { owner: { diff --git a/src/pages/AccountSettings/AccountSettings.test.jsx b/src/pages/AccountSettings/AccountSettings.test.jsx index 0801af2921..017b3f4cae 100644 --- a/src/pages/AccountSettings/AccountSettings.test.jsx +++ b/src/pages/AccountSettings/AccountSettings.test.jsx @@ -145,15 +145,15 @@ describe('AccountSettings', () => { config.HIDE_ACCESS_TAB = hideAccessTab server.use( - graphql.query('CurrentUser', (info) => { + graphql.query('CurrentUser', () => { return HttpResponse.json({ data: mockCurrentUser(username) }) }), - graphql.query('DetailOwner', (info) => { + graphql.query('DetailOwner', () => { return HttpResponse.json({ data: { owner: { username: owner, isAdmin } }, }) }), - graphql.query('GetPlanData', (info) => { + graphql.query('GetPlanData', () => { return HttpResponse.json({ data: { owner: { diff --git a/src/pages/AccountSettings/AccountSettingsSideMenu.test.jsx b/src/pages/AccountSettings/AccountSettingsSideMenu.test.jsx index 6a0a7c1957..02b9881ce0 100644 --- a/src/pages/AccountSettings/AccountSettingsSideMenu.test.jsx +++ b/src/pages/AccountSettings/AccountSettingsSideMenu.test.jsx @@ -133,15 +133,15 @@ describe('AccountSettingsSideMenu', () => { config.HIDE_ACCESS_TAB = hideAccessTab server.use( - graphql.query('CurrentUser', (info) => { + graphql.query('CurrentUser', () => { return HttpResponse.json({ data: mockCurrentUser(username) }) }), - graphql.query('DetailOwner', (info) => { + graphql.query('DetailOwner', () => { return HttpResponse.json({ data: { owner: { username: owner, isAdmin } }, }) }), - graphql.query('GetPlanData', (info) => { + graphql.query('GetPlanData', () => { return HttpResponse.json({ data: { owner: { diff --git a/src/pages/AccountSettings/tabs/Access/Access.test.tsx b/src/pages/AccountSettings/tabs/Access/Access.test.tsx index 7877b8621a..7f1799bab7 100644 --- a/src/pages/AccountSettings/tabs/Access/Access.test.tsx +++ b/src/pages/AccountSettings/tabs/Access/Access.test.tsx @@ -127,13 +127,13 @@ describe('AccessTab', () => { const user = userEvent.setup() server.use( - graphql.query('MySessions', (info) => { + graphql.query('MySessions', () => { return HttpResponse.json({ data: mockSessionInfo }) }), - graphql.query('CurrentUser', (info) => { + graphql.query('CurrentUser', () => { return HttpResponse.json({ data: mockSignedInUser }) }), - graphql.mutation('DeleteSession', (info) => { + graphql.mutation('DeleteSession', () => { return HttpResponse.json({ data: {} }) }) ) diff --git a/src/pages/AccountSettings/tabs/Admin/Admin.test.jsx b/src/pages/AccountSettings/tabs/Admin/Admin.test.jsx index b1f77db610..5c72bf2415 100644 --- a/src/pages/AccountSettings/tabs/Admin/Admin.test.jsx +++ b/src/pages/AccountSettings/tabs/Admin/Admin.test.jsx @@ -90,7 +90,7 @@ afterAll(() => { describe('AdminTab', () => { function setup() { server.use( - graphql.query('CurrentUser', (info) => { + graphql.query('CurrentUser', () => { return HttpResponse.json({ data: user }) }) ) diff --git a/src/pages/AccountSettings/tabs/Admin/GithubIntegrationSection/GithubIntegrationSection.test.jsx b/src/pages/AccountSettings/tabs/Admin/GithubIntegrationSection/GithubIntegrationSection.test.jsx index 4d50d999cc..bcd8fa5f1d 100644 --- a/src/pages/AccountSettings/tabs/Admin/GithubIntegrationSection/GithubIntegrationSection.test.jsx +++ b/src/pages/AccountSettings/tabs/Admin/GithubIntegrationSection/GithubIntegrationSection.test.jsx @@ -54,7 +54,7 @@ describe('GithubIntegrationSection', () => { config.GH_APP = 'codecov' server.use( - http.get(`/internal/gh/codecov/account-details/`, (info) => { + http.get(`/internal/gh/codecov/account-details/`, () => { return HttpResponse.json({ plan: { marketingName: Plans.USERS_BASIC, diff --git a/src/pages/AccountSettings/tabs/OktaAccess/OktaAccess.test.tsx b/src/pages/AccountSettings/tabs/OktaAccess/OktaAccess.test.tsx index fe9dbb989c..07d6d581c4 100644 --- a/src/pages/AccountSettings/tabs/OktaAccess/OktaAccess.test.tsx +++ b/src/pages/AccountSettings/tabs/OktaAccess/OktaAccess.test.tsx @@ -38,12 +38,12 @@ afterAll(() => { describe('OktaAccess', () => { function setup({ isAdmin = false } = {}) { server.use( - graphql.query('DetailOwner', (info) => { + graphql.query('DetailOwner', () => { return HttpResponse.json({ data: { owner: { username: 'codecov', isAdmin } }, }) }), - graphql.query('GetOktaConfig', (info) => { + graphql.query('GetOktaConfig', () => { return HttpResponse.json({ data: { owner: { diff --git a/src/pages/AccountSettings/tabs/OktaAccess/OktaConfigForm/OktaConfigForm.test.tsx b/src/pages/AccountSettings/tabs/OktaAccess/OktaConfigForm/OktaConfigForm.test.tsx index f6d7be028e..b0068a9b7c 100644 --- a/src/pages/AccountSettings/tabs/OktaAccess/OktaConfigForm/OktaConfigForm.test.tsx +++ b/src/pages/AccountSettings/tabs/OktaAccess/OktaConfigForm/OktaConfigForm.test.tsx @@ -50,7 +50,7 @@ describe('OktaConfigForm', () => { const mutate = vi.fn() server.use( - graphql.query('GetOktaConfig', (info) => { + graphql.query('GetOktaConfig', () => { return HttpResponse.json({ data: { owner: { diff --git a/src/pages/AccountSettings/tabs/OktaAccess/hooks/useOktaConfig.test.tsx b/src/pages/AccountSettings/tabs/OktaAccess/hooks/useOktaConfig.test.tsx index 7957103eab..e4cf56838f 100644 --- a/src/pages/AccountSettings/tabs/OktaAccess/hooks/useOktaConfig.test.tsx +++ b/src/pages/AccountSettings/tabs/OktaAccess/hooks/useOktaConfig.test.tsx @@ -38,7 +38,7 @@ afterAll(() => { describe('useOktaConfig', () => { function setup(oktaConfigData = {}) { server.use( - graphql.query('GetOktaConfig', (info) => { + graphql.query('GetOktaConfig', () => { return HttpResponse.json({ data: { owner: { @@ -79,7 +79,7 @@ describe('useOktaConfig', () => { }) describe('invalid schema', () => { - let consoleSpy = vi.spyOn(console, 'error').mockImplementation(() => {}) + const consoleSpy = vi.spyOn(console, 'error').mockImplementation(() => {}) afterAll(() => { consoleSpy.mockRestore() diff --git a/src/pages/AccountSettings/tabs/OktaAccess/hooks/useUpdateOktaConfig.test.tsx b/src/pages/AccountSettings/tabs/OktaAccess/hooks/useUpdateOktaConfig.test.tsx index 40bed56740..fe78a1dbc6 100644 --- a/src/pages/AccountSettings/tabs/OktaAccess/hooks/useUpdateOktaConfig.test.tsx +++ b/src/pages/AccountSettings/tabs/OktaAccess/hooks/useUpdateOktaConfig.test.tsx @@ -63,14 +63,14 @@ describe('useUpdateOktaConfig', () => { mockedToastNotification.mockReturnValue(addToast) server.use( - graphql.mutation(`SaveOktaConfig`, (info) => { + graphql.mutation(`SaveOktaConfig`, () => { return HttpResponse.json({ data: response }) }) ) } describe('when calling the mutation', () => { - let consoleSpy = vi.spyOn(console, 'error').mockImplementation(() => {}) + const consoleSpy = vi.spyOn(console, 'error').mockImplementation(() => {}) afterAll(() => { consoleSpy.mockRestore() diff --git a/src/pages/AccountSettings/tabs/OrgUploadToken/OrgUploadToken.test.jsx b/src/pages/AccountSettings/tabs/OrgUploadToken/OrgUploadToken.test.jsx index 101987bb61..e030535b5f 100644 --- a/src/pages/AccountSettings/tabs/OrgUploadToken/OrgUploadToken.test.jsx +++ b/src/pages/AccountSettings/tabs/OrgUploadToken/OrgUploadToken.test.jsx @@ -68,7 +68,7 @@ describe('OrgUploadToken', () => { useAddNotification.mockReturnValue(addNotification) server.use( - graphql.query('DetailOwner', (info) => { + graphql.query('DetailOwner', () => { return HttpResponse.json({ data: { owner: { @@ -78,7 +78,7 @@ describe('OrgUploadToken', () => { }, }) }), - graphql.query('GetOrgUploadToken', (info) => { + graphql.query('GetOrgUploadToken', () => { return HttpResponse.json({ data: { owner: { @@ -87,7 +87,7 @@ describe('OrgUploadToken', () => { }, }) }), - graphql.mutation('regenerateOrgUploadToken', (info) => { + graphql.mutation('regenerateOrgUploadToken', () => { mutate('regenerateOrgUploadToken') return HttpResponse.json({ data: { diff --git a/src/pages/AccountSettings/tabs/Profile/ActivationBanner/ActivationBanner.test.jsx b/src/pages/AccountSettings/tabs/Profile/ActivationBanner/ActivationBanner.test.jsx index dfe3d3d080..2e8316eb23 100644 --- a/src/pages/AccountSettings/tabs/Profile/ActivationBanner/ActivationBanner.test.jsx +++ b/src/pages/AccountSettings/tabs/Profile/ActivationBanner/ActivationBanner.test.jsx @@ -61,10 +61,10 @@ describe('ActivationBanner', () => { const querySeats = { ...mockSeatData, ...overrideSeatData } server.use( - http.get('/internal/users/current', (info) => { + http.get('/internal/users/current', () => { return HttpResponse.json(restUsersCurrent) }), - graphql.query('Seats', (info) => { + graphql.query('Seats', () => { return HttpResponse.json({ data: querySeats }) }), http.patch('/internal/users/current', async (info) => { diff --git a/src/pages/AccountSettings/tabs/Profile/ActivationBanner/useSelfActivationMutation.test.jsx b/src/pages/AccountSettings/tabs/Profile/ActivationBanner/useSelfActivationMutation.test.jsx index 36129b66f7..e704710534 100644 --- a/src/pages/AccountSettings/tabs/Profile/ActivationBanner/useSelfActivationMutation.test.jsx +++ b/src/pages/AccountSettings/tabs/Profile/ActivationBanner/useSelfActivationMutation.test.jsx @@ -60,7 +60,7 @@ describe('useSelfActivationMutation', () => { } server.use( - http.get('/internal/users/current', (info) => { + http.get('/internal/users/current', () => { return HttpResponse.json(mockUser) }), http.patch('/internal/users/current', async (info) => { @@ -115,7 +115,7 @@ describe('useSelfActivationMutation', () => { } server.use( - http.get('/internal/users/current', (info) => { + http.get('/internal/users/current', () => { return HttpResponse.json(mockUser) }), http.patch('/internal/users/current', async (info) => { @@ -169,7 +169,7 @@ describe('useSelfActivationMutation', () => { } server.use( - http.get('/internal/users/current', (info) => { + http.get('/internal/users/current', () => { return HttpResponse.json(mockUser) }), http.patch('/internal/users/current', async (info) => { @@ -225,10 +225,10 @@ describe('useSelfActivationMutation', () => { } server.use( - http.get('/internal/users/current', (req, res, ctx) => { + http.get('/internal/users/current', () => { return HttpResponse.json(mockUser) }), - http.patch('/internal/users/current', (req, res, ctx) => { + http.patch('/internal/users/current', () => { return HttpResponse.json({}, { status: 400 }) }) ) diff --git a/src/pages/AccountSettings/tabs/Profile/Profile.test.jsx b/src/pages/AccountSettings/tabs/Profile/Profile.test.jsx index cd69015c0e..c4a0988205 100644 --- a/src/pages/AccountSettings/tabs/Profile/Profile.test.jsx +++ b/src/pages/AccountSettings/tabs/Profile/Profile.test.jsx @@ -36,10 +36,10 @@ afterAll(() => server.close()) describe('Profile', () => { function setup() { server.use( - http.get('/internal/users/current', (info) => { + http.get('/internal/users/current', () => { return HttpResponse.json(mockUser) }), - graphql.query('Seats', (info) => { + graphql.query('Seats', () => { return HttpResponse.json({ data: { config: { seatsUsed: 0, seatsLimit: 10 } }, }) diff --git a/src/pages/AccountSettings/tabs/YAML/YAML.test.jsx b/src/pages/AccountSettings/tabs/YAML/YAML.test.jsx index 8071d40a22..68b0503b42 100644 --- a/src/pages/AccountSettings/tabs/YAML/YAML.test.jsx +++ b/src/pages/AccountSettings/tabs/YAML/YAML.test.jsx @@ -72,10 +72,10 @@ describe('YAMLTab', () => { useIsCurrentUserAnAdmin.mockReturnValue(true) server.use( - graphql.query('YamlConfig', (info) => { + graphql.query('YamlConfig', () => { return HttpResponse.json({ data: dataReturned.YamlConfig }) }), - graphql.mutation('UpdateYamlConfig', (info) => { + graphql.mutation('UpdateYamlConfig', () => { return HttpResponse.json(dataReturned.UpdateYamlConfig) }) ) diff --git a/src/pages/AdminSettings/AdminAccess/AdminAccess.tsx b/src/pages/AdminSettings/AdminAccess/AdminAccess.tsx index 9fccfe33ce..6e04fa6ba2 100644 --- a/src/pages/AdminSettings/AdminAccess/AdminAccess.tsx +++ b/src/pages/AdminSettings/AdminAccess/AdminAccess.tsx @@ -23,7 +23,8 @@ function AdminAccess() {

- Admins can be edited in the {/* @ts-expect-error */} + Admins can be edited in the{' '} + {/* @ts-expect-error - A hasn't been typed yet */} install.yml {' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} { describe('ActivationCount', () => { function setup() { server.use( - graphql.query('SelfHostedSettings', (info) => { + graphql.query('SelfHostedSettings', () => { return HttpResponse.json({ data: mockResponse }) }) ) diff --git a/src/pages/AdminSettings/AdminMembers/ActivationInfo/AutoActivateMembers/AutoActivateMembers.test.jsx b/src/pages/AdminSettings/AdminMembers/ActivationInfo/AutoActivateMembers/AutoActivateMembers.test.jsx index bbcada0019..21f7e7cbee 100644 --- a/src/pages/AdminSettings/AdminMembers/ActivationInfo/AutoActivateMembers/AutoActivateMembers.test.jsx +++ b/src/pages/AdminSettings/AdminMembers/ActivationInfo/AutoActivateMembers/AutoActivateMembers.test.jsx @@ -45,7 +45,7 @@ describe('AutoActivateMembers', () => { function setup() { const user = userEvent.setup() server.use( - graphql.query('SelfHostedSettings', (info) => { + graphql.query('SelfHostedSettings', () => { return HttpResponse.json({ data: mockResponse }) }), diff --git a/src/pages/AdminSettings/AdminMembers/MemberList/MemberTable.test.jsx b/src/pages/AdminSettings/AdminMembers/MemberList/MemberTable.test.jsx index c98ffbf9e4..e82bdc4f6a 100644 --- a/src/pages/AdminSettings/AdminMembers/MemberList/MemberTable.test.jsx +++ b/src/pages/AdminSettings/AdminMembers/MemberList/MemberTable.test.jsx @@ -133,7 +133,7 @@ describe('MemberTable', () => { return HttpResponse.json({}) }), - graphql.query('SelfHostedSettings', (req, res, ctx) => { + graphql.query('SelfHostedSettings', () => { if (seatsOpen) { return HttpResponse.json({ data: mockOpenSeatsTaken }) } diff --git a/src/pages/AdminSettings/AdminMembers/MemberList/MemberTable.tsx b/src/pages/AdminSettings/AdminMembers/MemberList/MemberTable.tsx index 15cefb1891..f9b0b5abf8 100644 --- a/src/pages/AdminSettings/AdminMembers/MemberList/MemberTable.tsx +++ b/src/pages/AdminSettings/AdminMembers/MemberList/MemberTable.tsx @@ -71,7 +71,7 @@ interface CreateTableArgs { const createTable = ({ tableData, seatData, mutate }: CreateTableArgs) => { return tableData?.map( ({ ownerid, activated, email, isAdmin, name, username }) => { - let maxSeats = seatData?.seatsUsed === seatData?.seatsLimit + const maxSeats = seatData?.seatsUsed === seatData?.seatsLimit const disableToggle = maxSeats && !activated return { diff --git a/src/pages/AdminSettings/AdminSettings.test.jsx b/src/pages/AdminSettings/AdminSettings.test.jsx index e1c4b56fa7..698d0659de 100644 --- a/src/pages/AdminSettings/AdminSettings.test.jsx +++ b/src/pages/AdminSettings/AdminSettings.test.jsx @@ -57,10 +57,10 @@ afterAll(() => { describe('AdminSettings', () => { function setup({ data = {} }) { server.use( - http.get('/internal/users/current', (info) => { + http.get('/internal/users/current', () => { return HttpResponse.json({ ...user, ...data }) }), - graphql.query('CurrentUser', (req, res, ctx) => { + graphql.query('CurrentUser', () => { return HttpResponse.json({ data: { me: null } }) }) ) diff --git a/src/pages/AnalyticsPage/Chart/Chart.test.tsx b/src/pages/AnalyticsPage/Chart/Chart.test.tsx index 5b0b7fe4b2..e0ddc77184 100644 --- a/src/pages/AnalyticsPage/Chart/Chart.test.tsx +++ b/src/pages/AnalyticsPage/Chart/Chart.test.tsx @@ -68,7 +68,7 @@ beforeEach(() => { * This mock also allow us to use {@link notifyResizeObserverChange} to fire changes * from inside our test. */ - resizeObserverMock = vi.fn().mockImplementation((callback) => { + resizeObserverMock = vi.fn().mockImplementation((_callback) => { return { observe: vi.fn(), unobserve: vi.fn(), @@ -76,7 +76,7 @@ beforeEach(() => { } }) - // @ts-ignore + // @ts-expect-error - deleting so we can override with the mock delete window.ResizeObserver window.ResizeObserver = resizeObserverMock @@ -104,7 +104,7 @@ describe('Analytics coverage chart', () => { hasError = false, }: SetupArgs) { server.use( - graphql.query('GetReposCoverageMeasurements', (info) => { + graphql.query('GetReposCoverageMeasurements', () => { if (hasNoData) { return HttpResponse.json({ data: { owner: { measurements: [] } } }) } else if (hasSingleData) { @@ -115,7 +115,7 @@ describe('Analytics coverage chart', () => { return HttpResponse.json({ data: mockDataPoints }) }), - graphql.query('OwnerTier', (info) => + graphql.query('OwnerTier', () => HttpResponse.json({ data: { owner: { plan: { tierName: 'pro' } } } }) ) ) diff --git a/src/pages/AnalyticsPage/Chart/useCoverage.test.tsx b/src/pages/AnalyticsPage/Chart/useCoverage.test.tsx index da4d2e895e..a29e299d10 100644 --- a/src/pages/AnalyticsPage/Chart/useCoverage.test.tsx +++ b/src/pages/AnalyticsPage/Chart/useCoverage.test.tsx @@ -85,7 +85,7 @@ describe('useCoverage', () => { } return HttpResponse.json({ data: mockRepoMeasurements }) }), - graphql.query('OwnerTier', (info) => { + graphql.query('OwnerTier', () => { return HttpResponse.json({ data: { owner: { plan: { tierName: tierValue } } }, }) diff --git a/src/pages/AnalyticsPage/Chart/useCoverage.ts b/src/pages/AnalyticsPage/Chart/useCoverage.ts index 5e1401cb08..1f8fa8a870 100644 --- a/src/pages/AnalyticsPage/Chart/useCoverage.ts +++ b/src/pages/AnalyticsPage/Chart/useCoverage.ts @@ -61,7 +61,7 @@ export const useCoverage = ({ // set prevPercent so we can reuse value if next value is null let prevPercent = data?.measurements?.[0]?.avg ?? 0 const coverage = data?.measurements?.map((measurement) => { - let coverage = measurement?.avg ?? prevPercent + const coverage = measurement?.avg ?? prevPercent // can save on a few reassignments if (prevPercent !== coverage) { diff --git a/src/pages/AnalyticsPage/ChartSelectors/ChartSelectors.test.jsx b/src/pages/AnalyticsPage/ChartSelectors/ChartSelectors.test.jsx index 4e83d23d2a..05d9f8c78e 100644 --- a/src/pages/AnalyticsPage/ChartSelectors/ChartSelectors.test.jsx +++ b/src/pages/AnalyticsPage/ChartSelectors/ChartSelectors.test.jsx @@ -122,7 +122,7 @@ describe('ChartSelectors', () => { }) server.use( - graphql.query('OwnerTier', (info) => { + graphql.query('OwnerTier', () => { return HttpResponse.json({ data: { owner: { plan: { tierName: tierValue } } }, }) diff --git a/src/pages/CodecovAIPage/CodecovAIPage.test.tsx b/src/pages/CodecovAIPage/CodecovAIPage.test.tsx index b6a5917f6c..ca45d8aad9 100644 --- a/src/pages/CodecovAIPage/CodecovAIPage.test.tsx +++ b/src/pages/CodecovAIPage/CodecovAIPage.test.tsx @@ -70,7 +70,7 @@ describe('CodecovAIPage', () => { aiEnabledRepos = ['repo-1', 'repo-2'] ) { server.use( - graphql.query('GetCodecovAIAppInstallInfo', (info) => { + graphql.query('GetCodecovAIAppInstallInfo', () => { return HttpResponse.json({ data: { owner: { @@ -79,7 +79,7 @@ describe('CodecovAIPage', () => { }, }) }), - graphql.query('GetCodecovAIInstalledRepos', (info) => { + graphql.query('GetCodecovAIInstalledRepos', () => { return HttpResponse.json({ data: { owner: { diff --git a/src/pages/CommitDetailPage/CommitBundleAnalysis/BundleMessage/BundleMessage.test.tsx b/src/pages/CommitDetailPage/CommitBundleAnalysis/BundleMessage/BundleMessage.test.tsx index 5c4dff9cd6..b2413e88ec 100644 --- a/src/pages/CommitDetailPage/CommitBundleAnalysis/BundleMessage/BundleMessage.test.tsx +++ b/src/pages/CommitDetailPage/CommitBundleAnalysis/BundleMessage/BundleMessage.test.tsx @@ -116,7 +116,7 @@ describe('BundleMessage', () => { } ) { server.use( - graphql.query('CommitBADropdownSummary', (info) => { + graphql.query('CommitBADropdownSummary', () => { if (noData) { return HttpResponse.json({ data: mockNoData }) } else if (firstPullRequest) { diff --git a/src/pages/CommitDetailPage/CommitBundleAnalysis/CommitBundleAnalysis.test.tsx b/src/pages/CommitDetailPage/CommitBundleAnalysis/CommitBundleAnalysis.test.tsx index 2e882d7d1c..782c7d3bc8 100644 --- a/src/pages/CommitDetailPage/CommitBundleAnalysis/CommitBundleAnalysis.test.tsx +++ b/src/pages/CommitDetailPage/CommitBundleAnalysis/CommitBundleAnalysis.test.tsx @@ -196,7 +196,7 @@ describe('CommitBundleAnalysis', () => { } ) { server.use( - graphql.query('CommitPageData', (info) => { + graphql.query('CommitPageData', () => { return HttpResponse.json({ data: mockCommitPageData({ coverageEnabled, @@ -206,7 +206,7 @@ describe('CommitBundleAnalysis', () => { }), }) }), - graphql.query('CommitBADropdownSummary', (info) => { + graphql.query('CommitBADropdownSummary', () => { if (noData) { return HttpResponse.json({ data: mockNoData }) } else if (firstPullRequest) { @@ -217,7 +217,7 @@ describe('CommitBundleAnalysis', () => { return HttpResponse.json({ data: mockSummaryData(uncompress) }) }), - graphql.query('GetRepoOverview', (info) => { + graphql.query('GetRepoOverview', () => { return HttpResponse.json({ data: mockRepoOverview({ coverageEnabled, bundleAnalysisEnabled }), }) diff --git a/src/pages/CommitDetailPage/CommitBundleAnalysis/CommitBundleAnalysisTable/CommitBundleAnalysisTable.test.tsx b/src/pages/CommitDetailPage/CommitBundleAnalysis/CommitBundleAnalysisTable/CommitBundleAnalysisTable.test.tsx index 2e89f34b78..d386621c0b 100644 --- a/src/pages/CommitDetailPage/CommitBundleAnalysis/CommitBundleAnalysisTable/CommitBundleAnalysisTable.test.tsx +++ b/src/pages/CommitDetailPage/CommitBundleAnalysis/CommitBundleAnalysisTable/CommitBundleAnalysisTable.test.tsx @@ -133,7 +133,7 @@ describe('CommitBundleAnalysisTable', () => { ) { const user = userEvent.setup() server.use( - graphql.query('CommitBundleList', (info) => { + graphql.query('CommitBundleList', () => { if (isEmptyList) { return HttpResponse.json({ data: mockEmptyCommitBundleListData }) } else if (nonComparisonType) { @@ -242,13 +242,12 @@ describe('CommitBundleAnalysisTable', () => { describe('useTableData', () => { function setup( - { isEmptyList = false, nonComparisonType = false }: SetupArgs = { - isEmptyList: false, + { nonComparisonType = false }: SetupArgs = { nonComparisonType: false, } ) { server.use( - graphql.query('CommitBundleList', (info) => { + graphql.query('CommitBundleList', () => { if (nonComparisonType) { return HttpResponse.json({ data: mockNonComparisonTypeData }) } else { diff --git a/src/pages/CommitDetailPage/CommitCoverage/BotErrorBanner/BotErrorBanner.test.jsx b/src/pages/CommitDetailPage/CommitCoverage/BotErrorBanner/BotErrorBanner.test.jsx index 82a63a8827..5c51cb945c 100644 --- a/src/pages/CommitDetailPage/CommitCoverage/BotErrorBanner/BotErrorBanner.test.jsx +++ b/src/pages/CommitDetailPage/CommitCoverage/BotErrorBanner/BotErrorBanner.test.jsx @@ -44,7 +44,7 @@ afterAll(() => { describe('BotErrorBanner', () => { function setup({ integrationId } = { integrationId: null }) { server.use( - http.get('/internal/:provider/codecov/account-details/', (info) => { + http.get('/internal/:provider/codecov/account-details/', () => { return HttpResponse.json({ integrationId }) }) ) diff --git a/src/pages/CommitDetailPage/CommitCoverage/CommitCoverage.test.jsx b/src/pages/CommitDetailPage/CommitCoverage/CommitCoverage.test.jsx index bb41c17dc6..b4a08236e9 100644 --- a/src/pages/CommitDetailPage/CommitCoverage/CommitCoverage.test.jsx +++ b/src/pages/CommitDetailPage/CommitCoverage/CommitCoverage.test.jsx @@ -420,17 +420,17 @@ describe('CommitCoverage', () => { }) server.use( - graphql.query('Commit', (info) => { + graphql.query('Commit', () => { if (hasErroredUploads) { return HttpResponse.json({ data: mockErroredUploads }) } return HttpResponse.json({ data: mockCommitData }) }), - graphql.query('GetRepoSettingsTeam', (info) => { + graphql.query('GetRepoSettingsTeam', () => { return HttpResponse.json({ data: mockRepoSettingsTeamData(isPrivate) }) }), - graphql.query('GetRepoOverview', (info) => { + graphql.query('GetRepoOverview', () => { return HttpResponse.json({ data: mockRepoOverview({ coverageEnabled, @@ -439,25 +439,25 @@ describe('CommitCoverage', () => { }), }) }), - graphql.query('OwnerTier', (info) => { + graphql.query('OwnerTier', () => { return HttpResponse.json({ data: mockOwnerTier(tierName) }) }), - graphql.query('BackfillFlagMemberships', (info) => { + graphql.query('BackfillFlagMemberships', () => { return HttpResponse.json({ data: mockRepoBackfilledData }) }), - graphql.query('CommitErrors', (info) => { + graphql.query('CommitErrors', () => { return HttpResponse.json({ data: mockCommitErrors(hasCommitErrors) }) }), - graphql.query('DetailOwner', (info) => { + graphql.query('DetailOwner', () => { return HttpResponse.json({ data: mockOwnerData }) }), - graphql.query('CompareTotals', (info) => { + graphql.query('CompareTotals', () => { return HttpResponse.json({ data: mockCompareTotals }) }), - graphql.query('CommitComponents', (info) => { + graphql.query('CommitComponents', () => { return HttpResponse.json({ data: mockCommitComponentData }) }), - graphql.query('CommitPageData', (info) => { + graphql.query('CommitPageData', () => { return HttpResponse.json({ data: mockCommitPageData( hasCommitPageMissingCommitDataError, @@ -466,7 +466,7 @@ describe('CommitCoverage', () => { ), }) }), - graphql.query('GetRepoRateLimitStatus', (info) => { + graphql.query('GetRepoRateLimitStatus', () => { return HttpResponse.json({ data: mockRepoRateLimitStatus({ isGithubRateLimited }), }) diff --git a/src/pages/CommitDetailPage/CommitCoverage/CommitCoverageSummary/CommitCoverageSummary.test.jsx b/src/pages/CommitDetailPage/CommitCoverage/CommitCoverageSummary/CommitCoverageSummary.test.jsx index c9c0f970b9..8f5a838cb1 100644 --- a/src/pages/CommitDetailPage/CommitCoverage/CommitCoverageSummary/CommitCoverageSummary.test.jsx +++ b/src/pages/CommitDetailPage/CommitCoverage/CommitCoverageSummary/CommitCoverageSummary.test.jsx @@ -115,7 +115,7 @@ afterAll(() => { describe('CommitCoverageSummary', () => { function setup(hasErrored = false) { server.use( - graphql.query('Commit', (info) => { + graphql.query('Commit', () => { if (hasErrored) { return HttpResponse.json({ data: { diff --git a/src/pages/CommitDetailPage/CommitCoverage/CommitCoverageSummary/hooks/useCommitForSummary.test.jsx b/src/pages/CommitDetailPage/CommitCoverage/CommitCoverageSummary/hooks/useCommitForSummary.test.jsx index 96422105bd..5a1f3247d6 100644 --- a/src/pages/CommitDetailPage/CommitCoverage/CommitCoverageSummary/hooks/useCommitForSummary.test.jsx +++ b/src/pages/CommitDetailPage/CommitCoverage/CommitCoverageSummary/hooks/useCommitForSummary.test.jsx @@ -153,7 +153,7 @@ afterAll(() => { describe('usePullForCompareSummary', () => { function setup() { server.use( - graphql.query('Commit', (info) => { + graphql.query('Commit', () => { return HttpResponse.json({ data: { owner: { repository: { __typename: 'Repository', ...data } }, @@ -182,15 +182,12 @@ describe('usePullForCompareSummary', () => { describe('getPullDataForCompareSummary', () => { it('returns all values accordingly', () => { - const { compareWithParent, coverageAnalytics, parent, state, commitid } = - data?.commit - const returnedData = getCommitDataForSummary({ - compareWithParent, - totals: coverageAnalytics?.totals, - parent, - state, - commitid, + compareWithParent: data?.commit?.compareWithParent, + totals: data?.commit?.coverageAnalytics?.totals, + parent: data?.commit?.parent, + state: data?.commit?.state, + commitid: data?.commit?.commitid, }) expect(returnedData).toEqual(successfulExpectedData) }) diff --git a/src/pages/CommitDetailPage/CommitCoverage/CommitCoverageTabs/CommitCoverageTabs.test.jsx b/src/pages/CommitDetailPage/CommitCoverage/CommitCoverageTabs/CommitCoverageTabs.test.jsx index ba687e6e79..4bf7cff3f8 100644 --- a/src/pages/CommitDetailPage/CommitCoverage/CommitCoverageTabs/CommitCoverageTabs.test.jsx +++ b/src/pages/CommitDetailPage/CommitCoverage/CommitCoverageTabs/CommitCoverageTabs.test.jsx @@ -111,25 +111,24 @@ afterAll(() => { describe('CommitCoverageTabs', () => { function setup( - { flagValue = false, tierValue = TierNames.PRO, isPrivate = false } = { - flagValue: false, + { tierValue = TierNames.PRO, isPrivate = false } = { tierValue: TierNames.PRO, isPrivate: false, } ) { server.use( - graphql.query('FlagsSelect', (info) => { + graphql.query('FlagsSelect', () => { return HttpResponse.json({ data: mockFlagsResponse }) }), - graphql.query('BackfillFlagMemberships', (info) => { + graphql.query('BackfillFlagMemberships', () => { return HttpResponse.json({ data: mockBackfillResponse }) }), - graphql.query('OwnerTier', (info) => { + graphql.query('OwnerTier', () => { return HttpResponse.json({ data: { owner: { plan: { tierName: tierValue } } }, }) }), - graphql.query('GetRepoSettingsTeam', (info) => { + graphql.query('GetRepoSettingsTeam', () => { return HttpResponse.json({ data: mockRepoSettings(isPrivate) }) }) ) diff --git a/src/pages/CommitDetailPage/CommitCoverage/UploadsCard/UploadItem.tsx b/src/pages/CommitDetailPage/CommitCoverage/UploadsCard/UploadItem.tsx index d5600d5cf1..944b3b37fb 100644 --- a/src/pages/CommitDetailPage/CommitCoverage/UploadsCard/UploadItem.tsx +++ b/src/pages/CommitDetailPage/CommitCoverage/UploadsCard/UploadItem.tsx @@ -90,7 +90,7 @@ const UploadItem = ({ carry-forward )} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} Download diff --git a/src/pages/CommitDetailPage/CommitCoverage/UploadsCard/UploadReference.tsx b/src/pages/CommitDetailPage/CommitCoverage/UploadsCard/UploadReference.tsx index 9d37e0f44b..702f6e77c3 100644 --- a/src/pages/CommitDetailPage/CommitCoverage/UploadsCard/UploadReference.tsx +++ b/src/pages/CommitDetailPage/CommitCoverage/UploadsCard/UploadReference.tsx @@ -11,7 +11,7 @@ const UploadReference = ({ ciUrl, name, buildCode }: UploadReferenceProps) => { if (ciUrl) { return ( - // @ts-expect-error + // @ts-expect-error - A hasn't been typed yet {uploadRef} diff --git a/src/pages/CommitDetailPage/CommitCoverage/UploadsCard/UploadsCard.test.tsx b/src/pages/CommitDetailPage/CommitCoverage/UploadsCard/UploadsCard.test.tsx index 4e3918aaa7..e0481bafdc 100644 --- a/src/pages/CommitDetailPage/CommitCoverage/UploadsCard/UploadsCard.test.tsx +++ b/src/pages/CommitDetailPage/CommitCoverage/UploadsCard/UploadsCard.test.tsx @@ -79,7 +79,7 @@ describe('UploadsCard', () => { mocks.useCommitErrors.mockReturnValue(mockCommitErrors) server.use( - graphql.query('CommitYaml', (info) => { + graphql.query('CommitYaml', () => { return HttpResponse.json({ data: { owner: { diff --git a/src/pages/CommitDetailPage/CommitCoverage/UploadsCard/UploadsCard.tsx b/src/pages/CommitDetailPage/CommitCoverage/UploadsCard/UploadsCard.tsx index 62ab691bb2..24e8c26eee 100644 --- a/src/pages/CommitDetailPage/CommitCoverage/UploadsCard/UploadsCard.tsx +++ b/src/pages/CommitDetailPage/CommitCoverage/UploadsCard/UploadsCard.tsx @@ -156,7 +156,7 @@ function UploadsCard() {

Coverage reports history - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} setShowYAMLModal(true)} hook="open yaml modal"> {invalidYamlError ? (
diff --git a/src/pages/CommitDetailPage/CommitCoverage/UploadsCard/useUploads/useUploads.test.tsx b/src/pages/CommitDetailPage/CommitCoverage/UploadsCard/useUploads/useUploads.test.tsx index f199c3b3fd..b9d54af98b 100644 --- a/src/pages/CommitDetailPage/CommitCoverage/UploadsCard/useUploads/useUploads.test.tsx +++ b/src/pages/CommitDetailPage/CommitCoverage/UploadsCard/useUploads/useUploads.test.tsx @@ -62,14 +62,14 @@ describe('useUploads', () => { server.use(query, compareTotalsEmpty) server.use( - graphql.query('OwnerTier', (info) => { + graphql.query('OwnerTier', () => { return HttpResponse.json({ data: { owner: { plan: { tierName: tierValue } }, }, }) }), - graphql.query('GetRepoOverview', (info) => { + graphql.query('GetRepoOverview', () => { return HttpResponse.json({ data: mockOverview }) }) ) diff --git a/src/pages/CommitDetailPage/CommitCoverage/YamlErrorBanner/YamlErrorBanner.tsx b/src/pages/CommitDetailPage/CommitCoverage/YamlErrorBanner/YamlErrorBanner.tsx index 6cb9b59e85..8e8bc62add 100644 --- a/src/pages/CommitDetailPage/CommitCoverage/YamlErrorBanner/YamlErrorBanner.tsx +++ b/src/pages/CommitDetailPage/CommitCoverage/YamlErrorBanner/YamlErrorBanner.tsx @@ -18,7 +18,7 @@ function YamlErrorBanner({
{shouldLinkToModal ? ( - {/* @ts-ignore ignore until we convert A to ts */} + {/* @ts-expect-error - A hasn't been typed yet */} setShowYamlModal(true)} hook="open yaml modal" @@ -36,7 +36,7 @@ function YamlErrorBanner({ Coverage data is unable to be displayed, as the yaml appears to be invalid. The  - {/* @ts-ignore ignore until we convert A to ts */} + {/* @ts-expect-error - A hasn't been typed yet */} yaml validator can help determine its validation. diff --git a/src/pages/CommitDetailPage/CommitCoverage/YamlModal/YamlModal.test.jsx b/src/pages/CommitDetailPage/CommitCoverage/YamlModal/YamlModal.test.jsx index 7149fa661d..d9cb10134b 100644 --- a/src/pages/CommitDetailPage/CommitCoverage/YamlModal/YamlModal.test.jsx +++ b/src/pages/CommitDetailPage/CommitCoverage/YamlModal/YamlModal.test.jsx @@ -67,7 +67,7 @@ describe('YamlModal', () => { const showModal = vi.fn() function setup({ hasYamlErrors } = { hasYamlErrors: false }) { server.use( - graphql.query('CommitErrors', (info) => { + graphql.query('CommitErrors', () => { if (hasYamlErrors) { return HttpResponse.json({ data: mockCommitYamlErrors }) } diff --git a/src/pages/CommitDetailPage/CommitCoverage/routes/CommitDetailFileExplorer/CommitDetailFileExplorer.test.tsx b/src/pages/CommitDetailPage/CommitCoverage/routes/CommitDetailFileExplorer/CommitDetailFileExplorer.test.tsx index e7ffd2e2e7..9a0d01ac86 100644 --- a/src/pages/CommitDetailPage/CommitCoverage/routes/CommitDetailFileExplorer/CommitDetailFileExplorer.test.tsx +++ b/src/pages/CommitDetailPage/CommitCoverage/routes/CommitDetailFileExplorer/CommitDetailFileExplorer.test.tsx @@ -90,7 +90,7 @@ afterAll(() => { describe('CommitDetailFileExplorer', () => { function setup() { server.use( - graphql.query('CommitPathContents', (info) => { + graphql.query('CommitPathContents', () => { return HttpResponse.json({ data: mockTreeData }) }) ) diff --git a/src/pages/CommitDetailPage/CommitCoverage/routes/CommitDetailFileExplorer/CommitDetailFileExplorer.tsx b/src/pages/CommitDetailPage/CommitCoverage/routes/CommitDetailFileExplorer/CommitDetailFileExplorer.tsx index 926ebf8b06..6c1d479614 100644 --- a/src/pages/CommitDetailPage/CommitCoverage/routes/CommitDetailFileExplorer/CommitDetailFileExplorer.tsx +++ b/src/pages/CommitDetailPage/CommitCoverage/routes/CommitDetailFileExplorer/CommitDetailFileExplorer.tsx @@ -31,7 +31,7 @@ function CommitDetailFileExplorer() {
{ return HttpResponse.json({ data: mockTreeData }) }), - graphql.query('BackfillFlagMemberships', (info) => { + graphql.query('BackfillFlagMemberships', () => { return HttpResponse.json({ data: mockFlagBackfillData }) }), - graphql.query('CommitComponents', (info) => { + graphql.query('CommitComponents', () => { return HttpResponse.json({ data: mockCommitComponentData }) }), - graphql.query('GetRepoOverview', (info) => { + graphql.query('GetRepoOverview', () => { return HttpResponse.json({ data: mockOverview }) }), - graphql.query('OwnerTier', (info) => { + graphql.query('OwnerTier', () => { return HttpResponse.json({ data: mockOwnerTier }) }), - graphql.query('FlagsSelect', (info) => { + graphql.query('FlagsSelect', () => { return HttpResponse.json({ data: mockFlagsResponse }) }) ) diff --git a/src/pages/CommitDetailPage/CommitCoverage/routes/CommitDetailFileExplorer/hooks/useRepoCommitContentsTable.tsx b/src/pages/CommitDetailPage/CommitCoverage/routes/CommitDetailFileExplorer/hooks/useRepoCommitContentsTable.tsx index 4a41092651..6088a79f42 100644 --- a/src/pages/CommitDetailPage/CommitCoverage/routes/CommitDetailFileExplorer/hooks/useRepoCommitContentsTable.tsx +++ b/src/pages/CommitDetailPage/CommitCoverage/routes/CommitDetailFileExplorer/hooks/useRepoCommitContentsTable.tsx @@ -169,7 +169,6 @@ export function useRepoCommitContentsTable() { data, pathContentsType: commitData?.pathContentsType, isLoading: commitIsLoading, - // @ts-ignore isSearching: !!search, sortBy, setSortBy, diff --git a/src/pages/CommitDetailPage/CommitCoverage/routes/CommitDetailFileViewer/CommitDetailFileViewer.test.jsx b/src/pages/CommitDetailPage/CommitCoverage/routes/CommitDetailFileViewer/CommitDetailFileViewer.test.jsx index bfdb361d4a..c560c7c377 100644 --- a/src/pages/CommitDetailPage/CommitCoverage/routes/CommitDetailFileViewer/CommitDetailFileViewer.test.jsx +++ b/src/pages/CommitDetailPage/CommitCoverage/routes/CommitDetailFileViewer/CommitDetailFileViewer.test.jsx @@ -21,7 +21,7 @@ window.scrollTo = scrollToMock window.scrollY = 100 class ResizeObserverMock { - callback = (x) => null + callback = (_x) => null constructor(callback) { this.callback = callback @@ -115,21 +115,21 @@ afterAll(() => { describe('CommitDetailFileViewer', () => { function setup() { server.use( - graphql.query('DetailOwner', (info) => { + graphql.query('DetailOwner', () => { return HttpResponse.json({ data: { owner: mockOwner } }) }), - graphql.query('CoverageForFile', (info) => { + graphql.query('CoverageForFile', () => { return HttpResponse.json({ data: { owner: { repository: mockCoverage } }, }) }), - graphql.query('OwnerTier', (info) => { + graphql.query('OwnerTier', () => { return HttpResponse.json({ data: { owner: null } }) }), - graphql.query('BackfillFlagMemberships', (info) => { + graphql.query('BackfillFlagMemberships', () => { return HttpResponse.json({ data: { owner: null } }) }), - graphql.query('GetRepoOverview', (info) => { + graphql.query('GetRepoOverview', () => { return HttpResponse.json({ data: { owner: null } }) }) ) diff --git a/src/pages/CommitDetailPage/CommitCoverage/routes/ComponentsSelector/ComponentsSelector.tsx b/src/pages/CommitDetailPage/CommitCoverage/routes/ComponentsSelector/ComponentsSelector.tsx index f49f7aea51..2e8859d5c7 100644 --- a/src/pages/CommitDetailPage/CommitCoverage/routes/ComponentsSelector/ComponentsSelector.tsx +++ b/src/pages/CommitDetailPage/CommitCoverage/routes/ComponentsSelector/ComponentsSelector.tsx @@ -54,7 +54,7 @@ function ComponentsSelector() { return (
{ + onChange={(components: string[]) => { setSelectedComponents(components) updateParams({ components }) }} onSearch={(term: string) => setComponentSearch(term)} - renderSelected={(selectedItems: String[]) => ( + renderSelected={(selectedItems: string[]) => ( {selectedItems.length === 0 ? ( diff --git a/src/pages/CommitDetailPage/CommitCoverage/routes/FilesChangedTab/FilesChangedTab.test.tsx b/src/pages/CommitDetailPage/CommitCoverage/routes/FilesChangedTab/FilesChangedTab.test.tsx index a5543ca659..0d9dbd8268 100644 --- a/src/pages/CommitDetailPage/CommitCoverage/routes/FilesChangedTab/FilesChangedTab.test.tsx +++ b/src/pages/CommitDetailPage/CommitCoverage/routes/FilesChangedTab/FilesChangedTab.test.tsx @@ -87,14 +87,14 @@ interface SetupArgs { describe('FilesChangedTab', () => { function setup({ planValue, isPrivate = false }: SetupArgs) { server.use( - graphql.query('OwnerTier', (info) => { + graphql.query('OwnerTier', () => { if (planValue === 'team') { return HttpResponse.json({ data: mockTeamTier }) } return HttpResponse.json({ data: mockProTier }) }), - graphql.query('GetRepoSettingsTeam', (info) => { + graphql.query('GetRepoSettingsTeam', () => { return HttpResponse.json({ data: mockRepoSettings(isPrivate) }) }) ) diff --git a/src/pages/CommitDetailPage/CommitCoverage/routes/FilesChangedTab/FilesChangedTable/FilesChangedTable.tsx b/src/pages/CommitDetailPage/CommitCoverage/routes/FilesChangedTab/FilesChangedTable/FilesChangedTable.tsx index c8e4657b29..0bc4d10a69 100644 --- a/src/pages/CommitDetailPage/CommitCoverage/routes/FilesChangedTab/FilesChangedTable/FilesChangedTable.tsx +++ b/src/pages/CommitDetailPage/CommitCoverage/routes/FilesChangedTab/FilesChangedTable/FilesChangedTable.tsx @@ -106,7 +106,7 @@ function getColumns({ commitId }: { commitId: string }) { {isDeletedFile ? ( <>{headName} ) : ( - /* @ts-expect-error */ + /* @ts-expect-error - A hasn't been typed yet */ { interface SetupArgs { pendingCommit?: boolean noCoveredFiles?: boolean - temp?: string } describe('FilesChangedTableTeam', () => { function setup( - { pendingCommit = false, noCoveredFiles = false, temp }: SetupArgs = { + { pendingCommit = false, noCoveredFiles = false }: SetupArgs = { pendingCommit: false, noCoveredFiles: false, } diff --git a/src/pages/CommitDetailPage/CommitCoverage/routes/FilesChangedTab/FilesChangedTableTeam/FilesChangedTableTeam.tsx b/src/pages/CommitDetailPage/CommitCoverage/routes/FilesChangedTab/FilesChangedTableTeam/FilesChangedTableTeam.tsx index bb637ae0a2..5e4cc56a16 100644 --- a/src/pages/CommitDetailPage/CommitCoverage/routes/FilesChangedTab/FilesChangedTableTeam/FilesChangedTableTeam.tsx +++ b/src/pages/CommitDetailPage/CommitCoverage/routes/FilesChangedTab/FilesChangedTableTeam/FilesChangedTableTeam.tsx @@ -86,7 +86,7 @@ function getColumns({ commitId }: { commitId: string }) { variant="solid" /> - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} null + callback = (_x: any) => null constructor(callback: any) { this.callback = callback @@ -247,10 +247,10 @@ describe('CommitFileDiff', () => { })) server.use( - graphql.query('ImpactedFileComparedWithParent', (info) => { + graphql.query('ImpactedFileComparedWithParent', () => { return HttpResponse.json({ data: baseMock(impactedFile) }) }), - graphql.query('GetRepoOverview', (info) => { + graphql.query('GetRepoOverview', () => { return HttpResponse.json({ data: mockOverview(bundleAnalysisEnabled) }) }) ) diff --git a/src/pages/CommitDetailPage/CommitCoverage/routes/IndirectChangesTab/IndirectChangesTable/CommitFileDiff/CommitFileDiff.test.tsx b/src/pages/CommitDetailPage/CommitCoverage/routes/IndirectChangesTab/IndirectChangesTable/CommitFileDiff/CommitFileDiff.test.tsx index c72e6c68c3..628ac1753c 100644 --- a/src/pages/CommitDetailPage/CommitCoverage/routes/IndirectChangesTab/IndirectChangesTable/CommitFileDiff/CommitFileDiff.test.tsx +++ b/src/pages/CommitDetailPage/CommitCoverage/routes/IndirectChangesTab/IndirectChangesTable/CommitFileDiff/CommitFileDiff.test.tsx @@ -49,7 +49,7 @@ window.scrollTo = scrollToMock window.scrollY = 100 class ResizeObserverMock { - callback = (x: any) => null + callback = (_x: any) => null constructor(callback: any) { this.callback = callback @@ -237,10 +237,10 @@ describe('CommitFileDiff', () => { })) server.use( - graphql.query('ImpactedFileComparedWithParent', (info) => { + graphql.query('ImpactedFileComparedWithParent', () => { return HttpResponse.json({ data: baseMock(impactedFile) }) }), - graphql.query('GetRepoOverview', (info) => { + graphql.query('GetRepoOverview', () => { return HttpResponse.json({ data: mockOverview(bundleAnalysisEnabled) }) }) ) diff --git a/src/pages/CommitDetailPage/CommitDetailPage.test.tsx b/src/pages/CommitDetailPage/CommitDetailPage.test.tsx index 1e47df1dec..84365a90db 100644 --- a/src/pages/CommitDetailPage/CommitDetailPage.test.tsx +++ b/src/pages/CommitDetailPage/CommitDetailPage.test.tsx @@ -161,7 +161,7 @@ describe('CommitDetailPage', () => { } ) { server.use( - graphql.query('CommitPageData', (info) => { + graphql.query('CommitPageData', () => { if (notFoundCommit) { return HttpResponse.json({ data: mockNotFoundCommit }) } @@ -173,13 +173,13 @@ describe('CommitDetailPage', () => { }), }) }), - graphql.query('CommitBADropdownSummary', (info) => { + graphql.query('CommitBADropdownSummary', () => { return HttpResponse.json({ data: mockBundleDropdownSummary }) }), - graphql.query('CommitDropdownSummary', (info) => { + graphql.query('CommitDropdownSummary', () => { return HttpResponse.json({ data: mockCoverageDropdownSummary }) }), - graphql.query('CommitComponents', (info) => { + graphql.query('CommitComponents', () => { return HttpResponse.json({ data: { owner: null } }) }) ) diff --git a/src/pages/CommitDetailPage/CommitDetailPage.tsx b/src/pages/CommitDetailPage/CommitDetailPage.tsx index fdd7b53e02..6dcb0654e0 100644 --- a/src/pages/CommitDetailPage/CommitDetailPage.tsx +++ b/src/pages/CommitDetailPage/CommitDetailPage.tsx @@ -107,7 +107,7 @@ const CommitDetailPage: React.FC = () => { return } - let defaultDropdown: Array<'coverage' | 'bundle'> = [] + const defaultDropdown: Array<'coverage' | 'bundle'> = [] // default to displaying only coverage let displayMode: TDisplayMode = DISPLAY_MODE.COVERAGE if ( diff --git a/src/pages/CommitDetailPage/Dropdowns/CommitBundleDropdown.test.tsx b/src/pages/CommitDetailPage/Dropdowns/CommitBundleDropdown.test.tsx index 22d91b8a8d..7fee901ed5 100644 --- a/src/pages/CommitDetailPage/Dropdowns/CommitBundleDropdown.test.tsx +++ b/src/pages/CommitDetailPage/Dropdowns/CommitBundleDropdown.test.tsx @@ -123,7 +123,7 @@ describe('CommitBundleDropdown', () => { const user = userEvent.setup() server.use( - graphql.query('CommitBADropdownSummary', (info) => { + graphql.query('CommitBADropdownSummary', () => { if (noData) { return HttpResponse.json({ data: mockNoData }) } else if (firstPullRequest) { diff --git a/src/pages/CommitDetailPage/Dropdowns/CommitCoverageDropdown.test.tsx b/src/pages/CommitDetailPage/Dropdowns/CommitCoverageDropdown.test.tsx index 0fd8a760cf..05be550881 100644 --- a/src/pages/CommitDetailPage/Dropdowns/CommitCoverageDropdown.test.tsx +++ b/src/pages/CommitDetailPage/Dropdowns/CommitCoverageDropdown.test.tsx @@ -162,7 +162,7 @@ describe('CommitCoverageDropdown', () => { const user = userEvent.setup() server.use( - graphql.query('CommitDropdownSummary', (info) => { + graphql.query('CommitDropdownSummary', () => { if (noData) { return HttpResponse.json({ data: mockNoData }) } else if (comparisonError) { diff --git a/src/pages/CommitDetailPage/Dropdowns/CommitCoverageDropdown.tsx b/src/pages/CommitDetailPage/Dropdowns/CommitCoverageDropdown.tsx index c15a3e7e83..7e75383d9b 100644 --- a/src/pages/CommitDetailPage/Dropdowns/CommitCoverageDropdown.tsx +++ b/src/pages/CommitDetailPage/Dropdowns/CommitCoverageDropdown.tsx @@ -28,7 +28,7 @@ const CoverageMessage: React.FC = () => { return <>data unavailable due to invalid yaml ⚠️ } - if (!!uploadErrorCount) { + if (uploadErrorCount) { if (uploadErrorCount === 1) { return ( <>{uploadErrorCount} upload has failed to process ⚠️ diff --git a/src/pages/CommitDetailPage/Header/Header.test.tsx b/src/pages/CommitDetailPage/Header/Header.test.tsx index e651909f66..3602af1213 100644 --- a/src/pages/CommitDetailPage/Header/Header.test.tsx +++ b/src/pages/CommitDetailPage/Header/Header.test.tsx @@ -56,7 +56,7 @@ interface SetupArgs { describe('Header', () => { function setup({ teamPlan = false, isPrivate = false }: SetupArgs) { server.use( - graphql.query('OwnerTier', (info) => { + graphql.query('OwnerTier', () => { if (teamPlan) { return HttpResponse.json({ data: { owner: { plan: { tierName: TierNames.TEAM } } }, @@ -66,7 +66,7 @@ describe('Header', () => { data: { owner: { plan: { tierName: TierNames.PRO } } }, }) }), - graphql.query('GetRepoSettingsTeam', (info) => { + graphql.query('GetRepoSettingsTeam', () => { return HttpResponse.json({ data: mockRepoSettings(isPrivate) }) }) ) diff --git a/src/pages/CommitDetailPage/Header/HeaderDefault/HeaderDefault.test.jsx b/src/pages/CommitDetailPage/Header/HeaderDefault/HeaderDefault.test.jsx index d62736af6f..915bad8e1a 100644 --- a/src/pages/CommitDetailPage/Header/HeaderDefault/HeaderDefault.test.jsx +++ b/src/pages/CommitDetailPage/Header/HeaderDefault/HeaderDefault.test.jsx @@ -63,7 +63,7 @@ describe('HeaderDefault', () => { })) server.use( - graphql.query('CommitPageHeaderData', (info) => { + graphql.query('CommitPageHeaderData', () => { return HttpResponse.json({ data: mockData(pullId) }) }) ) diff --git a/src/pages/CommitDetailPage/Header/HeaderDefault/queries/CommitHeaderDataQueryOpts.test.tsx b/src/pages/CommitDetailPage/Header/HeaderDefault/queries/CommitHeaderDataQueryOpts.test.tsx index c462b0463a..cab0e463a2 100644 --- a/src/pages/CommitDetailPage/Header/HeaderDefault/queries/CommitHeaderDataQueryOpts.test.tsx +++ b/src/pages/CommitDetailPage/Header/HeaderDefault/queries/CommitHeaderDataQueryOpts.test.tsx @@ -91,7 +91,7 @@ describe('CommitHeaderDataQueryOpts', () => { isNullOwner = false, }: SetupArgs) { server.use( - graphql.query('CommitPageHeaderData', (info) => { + graphql.query('CommitPageHeaderData', () => { if (isNotFoundError) { return HttpResponse.json({ data: mockNotFoundError }) } else if (isOwnerNotActivatedError) { @@ -180,7 +180,7 @@ describe('CommitHeaderDataQueryOpts', () => { }) describe('returns NotFoundError __typename', () => { - let oldConsoleError = console.error + const oldConsoleError = console.error beforeEach(() => { console.error = () => null @@ -218,7 +218,7 @@ describe('CommitHeaderDataQueryOpts', () => { }) describe('returns OwnerNotActivatedError __typename', () => { - let oldConsoleError = console.error + const oldConsoleError = console.error beforeEach(() => { console.error = () => null @@ -256,7 +256,7 @@ describe('CommitHeaderDataQueryOpts', () => { }) describe('unsuccessful parse of zod schema', () => { - let oldConsoleError = console.error + const oldConsoleError = console.error beforeEach(() => { console.error = () => null diff --git a/src/pages/CommitDetailPage/Header/HeaderDefault/queries/CommitHeaderDataQueryOpts.tsx b/src/pages/CommitDetailPage/Header/HeaderDefault/queries/CommitHeaderDataQueryOpts.tsx index 8b21154240..4a964d1d80 100644 --- a/src/pages/CommitDetailPage/Header/HeaderDefault/queries/CommitHeaderDataQueryOpts.tsx +++ b/src/pages/CommitDetailPage/Header/HeaderDefault/queries/CommitHeaderDataQueryOpts.tsx @@ -132,7 +132,7 @@ export const CommitHeaderDataQueryOpts = ({ detail: (

Activation is required to view this repo, please{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} click here to activate your account.

diff --git a/src/pages/CommitDetailPage/Header/HeaderTeam/HeaderTeam.test.jsx b/src/pages/CommitDetailPage/Header/HeaderTeam/HeaderTeam.test.jsx index d638526e7d..2a8c5d703c 100644 --- a/src/pages/CommitDetailPage/Header/HeaderTeam/HeaderTeam.test.jsx +++ b/src/pages/CommitDetailPage/Header/HeaderTeam/HeaderTeam.test.jsx @@ -90,7 +90,7 @@ describe('HeaderTeam', () => { })) server.use( - graphql.query('CommitPageHeaderDataTeam', (info) => { + graphql.query('CommitPageHeaderDataTeam', () => { return HttpResponse.json({ data: mockData(pullId) }) }) ) diff --git a/src/pages/CommitDetailPage/Header/HeaderTeam/queries/CommitHeaderDataTeamQueryOpts.test.tsx b/src/pages/CommitDetailPage/Header/HeaderTeam/queries/CommitHeaderDataTeamQueryOpts.test.tsx index 1a703daf80..5f3da55a82 100644 --- a/src/pages/CommitDetailPage/Header/HeaderTeam/queries/CommitHeaderDataTeamQueryOpts.test.tsx +++ b/src/pages/CommitDetailPage/Header/HeaderTeam/queries/CommitHeaderDataTeamQueryOpts.test.tsx @@ -97,7 +97,7 @@ describe('CommitHeaderDataTeamQueryOpts', () => { isNullOwner = false, }: SetupArgs) { server.use( - graphql.query('CommitPageHeaderDataTeam', (info) => { + graphql.query('CommitPageHeaderDataTeam', () => { if (isNotFoundError) { return HttpResponse.json({ data: mockNotFoundError }) } else if (isOwnerNotActivatedError) { @@ -192,7 +192,7 @@ describe('CommitHeaderDataTeamQueryOpts', () => { }) describe('returns NotFoundError __typename', () => { - let oldConsoleError = console.error + const oldConsoleError = console.error beforeEach(() => { console.error = () => null @@ -230,7 +230,7 @@ describe('CommitHeaderDataTeamQueryOpts', () => { }) describe('returns OwnerNotActivatedError __typename', () => { - let oldConsoleError = console.error + const oldConsoleError = console.error beforeEach(() => { console.error = () => null @@ -268,7 +268,7 @@ describe('CommitHeaderDataTeamQueryOpts', () => { }) describe('unsuccessful parse of zod schema', () => { - let oldConsoleError = console.error + const oldConsoleError = console.error beforeEach(() => { console.error = () => null diff --git a/src/pages/CommitDetailPage/Header/HeaderTeam/queries/CommitHeaderDataTeamQueryOpts.tsx b/src/pages/CommitDetailPage/Header/HeaderTeam/queries/CommitHeaderDataTeamQueryOpts.tsx index 4539d01cc6..af600cb276 100644 --- a/src/pages/CommitDetailPage/Header/HeaderTeam/queries/CommitHeaderDataTeamQueryOpts.tsx +++ b/src/pages/CommitDetailPage/Header/HeaderTeam/queries/CommitHeaderDataTeamQueryOpts.tsx @@ -193,7 +193,7 @@ export const CommitHeaderDataTeamQueryOpts = ({ detail: (

Activation is required to view this repo, please{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} click here to activate your account.

diff --git a/src/pages/CommitDetailPage/queries/CommitPageDataQueryOpts.test.tsx b/src/pages/CommitDetailPage/queries/CommitPageDataQueryOpts.test.tsx index 659109dce2..456c92fbab 100644 --- a/src/pages/CommitDetailPage/queries/CommitPageDataQueryOpts.test.tsx +++ b/src/pages/CommitDetailPage/queries/CommitPageDataQueryOpts.test.tsx @@ -97,7 +97,7 @@ describe('useCommitPageData', () => { isNullOwner = false, }: SetupArgs) { server.use( - graphql.query('CommitPageData', (info) => { + graphql.query('CommitPageData', () => { if (isNotFoundError) { return HttpResponse.json({ data: mockNotFoundError }) } else if (isOwnerNotActivatedError) { @@ -194,7 +194,7 @@ describe('useCommitPageData', () => { }) describe('returns NotFoundError __typename', () => { - let oldConsoleError = console.error + const oldConsoleError = console.error beforeEach(() => { console.error = () => null @@ -232,7 +232,7 @@ describe('useCommitPageData', () => { }) describe('returns OwnerNotActivatedError __typename', () => { - let oldConsoleError = console.error + const oldConsoleError = console.error beforeEach(() => { console.error = () => null @@ -270,7 +270,7 @@ describe('useCommitPageData', () => { }) describe('unsuccessful parse of zod schema', () => { - let oldConsoleError = console.error + const oldConsoleError = console.error beforeEach(() => { console.error = () => null diff --git a/src/pages/CommitDetailPage/queries/CommitPageDataQueryOpts.tsx b/src/pages/CommitDetailPage/queries/CommitPageDataQueryOpts.tsx index 322ff1364b..a1634ec141 100644 --- a/src/pages/CommitDetailPage/queries/CommitPageDataQueryOpts.tsx +++ b/src/pages/CommitDetailPage/queries/CommitPageDataQueryOpts.tsx @@ -169,7 +169,7 @@ export const CommitPageDataQueryOpts = ({ detail: (

Activation is required to view this repo, please{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} click here to activate your account.

diff --git a/src/pages/DefaultOrgSelector/DefaultOrgSelector.test.jsx b/src/pages/DefaultOrgSelector/DefaultOrgSelector.test.jsx index a534f1ebbb..d54630c51a 100644 --- a/src/pages/DefaultOrgSelector/DefaultOrgSelector.test.jsx +++ b/src/pages/DefaultOrgSelector/DefaultOrgSelector.test.jsx @@ -194,18 +194,18 @@ describe('DefaultOrgSelector', () => { server.use( graphql.query('UseMyOrganizations', (info) => { - if (!!info.variables.after) { + if (info.variables.after) { fetchNextPage(info.variables.after) } return HttpResponse.json({ data: myOrganizationsData }) }), - graphql.query('CurrentUser', (info) => { + graphql.query('CurrentUser', () => { if (!isValidUser) { return HttpResponse.json({ data: { me: null } }) } return HttpResponse.json({ data: useUserData }) }), - graphql.query('GetPlanData', (info) => { + graphql.query('GetPlanData', () => { return HttpResponse.json({ data: { owner: { diff --git a/src/pages/DefaultOrgSelector/GitHubHelpBanner/GitHubHelpBanner.test.tsx b/src/pages/DefaultOrgSelector/GitHubHelpBanner/GitHubHelpBanner.test.tsx index 3d20bd9112..60c05fde09 100644 --- a/src/pages/DefaultOrgSelector/GitHubHelpBanner/GitHubHelpBanner.test.tsx +++ b/src/pages/DefaultOrgSelector/GitHubHelpBanner/GitHubHelpBanner.test.tsx @@ -47,7 +47,7 @@ describe('GitHubHelpBanner', () => { const mutation = vi.fn() server.use( - graphql.query('IsSyncing', (info) => { + graphql.query('IsSyncing', () => { return HttpResponse.json({ data: { me: { isSyncing: false } } }) }), graphql.mutation('SyncData', (info) => { diff --git a/src/pages/DefaultOrgSelector/hooks/useMyOrganizations.test.tsx b/src/pages/DefaultOrgSelector/hooks/useMyOrganizations.test.tsx index 729f775163..e55eda3f21 100644 --- a/src/pages/DefaultOrgSelector/hooks/useMyOrganizations.test.tsx +++ b/src/pages/DefaultOrgSelector/hooks/useMyOrganizations.test.tsx @@ -52,7 +52,7 @@ describe('useMyOrganizations', () => { spy.mockImplementation(thrownMock) server.use( - graphql.query('UseMyOrganizations', (info) => { + graphql.query('UseMyOrganizations', () => { if (apiError) { return HttpResponse.json( { diff --git a/src/pages/EnterpriseLandingPage/EnterpriseLandingPage.test.tsx b/src/pages/EnterpriseLandingPage/EnterpriseLandingPage.test.tsx index 5626a6c23a..d07a0d0271 100644 --- a/src/pages/EnterpriseLandingPage/EnterpriseLandingPage.test.tsx +++ b/src/pages/EnterpriseLandingPage/EnterpriseLandingPage.test.tsx @@ -59,14 +59,14 @@ describe('EnterpriseLandingPage', () => { { sendProviders = true }: SetupArgs = { sendProviders: true } ) { server.use( - graphql.query('GetLoginProviders', (info) => { + graphql.query('GetLoginProviders', () => { if (sendProviders) { return HttpResponse.json({ data: mockServiceProviders }) } return HttpResponse.json({ data: { config: { loginProviders: [] } } }) }), - graphql.query('EnterpriseLandingPageUser', (info) => { + graphql.query('EnterpriseLandingPageUser', () => { return HttpResponse.json({ data: { me: undefined } }) }) ) diff --git a/src/pages/EnterpriseLandingPage/useEnterpriseRedirect.test.tsx b/src/pages/EnterpriseLandingPage/useEnterpriseRedirect.test.tsx index 6a7a973675..8659361463 100644 --- a/src/pages/EnterpriseLandingPage/useEnterpriseRedirect.test.tsx +++ b/src/pages/EnterpriseLandingPage/useEnterpriseRedirect.test.tsx @@ -42,7 +42,7 @@ describe('useEnterpriseRedirect', () => { config.ENTERPRISE_DEFAULT_PROVIDER = defaultProvider server.use( - graphql.query('EnterpriseLandingPageUser', (info) => { + graphql.query('EnterpriseLandingPageUser', () => { if (sendUser) { return HttpResponse.json({ data: { diff --git a/src/pages/MembersPage/MembersActivation/Activation/Activation.test.jsx b/src/pages/MembersPage/MembersActivation/Activation/Activation.test.jsx index 96a56eae54..ae7b599bf9 100644 --- a/src/pages/MembersPage/MembersActivation/Activation/Activation.test.jsx +++ b/src/pages/MembersPage/MembersActivation/Activation/Activation.test.jsx @@ -77,10 +77,10 @@ describe('Activation', () => { planValue = mockedAccountDetails.plan.value ) { server.use( - http.get('/internal/:provider/:owner/account-details/', (info) => { + http.get('/internal/:provider/:owner/account-details/', () => { return HttpResponse.json(accountDetails) }), - graphql.query('GetPlanData', (info) => { + graphql.query('GetPlanData', () => { return HttpResponse.json({ data: { owner: { diff --git a/src/pages/MembersPage/MembersActivation/MembersActivation.test.jsx b/src/pages/MembersPage/MembersActivation/MembersActivation.test.jsx index 55815db767..8f99498384 100644 --- a/src/pages/MembersPage/MembersActivation/MembersActivation.test.jsx +++ b/src/pages/MembersPage/MembersActivation/MembersActivation.test.jsx @@ -75,10 +75,10 @@ describe('Members Activation', () => { planValue = mockedAccountDetails.plan.value ) { server.use( - http.get('/internal/:provider/:owner/account-details/', (info) => { + http.get('/internal/:provider/:owner/account-details/', () => { return HttpResponse.json(accountDetails) }), - graphql.query('GetPlanData', (info) => { + graphql.query('GetPlanData', () => { return HttpResponse.json({ data: { owner: { diff --git a/src/pages/MembersPage/MembersList/MembersList.test.jsx b/src/pages/MembersPage/MembersList/MembersList.test.jsx index 7d2c7c249d..96b24c9097 100644 --- a/src/pages/MembersPage/MembersList/MembersList.test.jsx +++ b/src/pages/MembersPage/MembersList/MembersList.test.jsx @@ -89,17 +89,17 @@ describe('MembersList', () => { let sendActivatedUser = false server.use( - http.get('/internal/:provider/codecov/account-details', (info) => { + http.get('/internal/:provider/codecov/account-details', () => { return HttpResponse.json(accountDetails) }), - http.get('/internal/:provider/codecov/users', (info) => { + http.get('/internal/:provider/codecov/users', () => { if (sendActivatedUser) { sendActivatedUser = false return HttpResponse.json(mockActiveUserRequest) } return HttpResponse.json(mockNonActiveUserRequest) }), - http.patch('/internal/:provider/codecov/users/:ownerid', (info) => { + http.patch('/internal/:provider/codecov/users/:ownerid', () => { sendActivatedUser = true mockActivateUser() return HttpResponse.json({}) diff --git a/src/pages/MembersPage/MembersList/MembersTable/MembersTable.test.jsx b/src/pages/MembersPage/MembersList/MembersTable/MembersTable.test.jsx index 638db8a5f8..fb5223cbd1 100644 --- a/src/pages/MembersPage/MembersList/MembersTable/MembersTable.test.jsx +++ b/src/pages/MembersPage/MembersList/MembersTable/MembersTable.test.jsx @@ -126,12 +126,9 @@ describe('MembersTable', () => { const user = userEvent.setup() mocks.useImage.mockReturnValue({ src: 'mocked-avatar-url' }) server.use( - http.get( - '/internal/:provider/codecov/account-details', - (req, res, ctx) => { - return HttpResponse.json(accountDetails) - } - ), + http.get('/internal/:provider/codecov/account-details', () => { + return HttpResponse.json(accountDetails) + }), http.get('/internal/:provider/codecov/users', (info) => { requestSearchParams = new URL(info.request.url).searchParams diff --git a/src/pages/MembersPage/MembersList/MembersTable/MembersTable.tsx b/src/pages/MembersPage/MembersList/MembersTable/MembersTable.tsx index dc88e7f3ee..3dfa6d464c 100644 --- a/src/pages/MembersPage/MembersList/MembersTable/MembersTable.tsx +++ b/src/pages/MembersPage/MembersList/MembersTable/MembersTable.tsx @@ -69,7 +69,7 @@ function ActivationStatus({ accountDetails?.activatedUserCount >= accountDetails?.plan?.quantity && !isFreePlan(accountDetails?.plan?.value) } - if (!!student) { + if (student) { disabled = false } return ( diff --git a/src/pages/OwnerPage/HeaderBanners/ExceededUploadsAlert/ExceededUploadsAlert.test.jsx b/src/pages/OwnerPage/HeaderBanners/ExceededUploadsAlert/ExceededUploadsAlert.test.jsx index 6b7ed7b4ec..f91f1eeb43 100644 --- a/src/pages/OwnerPage/HeaderBanners/ExceededUploadsAlert/ExceededUploadsAlert.test.jsx +++ b/src/pages/OwnerPage/HeaderBanners/ExceededUploadsAlert/ExceededUploadsAlert.test.jsx @@ -55,7 +55,7 @@ afterAll(() => { describe('ExceededUploadsAlert', () => { function setup() { server.use( - graphql.query('GetPlanData', (info) => { + graphql.query('GetPlanData', () => { return HttpResponse.json({ data: { owner: { diff --git a/src/pages/OwnerPage/HeaderBanners/HeaderBanners.test.jsx b/src/pages/OwnerPage/HeaderBanners/HeaderBanners.test.jsx index 152e2a6b5a..b69913bc98 100644 --- a/src/pages/OwnerPage/HeaderBanners/HeaderBanners.test.jsx +++ b/src/pages/OwnerPage/HeaderBanners/HeaderBanners.test.jsx @@ -67,7 +67,7 @@ describe('HeaderBanners', () => { }) { config.IS_SELF_HOSTED = isSelfHosted server.use( - graphql.query('OwnerPageData', (info) => { + graphql.query('OwnerPageData', () => { if (hasReachedLimit) { return HttpResponse.json({ data: { owner: { numberOfUploads: 252 } }, @@ -84,7 +84,7 @@ describe('HeaderBanners', () => { data: { owner: { numberOfUploads: 230 } }, }) }), - graphql.query('GetPlanData', (info) => { + graphql.query('GetPlanData', () => { return HttpResponse.json({ data: { owner: { @@ -94,7 +94,7 @@ describe('HeaderBanners', () => { }, }) }), - http.get('/internal/gh/codecov/account-details/', (info) => { + http.get('/internal/gh/codecov/account-details/', () => { return HttpResponse.json({ integrationId }) }) ) @@ -194,16 +194,13 @@ describe('HeaderBanners', () => { hasReachedLimit: true, }) server.use( - graphql.query('GetPlanData', (req, res, ctx) => { - return res( - ctx.status(200), - ctx.data({ - owner: { - hasPrivateRepos: true, - plan: mockPlanDataResponseNoUploadLimit, - }, - }) - ) + graphql.query('GetPlanData', () => { + return HttpResponse.json({ + owner: { + hasPrivateRepos: true, + plan: mockPlanDataResponseNoUploadLimit, + }, + }) }) ) }) @@ -267,7 +264,7 @@ describe('HeaderBanners', () => { describe('error in api response', () => { server.use( - http.get('/internal/gh/codecov/account-details/', (info) => { + http.get('/internal/gh/codecov/account-details/', () => { return HttpResponse.error(404) }) ) diff --git a/src/pages/OwnerPage/HeaderBanners/ReachingUploadLimitAlert/ReachingUploadLimitAlert.test.jsx b/src/pages/OwnerPage/HeaderBanners/ReachingUploadLimitAlert/ReachingUploadLimitAlert.test.jsx index 996655ce82..3422a5ff60 100644 --- a/src/pages/OwnerPage/HeaderBanners/ReachingUploadLimitAlert/ReachingUploadLimitAlert.test.jsx +++ b/src/pages/OwnerPage/HeaderBanners/ReachingUploadLimitAlert/ReachingUploadLimitAlert.test.jsx @@ -55,7 +55,7 @@ afterAll(() => { describe('ReachingUploadLimitAlert', () => { function setup() { server.use( - graphql.query('GetPlanData', (info) => { + graphql.query('GetPlanData', () => { return HttpResponse.json({ data: { owner: { diff --git a/src/pages/OwnerPage/OwnerPage.test.jsx b/src/pages/OwnerPage/OwnerPage.test.jsx index b7c4f2081d..d9868db345 100644 --- a/src/pages/OwnerPage/OwnerPage.test.jsx +++ b/src/pages/OwnerPage/OwnerPage.test.jsx @@ -62,10 +62,10 @@ describe('OwnerPage', () => { } ) { server.use( - graphql.query('OwnerPageData', (info) => { + graphql.query('OwnerPageData', () => { return HttpResponse.json({ data: { owner } }) }), - graphql.mutation('SendSentryToken', (info) => { + graphql.mutation('SendSentryToken', () => { if (!successfulMutation) { return HttpResponse.json({ data: { diff --git a/src/pages/OwnerPage/Tabs/TrialReminder/TrialReminder.test.tsx b/src/pages/OwnerPage/Tabs/TrialReminder/TrialReminder.test.tsx index c88f16bc64..424b417913 100644 --- a/src/pages/OwnerPage/Tabs/TrialReminder/TrialReminder.test.tsx +++ b/src/pages/OwnerPage/Tabs/TrialReminder/TrialReminder.test.tsx @@ -90,7 +90,7 @@ describe('TrialReminder', () => { mockedConfig.IS_SELF_HOSTED = isSelfHosted server.use( - graphql.query('GetPlanData', (info) => { + graphql.query('GetPlanData', () => { return HttpResponse.json({ data: { owner: { @@ -106,7 +106,7 @@ describe('TrialReminder', () => { }, }) }), - graphql.query('DetailOwner', (info) => { + graphql.query('DetailOwner', () => { return HttpResponse.json({ data: { owner: { isCurrentUserPartOfOrg: userPartOfOrg } }, }) diff --git a/src/pages/OwnerPage/Tabs/TrialReminder/TrialReminder.tsx b/src/pages/OwnerPage/Tabs/TrialReminder/TrialReminder.tsx index 2528a1af51..6a0814bbaa 100644 --- a/src/pages/OwnerPage/Tabs/TrialReminder/TrialReminder.tsx +++ b/src/pages/OwnerPage/Tabs/TrialReminder/TrialReminder.tsx @@ -73,7 +73,7 @@ const TrialReminder: React.FC = () => { return (
{/* this is required because the A component has this random `[x: string]: any` record type on it */} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} 🚀 Try Codecov Pro
) @@ -86,7 +86,7 @@ const TrialReminder: React.FC = () => { Trial active for {dateDiff} days.{' '} {/* this is required because the A component has this random `[x: string]: any` record type on it */} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} Upgrade now

@@ -98,7 +98,7 @@ const TrialReminder: React.FC = () => { return (
{/* this is required because the A component has this random `[x: string]: any` record type on it */} - {/* @ts-expect-error*/} + {/* @ts-expect-error - A hasn't been typed yet */} 🚀 Upgrade plan
) diff --git a/src/pages/OwnerPage/hooks/useOwnerPageData.test.jsx b/src/pages/OwnerPage/hooks/useOwnerPageData.test.jsx index 4f5e409a3d..352b99cfa7 100644 --- a/src/pages/OwnerPage/hooks/useOwnerPageData.test.jsx +++ b/src/pages/OwnerPage/hooks/useOwnerPageData.test.jsx @@ -36,7 +36,7 @@ afterAll(() => server.close()) describe('useOwnerPageData', () => { function setup() { server.use( - graphql.query('OwnerPageData', (info) => { + graphql.query('OwnerPageData', () => { return HttpResponse.json({ data: { owner: mockOwner } }) }) ) diff --git a/src/pages/PlanPage/PlanPage.test.jsx b/src/pages/PlanPage/PlanPage.test.jsx index 1a91b54eb6..78eab0ec26 100644 --- a/src/pages/PlanPage/PlanPage.test.jsx +++ b/src/pages/PlanPage/PlanPage.test.jsx @@ -81,7 +81,7 @@ describe('PlanPage', () => { config.IS_SELF_HOSTED = isSelfHosted server.use( - graphql.query('PlanPageData', (info) => { + graphql.query('PlanPageData', () => { return HttpResponse.json({ data: { owner } }) }) ) diff --git a/src/pages/PlanPage/hooks/usePlanPageData.test.tsx b/src/pages/PlanPage/hooks/usePlanPageData.test.tsx index 4268a0f1b0..62f81c6388 100644 --- a/src/pages/PlanPage/hooks/usePlanPageData.test.tsx +++ b/src/pages/PlanPage/hooks/usePlanPageData.test.tsx @@ -36,7 +36,7 @@ afterAll(() => server.close()) describe('usePlanPageData', () => { function setup({ invalidSchema = false }) { server.use( - graphql.query('PlanPageData', (info) => { + graphql.query('PlanPageData', () => { if (invalidSchema) { return HttpResponse.json({ data: {} }) } diff --git a/src/pages/PlanPage/subRoutes/CancelPlanPage/CancelPlanPage.test.tsx b/src/pages/PlanPage/subRoutes/CancelPlanPage/CancelPlanPage.test.tsx index ddc19032f4..58915ec097 100644 --- a/src/pages/PlanPage/subRoutes/CancelPlanPage/CancelPlanPage.test.tsx +++ b/src/pages/PlanPage/subRoutes/CancelPlanPage/CancelPlanPage.test.tsx @@ -136,13 +136,13 @@ describe('CancelPlanPage', () => { hasTeamPlans = false, }: SetupProps = {}) { server.use( - http.get('internal/gh/codecov/account-details/', (info) => { + http.get('internal/gh/codecov/account-details/', () => { return HttpResponse.json({ plan: { value: planValue }, subscriptionDetail: { customer: { discount: hasDiscount } }, }) }), - graphql.query('GetPlanData', (info) => { + graphql.query('GetPlanData', () => { return HttpResponse.json({ data: { owner: { @@ -156,7 +156,7 @@ describe('CancelPlanPage', () => { }, }) }), - graphql.query('GetAvailablePlans', (info) => { + graphql.query('GetAvailablePlans', () => { return HttpResponse.json({ data: { owner: { diff --git a/src/pages/PlanPage/subRoutes/CancelPlanPage/subRoutes/DowngradePlan/CancelButton/utils.js b/src/pages/PlanPage/subRoutes/CancelPlanPage/subRoutes/DowngradePlan/CancelButton/utils.js index b3416c7626..9700b39ece 100644 --- a/src/pages/PlanPage/subRoutes/CancelPlanPage/subRoutes/DowngradePlan/CancelButton/utils.js +++ b/src/pages/PlanPage/subRoutes/CancelPlanPage/subRoutes/DowngradePlan/CancelButton/utils.js @@ -36,12 +36,12 @@ export function cleanupBaremetrics() { '[href="https://baremetrics-barecancel.baremetrics.com/css/barecancel.css"]' ) - if (!!scriptElement) { + if (scriptElement) { scriptElement.parentNode.removeChild(scriptElement) delete window.barecancel } - if (!!stylesElement) { + if (stylesElement) { stylesElement.parentNode.removeChild(stylesElement) } } diff --git a/src/pages/PlanPage/subRoutes/CancelPlanPage/subRoutes/DowngradePlan/DowngradePlan.test.jsx b/src/pages/PlanPage/subRoutes/CancelPlanPage/subRoutes/DowngradePlan/DowngradePlan.test.jsx index 4bd0daafae..0313e0e4c4 100644 --- a/src/pages/PlanPage/subRoutes/CancelPlanPage/subRoutes/DowngradePlan/DowngradePlan.test.jsx +++ b/src/pages/PlanPage/subRoutes/CancelPlanPage/subRoutes/DowngradePlan/DowngradePlan.test.jsx @@ -55,7 +55,7 @@ afterAll(() => { describe('DowngradePlan', () => { function setup() { server.use( - http.all('/internal/gh/codecov/account-details', (info) => { + http.all('/internal/gh/codecov/account-details', () => { return HttpResponse.json(mockAccountDetails) }) ) diff --git a/src/pages/PlanPage/subRoutes/CancelPlanPage/subRoutes/TeamPlanSpecialOffer/TeamPlanCard/TeamPlanCard.test.tsx b/src/pages/PlanPage/subRoutes/CancelPlanPage/subRoutes/TeamPlanSpecialOffer/TeamPlanCard/TeamPlanCard.test.tsx index b04eea11dd..9ca9a7d3f4 100644 --- a/src/pages/PlanPage/subRoutes/CancelPlanPage/subRoutes/TeamPlanSpecialOffer/TeamPlanCard/TeamPlanCard.test.tsx +++ b/src/pages/PlanPage/subRoutes/CancelPlanPage/subRoutes/TeamPlanSpecialOffer/TeamPlanCard/TeamPlanCard.test.tsx @@ -121,7 +121,7 @@ const wrapper: React.FC = ({ children }) => ( describe('TeamPlanCard', () => { function setup() { server.use( - graphql.query('GetAvailablePlans', (info) => { + graphql.query('GetAvailablePlans', () => { return HttpResponse.json({ data: { owner: { availablePlans: mockAvailablePlans } }, }) diff --git a/src/pages/PlanPage/subRoutes/CurrentOrgPlan/AccountOrgs/AccountOrgs.tsx b/src/pages/PlanPage/subRoutes/CurrentOrgPlan/AccountOrgs/AccountOrgs.tsx index 00f5283607..8f51a83b15 100644 --- a/src/pages/PlanPage/subRoutes/CurrentOrgPlan/AccountOrgs/AccountOrgs.tsx +++ b/src/pages/PlanPage/subRoutes/CurrentOrgPlan/AccountOrgs/AccountOrgs.tsx @@ -88,7 +88,7 @@ const columns = [ cell: (info) => info.row.original.isCurrentUserPartOfOrg ? (
- {/* @ts-ignore-error */} + {/* @ts-expect-error - A hasn't been typed yet */} Account details - To modify your orgs and seats, please {/* @ts-ignore-error */} + To modify your orgs and seats, please{' '} + {/* @ts-expect-error - A hasn't been typed yet */} contact support. diff --git a/src/pages/PlanPage/subRoutes/CurrentOrgPlan/BillingDetails/Address/AddressCard.test.tsx b/src/pages/PlanPage/subRoutes/CurrentOrgPlan/BillingDetails/Address/AddressCard.test.tsx index e123151fd2..5142eafd5c 100644 --- a/src/pages/PlanPage/subRoutes/CurrentOrgPlan/BillingDetails/Address/AddressCard.test.tsx +++ b/src/pages/PlanPage/subRoutes/CurrentOrgPlan/BillingDetails/Address/AddressCard.test.tsx @@ -51,7 +51,7 @@ const wrapper: React.FC = ({ children }) => ( vi.mock('@stripe/react-stripe-js', () => { function makeFakeComponent(name: string) { // mocking onReady to be called after a bit of time - return function Component({ onReady }: { onReady?: any }) { + return function Component({ _onReady }: { _onReady?: any }) { return name } } diff --git a/src/pages/PlanPage/subRoutes/CurrentOrgPlan/BillingDetails/BillingDetails.test.tsx b/src/pages/PlanPage/subRoutes/CurrentOrgPlan/BillingDetails/BillingDetails.test.tsx index bdfa6fd569..c524ccd390 100644 --- a/src/pages/PlanPage/subRoutes/CurrentOrgPlan/BillingDetails/BillingDetails.test.tsx +++ b/src/pages/PlanPage/subRoutes/CurrentOrgPlan/BillingDetails/BillingDetails.test.tsx @@ -62,7 +62,7 @@ describe('BillingDetails', () => { } ) { server.use( - http.get('/internal/gh/:owner/account-details/', (info) => { + http.get('/internal/gh/:owner/account-details/', () => { if (hasSubscription) { return HttpResponse.json({ subscriptionDetail: hasTax diff --git a/src/pages/PlanPage/subRoutes/CurrentOrgPlan/BillingDetails/EmailAddress/EmailAddress.test.tsx b/src/pages/PlanPage/subRoutes/CurrentOrgPlan/BillingDetails/EmailAddress/EmailAddress.test.tsx index a54b2c9296..26211f6447 100644 --- a/src/pages/PlanPage/subRoutes/CurrentOrgPlan/BillingDetails/EmailAddress/EmailAddress.test.tsx +++ b/src/pages/PlanPage/subRoutes/CurrentOrgPlan/BillingDetails/EmailAddress/EmailAddress.test.tsx @@ -52,16 +52,13 @@ describe('EmailAddress', () => { const mutate = vi.fn() server.use( - http.get('/internal/gh/codecov/account-details', (info) => { + http.get('/internal/gh/codecov/account-details', () => { return HttpResponse.json(mockAccountDetails) }), - http.patch( - '/internal/gh/codecov/account-details/update_email', - (info) => { - mutate() - return HttpResponse.json({}) - } - ) + http.patch('/internal/gh/codecov/account-details/update_email', () => { + mutate() + return HttpResponse.json({}) + }) ) return { user, mutate } @@ -136,7 +133,7 @@ describe('EmailAddress', () => { const input = await screen.findByPlaceholderText('Your email') // eslint-disable-next-line @typescript-eslint/no-unused-vars - for (let _ of testEmail) { + for (const _ of testEmail) { await user.type(input, '{backspace}') } await user.type(input, 'another-email@gmail.com') @@ -176,7 +173,7 @@ describe('EmailAddress', () => { const input = await screen.findByPlaceholderText('Your email') // eslint-disable-next-line @typescript-eslint/no-unused-vars - for (let _ of testEmail) { + for (const _ of testEmail) { await user.type(input, '{backspace}') } @@ -198,7 +195,7 @@ describe('EmailAddress', () => { const input = await screen.findByPlaceholderText('Your email') // eslint-disable-next-line @typescript-eslint/no-unused-vars - for (let _ of testEmail) { + for (const _ of testEmail) { await user.type(input, '{backspace}') } await user.type(input, 'rand123tasdf') diff --git a/src/pages/PlanPage/subRoutes/CurrentOrgPlan/BillingDetails/EmailAddress/EmailAddress.tsx b/src/pages/PlanPage/subRoutes/CurrentOrgPlan/BillingDetails/EmailAddress/EmailAddress.tsx index 7faf84da77..8a159c2f13 100644 --- a/src/pages/PlanPage/subRoutes/CurrentOrgPlan/BillingDetails/EmailAddress/EmailAddress.tsx +++ b/src/pages/PlanPage/subRoutes/CurrentOrgPlan/BillingDetails/EmailAddress/EmailAddress.tsx @@ -61,7 +61,7 @@ function EmailAddress() {

Email address

{' '} {!isFormOpen && ( - /* @ts-expect-error */ + /* @ts-expect-error - A hasn't been typed yet */ setIsFormOpen(true)} diff --git a/src/pages/PlanPage/subRoutes/CurrentOrgPlan/BillingDetails/PaymentCard/PaymentCard.test.jsx b/src/pages/PlanPage/subRoutes/CurrentOrgPlan/BillingDetails/PaymentCard/PaymentCard.test.jsx index cb9ca3cfe8..b8021a7cb6 100644 --- a/src/pages/PlanPage/subRoutes/CurrentOrgPlan/BillingDetails/PaymentCard/PaymentCard.test.jsx +++ b/src/pages/PlanPage/subRoutes/CurrentOrgPlan/BillingDetails/PaymentCard/PaymentCard.test.jsx @@ -41,8 +41,7 @@ const wrapper = ({ children }) => ( // mocking all the stripe components; and trusting the library :) vi.mock('@stripe/react-stripe-js', () => { function makeFakeComponent(name) { - // mocking onReady to be called after a bit of time - return function Component({ onReady }) { + return function Component() { return name } } diff --git a/src/pages/PlanPage/subRoutes/CurrentOrgPlan/CurrentOrgPlan.tsx b/src/pages/PlanPage/subRoutes/CurrentOrgPlan/CurrentOrgPlan.tsx index 4115b709f4..f84b68a5fa 100644 --- a/src/pages/PlanPage/subRoutes/CurrentOrgPlan/CurrentOrgPlan.tsx +++ b/src/pages/PlanPage/subRoutes/CurrentOrgPlan/CurrentOrgPlan.tsx @@ -108,7 +108,7 @@ const AccountUsageAlert = ({ Your account is using 100% of its seats You might want to add more seats for your team to ensure availability.{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} Contact support to update your plan. @@ -120,7 +120,7 @@ const AccountUsageAlert = ({ Your account is using 90% of its seats You might want to add more seats for your team to ensure availability.{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} Contact support to update your plan. diff --git a/src/pages/PlanPage/subRoutes/CurrentOrgPlan/CurrentPlanCard/CurrentPlanCard.test.tsx b/src/pages/PlanPage/subRoutes/CurrentOrgPlan/CurrentPlanCard/CurrentPlanCard.test.tsx index 84b944ab73..54f595e102 100644 --- a/src/pages/PlanPage/subRoutes/CurrentOrgPlan/CurrentPlanCard/CurrentPlanCard.test.tsx +++ b/src/pages/PlanPage/subRoutes/CurrentOrgPlan/CurrentPlanCard/CurrentPlanCard.test.tsx @@ -114,7 +114,7 @@ afterAll(() => server.close()) describe('CurrentPlanCard', () => { function setup(planDetails: TestPlan = freePlanDetails) { server.use( - http.get('/internal/bb/critical-role/account-details/', (http) => { + http.get('/internal/bb/critical-role/account-details/', () => { return HttpResponse.json(planDetails) }) ) diff --git a/src/pages/PlanPage/subRoutes/CurrentOrgPlan/CurrentPlanCard/FreePlanCard/FreePlanCard.test.jsx b/src/pages/PlanPage/subRoutes/CurrentOrgPlan/CurrentPlanCard/FreePlanCard/FreePlanCard.test.jsx index fdd561b54d..41ce08b5c2 100644 --- a/src/pages/PlanPage/subRoutes/CurrentOrgPlan/CurrentPlanCard/FreePlanCard/FreePlanCard.test.jsx +++ b/src/pages/PlanPage/subRoutes/CurrentOrgPlan/CurrentPlanCard/FreePlanCard/FreePlanCard.test.jsx @@ -208,10 +208,10 @@ describe('FreePlanCard', () => { } ) { server.use( - graphql.query('PlanPageData', (info) => { + graphql.query('PlanPageData', () => { return HttpResponse.json({ data: { owner } }) }), - graphql.query('GetPlanData', (info) => { + graphql.query('GetPlanData', () => { return HttpResponse.json({ data: { owner: { @@ -227,12 +227,12 @@ describe('FreePlanCard', () => { }, }) }), - graphql.query('GetAvailablePlans', (info) => { + graphql.query('GetAvailablePlans', () => { return HttpResponse.json({ data: { owner: { availablePlans: plans } }, }) }), - http.get('/internal/bb/critical-role/account-details/', (info) => { + http.get('/internal/bb/critical-role/account-details/', () => { return HttpResponse.json({ numberOfUploads: 250 }) }) ) diff --git a/src/pages/PlanPage/subRoutes/CurrentOrgPlan/CurrentPlanCard/FreePlanCard/PlanUpgradeTeam/PlanUpgradeTeam.test.jsx b/src/pages/PlanPage/subRoutes/CurrentOrgPlan/CurrentPlanCard/FreePlanCard/PlanUpgradeTeam/PlanUpgradeTeam.test.jsx index 2bb1aeeebc..7567d6822b 100644 --- a/src/pages/PlanPage/subRoutes/CurrentOrgPlan/CurrentPlanCard/FreePlanCard/PlanUpgradeTeam/PlanUpgradeTeam.test.jsx +++ b/src/pages/PlanPage/subRoutes/CurrentOrgPlan/CurrentPlanCard/FreePlanCard/PlanUpgradeTeam/PlanUpgradeTeam.test.jsx @@ -184,7 +184,7 @@ const wrapper = ({ children }) => ( describe('PlanUpgradeTeam', () => { function setup({ plan = mockPlanBasic } = { plan: mockPlanBasic }) { server.use( - graphql.query('GetPlanData', (info) => { + graphql.query('GetPlanData', () => { return HttpResponse.json({ data: { owner: { @@ -195,7 +195,7 @@ describe('PlanUpgradeTeam', () => { }, }) }), - graphql.query('GetAvailablePlans', (info) => { + graphql.query('GetAvailablePlans', () => { return HttpResponse.json({ data: { owner: { availablePlans: mockAvailablePlans } }, }) diff --git a/src/pages/PlanPage/subRoutes/CurrentOrgPlan/CurrentPlanCard/FreePlanCard/ProPlanSubheading/ProPlanSubheading.test.tsx b/src/pages/PlanPage/subRoutes/CurrentOrgPlan/CurrentPlanCard/FreePlanCard/ProPlanSubheading/ProPlanSubheading.test.tsx index 6e0a61809f..edb51e6e75 100644 --- a/src/pages/PlanPage/subRoutes/CurrentOrgPlan/CurrentPlanCard/FreePlanCard/ProPlanSubheading/ProPlanSubheading.test.tsx +++ b/src/pages/PlanPage/subRoutes/CurrentOrgPlan/CurrentPlanCard/FreePlanCard/ProPlanSubheading/ProPlanSubheading.test.tsx @@ -64,7 +64,7 @@ describe('ProPlanSubheading', () => { hasPrivateRepos = true, }: SetupArgs) { server.use( - graphql.query('GetPlanData', (info) => { + graphql.query('GetPlanData', () => { return HttpResponse.json({ data: { owner: { diff --git a/src/pages/PlanPage/subRoutes/CurrentOrgPlan/CurrentPlanCard/FreePlanCard/ProPlanSubheading/ProPlanSubheading.tsx b/src/pages/PlanPage/subRoutes/CurrentOrgPlan/CurrentPlanCard/FreePlanCard/ProPlanSubheading/ProPlanSubheading.tsx index 1768e3ee4c..22ad7b17a9 100644 --- a/src/pages/PlanPage/subRoutes/CurrentOrgPlan/CurrentPlanCard/FreePlanCard/ProPlanSubheading/ProPlanSubheading.tsx +++ b/src/pages/PlanPage/subRoutes/CurrentOrgPlan/CurrentPlanCard/FreePlanCard/ProPlanSubheading/ProPlanSubheading.tsx @@ -28,7 +28,7 @@ function ProPlanSubheading() { ) { return (

- {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} Includes 14-day free trial FAQ

) @@ -43,7 +43,7 @@ function ProPlanSubheading() { ) { return (

- {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} Current trial FAQ

) diff --git a/src/pages/PlanPage/subRoutes/CurrentOrgPlan/CurrentPlanCard/PaidPlanCard/PaidPlanCard.test.tsx b/src/pages/PlanPage/subRoutes/CurrentOrgPlan/CurrentPlanCard/PaidPlanCard/PaidPlanCard.test.tsx index 2768fa17f6..c0300bc522 100644 --- a/src/pages/PlanPage/subRoutes/CurrentOrgPlan/CurrentPlanCard/PaidPlanCard/PaidPlanCard.test.tsx +++ b/src/pages/PlanPage/subRoutes/CurrentOrgPlan/CurrentPlanCard/PaidPlanCard/PaidPlanCard.test.tsx @@ -95,7 +95,7 @@ describe('PaidPlanCard', () => { plan = mockProPlan, }: SetupArgs) { server.use( - http.get('/internal/:provider/:owner/account-details/', (info) => { + http.get('/internal/:provider/:owner/account-details/', () => { if (hasScheduledDetails) { return HttpResponse.json({ scheduleDetail: mockScheduleDetail, @@ -103,14 +103,14 @@ describe('PaidPlanCard', () => { } return HttpResponse.json({ data: {} }) }), - graphql.query('GetPlanData', (info) => { + graphql.query('GetPlanData', () => { return HttpResponse.json({ data: { owner: { hasPrivateRepos: true, plan }, }, }) }), - graphql.query('PlanPageData', (info) => { + graphql.query('PlanPageData', () => { return HttpResponse.json({ data: { owner: { diff --git a/src/pages/PlanPage/subRoutes/CurrentOrgPlan/CurrentPlanCard/shared/ActionsBilling/ActionsBilling.test.jsx b/src/pages/PlanPage/subRoutes/CurrentOrgPlan/CurrentPlanCard/shared/ActionsBilling/ActionsBilling.test.jsx index 350db0bb1d..16b9b66efe 100644 --- a/src/pages/PlanPage/subRoutes/CurrentOrgPlan/CurrentPlanCard/shared/ActionsBilling/ActionsBilling.test.jsx +++ b/src/pages/PlanPage/subRoutes/CurrentOrgPlan/CurrentPlanCard/shared/ActionsBilling/ActionsBilling.test.jsx @@ -212,13 +212,13 @@ describe('Actions Billing', () => { })) server.use( - http.get('/internal/gh/critical-role/account-details/', (info) => { + http.get('/internal/gh/critical-role/account-details/', () => { return HttpResponse.json(accountDetails) }), - graphql.query('GetAvailablePlans', (info) => { + graphql.query('GetAvailablePlans', () => { return HttpResponse.json({ data: { owner: { availablePlans: plans } } }) }), - graphql.query('GetPlanData', (info) => { + graphql.query('GetPlanData', () => { return HttpResponse.json({ data: { owner: trialPlanData } }) }), graphql.mutation('startTrial', (info) => { diff --git a/src/pages/PlanPage/subRoutes/CurrentOrgPlan/InfoAlertCancellation/InfoAlertCancellation.test.tsx b/src/pages/PlanPage/subRoutes/CurrentOrgPlan/InfoAlertCancellation/InfoAlertCancellation.test.tsx index b688266c40..654ce3a78e 100644 --- a/src/pages/PlanPage/subRoutes/CurrentOrgPlan/InfoAlertCancellation/InfoAlertCancellation.test.tsx +++ b/src/pages/PlanPage/subRoutes/CurrentOrgPlan/InfoAlertCancellation/InfoAlertCancellation.test.tsx @@ -19,20 +19,15 @@ const subscriptionDetail = { } as z.infer describe('InfoAlertCancellation', () => { - describe('when the subscription isnt cancelled', () => { + describe('when the subscription is not cancelled', () => { const subDetail = { ...subscriptionDetail, cancelAtPeriodEnd: false, } as z.infer - it('doesnt render anything', () => { + it('does not render anything', () => { const { container } = render( - + ) expect(container).toBeEmptyDOMElement() }) @@ -45,14 +40,7 @@ describe('InfoAlertCancellation', () => { } as z.infer it('renders a message that your subscription is cancelling', () => { - render( - - ) + render() expect(screen.getByText(/Cancellation confirmation/)).toBeInTheDocument() expect( screen.getByText(/Your account will return to the/) @@ -62,13 +50,7 @@ describe('InfoAlertCancellation', () => { describe('when the subscription is cancelled and refunded taking account immediately', () => { it('renders a message that your subscription is cancelled and refunded', () => { - render( - - ) + render() expect(screen.getByText(/Cancellation confirmation/)).toBeInTheDocument() expect( screen.getByText( diff --git a/src/pages/PlanPage/subRoutes/CurrentOrgPlan/hooks/useEnterpriseAccountDetails.test.tsx b/src/pages/PlanPage/subRoutes/CurrentOrgPlan/hooks/useEnterpriseAccountDetails.test.tsx index 80f623943b..6b12cef1b4 100644 --- a/src/pages/PlanPage/subRoutes/CurrentOrgPlan/hooks/useEnterpriseAccountDetails.test.tsx +++ b/src/pages/PlanPage/subRoutes/CurrentOrgPlan/hooks/useEnterpriseAccountDetails.test.tsx @@ -41,7 +41,7 @@ interface SetupArgs { describe('useEnterpriseAccountDetails', () => { function setup({ badResponse = false }: SetupArgs) { server.use( - graphql.query('EnterpriseAccountDetails', (info) => { + graphql.query('EnterpriseAccountDetails', () => { if (badResponse) { return HttpResponse.json({}) } diff --git a/src/pages/PlanPage/subRoutes/InvoiceDetailsPage/sections/InvoiceHeader.test.tsx b/src/pages/PlanPage/subRoutes/InvoiceDetailsPage/sections/InvoiceHeader.test.tsx index 83a15c1f7a..39f03a9590 100644 --- a/src/pages/PlanPage/subRoutes/InvoiceDetailsPage/sections/InvoiceHeader.test.tsx +++ b/src/pages/PlanPage/subRoutes/InvoiceDetailsPage/sections/InvoiceHeader.test.tsx @@ -61,7 +61,7 @@ const mockInvoice = ({ status = 'paid' } = {}) => { description: null, amount: 72000, currency: 'usd', - // @ts-expect-error + // @ts-expect-error - only using properties that are present for the test period: { end: null, start: null }, value: null, quantity: 1, @@ -127,7 +127,7 @@ describe('Invoice Header', () => { render( , { @@ -166,7 +166,7 @@ describe('Invoice Header', () => { render( , { @@ -184,7 +184,7 @@ describe('Invoice Header', () => { render( , { diff --git a/src/pages/PlanPage/subRoutes/UpgradePlanPage/PlanDetailsControls/PlanDetailsControls.test.tsx b/src/pages/PlanPage/subRoutes/UpgradePlanPage/PlanDetailsControls/PlanDetailsControls.test.tsx index c72df24819..fc6f3e9244 100644 --- a/src/pages/PlanPage/subRoutes/UpgradePlanPage/PlanDetailsControls/PlanDetailsControls.test.tsx +++ b/src/pages/PlanPage/subRoutes/UpgradePlanPage/PlanDetailsControls/PlanDetailsControls.test.tsx @@ -119,7 +119,7 @@ describe('PlanDetailsControls', () => { { hasSentryPlans = false }: SetupArgs = { hasSentryPlans: false } ) { server.use( - graphql.query('GetAvailablePlans', (info) => { + graphql.query('GetAvailablePlans', () => { if (hasSentryPlans) { return HttpResponse.json({ data: { diff --git a/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeDetails/ProPlanDetails/ProPlanDetails.test.jsx b/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeDetails/ProPlanDetails/ProPlanDetails.test.jsx index b693de02c3..4fd177e09d 100644 --- a/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeDetails/ProPlanDetails/ProPlanDetails.test.jsx +++ b/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeDetails/ProPlanDetails/ProPlanDetails.test.jsx @@ -178,7 +178,7 @@ describe('ProPlanDetails', () => { } ) { server.use( - graphql.query('GetPlanData', (info) => { + graphql.query('GetPlanData', () => { return HttpResponse.json({ data: { owner: { @@ -198,7 +198,7 @@ describe('ProPlanDetails', () => { }, }) }), - graphql.query('GetAvailablePlans', (info) => { + graphql.query('GetAvailablePlans', () => { if (isSentryPlan) { return HttpResponse.json({ data: { @@ -217,7 +217,7 @@ describe('ProPlanDetails', () => { }) } }), - http.get('/internal/gh/codecov/account-details', (info) => { + http.get('/internal/gh/codecov/account-details', () => { if (isSentryPlan) { return HttpResponse.json({ plan: sentryPlanYear, diff --git a/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeDetails/SentryPlanDetails/SentryPlanDetails.test.jsx b/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeDetails/SentryPlanDetails/SentryPlanDetails.test.jsx index ac58c76b43..3c33f30a8d 100644 --- a/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeDetails/SentryPlanDetails/SentryPlanDetails.test.jsx +++ b/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeDetails/SentryPlanDetails/SentryPlanDetails.test.jsx @@ -172,7 +172,7 @@ describe('SentryPlanDetails', () => { } ) { server.use( - graphql.query('GetPlanData', (info) => { + graphql.query('GetPlanData', () => { return HttpResponse.json({ data: { owner: { @@ -192,12 +192,12 @@ describe('SentryPlanDetails', () => { }, }) }), - graphql.query('GetAvailablePlans', (info) => { + graphql.query('GetAvailablePlans', () => { return HttpResponse.json({ data: { owner: { availablePlans: allPlans } }, }) }), - http.get('/internal/gh/codecov/account-details', (info) => { + http.get('/internal/gh/codecov/account-details', () => { return HttpResponse.json({ plan: sentryPlanYear, subscriptionDetail: { diff --git a/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeDetails/TeamPlanDetails/TeamPlanDetails.test.jsx b/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeDetails/TeamPlanDetails/TeamPlanDetails.test.jsx index 70550640d5..2e649e746d 100644 --- a/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeDetails/TeamPlanDetails/TeamPlanDetails.test.jsx +++ b/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeDetails/TeamPlanDetails/TeamPlanDetails.test.jsx @@ -136,7 +136,7 @@ describe('TeamPlanDetails', () => { } ) { server.use( - graphql.query('GetPlanData', (info) => { + graphql.query('GetPlanData', () => { return HttpResponse.json({ data: { owner: { @@ -149,7 +149,7 @@ describe('TeamPlanDetails', () => { }, }) }), - graphql.query('GetAvailablePlans', (info) => { + graphql.query('GetAvailablePlans', () => { return HttpResponse.json({ data: { owner: { @@ -158,7 +158,7 @@ describe('TeamPlanDetails', () => { }, }) }), - http.get('/internal/gh/codecov/account-details', (info) => { + http.get('/internal/gh/codecov/account-details', () => { return HttpResponse.json({ plan: teamPlanYear, subscriptionDetail: { diff --git a/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/Controllers/ProPlanController/BillingOptions/BillingOptions.test.tsx b/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/Controllers/ProPlanController/BillingOptions/BillingOptions.test.tsx index 504290df7d..99aa5663eb 100644 --- a/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/Controllers/ProPlanController/BillingOptions/BillingOptions.test.tsx +++ b/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/Controllers/ProPlanController/BillingOptions/BillingOptions.test.tsx @@ -97,7 +97,7 @@ afterAll(() => { describe('BillingOptions', () => { function setup() { server.use( - graphql.query('GetAvailablePlans', (info) => { + graphql.query('GetAvailablePlans', () => { return HttpResponse.json({ data: { owner: { @@ -106,7 +106,7 @@ describe('BillingOptions', () => { }, }) }), - graphql.query('GetPlanData', (info) => { + graphql.query('GetPlanData', () => { return HttpResponse.json({ data: { owner: { diff --git a/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/Controllers/ProPlanController/PriceCallout/PriceCallout.test.tsx b/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/Controllers/ProPlanController/PriceCallout/PriceCallout.test.tsx index 9a562ce5fe..b6dce9bb66 100644 --- a/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/Controllers/ProPlanController/PriceCallout/PriceCallout.test.tsx +++ b/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/Controllers/ProPlanController/PriceCallout/PriceCallout.test.tsx @@ -113,10 +113,10 @@ describe('PriceCallout', () => { } server.use( - graphql.query('GetAvailablePlans', (info) => { + graphql.query('GetAvailablePlans', () => { return HttpResponse.json({ data: { owner: { availablePlans } } }) }), - http.get('internal/gh/codecov/account-details/', (info) => { + http.get('internal/gh/codecov/account-details/', () => { return HttpResponse.json(mockAccountDetails) }) ) diff --git a/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/Controllers/ProPlanController/ProPlanController.test.tsx b/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/Controllers/ProPlanController/ProPlanController.test.tsx index 42e9536e65..5b44bbad2d 100644 --- a/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/Controllers/ProPlanController/ProPlanController.test.tsx +++ b/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/Controllers/ProPlanController/ProPlanController.test.tsx @@ -202,7 +202,7 @@ describe('ProPlanController', () => { mocks.useAddNotification.mockReturnValue(addNotification) server.use( - http.get(`/internal/gh/codecov/account-details/`, (info) => { + http.get(`/internal/gh/codecov/account-details/`, () => { if (planValue === Plans.USERS_BASIC) { return HttpResponse.json(mockAccountDetailsBasic) } else if (planValue === Plans.USERS_PR_INAPPM) { @@ -213,10 +213,10 @@ describe('ProPlanController', () => { return HttpResponse.json(mockAccountDetailsTrial) } }), - http.patch('/internal/gh/codecov/account-details/', async (info) => { + http.patch('/internal/gh/codecov/account-details/', async () => { return HttpResponse.json({ success: false }) }), - graphql.query('GetAvailablePlans', (info) => { + graphql.query('GetAvailablePlans', () => { return HttpResponse.json({ data: { owner: { @@ -225,7 +225,7 @@ describe('ProPlanController', () => { }, }) }), - graphql.query('GetPlanData', (info) => { + graphql.query('GetPlanData', () => { const planResponse = monthlyPlan ? mockPlanDataResponseMonthly : mockPlanDataResponseYearly diff --git a/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/Controllers/ProPlanController/UserCount/UserCount.test.tsx b/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/Controllers/ProPlanController/UserCount/UserCount.test.tsx index 4b6e63ee3f..553eb071e3 100644 --- a/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/Controllers/ProPlanController/UserCount/UserCount.test.tsx +++ b/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/Controllers/ProPlanController/UserCount/UserCount.test.tsx @@ -58,7 +58,7 @@ describe('UserCount', () => { } ) { server.use( - http.get('/internal/gh/codecov/account-details', (info) => { + http.get('/internal/gh/codecov/account-details', () => { return HttpResponse.json({ activatedUserCount, activatedStudentCount, diff --git a/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/Controllers/SentryPlanController/BillingOptions/BillingOptions.test.tsx b/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/Controllers/SentryPlanController/BillingOptions/BillingOptions.test.tsx index 8589de44b9..958002f53b 100644 --- a/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/Controllers/SentryPlanController/BillingOptions/BillingOptions.test.tsx +++ b/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/Controllers/SentryPlanController/BillingOptions/BillingOptions.test.tsx @@ -103,10 +103,10 @@ afterAll(() => { describe('BillingOptions', () => { function setup() { server.use( - graphql.query('GetAvailablePlans', (info) => { + graphql.query('GetAvailablePlans', () => { return HttpResponse.json({ data: { owner: { availablePlans } } }) }), - graphql.query('GetPlanData', (info) => { + graphql.query('GetPlanData', () => { return HttpResponse.json({ data: { owner: { hasPrivateRepos: true, plan: mockPlanDataResponse }, diff --git a/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/Controllers/SentryPlanController/PriceCallout/PriceCallout.test.tsx b/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/Controllers/SentryPlanController/PriceCallout/PriceCallout.test.tsx index 99733f76a3..60a40fb04f 100644 --- a/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/Controllers/SentryPlanController/PriceCallout/PriceCallout.test.tsx +++ b/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/Controllers/SentryPlanController/PriceCallout/PriceCallout.test.tsx @@ -101,10 +101,10 @@ describe('PriceCallout', () => { } server.use( - graphql.query('GetAvailablePlans', (info) => { + graphql.query('GetAvailablePlans', () => { return HttpResponse.json({ data: { owner: { availablePlans } } }) }), - http.get('internal/gh/codecov/account-details/', (info) => { + http.get('internal/gh/codecov/account-details/', () => { return HttpResponse.json(mockAccountDetails) }) ) diff --git a/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/Controllers/SentryPlanController/SentryPlanController.test.tsx b/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/Controllers/SentryPlanController/SentryPlanController.test.tsx index 2d48891335..b8e254ca5f 100644 --- a/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/Controllers/SentryPlanController/SentryPlanController.test.tsx +++ b/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/Controllers/SentryPlanController/SentryPlanController.test.tsx @@ -187,7 +187,7 @@ describe('SentryPlanController', () => { mocks.useAddNotification.mockReturnValue(addNotification) server.use( - http.get(`/internal/gh/codecov/account-details/`, (info) => { + http.get(`/internal/gh/codecov/account-details/`, () => { if (planValue === Plans.USERS_BASIC) { return HttpResponse.json(mockAccountDetailsBasic) } else if (planValue === Plans.USERS_SENTRYM) { @@ -196,10 +196,10 @@ describe('SentryPlanController', () => { return HttpResponse.json(mockAccountDetailsSentryYearly) } }), - http.patch('/internal/gh/codecov/account-details/', async (info) => { + http.patch('/internal/gh/codecov/account-details/', async () => { return HttpResponse.json({ success: false }) }), - graphql.query('GetAvailablePlans', (info) => { + graphql.query('GetAvailablePlans', () => { return HttpResponse.json({ data: { owner: { @@ -208,7 +208,7 @@ describe('SentryPlanController', () => { }, }) }), - graphql.query('GetPlanData', (info) => { + graphql.query('GetPlanData', () => { const planResponse = monthlyPlan ? mockPlanDataResponseMonthly : mockPlanDataResponseYearly diff --git a/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/Controllers/SentryPlanController/UserCount/UserCount.test.tsx b/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/Controllers/SentryPlanController/UserCount/UserCount.test.tsx index af261c7947..0ffd153736 100644 --- a/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/Controllers/SentryPlanController/UserCount/UserCount.test.tsx +++ b/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/Controllers/SentryPlanController/UserCount/UserCount.test.tsx @@ -58,7 +58,7 @@ describe('UserCount', () => { } ) { server.use( - http.get('/internal/gh/codecov/account-details', (info) => { + http.get('/internal/gh/codecov/account-details', () => { return HttpResponse.json({ activatedUserCount, activatedStudentCount, diff --git a/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/Controllers/TeamPlanController/BillingOptions/BillingOptions.test.tsx b/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/Controllers/TeamPlanController/BillingOptions/BillingOptions.test.tsx index 0de7ffb3e7..de7216dcc1 100644 --- a/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/Controllers/TeamPlanController/BillingOptions/BillingOptions.test.tsx +++ b/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/Controllers/TeamPlanController/BillingOptions/BillingOptions.test.tsx @@ -87,12 +87,12 @@ afterAll(() => { describe('BillingOptions', () => { function setup() { server.use( - graphql.query('GetAvailablePlans', (info) => { + graphql.query('GetAvailablePlans', () => { return HttpResponse.json({ data: { owner: { availablePlans } }, }) }), - graphql.query('GetPlanData', (info) => { + graphql.query('GetPlanData', () => { return HttpResponse.json({ data: { owner: { hasPrivateRepos: true, plan: mockPlanDataResponse }, diff --git a/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/Controllers/TeamPlanController/ErrorBanner/ErrorBanner.test.tsx b/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/Controllers/TeamPlanController/ErrorBanner/ErrorBanner.test.tsx index 1e9e6de888..2bc44a399b 100644 --- a/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/Controllers/TeamPlanController/ErrorBanner/ErrorBanner.test.tsx +++ b/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/Controllers/TeamPlanController/ErrorBanner/ErrorBanner.test.tsx @@ -170,7 +170,7 @@ describe('ErrorBanner', () => { const user = userEvent.setup() server.use( - http.get(`/internal/gh/codecov/account-details/`, (info) => { + http.get(`/internal/gh/codecov/account-details/`, () => { if (planValue === Plans.USERS_BASIC) { return HttpResponse.json(mockAccountDetailsBasic) } else if (planValue === Plans.USERS_TEAMM) { @@ -179,10 +179,10 @@ describe('ErrorBanner', () => { return HttpResponse.json(mockAccountDetailsTeamYearly) } }), - http.patch('/internal/gh/codecov/account-details/', async (info) => { + http.patch('/internal/gh/codecov/account-details/', async () => { return HttpResponse.json({ success: false }) }), - graphql.query('GetAvailablePlans', (info) => { + graphql.query('GetAvailablePlans', () => { return HttpResponse.json({ data: { owner: { @@ -196,7 +196,7 @@ describe('ErrorBanner', () => { }, }) }), - graphql.query('GetPlanData', (info) => { + graphql.query('GetPlanData', () => { const planResponse = monthlyPlan ? mockPlanDataResponseMonthly : mockPlanDataResponseYearly diff --git a/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/Controllers/TeamPlanController/PriceCallout/PriceCallout.test.tsx b/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/Controllers/TeamPlanController/PriceCallout/PriceCallout.test.tsx index 3d4de3e232..1f2ae8801e 100644 --- a/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/Controllers/TeamPlanController/PriceCallout/PriceCallout.test.tsx +++ b/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/Controllers/TeamPlanController/PriceCallout/PriceCallout.test.tsx @@ -100,12 +100,12 @@ describe('PriceCallout', () => { } server.use( - graphql.query('GetAvailablePlans', (info) => { + graphql.query('GetAvailablePlans', () => { return HttpResponse.json({ data: { owner: { availablePlans } }, }) }), - http.get('internal/gh/codecov/account-details/', (info) => { + http.get('internal/gh/codecov/account-details/', () => { return HttpResponse.json(mockAccountDetails) }) ) diff --git a/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/Controllers/TeamPlanController/TeamPlanController.test.tsx b/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/Controllers/TeamPlanController/TeamPlanController.test.tsx index baaeb7ef6a..cd518e08ae 100644 --- a/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/Controllers/TeamPlanController/TeamPlanController.test.tsx +++ b/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/Controllers/TeamPlanController/TeamPlanController.test.tsx @@ -188,7 +188,7 @@ describe('TeamPlanController', () => { mocks.useAddNotification.mockReturnValue(addNotification) server.use( - http.get(`/internal/gh/codecov/account-details/`, (info) => { + http.get(`/internal/gh/codecov/account-details/`, () => { if (planValue === Plans.USERS_BASIC) { return HttpResponse.json(mockAccountDetailsBasic) } else if (planValue === Plans.USERS_TEAMM) { @@ -200,7 +200,7 @@ describe('TeamPlanController', () => { http.patch('/internal/gh/codecov/account-details/', async () => { return HttpResponse.json({ success: false }) }), - graphql.query('GetAvailablePlans', (info) => { + graphql.query('GetAvailablePlans', () => { return HttpResponse.json({ data: { owner: { @@ -214,7 +214,7 @@ describe('TeamPlanController', () => { }, }) }), - graphql.query('GetPlanData', (info) => { + graphql.query('GetPlanData', () => { const planResponse = monthlyPlan ? mockPlanDataResponseMonthly : mockPlanDataResponseYearly diff --git a/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/Controllers/TeamPlanController/UserCount/UserCount.test.tsx b/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/Controllers/TeamPlanController/UserCount/UserCount.test.tsx index 965bd53def..4335ab6ff9 100644 --- a/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/Controllers/TeamPlanController/UserCount/UserCount.test.tsx +++ b/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/Controllers/TeamPlanController/UserCount/UserCount.test.tsx @@ -58,7 +58,7 @@ describe('UserCount', () => { } ) { server.use( - http.get('/internal/gh/codecov/account-details', (info) => { + http.get('/internal/gh/codecov/account-details', () => { return HttpResponse.json({ activatedUserCount, activatedStudentCount, diff --git a/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/PlanTypeOptions/PlanTypeOptions.test.tsx b/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/PlanTypeOptions/PlanTypeOptions.test.tsx index 0e02d3a6be..0b120ec912 100644 --- a/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/PlanTypeOptions/PlanTypeOptions.test.tsx +++ b/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/PlanTypeOptions/PlanTypeOptions.test.tsx @@ -200,7 +200,7 @@ describe('PlanTypeOptions', () => { } ) { server.use( - http.get(`/internal/gh/codecov/account-details/`, (info) => { + http.get(`/internal/gh/codecov/account-details/`, () => { if (planValue === Plans.USERS_BASIC) { return HttpResponse.json(mockAccountDetailsBasic) } else if (planValue === Plans.USERS_PR_INAPPY) { @@ -215,7 +215,7 @@ describe('PlanTypeOptions', () => { return HttpResponse.json(mockAccountDetailsSentryYearly) } }), - graphql.query('GetAvailablePlans', (info) => { + graphql.query('GetAvailablePlans', () => { return HttpResponse.json({ data: { owner: { diff --git a/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/UpdateButton/UpdateButton.test.tsx b/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/UpdateButton/UpdateButton.test.tsx index 8e332d7df6..5f1f912e5c 100644 --- a/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/UpdateButton/UpdateButton.test.tsx +++ b/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/UpdateButton/UpdateButton.test.tsx @@ -70,7 +70,7 @@ describe('UpdateButton', () => { } ) { server.use( - http.get(`/internal/gh/codecov/account-details/`, (info) => { + http.get(`/internal/gh/codecov/account-details/`, () => { if (planValue === Plans.USERS_BASIC) { return HttpResponse.json(mockAccountDetailsBasic) } else if (planValue === Plans.USERS_TEAMM) { diff --git a/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/UpgradeForm.test.tsx b/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/UpgradeForm.test.tsx index 45d2e808d4..97b9e10260 100644 --- a/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/UpgradeForm.test.tsx +++ b/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/UpgradeForm.test.tsx @@ -297,7 +297,7 @@ describe('UpgradeForm', () => { mocks.useAddNotification.mockReturnValue(addNotification) server.use( - http.get(`/internal/:provider/:owner/account-details/`, (info) => { + http.get(`/internal/:provider/:owner/account-details/`, () => { if (planValue === Plans.USERS_BASIC) { return HttpResponse.json(mockAccountDetailsBasic) } else if (planValue === Plans.USERS_PR_INAPPM) { @@ -333,7 +333,7 @@ describe('UpgradeForm', () => { return HttpResponse.json({ success: true }) } ), - graphql.query('GetAvailablePlans', (info) => { + graphql.query('GetAvailablePlans', () => { return HttpResponse.json({ data: { owner: { @@ -349,7 +349,7 @@ describe('UpgradeForm', () => { }, }) }), - graphql.query('GetPlanData', (info) => { + graphql.query('GetPlanData', () => { const planResponse = monthlyPlan ? mockPlanDataResponseMonthly : mockPlanDataResponseYearly diff --git a/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradePlanPage.test.jsx b/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradePlanPage.test.jsx index b6dcebf94d..3e38cd7f1f 100644 --- a/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradePlanPage.test.jsx +++ b/src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradePlanPage.test.jsx @@ -202,7 +202,7 @@ describe('UpgradePlanPage', () => { } ) { server.use( - graphql.query('GetPlanData', (info) => { + graphql.query('GetPlanData', () => { return HttpResponse.json({ data: { owner: { @@ -214,7 +214,7 @@ describe('UpgradePlanPage', () => { }, }) }), - graphql.query('GetAvailablePlans', (info) => { + graphql.query('GetAvailablePlans', () => { if (includeSentryPlans) { return HttpResponse.json({ data: { @@ -235,7 +235,7 @@ describe('UpgradePlanPage', () => { }) } }), - http.get('/internal/gh/codecov/account-details', (info) => { + http.get('/internal/gh/codecov/account-details', () => { if (planValue === Plans.USERS_SENTRYY) { return HttpResponse.json({ plan: sentryPlanYear, diff --git a/src/pages/PullRequestPage/Dropdowns/PullBundleDropdown.test.tsx b/src/pages/PullRequestPage/Dropdowns/PullBundleDropdown.test.tsx index 27172eab09..4d12b1e739 100644 --- a/src/pages/PullRequestPage/Dropdowns/PullBundleDropdown.test.tsx +++ b/src/pages/PullRequestPage/Dropdowns/PullBundleDropdown.test.tsx @@ -129,7 +129,7 @@ describe('BundleMessage', () => { const user = userEvent.setup() server.use( - graphql.query('PullBADropdownSummary', (info) => { + graphql.query('PullBADropdownSummary', () => { if (noData) { return HttpResponse.json({ data: mockNoData }) } else if (firstPullRequest) { diff --git a/src/pages/PullRequestPage/Dropdowns/PullCoverageDropdown.test.tsx b/src/pages/PullRequestPage/Dropdowns/PullCoverageDropdown.test.tsx index 311ef4cb66..bcb0b330b2 100644 --- a/src/pages/PullRequestPage/Dropdowns/PullCoverageDropdown.test.tsx +++ b/src/pages/PullRequestPage/Dropdowns/PullCoverageDropdown.test.tsx @@ -114,7 +114,7 @@ describe('PullCoverageDropdown', () => { const user = userEvent.setup() server.use( - graphql.query('PullCoverageDropdownSummary', (info) => { + graphql.query('PullCoverageDropdownSummary', () => { if (noData) { return HttpResponse.json({ data: mockNoData }) } else if (comparisonError) { diff --git a/src/pages/PullRequestPage/Header/Header.test.tsx b/src/pages/PullRequestPage/Header/Header.test.tsx index a83eae6175..f44f46ca3c 100644 --- a/src/pages/PullRequestPage/Header/Header.test.tsx +++ b/src/pages/PullRequestPage/Header/Header.test.tsx @@ -56,7 +56,7 @@ interface SetupArgs { describe('Header', () => { function setup({ isTeam = false, isPrivate = false }: SetupArgs) { server.use( - graphql.query('OwnerTier', (info) => { + graphql.query('OwnerTier', () => { if (isTeam) { return HttpResponse.json({ data: { owner: { plan: { tierName: TierNames.TEAM } } }, @@ -66,7 +66,7 @@ describe('Header', () => { data: { owner: { plan: { tierName: TierNames.PRO } } }, }) }), - graphql.query('GetRepoSettingsTeam', (info) => { + graphql.query('GetRepoSettingsTeam', () => { return HttpResponse.json({ data: mockRepoSettings(isPrivate), }) diff --git a/src/pages/PullRequestPage/Header/HeaderDefault/HeaderDefault.test.tsx b/src/pages/PullRequestPage/Header/HeaderDefault/HeaderDefault.test.tsx index 4d47bb61a1..a9a9c1867d 100644 --- a/src/pages/PullRequestPage/Header/HeaderDefault/HeaderDefault.test.tsx +++ b/src/pages/PullRequestPage/Header/HeaderDefault/HeaderDefault.test.tsx @@ -77,7 +77,7 @@ describe('Header', () => { nullPull = false, }: SetupArgs) { server.use( - graphql.query('PullHeadData', (info) => { + graphql.query('PullHeadData', () => { if (nullPull) { return HttpResponse.json({ data: { owner: { repository: null } } }) } diff --git a/src/pages/PullRequestPage/Header/HeaderDefault/queries/PullHeadDataQueryOpts.test.tsx b/src/pages/PullRequestPage/Header/HeaderDefault/queries/PullHeadDataQueryOpts.test.tsx index 5ab827dad4..dc92c9aad4 100644 --- a/src/pages/PullRequestPage/Header/HeaderDefault/queries/PullHeadDataQueryOpts.test.tsx +++ b/src/pages/PullRequestPage/Header/HeaderDefault/queries/PullHeadDataQueryOpts.test.tsx @@ -93,7 +93,7 @@ describe('usePullHeadData', () => { isNullOwner = false, }: SetupArgs) { server.use( - graphql.query('PullHeadData', (info) => { + graphql.query('PullHeadData', () => { if (isNotFoundError) { return HttpResponse.json({ data: mockNotFoundError }) } else if (isOwnerNotActivatedError) { @@ -179,7 +179,7 @@ describe('usePullHeadData', () => { }) describe('returns NotFoundError __typename', () => { - let oldConsoleError = console.error + const oldConsoleError = console.error beforeEach(() => { console.error = () => null @@ -217,7 +217,7 @@ describe('usePullHeadData', () => { }) describe('returns OwnerNotActivatedError __typename', () => { - let oldConsoleError = console.error + const oldConsoleError = console.error beforeEach(() => { console.error = () => null @@ -254,7 +254,7 @@ describe('usePullHeadData', () => { }) describe('unsuccessful parse of zod schema', () => { - let oldConsoleError = console.error + const oldConsoleError = console.error beforeEach(() => { console.error = () => null diff --git a/src/pages/PullRequestPage/Header/HeaderDefault/queries/PullHeadDataQueryOpts.tsx b/src/pages/PullRequestPage/Header/HeaderDefault/queries/PullHeadDataQueryOpts.tsx index e126420dd1..4fa21086b9 100644 --- a/src/pages/PullRequestPage/Header/HeaderDefault/queries/PullHeadDataQueryOpts.tsx +++ b/src/pages/PullRequestPage/Header/HeaderDefault/queries/PullHeadDataQueryOpts.tsx @@ -132,7 +132,7 @@ export const PullHeadDataQueryOpts = ({ detail: (

Activation is required to view this repo, please{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} click here to activate your account.

diff --git a/src/pages/PullRequestPage/Header/HeaderTeam/HeaderTeam.test.tsx b/src/pages/PullRequestPage/Header/HeaderTeam/HeaderTeam.test.tsx index 93daa0812d..6df0004f43 100644 --- a/src/pages/PullRequestPage/Header/HeaderTeam/HeaderTeam.test.tsx +++ b/src/pages/PullRequestPage/Header/HeaderTeam/HeaderTeam.test.tsx @@ -80,7 +80,7 @@ describe('Header', () => { nullPull = false, }: SetupArgs) { server.use( - graphql.query('PullHeadDataTeam', (info) => { + graphql.query('PullHeadDataTeam', () => { if (nullPull) { return HttpResponse.json({ data: { owner: { repository: null } } }) } diff --git a/src/pages/PullRequestPage/Header/HeaderTeam/queries/PullHeadDataTeamQueryOpts.test.tsx b/src/pages/PullRequestPage/Header/HeaderTeam/queries/PullHeadDataTeamQueryOpts.test.tsx index 9163bf0b72..3f202a5351 100644 --- a/src/pages/PullRequestPage/Header/HeaderTeam/queries/PullHeadDataTeamQueryOpts.test.tsx +++ b/src/pages/PullRequestPage/Header/HeaderTeam/queries/PullHeadDataTeamQueryOpts.test.tsx @@ -99,7 +99,7 @@ describe('usePullHeadDataTeam', () => { isNullOwner = false, }: SetupArgs) { server.use( - graphql.query('PullHeadDataTeam', (info) => { + graphql.query('PullHeadDataTeam', () => { if (isNotFoundError) { return HttpResponse.json({ data: mockNotFoundError }) } else if (isOwnerNotActivatedError) { @@ -191,7 +191,7 @@ describe('usePullHeadDataTeam', () => { }) describe('returns NotFoundError __typename', () => { - let oldConsoleError = console.error + const oldConsoleError = console.error beforeEach(() => { console.error = () => null @@ -229,7 +229,7 @@ describe('usePullHeadDataTeam', () => { }) describe('returns OwnerNotActivatedError __typename', () => { - let oldConsoleError = console.error + const oldConsoleError = console.error beforeEach(() => { console.error = () => null @@ -266,7 +266,7 @@ describe('usePullHeadDataTeam', () => { }) describe('unsuccessful parse of zod schema', () => { - let oldConsoleError = console.error + const oldConsoleError = console.error beforeEach(() => { console.error = () => null diff --git a/src/pages/PullRequestPage/Header/HeaderTeam/queries/PullHeadDataTeamQueryOpts.tsx b/src/pages/PullRequestPage/Header/HeaderTeam/queries/PullHeadDataTeamQueryOpts.tsx index 0dd975ada2..5f8ba93748 100644 --- a/src/pages/PullRequestPage/Header/HeaderTeam/queries/PullHeadDataTeamQueryOpts.tsx +++ b/src/pages/PullRequestPage/Header/HeaderTeam/queries/PullHeadDataTeamQueryOpts.tsx @@ -186,7 +186,7 @@ export const PullHeadDataTeamQueryOpts = ({ detail: (

Activation is required to view this repo, please{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} click here to activate your account.

diff --git a/src/pages/PullRequestPage/PullBundleAnalysis/BundleMessage/BundleMessage.test.tsx b/src/pages/PullRequestPage/PullBundleAnalysis/BundleMessage/BundleMessage.test.tsx index c811af6122..d04ab98ca6 100644 --- a/src/pages/PullRequestPage/PullBundleAnalysis/BundleMessage/BundleMessage.test.tsx +++ b/src/pages/PullRequestPage/PullBundleAnalysis/BundleMessage/BundleMessage.test.tsx @@ -122,7 +122,7 @@ describe('BundleMessage', () => { } ) { server.use( - graphql.query('PullBADropdownSummary', (info) => { + graphql.query('PullBADropdownSummary', () => { if (noData) { return HttpResponse.json({ data: mockNoData }) } else if (firstPullRequest) { diff --git a/src/pages/PullRequestPage/PullBundleAnalysis/PullBundleAnalysis.test.tsx b/src/pages/PullRequestPage/PullBundleAnalysis/PullBundleAnalysis.test.tsx index b1c4f929fa..796f913e87 100644 --- a/src/pages/PullRequestPage/PullBundleAnalysis/PullBundleAnalysis.test.tsx +++ b/src/pages/PullRequestPage/PullBundleAnalysis/PullBundleAnalysis.test.tsx @@ -154,7 +154,7 @@ describe('PullBundleAnalysis', () => { bundleAnalysisEnabled = false, }: SetupArgs) { server.use( - graphql.query('PullPageData', (info) => { + graphql.query('PullPageData', () => { return HttpResponse.json({ data: mockPullPageData( compareType, @@ -164,10 +164,10 @@ describe('PullBundleAnalysis', () => { ), }) }), - graphql.query('PullBADropdownSummary', (info) => { + graphql.query('PullBADropdownSummary', () => { return HttpResponse.json({ data: mockSummaryData }) }), - graphql.query('GetRepoOverview', (info) => { + graphql.query('GetRepoOverview', () => { return HttpResponse.json({ data: mockRepoOverview({ coverageEnabled, bundleAnalysisEnabled }), }) diff --git a/src/pages/PullRequestPage/PullBundleAnalysis/PullBundleComparisonTable/PullBundleComparisonTable.test.tsx b/src/pages/PullRequestPage/PullBundleAnalysis/PullBundleComparisonTable/PullBundleComparisonTable.test.tsx index e4691df419..1339d9d02a 100644 --- a/src/pages/PullRequestPage/PullBundleAnalysis/PullBundleComparisonTable/PullBundleComparisonTable.test.tsx +++ b/src/pages/PullRequestPage/PullBundleAnalysis/PullBundleComparisonTable/PullBundleComparisonTable.test.tsx @@ -137,7 +137,7 @@ describe('PullBundleComparisonTable', () => { ) { const user = userEvent.setup() server.use( - graphql.query('PullBundleComparisonList', (info) => { + graphql.query('PullBundleComparisonList', () => { if (isEmptyList) { return HttpResponse.json({ data: mockEmptyPullBundleListData }) } else if (nonComparisonType) { @@ -246,13 +246,12 @@ describe('PullBundleComparisonTable', () => { describe('useTableData', () => { function setup( - { isEmptyList = false, nonComparisonType = false }: SetupArgs = { - isEmptyList: false, + { nonComparisonType = false }: SetupArgs = { nonComparisonType: false, } ) { server.use( - graphql.query('PullBundleComparisonList', (info) => { + graphql.query('PullBundleComparisonList', () => { if (nonComparisonType) { return HttpResponse.json({ data: mockNonComparisonTypeData }) } else { diff --git a/src/pages/PullRequestPage/PullBundleAnalysis/PullBundleHeadTable/PullBundleHeadTable.test.tsx b/src/pages/PullRequestPage/PullBundleAnalysis/PullBundleHeadTable/PullBundleHeadTable.test.tsx index a1e361789a..9d1e31238c 100644 --- a/src/pages/PullRequestPage/PullBundleAnalysis/PullBundleHeadTable/PullBundleHeadTable.test.tsx +++ b/src/pages/PullRequestPage/PullBundleAnalysis/PullBundleHeadTable/PullBundleHeadTable.test.tsx @@ -143,7 +143,7 @@ describe('PullBundleHeadTable', () => { ) { const user = userEvent.setup() server.use( - graphql.query('PullBundleHeadList', (info) => { + graphql.query('PullBundleHeadList', () => { if (isEmptyList) { return HttpResponse.json({ data: mockBranchBundlesEmpty }) } else if (isUnknownError) { @@ -152,7 +152,7 @@ describe('PullBundleHeadTable', () => { return HttpResponse.json({ data: mockBranchBundles }) }), - graphql.query('GetRepoOverview', (info) => { + graphql.query('GetRepoOverview', () => { return HttpResponse.json({ data: mockRepoOverview }) }) ) @@ -249,7 +249,7 @@ describe('useTableData', () => { } ) { server.use( - graphql.query('PullBundleHeadList', (info) => { + graphql.query('PullBundleHeadList', () => { if (isEmptyList) { return HttpResponse.json({ data: mockBranchBundlesEmpty }) } else if (isUnknownError) { @@ -257,7 +257,7 @@ describe('useTableData', () => { } return HttpResponse.json({ data: mockBranchBundles }) }), - graphql.query('GetRepoOverview', (info) => { + graphql.query('GetRepoOverview', () => { return HttpResponse.json({ data: mockRepoOverview }) }) ) diff --git a/src/pages/PullRequestPage/PullCoverage/PullCoverage.test.jsx b/src/pages/PullRequestPage/PullCoverage/PullCoverage.test.jsx index 9695c8bb95..26166abea9 100644 --- a/src/pages/PullRequestPage/PullCoverage/PullCoverage.test.jsx +++ b/src/pages/PullRequestPage/PullCoverage/PullCoverage.test.jsx @@ -237,7 +237,7 @@ describe('PullRequestPageContent', () => { } return HttpResponse.json({ data: mockPullData(resultType) }) }), - graphql.query('GetRepoOverview', (info) => { + graphql.query('GetRepoOverview', () => { return HttpResponse.json({ data: mockRepoOverview({ bundleAnalysisEnabled, @@ -245,14 +245,14 @@ describe('PullRequestPageContent', () => { }), }) }), - graphql.query('OwnerTier', (info) => { + graphql.query('OwnerTier', () => { return HttpResponse.json({ data: { owner: { plan: { tierName: tierValue } }, }, }) }), - graphql.query('GetRepoRateLimitStatus', (info) => { + graphql.query('GetRepoRateLimitStatus', () => { return HttpResponse.json({ data: mockRepoRateLimitStatus({ isGithubRateLimited }), }) diff --git a/src/pages/PullRequestPage/PullCoverage/PullCoverageTabs/PullCoverageTabs.test.jsx b/src/pages/PullRequestPage/PullCoverage/PullCoverageTabs/PullCoverageTabs.test.jsx index 36f8b81489..2dbb298b4b 100644 --- a/src/pages/PullRequestPage/PullCoverage/PullCoverageTabs/PullCoverageTabs.test.jsx +++ b/src/pages/PullRequestPage/PullCoverage/PullCoverageTabs/PullCoverageTabs.test.jsx @@ -200,29 +200,29 @@ describe('PullCoverageTabs', () => { } ) { server.use( - graphql.query('PullPageData', (info) => { + graphql.query('PullPageData', () => { return HttpResponse.json({ data: mockPullData }) }), - graphql.query('GetCommits', (info) => { + graphql.query('GetCommits', () => { return HttpResponse.json({ data: mockCommits }) }), - graphql.query('OwnerTier', (info) => { + graphql.query('OwnerTier', () => { return HttpResponse.json({ data: { owner: { plan: { tierName: tierValue.toLowerCase() } }, }, }) }), - graphql.query('GetRepoOverview', (info) => { + graphql.query('GetRepoOverview', () => { return HttpResponse.json({ data: mockOverview(privateRepo) }) }), - graphql.query('FlagsSelect', (info) => { + graphql.query('FlagsSelect', () => { return HttpResponse.json({ data: mockFlagsResponse }) }), - graphql.query('BackfillFlagMemberships', (info) => { + graphql.query('BackfillFlagMemberships', () => { return HttpResponse.json({ data: mockBackfillResponse }) }), - graphql.query('PullFlagsSelect', (info) => { + graphql.query('PullFlagsSelect', () => { const dataReturned = { owner: { repository: { diff --git a/src/pages/PullRequestPage/PullCoverage/PullCoverageTabs/useTabsCounts.test.tsx b/src/pages/PullRequestPage/PullCoverage/PullCoverageTabs/useTabsCounts.test.tsx index 1a1417ce03..ff44891a99 100644 --- a/src/pages/PullRequestPage/PullCoverage/PullCoverageTabs/useTabsCounts.test.tsx +++ b/src/pages/PullRequestPage/PullCoverage/PullCoverageTabs/useTabsCounts.test.tsx @@ -105,7 +105,7 @@ afterAll(() => { describe('useTabsCount', () => { function setup({ firstPullRequest = false }) { server.use( - graphql.query('PullPageData', (info) => { + graphql.query('PullPageData', () => { if (firstPullRequest) { return HttpResponse.json({ data: mockFirstPullData }) } diff --git a/src/pages/PullRequestPage/PullCoverage/Summary/CompareSummary/CompareSummary.test.jsx b/src/pages/PullRequestPage/PullCoverage/Summary/CompareSummary/CompareSummary.test.jsx index c7ba237b81..934ca391e3 100644 --- a/src/pages/PullRequestPage/PullCoverage/Summary/CompareSummary/CompareSummary.test.jsx +++ b/src/pages/PullRequestPage/PullCoverage/Summary/CompareSummary/CompareSummary.test.jsx @@ -201,7 +201,7 @@ afterAll(() => { describe('CompareSummary', () => { function setup({ pullData }) { server.use( - graphql.query('Pull', (info) => { + graphql.query('Pull', () => { return HttpResponse.json({ data: pullData }) }) ) diff --git a/src/pages/PullRequestPage/PullCoverage/Summary/Summary.test.tsx b/src/pages/PullRequestPage/PullCoverage/Summary/Summary.test.tsx index 9a14457a63..4c88d46b81 100644 --- a/src/pages/PullRequestPage/PullCoverage/Summary/Summary.test.tsx +++ b/src/pages/PullRequestPage/PullCoverage/Summary/Summary.test.tsx @@ -52,14 +52,14 @@ describe('Summary', () => { } ) { server.use( - graphql.query('OwnerTier', (info) => { + graphql.query('OwnerTier', () => { return HttpResponse.json({ data: { owner: { plan: { tierName: tierValue.toLowerCase() } }, }, }) }), - graphql.query('GetRepoSettingsTeam', (info) => { + graphql.query('GetRepoSettingsTeam', () => { return HttpResponse.json({ data: { owner: { diff --git a/src/pages/PullRequestPage/PullCoverage/routes/CommitsTab/CommitsTable/CommitsTable.test.tsx b/src/pages/PullRequestPage/PullCoverage/routes/CommitsTab/CommitsTable/CommitsTable.test.tsx index cd8ffe8473..1ca6311e73 100644 --- a/src/pages/PullRequestPage/PullCoverage/routes/CommitsTab/CommitsTable/CommitsTable.test.tsx +++ b/src/pages/PullRequestPage/PullCoverage/routes/CommitsTab/CommitsTable/CommitsTable.test.tsx @@ -146,7 +146,7 @@ describe('CommitsTable', () => { const queryClient = new QueryClient() server.use( - graphql.query('GetRepoOverview', (info) => { + graphql.query('GetRepoOverview', () => { return HttpResponse.json({ data: mockRepoOverview(bundleAnalysisEnabled), }) diff --git a/src/pages/PullRequestPage/PullCoverage/routes/CommitsTab/CommitsTable/Title/Title.tsx b/src/pages/PullRequestPage/PullCoverage/routes/CommitsTab/CommitsTable/Title/Title.tsx index 411bfceff4..943210d7db 100644 --- a/src/pages/PullRequestPage/PullCoverage/routes/CommitsTab/CommitsTable/Title/Title.tsx +++ b/src/pages/PullRequestPage/PullCoverage/routes/CommitsTab/CommitsTable/Title/Title.tsx @@ -39,14 +39,14 @@ const Title = ({
- {/* @ts-ignore */} + {/* @ts-expect-error - type issues with A */}

{commitMessage()}

- {/* @ts-ignore */} + {/* @ts-expect-error - type issues with A */} {author?.username} diff --git a/src/pages/PullRequestPage/PullCoverage/routes/ComponentsSelector/ComponentsSelector.tsx b/src/pages/PullRequestPage/PullCoverage/routes/ComponentsSelector/ComponentsSelector.tsx index c54c73670a..fd38be1f4c 100644 --- a/src/pages/PullRequestPage/PullCoverage/routes/ComponentsSelector/ComponentsSelector.tsx +++ b/src/pages/PullRequestPage/PullCoverage/routes/ComponentsSelector/ComponentsSelector.tsx @@ -56,7 +56,7 @@ function ComponentsSelector() { return (

{ + onChange={(components: string[]) => { setSelectedComponents(components) updateParams({ components }) }} onSearch={(term: string) => setComponentSearch(term)} - renderSelected={(selectedItems: String[]) => ( + renderSelected={(selectedItems: string[]) => ( {selectedItems.length === 0 ? ( diff --git a/src/pages/PullRequestPage/PullCoverage/routes/ComponentsTab/queries/ComponentComparisonQueryOpts.test.tsx b/src/pages/PullRequestPage/PullCoverage/routes/ComponentsTab/queries/ComponentComparisonQueryOpts.test.tsx index b59bbf6b35..a22110dc13 100644 --- a/src/pages/PullRequestPage/PullCoverage/routes/ComponentsTab/queries/ComponentComparisonQueryOpts.test.tsx +++ b/src/pages/PullRequestPage/PullCoverage/routes/ComponentsTab/queries/ComponentComparisonQueryOpts.test.tsx @@ -151,7 +151,7 @@ describe('useComponentComparison', () => { }) describe('returns NotFoundError __typename', () => { - let oldConsoleError = console.error + const oldConsoleError = console.error beforeEach(() => { console.error = () => null @@ -188,7 +188,7 @@ describe('useComponentComparison', () => { }) describe('returns OwnerNotActivatedError __typename', () => { - let oldConsoleError = console.error + const oldConsoleError = console.error beforeEach(() => { console.error = () => null @@ -225,7 +225,7 @@ describe('useComponentComparison', () => { }) describe('unsuccessful parse of zod schema', () => { - let oldConsoleError = console.error + const oldConsoleError = console.error beforeEach(() => { console.error = () => null diff --git a/src/pages/PullRequestPage/PullCoverage/routes/ComponentsTab/queries/ComponentComparisonQueryOpts.tsx b/src/pages/PullRequestPage/PullCoverage/routes/ComponentsTab/queries/ComponentComparisonQueryOpts.tsx index f58cf09b08..800a8a5075 100644 --- a/src/pages/PullRequestPage/PullCoverage/routes/ComponentsTab/queries/ComponentComparisonQueryOpts.tsx +++ b/src/pages/PullRequestPage/PullCoverage/routes/ComponentsTab/queries/ComponentComparisonQueryOpts.tsx @@ -202,7 +202,7 @@ export function ComponentComparisonQueryOpts({ detail: (

Activation is required to view this repo, please{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} click here to activate your account.

diff --git a/src/pages/PullRequestPage/PullCoverage/routes/FileExplorer/FileExplorer.test.tsx b/src/pages/PullRequestPage/PullCoverage/routes/FileExplorer/FileExplorer.test.tsx index f4747cfeff..b0d9866a05 100644 --- a/src/pages/PullRequestPage/PullCoverage/routes/FileExplorer/FileExplorer.test.tsx +++ b/src/pages/PullRequestPage/PullCoverage/routes/FileExplorer/FileExplorer.test.tsx @@ -252,7 +252,7 @@ describe('FileExplorer', () => { // Mock so the components selector will be populated server.use( - graphql.query('PullComponentsSelector', (info) => { + graphql.query('PullComponentsSelector', () => { return HttpResponse.json({ data: { owner: { @@ -277,7 +277,7 @@ describe('FileExplorer', () => { // Mock so the flags selector will be populated server.use( - graphql.query('PullFlagsSelect', (info) => { + graphql.query('PullFlagsSelect', () => { return HttpResponse.json({ data: { owner: { @@ -298,18 +298,18 @@ describe('FileExplorer', () => { }, }) }), - graphql.query('BackfillFlagMemberships', (info) => { + graphql.query('BackfillFlagMemberships', () => { return HttpResponse.json({ data: mockBackfillData }) }), - graphql.query('OwnerTier', (info) => { + graphql.query('OwnerTier', () => { return HttpResponse.json({ data: { owner: { plan: { tierName: TierNames.PRO } } }, }) }), - graphql.query('GetRepoSettingsTeam', (info) => { + graphql.query('GetRepoSettingsTeam', () => { return HttpResponse.json({ data: mockRepoSettings }) }), - graphql.query('GetRepoOverview', (info) => { + graphql.query('GetRepoOverview', () => { return HttpResponse.json({ data: { owner: { diff --git a/src/pages/PullRequestPage/PullCoverage/routes/FileExplorer/FileExplorer.tsx b/src/pages/PullRequestPage/PullCoverage/routes/FileExplorer/FileExplorer.tsx index 2ba90806f4..d0891ba87a 100644 --- a/src/pages/PullRequestPage/PullCoverage/routes/FileExplorer/FileExplorer.tsx +++ b/src/pages/PullRequestPage/PullCoverage/routes/FileExplorer/FileExplorer.tsx @@ -31,7 +31,7 @@ function FileExplorer() {
null + callback = (_x) => null constructor(callback) { this.callback = callback @@ -159,24 +159,24 @@ afterAll(() => { describe('FileViewer', () => { function setup() { server.use( - graphql.query('DetailOwner', (req, res, ctx) => { + graphql.query('DetailOwner', () => { return HttpResponse.json({ data: { owner: mockOwner } }) }), - graphql.query('CoverageForFile', (req, res, ctx) => { + graphql.query('CoverageForFile', () => { return HttpResponse.json({ data: { owner: { repository: mockCoverage } }, }) }), - graphql.query('PullPageData', (req, res, ctx) => { + graphql.query('PullPageData', () => { return HttpResponse.json({ data: { owner: mockPullData } }) }), - graphql.query('BackfillFlagMemberships', (req, res, ctx) => { + graphql.query('BackfillFlagMemberships', () => { return HttpResponse.json({ data: { owner: null } }) }), - graphql.query('OwnerTier', (req, res, ctx) => { + graphql.query('OwnerTier', () => { return HttpResponse.json({ data: { owner: null } }) }), - graphql.query('GetRepoOverview', (req, res, ctx) => { + graphql.query('GetRepoOverview', () => { return HttpResponse.json({ data: { owner: null } }) }) ) diff --git a/src/pages/PullRequestPage/PullCoverage/routes/FilesChangedTab/FilesChanged/FilesChanged.test.jsx b/src/pages/PullRequestPage/PullCoverage/routes/FilesChangedTab/FilesChanged/FilesChanged.test.jsx index 15dc6a96ce..2257729fec 100644 --- a/src/pages/PullRequestPage/PullCoverage/routes/FilesChangedTab/FilesChanged/FilesChanged.test.jsx +++ b/src/pages/PullRequestPage/PullCoverage/routes/FilesChangedTab/FilesChanged/FilesChanged.test.jsx @@ -187,7 +187,7 @@ afterAll(() => server.close()) describe('FilesChanged', () => { function setup({ overrideComparison, headState } = {}) { server.use( - graphql.query('Pull', (info) => { + graphql.query('Pull', () => { return HttpResponse.json({ data: mockPull({ overrideComparison, headState }), }) diff --git a/src/pages/PullRequestPage/PullCoverage/routes/FilesChangedTab/FilesChanged/FilesChangedTable/FilesChangedTable.tsx b/src/pages/PullRequestPage/PullCoverage/routes/FilesChangedTab/FilesChanged/FilesChangedTable/FilesChangedTable.tsx index 226243c62d..5ed6611971 100644 --- a/src/pages/PullRequestPage/PullCoverage/routes/FilesChangedTab/FilesChanged/FilesChangedTable/FilesChangedTable.tsx +++ b/src/pages/PullRequestPage/PullCoverage/routes/FilesChangedTab/FilesChanged/FilesChangedTable/FilesChangedTable.tsx @@ -117,7 +117,7 @@ function getColumns({ pullId }: { pullId: string }) { {isDeletedFile ? ( <>{headName} ) : ( - /* @ts-expect-error */ + /* @ts-expect-error - A hasn't been typed yet */ { const user = userEvent.setup() server.use( - graphql.query('ImpactedFileComparison', (info) => { + graphql.query('ImpactedFileComparison', () => { return HttpResponse.json({ data: mockSingularImpactedFilesData }) }) ) diff --git a/src/pages/PullRequestPage/PullCoverage/routes/FilesChangedTab/FilesChanged/PullFileDiff/PullFileDiff.test.tsx b/src/pages/PullRequestPage/PullCoverage/routes/FilesChangedTab/FilesChanged/PullFileDiff/PullFileDiff.test.tsx index 1584820c3f..707ce7c5fb 100644 --- a/src/pages/PullRequestPage/PullCoverage/routes/FilesChangedTab/FilesChanged/PullFileDiff/PullFileDiff.test.tsx +++ b/src/pages/PullRequestPage/PullCoverage/routes/FilesChangedTab/FilesChanged/PullFileDiff/PullFileDiff.test.tsx @@ -41,7 +41,7 @@ window.scrollTo = scrollToMock window.scrollY = 100 class ResizeObserverMock { - callback = (x: any) => null + callback = (_x: any) => null constructor(callback: any) { this.callback = callback @@ -197,7 +197,7 @@ describe('FileDiff', () => { })) server.use( - graphql.query('ImpactedFileComparison', (info) => { + graphql.query('ImpactedFileComparison', () => { return HttpResponse.json({ data: baseMock({ isNewFile, @@ -207,7 +207,7 @@ describe('FileDiff', () => { }), }) }), - graphql.query('GetRepoOverview', (info) => { + graphql.query('GetRepoOverview', () => { return HttpResponse.json({ data: mockOverview(bundleAnalysisEnabled) }) }) ) diff --git a/src/pages/PullRequestPage/PullCoverage/routes/FilesChangedTab/FilesChanged/TableTeam/TableTeam.tsx b/src/pages/PullRequestPage/PullCoverage/routes/FilesChangedTab/FilesChanged/TableTeam/TableTeam.tsx index 89bc9e5287..2f2f1cca6d 100644 --- a/src/pages/PullRequestPage/PullCoverage/routes/FilesChangedTab/FilesChanged/TableTeam/TableTeam.tsx +++ b/src/pages/PullRequestPage/PullCoverage/routes/FilesChangedTab/FilesChanged/TableTeam/TableTeam.tsx @@ -88,7 +88,7 @@ function getColumns({ pullId }: { pullId: string }) { variant="solid" /> - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} { function setup({ planValue, privateRepo }: SetupArgs) { server.use( - graphql.query('OwnerTier', (info) => { + graphql.query('OwnerTier', () => { if (planValue === TierNames.TEAM) { return HttpResponse.json({ data: mockTeamTier }) } return HttpResponse.json({ data: mockProTier }) }), - graphql.query('GetPullTeam', (info) => { + graphql.query('GetPullTeam', () => { return HttpResponse.json({ data: mockCompareData }) }), - graphql.query('GetRepoSettingsTeam', (info) => { + graphql.query('GetRepoSettingsTeam', () => { return HttpResponse.json({ data: { owner: { @@ -140,7 +140,7 @@ describe('FilesChangedTab', () => { }, }) }), - graphql.query('GetRepoOverview', (info) => { + graphql.query('GetRepoOverview', () => { return HttpResponse.json({ data: mockOverview }) }) ) diff --git a/src/pages/PullRequestPage/PullCoverage/routes/IndirectChangesTab/IndirectChangedFiles/IndirectChangedFiles.test.tsx b/src/pages/PullRequestPage/PullCoverage/routes/IndirectChangesTab/IndirectChangedFiles/IndirectChangedFiles.test.tsx index f61a13d8ee..571a1f8bf9 100644 --- a/src/pages/PullRequestPage/PullCoverage/routes/IndirectChangesTab/IndirectChangedFiles/IndirectChangedFiles.test.tsx +++ b/src/pages/PullRequestPage/PullCoverage/routes/IndirectChangesTab/IndirectChangedFiles/IndirectChangedFiles.test.tsx @@ -217,19 +217,19 @@ describe('IndirectChangedFiles', () => { mockVars(info.variables) return HttpResponse.json({ data: mockPull(overrideComparison) }) }), - graphql.query('ImpactedFileComparison', (info) => + graphql.query('ImpactedFileComparison', () => HttpResponse.json({ data: mockSingularImpactedFilesData }) ), - graphql.query('GetRepoOverview', (info) => { + graphql.query('GetRepoOverview', () => { return HttpResponse.json({ data: mockOverview }) }), - graphql.query('PullComponentsSelector', (info) => { + graphql.query('PullComponentsSelector', () => { return HttpResponse.json({ data: { owner: null } }) }), - graphql.query('BackfillFlagMemberships', (info) => { + graphql.query('BackfillFlagMemberships', () => { return HttpResponse.json({ data: { owner: null } }) }), - graphql.query('OwnerTier', (info) => { + graphql.query('OwnerTier', () => { return HttpResponse.json({ data: { owner: null } }) }) ) diff --git a/src/pages/PullRequestPage/PullCoverage/routes/IndirectChangesTab/IndirectChangedFiles/NameColumn/NameColumn.test.jsx b/src/pages/PullRequestPage/PullCoverage/routes/IndirectChangesTab/IndirectChangedFiles/NameColumn/NameColumn.test.jsx index dec5deaad6..b39524cbbb 100644 --- a/src/pages/PullRequestPage/PullCoverage/routes/IndirectChangesTab/IndirectChangedFiles/NameColumn/NameColumn.test.jsx +++ b/src/pages/PullRequestPage/PullCoverage/routes/IndirectChangesTab/IndirectChangedFiles/NameColumn/NameColumn.test.jsx @@ -84,7 +84,7 @@ describe('NameColumn', () => { const user = userEvent.setup() server.use( - graphql.query('ImpactedFileComparison', (info) => { + graphql.query('ImpactedFileComparison', () => { return HttpResponse.json({ data: mockSingularImpactedFilesData }) }) ) diff --git a/src/pages/PullRequestPage/PullCoverage/routes/IndirectChangesTab/IndirectChangesTab.test.jsx b/src/pages/PullRequestPage/PullCoverage/routes/IndirectChangesTab/IndirectChangesTab.test.jsx index 2d1ccd6386..0a86006937 100644 --- a/src/pages/PullRequestPage/PullCoverage/routes/IndirectChangesTab/IndirectChangesTab.test.jsx +++ b/src/pages/PullRequestPage/PullCoverage/routes/IndirectChangesTab/IndirectChangesTab.test.jsx @@ -173,7 +173,7 @@ afterAll(() => server.close()) describe('IndirectChangesTab', () => { function setup({ overrideComparison, headState } = {}) { server.use( - graphql.query('Pull', (info) => { + graphql.query('Pull', () => { return HttpResponse.json({ data: mockPull({ overrideComparison, headState }), }) diff --git a/src/pages/PullRequestPage/PullCoverage/routes/IndirectChangesTab/PullFileDiff/PullFileDiff.test.tsx b/src/pages/PullRequestPage/PullCoverage/routes/IndirectChangesTab/PullFileDiff/PullFileDiff.test.tsx index 559ac955d0..7431d190f0 100644 --- a/src/pages/PullRequestPage/PullCoverage/routes/IndirectChangesTab/PullFileDiff/PullFileDiff.test.tsx +++ b/src/pages/PullRequestPage/PullCoverage/routes/IndirectChangesTab/PullFileDiff/PullFileDiff.test.tsx @@ -40,7 +40,7 @@ window.scrollTo = scrollToMock window.scrollY = 100 class ResizeObserverMock { - callback = (x: any) => null + callback = (_x: any) => null constructor(callback: any) { this.callback = callback @@ -186,7 +186,7 @@ describe('FileDiff', () => { })) server.use( - graphql.query('ImpactedFileComparison', (info) => { + graphql.query('ImpactedFileComparison', () => { return HttpResponse.json({ data: baseMock({ isNewFile, @@ -196,7 +196,7 @@ describe('FileDiff', () => { }), }) }), - graphql.query('GetRepoOverview', (info) => { + graphql.query('GetRepoOverview', () => { return HttpResponse.json({ data: mockOverview(bundleAnalysisEnabled) }) }) ) diff --git a/src/pages/PullRequestPage/PullRequestPage.test.tsx b/src/pages/PullRequestPage/PullRequestPage.test.tsx index bdb1c410f4..8a5920c5a2 100644 --- a/src/pages/PullRequestPage/PullRequestPage.test.tsx +++ b/src/pages/PullRequestPage/PullRequestPage.test.tsx @@ -200,7 +200,7 @@ describe('PullRequestPage', () => { bundleAnalysisEnabled = false, }: SetupArgs) { server.use( - graphql.query('PullHeadData', (info) => { + graphql.query('PullHeadData', () => { return HttpResponse.json({ data: mockPullHeadData }) }), graphql.query('PullPageData', (info) => { @@ -232,20 +232,20 @@ describe('PullRequestPage', () => { }, }) }), - graphql.query('GetRepoOverview', (info) => { + graphql.query('GetRepoOverview', () => { return HttpResponse.json({ data: mockOverview(privateRepo) }) }), - graphql.query('OwnerTier', (info) => { + graphql.query('OwnerTier', () => { return HttpResponse.json({ data: { owner: { plan: { tierName: tierValue } }, }, }) }), - graphql.query('PullCoverageDropdownSummary', (info) => { + graphql.query('PullCoverageDropdownSummary', () => { return HttpResponse.json({ data: mockPullCoverageDropdownSummary }) }), - graphql.query('PullBADropdownSummary', (info) => { + graphql.query('PullBADropdownSummary', () => { return HttpResponse.json({ data: mockPullBADropdownSummary }) }) ) diff --git a/src/pages/PullRequestPage/PullRequestPage.tsx b/src/pages/PullRequestPage/PullRequestPage.tsx index ac5651eb7f..f7afa64449 100644 --- a/src/pages/PullRequestPage/PullRequestPage.tsx +++ b/src/pages/PullRequestPage/PullRequestPage.tsx @@ -115,7 +115,7 @@ function PullRequestPage() { return } - let defaultDropdown: Array<'coverage' | 'bundle'> = [] + const defaultDropdown: Array<'coverage' | 'bundle'> = [] // default to displaying only coverage let displayMode: TDisplayMode = DISPLAY_MODE.COVERAGE if (data?.bundleAnalysisEnabled && data?.coverageEnabled) { diff --git a/src/pages/PullRequestPage/queries/PullPageDataQueryOpts.test.tsx b/src/pages/PullRequestPage/queries/PullPageDataQueryOpts.test.tsx index 71e7f7a6c3..653f19a780 100644 --- a/src/pages/PullRequestPage/queries/PullPageDataQueryOpts.test.tsx +++ b/src/pages/PullRequestPage/queries/PullPageDataQueryOpts.test.tsx @@ -249,7 +249,7 @@ describe('PullPageDataQueryOpts', () => { }) describe('returns NotFoundError __typename', () => { - let oldConsoleError = console.error + const oldConsoleError = console.error beforeEach(() => { console.error = () => null @@ -288,7 +288,7 @@ describe('PullPageDataQueryOpts', () => { }) describe('returns OwnerNotActivatedError __typename', () => { - let oldConsoleError = console.error + const oldConsoleError = console.error beforeEach(() => { console.error = () => null @@ -327,7 +327,7 @@ describe('PullPageDataQueryOpts', () => { }) describe('unsuccessful parse of zod schema', () => { - let oldConsoleError = console.error + const oldConsoleError = console.error beforeEach(() => { console.error = () => null diff --git a/src/pages/PullRequestPage/queries/PullPageDataQueryOpts.tsx b/src/pages/PullRequestPage/queries/PullPageDataQueryOpts.tsx index 986071c9a5..4149a656bb 100644 --- a/src/pages/PullRequestPage/queries/PullPageDataQueryOpts.tsx +++ b/src/pages/PullRequestPage/queries/PullPageDataQueryOpts.tsx @@ -234,7 +234,7 @@ export const PullPageDataQueryOpts = ({ detail: (

Activation is required to view this repo, please{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} click here to activate your account.

diff --git a/src/pages/RepoPage/ActivationAlert/ActivationAlert.test.tsx b/src/pages/RepoPage/ActivationAlert/ActivationAlert.test.tsx index f523818430..def4dbf5cc 100644 --- a/src/pages/RepoPage/ActivationAlert/ActivationAlert.test.tsx +++ b/src/pages/RepoPage/ActivationAlert/ActivationAlert.test.tsx @@ -75,7 +75,7 @@ describe('ActivationAlert', () => { config.IS_SELF_HOSTED = isSelfHosted server.use( - graphql.query('GetPlanData', (info) => { + graphql.query('GetPlanData', () => { return HttpResponse.json({ data: { owner: { diff --git a/src/pages/RepoPage/ActivationAlert/ActivationRequiredSelfHosted/ActivationRequiredSelfHosted.test.tsx b/src/pages/RepoPage/ActivationAlert/ActivationRequiredSelfHosted/ActivationRequiredSelfHosted.test.tsx index 127e0d73c6..876b363d1d 100644 --- a/src/pages/RepoPage/ActivationAlert/ActivationRequiredSelfHosted/ActivationRequiredSelfHosted.test.tsx +++ b/src/pages/RepoPage/ActivationAlert/ActivationRequiredSelfHosted/ActivationRequiredSelfHosted.test.tsx @@ -44,7 +44,7 @@ afterAll(() => { describe('ActivationRequiredSelfHosted', () => { function setup(isAdmin: boolean, seatsUsed: number, seatsLimit: number) { server.use( - http.get('/internal/users/current', (info) => + http.get('/internal/users/current', () => HttpResponse.json({ isAdmin, email: 'user@example.com', @@ -54,7 +54,7 @@ describe('ActivationRequiredSelfHosted', () => { activated: true, }) ), - graphql.query('Seats', (info) => { + graphql.query('Seats', () => { return HttpResponse.json({ data: { config: { diff --git a/src/pages/RepoPage/BundlesTab/BundleContent/AssetsTable/AssetsTable.test.tsx b/src/pages/RepoPage/BundlesTab/BundleContent/AssetsTable/AssetsTable.test.tsx index 580135a460..452972bd3c 100644 --- a/src/pages/RepoPage/BundlesTab/BundleContent/AssetsTable/AssetsTable.test.tsx +++ b/src/pages/RepoPage/BundlesTab/BundleContent/AssetsTable/AssetsTable.test.tsx @@ -249,10 +249,10 @@ describe('AssetsTable', () => { return HttpResponse.json({ data: mockAssets(multipleAssets) }) }), - graphql.query('BundleAssetModules', (info) => { + graphql.query('BundleAssetModules', () => { return HttpResponse.json({ data: mockBundleAssetModules }) }), - graphql.query('GetRepoOverview', (info) => { + graphql.query('GetRepoOverview', () => { return HttpResponse.json({ data: mockRepoOverview }) }) ) diff --git a/src/pages/RepoPage/BundlesTab/BundleContent/AssetsTable/ModulesTable.test.tsx b/src/pages/RepoPage/BundlesTab/BundleContent/AssetsTable/ModulesTable.test.tsx index 3b23742970..c7b7c1f364 100644 --- a/src/pages/RepoPage/BundlesTab/BundleContent/AssetsTable/ModulesTable.test.tsx +++ b/src/pages/RepoPage/BundlesTab/BundleContent/AssetsTable/ModulesTable.test.tsx @@ -102,7 +102,7 @@ interface SetupArgs { describe('ModulesTable', () => { function setup({ noAssets = false }: SetupArgs) { server.use( - graphql.query('BundleAssetModules', (info) => { + graphql.query('BundleAssetModules', () => { if (noAssets) { return HttpResponse.json({ data: mockMissingHeadReport }) } diff --git a/src/pages/RepoPage/BundlesTab/BundleContent/AssetsTable/ModulesTable.tsx b/src/pages/RepoPage/BundlesTab/BundleContent/AssetsTable/ModulesTable.tsx index 5258f00bd0..2560e057a3 100644 --- a/src/pages/RepoPage/BundlesTab/BundleContent/AssetsTable/ModulesTable.tsx +++ b/src/pages/RepoPage/BundlesTab/BundleContent/AssetsTable/ModulesTable.tsx @@ -39,7 +39,7 @@ const columnHelper = createColumnHelper() const columns = [ columnHelper.accessor('name', { header: 'Asset', - cell: ({ getValue, row }) => { + cell: ({ getValue }) => { return

{getValue()}

}, }), diff --git a/src/pages/RepoPage/BundlesTab/BundleContent/AssetsTable/useBundleAssetsTable.test.tsx b/src/pages/RepoPage/BundlesTab/BundleContent/AssetsTable/useBundleAssetsTable.test.tsx index 3fc0abc92a..27d7b21fc6 100644 --- a/src/pages/RepoPage/BundlesTab/BundleContent/AssetsTable/useBundleAssetsTable.test.tsx +++ b/src/pages/RepoPage/BundlesTab/BundleContent/AssetsTable/useBundleAssetsTable.test.tsx @@ -124,7 +124,7 @@ describe('useBundleAssetsTable', () => { queryVarMock(info.variables) return HttpResponse.json({ data: mockedBundleAssets }) }), - graphql.query('GetRepoOverview', (info) => { + graphql.query('GetRepoOverview', () => { return HttpResponse.json({ data: mockRepoOverview }) }) ) diff --git a/src/pages/RepoPage/BundlesTab/BundleContent/BundleChart/BundleChart.test.tsx b/src/pages/RepoPage/BundlesTab/BundleContent/BundleChart/BundleChart.test.tsx index b71bbc1d63..979ce88cd9 100644 --- a/src/pages/RepoPage/BundlesTab/BundleContent/BundleChart/BundleChart.test.tsx +++ b/src/pages/RepoPage/BundlesTab/BundleContent/BundleChart/BundleChart.test.tsx @@ -149,10 +149,10 @@ afterAll(() => { describe('BundleChart', () => { function setup() { server.use( - graphql.query('GetBundleTrend', (info) => { + graphql.query('GetBundleTrend', () => { return HttpResponse.json({ data: mockBundleTrendData }) }), - graphql.query('GetRepoOverview', (info) => { + graphql.query('GetRepoOverview', () => { return HttpResponse.json({ data: mockRepoOverview }) }) ) diff --git a/src/pages/RepoPage/BundlesTab/BundleContent/BundleChart/useBundleChartData.test.tsx b/src/pages/RepoPage/BundlesTab/BundleContent/BundleChart/useBundleChartData.test.tsx index 54f485e00d..c253b29632 100644 --- a/src/pages/RepoPage/BundlesTab/BundleContent/BundleChart/useBundleChartData.test.tsx +++ b/src/pages/RepoPage/BundlesTab/BundleContent/BundleChart/useBundleChartData.test.tsx @@ -153,7 +153,7 @@ describe('useBundleChartData', () => { queryVarMock(info.variables) return HttpResponse.json({ data: mockBundleTrendData }) }), - graphql.query('GetRepoOverview', (info) => { + graphql.query('GetRepoOverview', () => { return HttpResponse.json({ data: mockRepoOverview }) }) ) diff --git a/src/pages/RepoPage/BundlesTab/BundleContent/BundleContent.test.tsx b/src/pages/RepoPage/BundlesTab/BundleContent/BundleContent.test.tsx index bd72ba4900..59133320d7 100644 --- a/src/pages/RepoPage/BundlesTab/BundleContent/BundleContent.test.tsx +++ b/src/pages/RepoPage/BundlesTab/BundleContent/BundleContent.test.tsx @@ -289,7 +289,7 @@ describe('BundleContent', () => { isEmptyBundleSelection = false, }: SetupArgs) { server.use( - graphql.query('BranchBundleSummaryData', (info) => { + graphql.query('BranchBundleSummaryData', () => { if (isBundleError) { return HttpResponse.json({ data: mockBranchBundlesError }) } else if (isEmptyBundleSelection) { @@ -297,20 +297,20 @@ describe('BundleContent', () => { } return HttpResponse.json({ data: mockBranchBundles }) }), - graphql.query('GetRepoOverview', (info) => { + graphql.query('GetRepoOverview', () => { return HttpResponse.json({ data: mockRepoOverview }) }), - graphql.query('BundleAssets', (info) => { + graphql.query('BundleAssets', () => { if (isBundleError) { return HttpResponse.json({ data: mockMissingHeadReportAssets }) } return HttpResponse.json({ data: mockAssets }) }), - graphql.query('GetBundleTrend', (info) => { + graphql.query('GetBundleTrend', () => { return HttpResponse.json({ data: mockBundleTrendData }) }), - graphql.query('BundleSummary', (info) => { + graphql.query('BundleSummary', () => { return HttpResponse.json({ data: mockBundleSummary }) }) ) diff --git a/src/pages/RepoPage/BundlesTab/BundleContent/BundleSelection/BranchSelector.test.tsx b/src/pages/RepoPage/BundlesTab/BundleContent/BundleSelection/BranchSelector.test.tsx index 631c404921..bf878af5c3 100644 --- a/src/pages/RepoPage/BundlesTab/BundleContent/BundleSelection/BranchSelector.test.tsx +++ b/src/pages/RepoPage/BundlesTab/BundleContent/BundleSelection/BranchSelector.test.tsx @@ -163,7 +163,7 @@ describe('BranchSelector', () => { }) server.use( - graphql.query('GetRepoOverview', (info) => { + graphql.query('GetRepoOverview', () => { if (nullOverview) { return HttpResponse.json({ data: { owner: null } }) } diff --git a/src/pages/RepoPage/BundlesTab/BundleContent/BundleSelection/BranchSelector.tsx b/src/pages/RepoPage/BundlesTab/BundleContent/BundleSelection/BranchSelector.tsx index a38eeb445a..59e01ff6d0 100644 --- a/src/pages/RepoPage/BundlesTab/BundleContent/BundleSelection/BranchSelector.tsx +++ b/src/pages/RepoPage/BundlesTab/BundleContent/BundleSelection/BranchSelector.tsx @@ -16,7 +16,7 @@ interface URLParams { } const getDecodedBranch = (branch?: string) => - !!branch ? decodeURIComponent(branch) : undefined + branch ? decodeURIComponent(branch) : undefined interface BranchSelectorProps { resetBundleSelect: () => void diff --git a/src/pages/RepoPage/BundlesTab/BundleContent/BundleSelection/BundleSelection.test.tsx b/src/pages/RepoPage/BundlesTab/BundleContent/BundleSelection/BundleSelection.test.tsx index f969425908..5b764059af 100644 --- a/src/pages/RepoPage/BundlesTab/BundleContent/BundleSelection/BundleSelection.test.tsx +++ b/src/pages/RepoPage/BundlesTab/BundleContent/BundleSelection/BundleSelection.test.tsx @@ -110,7 +110,7 @@ describe('BundleSelection', () => { const user = userEvent.setup() server.use( - graphql.query('GetRepoOverview', (info) => { + graphql.query('GetRepoOverview', () => { return HttpResponse.json({ data: { owner: { @@ -120,7 +120,7 @@ describe('BundleSelection', () => { }, }) }), - graphql.query('GetBranch', (info) => { + graphql.query('GetBranch', () => { return HttpResponse.json({ data: { owner: { @@ -129,12 +129,12 @@ describe('BundleSelection', () => { }, }) }), - graphql.query('GetBranches', (info) => { + graphql.query('GetBranches', () => { return HttpResponse.json({ data: { owner: { repository: mockBranches } }, }) }), - graphql.query('BranchBundlesNames', (info) => { + graphql.query('BranchBundlesNames', () => { return HttpResponse.json({ data: mockBranchBundles }) }) ) diff --git a/src/pages/RepoPage/BundlesTab/BundleContent/BundleSelection/BundleSelector.test.tsx b/src/pages/RepoPage/BundlesTab/BundleContent/BundleSelection/BundleSelector.test.tsx index c0dc04cb13..865be4435b 100644 --- a/src/pages/RepoPage/BundlesTab/BundleContent/BundleSelection/BundleSelector.test.tsx +++ b/src/pages/RepoPage/BundlesTab/BundleContent/BundleSelection/BundleSelector.test.tsx @@ -128,7 +128,7 @@ describe('BundleSelector', () => { const mockFilterReset = vi.fn() server.use( - graphql.query('GetRepoOverview', (info) => { + graphql.query('GetRepoOverview', () => { if (nullOverview) { return HttpResponse.json({ data: { owner: null } }) } @@ -142,7 +142,7 @@ describe('BundleSelector', () => { }, }) }), - graphql.query('BranchBundlesNames', (info) => { + graphql.query('BranchBundlesNames', () => { if (missingHeadReport) { return HttpResponse.json({ data: mockBadBundles }) } diff --git a/src/pages/RepoPage/BundlesTab/BundleContent/BundleSelection/BundleSelector.tsx b/src/pages/RepoPage/BundlesTab/BundleContent/BundleSelection/BundleSelector.tsx index c14d6532a8..bd66bfdbe2 100644 --- a/src/pages/RepoPage/BundlesTab/BundleContent/BundleSelection/BundleSelector.tsx +++ b/src/pages/RepoPage/BundlesTab/BundleContent/BundleSelection/BundleSelector.tsx @@ -86,7 +86,7 @@ const BundleSelector = forwardRef( { describe('useBranchSelector', () => { function setup(branchName: string, returnBranches: boolean = true) { server.use( - graphql.query('GetBranch', (info) => { + graphql.query('GetBranch', () => { if (returnBranches) { return HttpResponse.json({ data: mockBranches(branchName) }) } diff --git a/src/pages/RepoPage/CoverageTab/OverviewTab/hooks/useBranchSelector.ts b/src/pages/RepoPage/CoverageTab/OverviewTab/hooks/useBranchSelector.ts index 220c17cb5e..df629a875a 100644 --- a/src/pages/RepoPage/CoverageTab/OverviewTab/hooks/useBranchSelector.ts +++ b/src/pages/RepoPage/CoverageTab/OverviewTab/hooks/useBranchSelector.ts @@ -3,9 +3,9 @@ import { useParams } from 'react-router-dom' import { Branch, useBranch } from 'services/branches' const getDecodedBranch = (branch?: string) => - !!branch ? decodeURIComponent(branch) : branch + branch ? decodeURIComponent(branch) : branch -const getDecodedRef = (ref?: string) => (!!ref ? decodeURIComponent(ref) : ref) +const getDecodedRef = (ref?: string) => (ref ? decodeURIComponent(ref) : ref) interface URLParams { provider: string diff --git a/src/pages/RepoPage/CoverageTab/OverviewTab/hooks/useCoverageTabData.test.tsx b/src/pages/RepoPage/CoverageTab/OverviewTab/hooks/useCoverageTabData.test.tsx index 3196f1d344..09d13e3e4b 100644 --- a/src/pages/RepoPage/CoverageTab/OverviewTab/hooks/useCoverageTabData.test.tsx +++ b/src/pages/RepoPage/CoverageTab/OverviewTab/hooks/useCoverageTabData.test.tsx @@ -117,7 +117,7 @@ describe('useCoverageTabData', () => { isNullOwner = false, }: SetupArgs) { server.use( - graphql.query('CoverageTabData', (info) => { + graphql.query('CoverageTabData', () => { if (isNotFoundError) { return HttpResponse.json({ data: mockNotFoundError }) } else if (isOwnerNotActivatedError) { @@ -130,7 +130,7 @@ describe('useCoverageTabData', () => { return HttpResponse.json({ data: mockCoverageTabData }) } }), - graphql.query('GetRepoOverview', (info) => { + graphql.query('GetRepoOverview', () => { return HttpResponse.json({ data: mockOverview }) }) ) @@ -200,7 +200,7 @@ describe('useCoverageTabData', () => { }) describe('returns NotFoundError __typename', () => { - let oldConsoleError = console.error + const oldConsoleError = console.error beforeEach(() => { console.error = () => null @@ -236,7 +236,7 @@ describe('useCoverageTabData', () => { }) describe('returns OwnerNotActivatedError __typename', () => { - let oldConsoleError = console.error + const oldConsoleError = console.error beforeEach(() => { console.error = () => null @@ -272,7 +272,7 @@ describe('useCoverageTabData', () => { }) describe('unsuccessful parse of zod schema', () => { - let oldConsoleError = console.error + const oldConsoleError = console.error beforeEach(() => { console.error = () => null diff --git a/src/pages/RepoPage/CoverageTab/OverviewTab/hooks/useCoverageTabData.tsx b/src/pages/RepoPage/CoverageTab/OverviewTab/hooks/useCoverageTabData.tsx index 73f972f614..3bbd5eca36 100644 --- a/src/pages/RepoPage/CoverageTab/OverviewTab/hooks/useCoverageTabData.tsx +++ b/src/pages/RepoPage/CoverageTab/OverviewTab/hooks/useCoverageTabData.tsx @@ -135,7 +135,7 @@ export const useCoverageTabData = ({ detail: (

Activation is required to view this repo, please{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} click here to activate your account.

diff --git a/src/pages/RepoPage/CoverageTab/OverviewTab/hooks/useRepoCoverageTimeseries.test.tsx b/src/pages/RepoPage/CoverageTab/OverviewTab/hooks/useRepoCoverageTimeseries.test.tsx index 8a480c32e2..5a8181b865 100644 --- a/src/pages/RepoPage/CoverageTab/OverviewTab/hooks/useRepoCoverageTimeseries.test.tsx +++ b/src/pages/RepoPage/CoverageTab/OverviewTab/hooks/useRepoCoverageTimeseries.test.tsx @@ -86,13 +86,13 @@ interface SetupArgs { } describe('useRepoCoverageTimeseries', () => { - let config = vi.fn() + const config = vi.fn() function setup( { noCoverageData = false }: SetupArgs = { noCoverageData: false } ) { server.use( - graphql.query('GetRepoOverview', (info) => { + graphql.query('GetRepoOverview', () => { return HttpResponse.json({ data: mockRepoOverview }) }), graphql.query('GetBranchCoverageMeasurements', (info) => { diff --git a/src/pages/RepoPage/CoverageTab/OverviewTab/hooks/useRepoCoverageTimeseries.ts b/src/pages/RepoPage/CoverageTab/OverviewTab/hooks/useRepoCoverageTimeseries.ts index 016e8ace97..e8064f7ce9 100644 --- a/src/pages/RepoPage/CoverageTab/OverviewTab/hooks/useRepoCoverageTimeseries.ts +++ b/src/pages/RepoPage/CoverageTab/OverviewTab/hooks/useRepoCoverageTimeseries.ts @@ -83,7 +83,7 @@ export function useRepoCoverageTimeseries({ // set set initial t let prevPercent = data?.measurements?.[0]?.max ?? 0 coverage = data?.measurements?.map((measurement) => { - let coverage = measurement?.max ?? prevPercent + const coverage = measurement?.max ?? prevPercent // can save on a few reassignments if (prevPercent !== coverage) { diff --git a/src/pages/RepoPage/CoverageTab/OverviewTab/subroute/ComponentsMultiSelect/ComponentsMultiSelect.test.tsx b/src/pages/RepoPage/CoverageTab/OverviewTab/subroute/ComponentsMultiSelect/ComponentsMultiSelect.test.tsx index c5c448c65a..dc30f2c6b0 100644 --- a/src/pages/RepoPage/CoverageTab/OverviewTab/subroute/ComponentsMultiSelect/ComponentsMultiSelect.test.tsx +++ b/src/pages/RepoPage/CoverageTab/OverviewTab/subroute/ComponentsMultiSelect/ComponentsMultiSelect.test.tsx @@ -158,7 +158,7 @@ describe('ComponentsMultiSelect', () => { return HttpResponse.json({ data: mockComponentsResponse(components) }) }), - graphql.query('GetRepoOverview', (info) => { + graphql.query('GetRepoOverview', () => { return HttpResponse.json({ data: { owner: { @@ -168,17 +168,17 @@ describe('ComponentsMultiSelect', () => { }, }) }), - graphql.query('GetBranch', (info) => { + graphql.query('GetBranch', () => { return HttpResponse.json({ data: { owner: { repository: { __typename: 'Repository', ...mockBranch } }, }, }) }), - graphql.query('GetBranches', (info) => { + graphql.query('GetBranches', () => { return HttpResponse.json({ data: branchesMock }) }), - graphql.query('GetRepoCoverage', (info) => { + graphql.query('GetRepoCoverage', () => { return HttpResponse.json({ data: { owner: { repository: mockRepoCoverage } }, }) diff --git a/src/pages/RepoPage/CoverageTab/OverviewTab/subroute/ComponentsMultiSelect/ComponentsMultiSelect.tsx b/src/pages/RepoPage/CoverageTab/OverviewTab/subroute/ComponentsMultiSelect/ComponentsMultiSelect.tsx index 3712612917..d756020bf2 100644 --- a/src/pages/RepoPage/CoverageTab/OverviewTab/subroute/ComponentsMultiSelect/ComponentsMultiSelect.tsx +++ b/src/pages/RepoPage/CoverageTab/OverviewTab/subroute/ComponentsMultiSelect/ComponentsMultiSelect.tsx @@ -68,7 +68,7 @@ export default function ComponentsMultiSelect() { return (
{ + onChange={(components: string[]) => { setSelectedComponents(components) updateParams({ components }) }} onSearch={(term: string) => setComponentSearch(term)} - renderSelected={(selectedItems: String[]) => ( + renderSelected={(selectedItems: string[]) => ( {selectedItems.length === 0 ? ( diff --git a/src/pages/RepoPage/CoverageTab/OverviewTab/subroute/CoverageChart/CoverageChart.test.tsx b/src/pages/RepoPage/CoverageTab/OverviewTab/subroute/CoverageChart/CoverageChart.test.tsx index ab9f200bc2..ef6ef1eae2 100644 --- a/src/pages/RepoPage/CoverageTab/OverviewTab/subroute/CoverageChart/CoverageChart.test.tsx +++ b/src/pages/RepoPage/CoverageTab/OverviewTab/subroute/CoverageChart/CoverageChart.test.tsx @@ -57,7 +57,7 @@ beforeEach(() => { * This mock also allow us to use {@link notifyResizeObserverChange} to fire changes * from inside our test. */ - resizeObserverMock = vi.fn().mockImplementation((callback) => { + resizeObserverMock = vi.fn().mockImplementation(() => { return { observe: vi.fn(), unobserve: vi.fn(), @@ -65,7 +65,7 @@ beforeEach(() => { } }) - // @ts-ignore + // @ts-expect-error - we're deleting the window resize observer which is being replaced by a mock delete window.ResizeObserver window.ResizeObserver = resizeObserverMock @@ -156,16 +156,16 @@ describe('CoverageChart', () => { noData = false, }: SetupArgs) { server.use( - graphql.query('GetRepoOverview', (info) => { + graphql.query('GetRepoOverview', () => { return HttpResponse.json({ data: repoOverviewData }) }), - graphql.query('GetBranches', (info) => { + graphql.query('GetBranches', () => { return HttpResponse.json({ data: branchesData }) }), - graphql.query('GetBranch', (info) => { + graphql.query('GetBranch', () => { return HttpResponse.json({ data: branchMock }) }), - graphql.query('GetBranchCoverageMeasurements', (info) => { + graphql.query('GetBranchCoverageMeasurements', () => { if (coverageRepoStatus) { return HttpResponse.json( { errors: [{ message: 'error' }] }, diff --git a/src/pages/RepoPage/CoverageTab/OverviewTab/subroute/FileExplorer/CodeTreeTable/CodeTreeTable.test.tsx b/src/pages/RepoPage/CoverageTab/OverviewTab/subroute/FileExplorer/CodeTreeTable/CodeTreeTable.test.tsx index 5e45fa8700..7e00d590d3 100644 --- a/src/pages/RepoPage/CoverageTab/OverviewTab/subroute/FileExplorer/CodeTreeTable/CodeTreeTable.test.tsx +++ b/src/pages/RepoPage/CoverageTab/OverviewTab/subroute/FileExplorer/CodeTreeTable/CodeTreeTable.test.tsx @@ -247,7 +247,7 @@ describe('CodeTreeTable', () => { return HttpResponse.json({ data: { owner: mockTreeData } }) } }), - graphql.query('GetRepoOverview', (info) => { + graphql.query('GetRepoOverview', () => { return HttpResponse.json({ data: mockOverview }) }) ) diff --git a/src/pages/RepoPage/CoverageTab/OverviewTab/subroute/FileExplorer/FileExplorer.test.jsx b/src/pages/RepoPage/CoverageTab/OverviewTab/subroute/FileExplorer/FileExplorer.test.jsx index 9e138cb5b8..bbfd6b5d79 100644 --- a/src/pages/RepoPage/CoverageTab/OverviewTab/subroute/FileExplorer/FileExplorer.test.jsx +++ b/src/pages/RepoPage/CoverageTab/OverviewTab/subroute/FileExplorer/FileExplorer.test.jsx @@ -189,7 +189,7 @@ describe('FileExplorer', () => { return HttpResponse.json({ data: { owner: mockTreeData } }) }), - graphql.query('GetRepoOverview', (info) => { + graphql.query('GetRepoOverview', () => { return HttpResponse.json({ data: mockOverview }) }) ) diff --git a/src/pages/RepoPage/CoverageTab/OverviewTab/subroute/FileExplorer/FileListTable/FileListTable.test.tsx b/src/pages/RepoPage/CoverageTab/OverviewTab/subroute/FileExplorer/FileListTable/FileListTable.test.tsx index 93675cd093..13e37c609e 100644 --- a/src/pages/RepoPage/CoverageTab/OverviewTab/subroute/FileExplorer/FileListTable/FileListTable.test.tsx +++ b/src/pages/RepoPage/CoverageTab/OverviewTab/subroute/FileExplorer/FileListTable/FileListTable.test.tsx @@ -178,7 +178,7 @@ describe('FileListTable', () => { return HttpResponse.json({ data: { owner: mockListData } }) }), - graphql.query('GetRepoOverview', (info) => { + graphql.query('GetRepoOverview', () => { return HttpResponse.json({ data: mockOverview }) }) ) diff --git a/src/pages/RepoPage/CoverageTab/OverviewTab/subroute/FileExplorer/FlagMultiSelect.test.jsx b/src/pages/RepoPage/CoverageTab/OverviewTab/subroute/FileExplorer/FlagMultiSelect.test.jsx index e9ce6421cc..6c9734c558 100644 --- a/src/pages/RepoPage/CoverageTab/OverviewTab/subroute/FileExplorer/FlagMultiSelect.test.jsx +++ b/src/pages/RepoPage/CoverageTab/OverviewTab/subroute/FileExplorer/FlagMultiSelect.test.jsx @@ -212,15 +212,15 @@ describe('FlagMultiSelect', () => { return HttpResponse.json({ data: mockFirstResponse }) }), - graphql.query('BackfillFlagMemberships', (info) => { + graphql.query('BackfillFlagMemberships', () => { return HttpResponse.json({ data: backfillData }) }), - graphql.query('OwnerTier', (info) => { + graphql.query('OwnerTier', () => { return HttpResponse.json({ data: { owner: { plan: { tierName: tierValue } } }, }) }), - graphql.query('GetRepoSettingsTeam', (info) => { + graphql.query('GetRepoSettingsTeam', () => { return HttpResponse.json({ data: mockRepoSettings(isPrivate) }) }) ) diff --git a/src/pages/RepoPage/CoverageTab/OverviewTab/subroute/FileExplorer/hooks/useRepoBranchContentsTable.test.tsx b/src/pages/RepoPage/CoverageTab/OverviewTab/subroute/FileExplorer/hooks/useRepoBranchContentsTable.test.tsx index 7795634e06..db604992f0 100644 --- a/src/pages/RepoPage/CoverageTab/OverviewTab/subroute/FileExplorer/hooks/useRepoBranchContentsTable.test.tsx +++ b/src/pages/RepoPage/CoverageTab/OverviewTab/subroute/FileExplorer/hooks/useRepoBranchContentsTable.test.tsx @@ -135,7 +135,7 @@ describe('useRepoBranchContentsTable', () => { return HttpResponse.json({ data: mockBranchContentData }) }), - graphql.query('GetRepoOverview', (info) => { + graphql.query('GetRepoOverview', () => { return HttpResponse.json({ data: mockOverview }) }) ) diff --git a/src/pages/RepoPage/CoverageTab/OverviewTab/subroute/FileExplorer/hooks/useRepoBranchContentsTable.tsx b/src/pages/RepoPage/CoverageTab/OverviewTab/subroute/FileExplorer/hooks/useRepoBranchContentsTable.tsx index 1568be50a2..2df890089a 100644 --- a/src/pages/RepoPage/CoverageTab/OverviewTab/subroute/FileExplorer/hooks/useRepoBranchContentsTable.tsx +++ b/src/pages/RepoPage/CoverageTab/OverviewTab/subroute/FileExplorer/hooks/useRepoBranchContentsTable.tsx @@ -68,7 +68,7 @@ export function useRepoBranchContentsTable(sortItem?: { const urlPath = pathParam || '' // useLocationParams needs to be updated to have full types - // @ts-expect-error + // @ts-expect-error - type issues with useLocationParams const isSearching = !!params?.search const selectedDisplayType = determineDisplayType( queryParams?.displayType, @@ -190,12 +190,12 @@ export function useRepoBranchContentsTable(sortItem?: { data: finalizedTableRows ?? [], indicationRange: branchData?.indicationRange, // useLocationParams needs to be updated to have full types - // @ts-expect-error + // @ts-expect-error - type issues with useLocationParams hasFlagsSelected: params?.flags ? params?.flags?.length > 0 : false, - // @ts-expect-error + // @ts-expect-error - type issues with useLocationParams hasComponentsSelected: params?.components ? // useLocationParams needs to be updated to have full types - // @ts-expect-error + // @ts-expect-error - type issues with useLocationParams params?.components?.length > 0 : false, isLoading, diff --git a/src/pages/RepoPage/CoverageTab/OverviewTab/subroute/Fileviewer/Fileviewer.test.jsx b/src/pages/RepoPage/CoverageTab/OverviewTab/subroute/Fileviewer/Fileviewer.test.jsx index ed85668ce8..20ac742ec3 100644 --- a/src/pages/RepoPage/CoverageTab/OverviewTab/subroute/Fileviewer/Fileviewer.test.jsx +++ b/src/pages/RepoPage/CoverageTab/OverviewTab/subroute/Fileviewer/Fileviewer.test.jsx @@ -19,7 +19,7 @@ window.scrollTo = scrollToMock window.scrollY = 100 class ResizeObserverMock { - callback = (x) => null + callback = (_x) => null constructor(callback) { this.callback = callback @@ -198,41 +198,41 @@ describe('FileView', () => { } ) { server.use( - graphql.query('DetailOwner', (info) => { + graphql.query('DetailOwner', () => { return HttpResponse.json({ data: { owner: mockOwner } }) }), - graphql.query('CoverageForFile', (info) => { + graphql.query('CoverageForFile', () => { return HttpResponse.json({ data: { owner: { repository: mockCoverage } }, }) }), - graphql.query('GetRepoOverview', (info) => { + graphql.query('GetRepoOverview', () => { return HttpResponse.json({ data: mockOverview }) }), - graphql.query('BackfillFlagMemberships', (info) => { + graphql.query('BackfillFlagMemberships', () => { return HttpResponse.json({ data: mockBackfillResponse }) }), - graphql.query('FlagsSelect', (info) => { + graphql.query('FlagsSelect', () => { return HttpResponse.json({ data: mockFlagResponse }) }), - graphql.query('OwnerTier', (info) => { + graphql.query('OwnerTier', () => { return HttpResponse.json({ data: { owner: { plan: { tierName: tierName } } }, }) }), - graphql.query('GetRepoSettingsTeam', (info) => { + graphql.query('GetRepoSettingsTeam', () => { return HttpResponse.json({ data: mockRepoSettings(isPrivate) }) }), - graphql.query('GetBranchComponents', (info) => { + graphql.query('GetBranchComponents', () => { return HttpResponse.json({ data: mockComponents }) }), - graphql.query('GetBranches', (info) => { + graphql.query('GetBranches', () => { return HttpResponse.json({ data: {} }) }), - graphql.query('GetRepoCoverage', (info) => { + graphql.query('GetRepoCoverage', () => { return HttpResponse.json({ data: {} }) }), - graphql.query('GetBranch', (info) => { + graphql.query('GetBranch', () => { return HttpResponse.json({ data: {} }) }) ) diff --git a/src/pages/RepoPage/CoverageTab/OverviewTab/subroute/Sunburst/Sunburst.test.jsx b/src/pages/RepoPage/CoverageTab/OverviewTab/subroute/Sunburst/Sunburst.test.jsx index 29309b3ad8..a1b55482e0 100644 --- a/src/pages/RepoPage/CoverageTab/OverviewTab/subroute/Sunburst/Sunburst.test.jsx +++ b/src/pages/RepoPage/CoverageTab/OverviewTab/subroute/Sunburst/Sunburst.test.jsx @@ -70,13 +70,13 @@ describe('Sunburst', () => { coverageTreeStatus = 200, }) { server.use( - graphql.query('GetRepoOverview', (info) => { + graphql.query('GetRepoOverview', () => { return HttpResponse.json({ data: repoOverviewData }) }), - graphql.query('RepoConfig', (info) => { + graphql.query('RepoConfig', () => { return HttpResponse.json({ data: repoConfigMock }) }), - http.get('/internal/:provider/:owner/:repo/coverage/tree', (info) => { + http.get('/internal/:provider/:owner/:repo/coverage/tree', () => { return HttpResponse.json( { data: coverageTreeRes }, { status: coverageTreeStatus } diff --git a/src/pages/RepoPage/CoverageTab/OverviewTab/subroute/Sunburst/hooks/useConvertD3ToBreadcrumbs.test.jsx b/src/pages/RepoPage/CoverageTab/OverviewTab/subroute/Sunburst/hooks/useConvertD3ToBreadcrumbs.test.jsx index 20ce4c6f45..f36b43752c 100644 --- a/src/pages/RepoPage/CoverageTab/OverviewTab/subroute/Sunburst/hooks/useConvertD3ToBreadcrumbs.test.jsx +++ b/src/pages/RepoPage/CoverageTab/OverviewTab/subroute/Sunburst/hooks/useConvertD3ToBreadcrumbs.test.jsx @@ -58,7 +58,7 @@ const overviewMock = { describe('useConvertD3ToBreadcrumbs', () => { function setup({ repoOverviewData }) { server.use( - graphql.query('GetRepoOverview', (info) => { + graphql.query('GetRepoOverview', () => { return HttpResponse.json({ data: repoOverviewData }) }) ) diff --git a/src/pages/RepoPage/CoverageTab/OverviewTab/subroute/Sunburst/hooks/useSunburstChart.test.jsx b/src/pages/RepoPage/CoverageTab/OverviewTab/subroute/Sunburst/hooks/useSunburstChart.test.jsx index f648ecb009..17dd51a25c 100644 --- a/src/pages/RepoPage/CoverageTab/OverviewTab/subroute/Sunburst/hooks/useSunburstChart.test.jsx +++ b/src/pages/RepoPage/CoverageTab/OverviewTab/subroute/Sunburst/hooks/useSunburstChart.test.jsx @@ -66,7 +66,7 @@ describe('useSunburstChart', () => { coverageTreeStatus = 200, }) { server.use( - graphql.query('GetRepoOverview', (info) => { + graphql.query('GetRepoOverview', () => { return HttpResponse.json({ data: repoOverviewData }) }), http.get('/internal/:provider/:owner/:repo/coverage/tree', (info) => { diff --git a/src/pages/RepoPage/CoverageTab/OverviewTab/summaryHooks/useCoverageRedirect.ts b/src/pages/RepoPage/CoverageTab/OverviewTab/summaryHooks/useCoverageRedirect.ts index 33c1729372..f147432ccd 100644 --- a/src/pages/RepoPage/CoverageTab/OverviewTab/summaryHooks/useCoverageRedirect.ts +++ b/src/pages/RepoPage/CoverageTab/OverviewTab/summaryHooks/useCoverageRedirect.ts @@ -66,7 +66,7 @@ export function useCoverageRedirect() { repo, ref, branch, - name: !!newBranch ? encodeURIComponent(newBranch) : undefined, + name: newBranch ? encodeURIComponent(newBranch) : undefined, }, }) }, diff --git a/src/pages/RepoPage/CoverageTab/OverviewTab/summaryHooks/useSummary.test.tsx b/src/pages/RepoPage/CoverageTab/OverviewTab/summaryHooks/useSummary.test.tsx index f55a1a6588..439272fa69 100644 --- a/src/pages/RepoPage/CoverageTab/OverviewTab/summaryHooks/useSummary.test.tsx +++ b/src/pages/RepoPage/CoverageTab/OverviewTab/summaryHooks/useSummary.test.tsx @@ -126,7 +126,7 @@ afterAll(() => { describe('useSummary', () => { function setup({ hasNoBranches } = { hasNoBranches: false }) { server.use( - graphql.query('GetRepoOverview', (info) => { + graphql.query('GetRepoOverview', () => { return HttpResponse.json({ data: { owner: { @@ -156,7 +156,7 @@ describe('useSummary', () => { data: { owner: { repository: mockBranches } }, }) }), - graphql.query('GetRepoCoverage', (info) => + graphql.query('GetRepoCoverage', () => HttpResponse.json({ data: { owner: { repository: mockRepoCoverage } }, }) diff --git a/src/pages/RepoPage/DeactivatedRepo/DeactivatedRepo.test.tsx b/src/pages/RepoPage/DeactivatedRepo/DeactivatedRepo.test.tsx index 6884d23fec..4b8a00f1ec 100644 --- a/src/pages/RepoPage/DeactivatedRepo/DeactivatedRepo.test.tsx +++ b/src/pages/RepoPage/DeactivatedRepo/DeactivatedRepo.test.tsx @@ -34,7 +34,7 @@ afterAll(() => { describe('DeactivatedRepo', () => { function setup(isCurrentUserPartOfOrg = true) { server.use( - graphql.query('GetRepo', (info) => { + graphql.query('GetRepo', () => { return HttpResponse.json({ data: { owner: { diff --git a/src/pages/RepoPage/FailedTestsTab/FailedTestsPage/FailedTestsPage.test.tsx b/src/pages/RepoPage/FailedTestsTab/FailedTestsPage/FailedTestsPage.test.tsx index 2b698e06ad..024309ed79 100644 --- a/src/pages/RepoPage/FailedTestsTab/FailedTestsPage/FailedTestsPage.test.tsx +++ b/src/pages/RepoPage/FailedTestsTab/FailedTestsPage/FailedTestsPage.test.tsx @@ -63,7 +63,7 @@ afterAll(() => { describe('FailedTestsPage', () => { function setup() { server.use( - graphql.query('GetRepoOverview', (info) => { + graphql.query('GetRepoOverview', () => { return HttpResponse.json({}) }) ) diff --git a/src/pages/RepoPage/FailedTestsTab/FailedTestsPage/FailedTestsTable/FailedTestsTable.tsx b/src/pages/RepoPage/FailedTestsTab/FailedTestsPage/FailedTestsTable/FailedTestsTable.tsx index 7d96e279bb..cf7af4a522 100644 --- a/src/pages/RepoPage/FailedTestsTab/FailedTestsPage/FailedTestsTable/FailedTestsTable.tsx +++ b/src/pages/RepoPage/FailedTestsTab/FailedTestsPage/FailedTestsTable/FailedTestsTable.tsx @@ -34,7 +34,7 @@ import { import { TableHeader } from '../TableHeader' const getDecodedBranch = (branch?: string) => - !!branch ? decodeURIComponent(branch) : undefined + branch ? decodeURIComponent(branch) : undefined const Loader = () => (
diff --git a/src/pages/RepoPage/FailedTestsTab/FailedTestsPage/MetricsSection/MetricsSection.test.tsx b/src/pages/RepoPage/FailedTestsTab/FailedTestsPage/MetricsSection/MetricsSection.test.tsx index aea48a20cb..d1fc78eabc 100644 --- a/src/pages/RepoPage/FailedTestsTab/FailedTestsPage/MetricsSection/MetricsSection.test.tsx +++ b/src/pages/RepoPage/FailedTestsTab/FailedTestsPage/MetricsSection/MetricsSection.test.tsx @@ -110,12 +110,12 @@ describe('MetricsSection', () => { const user = userEvent.setup() server.use( - graphql.query('GetTestResultsAggregates', (info) => { + graphql.query('GetTestResultsAggregates', () => { return HttpResponse.json({ data: mockAggResponse(planValue, isPrivate), }) }), - graphql.query('GetFlakeAggregates', (info) => { + graphql.query('GetFlakeAggregates', () => { return HttpResponse.json({ data: mockFlakeAggResponse }) }) ) diff --git a/src/pages/RepoPage/FailedTestsTab/FailedTestsPage/MetricsSection/MetricsSection.tsx b/src/pages/RepoPage/FailedTestsTab/FailedTestsPage/MetricsSection/MetricsSection.tsx index be05118b98..6e5bdda4c2 100644 --- a/src/pages/RepoPage/FailedTestsTab/FailedTestsPage/MetricsSection/MetricsSection.tsx +++ b/src/pages/RepoPage/FailedTestsTab/FailedTestsPage/MetricsSection/MetricsSection.tsx @@ -340,7 +340,7 @@ interface URLParams { } const getDecodedBranch = (branch?: string) => - !!branch ? decodeURIComponent(branch) : undefined + branch ? decodeURIComponent(branch) : undefined export const historicalTrendToCopy = (interval?: MeasurementInterval) => { switch (interval) { @@ -426,10 +426,10 @@ function MetricsSection() {
- {!!flakeAggregates ? ( + {flakeAggregates ? ( <> { }) server.use( - graphql.query('GetRepoOverview', (info) => { + graphql.query('GetRepoOverview', () => { if (nullOverview) { return HttpResponse.json({ data: { owner: null } }) } diff --git a/src/pages/RepoPage/FailedTestsTab/FailedTestsPage/SelectorSection/BranchSelector/BranchSelector.tsx b/src/pages/RepoPage/FailedTestsTab/FailedTestsPage/SelectorSection/BranchSelector/BranchSelector.tsx index a131417ef6..828789178f 100644 --- a/src/pages/RepoPage/FailedTestsTab/FailedTestsPage/SelectorSection/BranchSelector/BranchSelector.tsx +++ b/src/pages/RepoPage/FailedTestsTab/FailedTestsPage/SelectorSection/BranchSelector/BranchSelector.tsx @@ -15,7 +15,7 @@ interface URLParams { } const getDecodedBranch = (branch?: string) => - !!branch ? decodeURIComponent(branch) : undefined + branch ? decodeURIComponent(branch) : undefined const BranchSelector = () => { const history = useHistory() diff --git a/src/pages/RepoPage/FailedTestsTab/FailedTestsPage/SelectorSection/SelectorSection.test.tsx b/src/pages/RepoPage/FailedTestsTab/FailedTestsPage/SelectorSection/SelectorSection.test.tsx index 8d8b1edfac..2ba9b2fc11 100644 --- a/src/pages/RepoPage/FailedTestsTab/FailedTestsPage/SelectorSection/SelectorSection.test.tsx +++ b/src/pages/RepoPage/FailedTestsTab/FailedTestsPage/SelectorSection/SelectorSection.test.tsx @@ -120,27 +120,27 @@ describe('SelectorSection', () => { const user = userEvent.setup() server.use( - graphql.query('GetRepoOverview', (info) => { + graphql.query('GetRepoOverview', () => { return HttpResponse.json({ data: mockRepoOverview }) }), - graphql.query('GetBranch', (info) => { + graphql.query('GetBranch', () => { return HttpResponse.json({ data: { owner: { repository: { __typename: 'Repository', ...mockBranch } }, }, }) }), - graphql.query('GetBranches', (info) => { + graphql.query('GetBranches', () => { return HttpResponse.json({ data: { owner: { repository: mockBranches } }, }) }), - graphql.query('GetTestResultsFlags', (info) => { + graphql.query('GetTestResultsFlags', () => { return HttpResponse.json({ data: { owner: { repository: mockFlags } }, }) }), - graphql.query('GetTestResultsTestSuites', (info) => { + graphql.query('GetTestResultsTestSuites', () => { return HttpResponse.json({ data: { owner: { repository: mockTestSuites } }, }) diff --git a/src/pages/RepoPage/FailedTestsTab/FailedTestsPage/SelectorSection/SelectorSection.tsx b/src/pages/RepoPage/FailedTestsTab/FailedTestsPage/SelectorSection/SelectorSection.tsx index 289be3fe2a..bdca329da1 100644 --- a/src/pages/RepoPage/FailedTestsTab/FailedTestsPage/SelectorSection/SelectorSection.tsx +++ b/src/pages/RepoPage/FailedTestsTab/FailedTestsPage/SelectorSection/SelectorSection.tsx @@ -36,7 +36,7 @@ export const defaultQueryParams = { } const getDecodedBranch = (branch?: string) => - !!branch ? decodeURIComponent(branch) : undefined + branch ? decodeURIComponent(branch) : undefined function SelectorSection() { const { params, updateParams } = useLocationParams(defaultQueryParams) diff --git a/src/pages/RepoPage/FailedTestsTab/FailedTestsPage/hooks/useFlakeAggregates/useFlakeAggregates.test.tsx b/src/pages/RepoPage/FailedTestsTab/FailedTestsPage/hooks/useFlakeAggregates/useFlakeAggregates.test.tsx index 3e5f3e6151..9c7912a31e 100644 --- a/src/pages/RepoPage/FailedTestsTab/FailedTestsPage/hooks/useFlakeAggregates/useFlakeAggregates.test.tsx +++ b/src/pages/RepoPage/FailedTestsTab/FailedTestsPage/hooks/useFlakeAggregates/useFlakeAggregates.test.tsx @@ -75,7 +75,7 @@ describe('useFlakeAggregates', () => { isUnsuccessfulParseError = false, }) { server.use( - graphql.query('GetFlakeAggregates', (info) => { + graphql.query('GetFlakeAggregates', () => { if (isNotFoundError) { return HttpResponse.json({ data: mockNotFoundError }) } else if (isUnsuccessfulParseError) { diff --git a/src/pages/RepoPage/FailedTestsTab/FailedTestsPage/hooks/useInfiniteTestResults/useInfiniteTestResults.test.tsx b/src/pages/RepoPage/FailedTestsTab/FailedTestsPage/hooks/useInfiniteTestResults/useInfiniteTestResults.test.tsx index 647fa3b223..9116d141dd 100644 --- a/src/pages/RepoPage/FailedTestsTab/FailedTestsPage/hooks/useInfiniteTestResults/useInfiniteTestResults.test.tsx +++ b/src/pages/RepoPage/FailedTestsTab/FailedTestsPage/hooks/useInfiniteTestResults/useInfiniteTestResults.test.tsx @@ -139,7 +139,7 @@ describe('useInfiniteTestResults', () => { isNullOwner = false, }: SetupArgs) { server.use( - graphql.query('GetTestResults', (info) => { + graphql.query('GetTestResults', () => { if (isNotFoundError) { return HttpResponse.json({ data: mockNotFoundError }) } else if (isOwnerNotActivatedError) { @@ -236,7 +236,7 @@ describe('useInfiniteTestResults', () => { }) describe('returns NotFoundError __typename', () => { - let oldConsoleError = console.error + const oldConsoleError = console.error beforeEach(() => { console.error = () => null @@ -272,7 +272,7 @@ describe('useInfiniteTestResults', () => { }) describe('returns OwnerNotActivatedError __typename', () => { - let oldConsoleError = console.error + const oldConsoleError = console.error beforeEach(() => { console.error = () => null @@ -308,7 +308,7 @@ describe('useInfiniteTestResults', () => { }) describe('unsuccessful parse of zod schema', () => { - let oldConsoleError = console.error + const oldConsoleError = console.error beforeEach(() => { console.error = () => null diff --git a/src/pages/RepoPage/FailedTestsTab/FailedTestsPage/hooks/useInfiniteTestResults/useInfiniteTestResults.tsx b/src/pages/RepoPage/FailedTestsTab/FailedTestsPage/hooks/useInfiniteTestResults/useInfiniteTestResults.tsx index 6eb673144a..c3b26ac815 100644 --- a/src/pages/RepoPage/FailedTestsTab/FailedTestsPage/hooks/useInfiniteTestResults/useInfiniteTestResults.tsx +++ b/src/pages/RepoPage/FailedTestsTab/FailedTestsPage/hooks/useInfiniteTestResults/useInfiniteTestResults.tsx @@ -258,7 +258,7 @@ export const useInfiniteTestResults = ({ detail: (

Activation is required to view this repo, please{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} click here to activate your account.

diff --git a/src/pages/RepoPage/FailedTestsTab/FailedTestsPage/hooks/useTestResultsAggregates/useTestsResultsAggregates.test.tsx b/src/pages/RepoPage/FailedTestsTab/FailedTestsPage/hooks/useTestResultsAggregates/useTestsResultsAggregates.test.tsx index 94d8666917..269ad0dd4a 100644 --- a/src/pages/RepoPage/FailedTestsTab/FailedTestsPage/hooks/useTestResultsAggregates/useTestsResultsAggregates.test.tsx +++ b/src/pages/RepoPage/FailedTestsTab/FailedTestsPage/hooks/useTestResultsAggregates/useTestsResultsAggregates.test.tsx @@ -92,7 +92,7 @@ describe('useTestResultsAggregates', () => { isUnsuccessfulParseError = false, }) { server.use( - graphql.query('GetTestResultsAggregates', (info) => { + graphql.query('GetTestResultsAggregates', () => { if (isNotFoundError) { return HttpResponse.json({ data: mockNotFoundError }) } else if (isUnsuccessfulParseError) { diff --git a/src/pages/RepoPage/FailedTestsTab/FailedTestsPage/hooks/useTestResultsFlags/useTestResultsFlags.test.tsx b/src/pages/RepoPage/FailedTestsTab/FailedTestsPage/hooks/useTestResultsFlags/useTestResultsFlags.test.tsx index 051aca2ef6..2b85b295cf 100644 --- a/src/pages/RepoPage/FailedTestsTab/FailedTestsPage/hooks/useTestResultsFlags/useTestResultsFlags.test.tsx +++ b/src/pages/RepoPage/FailedTestsTab/FailedTestsPage/hooks/useTestResultsFlags/useTestResultsFlags.test.tsx @@ -68,7 +68,7 @@ describe('useTestResultsFlags', () => { isUnsuccessfulParseError = false, }) { server.use( - graphql.query('GetTestResultsFlags', (info) => { + graphql.query('GetTestResultsFlags', () => { if (isNotFoundError) { return HttpResponse.json({ data: mockNotFoundError }) } else if (isUnsuccessfulParseError) { diff --git a/src/pages/RepoPage/FailedTestsTab/FailedTestsPage/hooks/useTestResultsTestSuites/useTestResultsTestSuites.test.tsx b/src/pages/RepoPage/FailedTestsTab/FailedTestsPage/hooks/useTestResultsTestSuites/useTestResultsTestSuites.test.tsx index 7f2f314b74..aeb4fcccee 100644 --- a/src/pages/RepoPage/FailedTestsTab/FailedTestsPage/hooks/useTestResultsTestSuites/useTestResultsTestSuites.test.tsx +++ b/src/pages/RepoPage/FailedTestsTab/FailedTestsPage/hooks/useTestResultsTestSuites/useTestResultsTestSuites.test.tsx @@ -68,7 +68,7 @@ describe('useTestResultsTestSuites', () => { isUnsuccessfulParseError = false, }) { server.use( - graphql.query('GetTestResultsTestSuites', (info) => { + graphql.query('GetTestResultsTestSuites', () => { if (isNotFoundError) { return HttpResponse.json({ data: mockNotFoundError }) } else if (isUnsuccessfulParseError) { diff --git a/src/pages/RepoPage/FailedTestsTab/FailedTestsTab.test.tsx b/src/pages/RepoPage/FailedTestsTab/FailedTestsTab.test.tsx index a8d0e08ce7..a35a8030ba 100644 --- a/src/pages/RepoPage/FailedTestsTab/FailedTestsTab.test.tsx +++ b/src/pages/RepoPage/FailedTestsTab/FailedTestsTab.test.tsx @@ -129,7 +129,7 @@ describe('FailedTestsTab', () => { isPrivate?: boolean }) { server.use( - graphql.query('GetRepoOverview', (info) => { + graphql.query('GetRepoOverview', () => { if (testEnabled) { return HttpResponse.json({ data: mockRepoOverview({ diff --git a/src/pages/RepoPage/PullsTab/PullsTable/PullsTable.test.tsx b/src/pages/RepoPage/PullsTab/PullsTable/PullsTable.test.tsx index a34015da19..16448a2172 100644 --- a/src/pages/RepoPage/PullsTab/PullsTable/PullsTable.test.tsx +++ b/src/pages/RepoPage/PullsTab/PullsTable/PullsTable.test.tsx @@ -138,7 +138,7 @@ describe('PullsTable', () => { const queryClient = new QueryClient() server.use( - graphql.query('GetRepoOverview', (info) => { + graphql.query('GetRepoOverview', () => { return HttpResponse.json({ data: mockRepoOverview(bundleAnalysisEnabled), }) diff --git a/src/pages/RepoPage/PullsTab/PullsTable/PullsTable.tsx b/src/pages/RepoPage/PullsTab/PullsTable/PullsTable.tsx index 22d9fc88a0..569d93d481 100644 --- a/src/pages/RepoPage/PullsTab/PullsTable/PullsTable.tsx +++ b/src/pages/RepoPage/PullsTab/PullsTable/PullsTable.tsx @@ -85,11 +85,11 @@ export default function PullsTable() { repo, filters: { // useLocationParams needs to be updated to have full types - // @ts-expect-errors + // @ts-expect-error - type issues with useLocationParams state: params?.prStates, }, // useLocationParams needs to be updated to have full types - // @ts-expect-error + // @ts-expect-error - type issues with useLocationParams orderingDirection: params?.order, }) diff --git a/src/pages/RepoPage/RepoPage.test.tsx b/src/pages/RepoPage/RepoPage.test.tsx index 2992f70c86..f4316f92aa 100644 --- a/src/pages/RepoPage/RepoPage.test.tsx +++ b/src/pages/RepoPage/RepoPage.test.tsx @@ -245,7 +245,7 @@ describe('RepoPage', () => { }) server.use( - graphql.query('GetRepo', (info) => { + graphql.query('GetRepo', () => { if (hasRepoData) { return HttpResponse.json({ data: mockGetRepo({ @@ -261,7 +261,7 @@ describe('RepoPage', () => { return HttpResponse.json({ data: { owner: {} } }) }), - graphql.query('OwnerTier', (info) => { + graphql.query('OwnerTier', () => { if (tierValue === TierNames.TEAM) { return HttpResponse.json({ data: { owner: { plan: { tierName: TierNames.TEAM } } }, @@ -271,7 +271,7 @@ describe('RepoPage', () => { data: { owner: { plan: { tierName: TierNames.PRO } } }, }) }), - graphql.query('GetRepoOverview', (info) => { + graphql.query('GetRepoOverview', () => { return HttpResponse.json({ data: mockRepoOverview({ coverageEnabled, @@ -281,10 +281,10 @@ describe('RepoPage', () => { }), }) }), - graphql.query('DetailOwner', (info) => { + graphql.query('DetailOwner', () => { return HttpResponse.json({ data: { owner: mockOwner } }) }), - graphql.query('CurrentUser', (info) => { + graphql.query('CurrentUser', () => { return HttpResponse.json({ data: mockUser }) }) ) diff --git a/src/pages/RepoPage/RepoPageTabs.test.tsx b/src/pages/RepoPage/RepoPageTabs.test.tsx index 70cb7c0011..9c994a0b5d 100644 --- a/src/pages/RepoPage/RepoPageTabs.test.tsx +++ b/src/pages/RepoPage/RepoPageTabs.test.tsx @@ -123,7 +123,6 @@ interface SetupArgs { bundleAnalysisEnabled?: boolean tierName?: TTierNames isCurrentUserPartOfOrg?: boolean - componentTab?: boolean testAnalyticsEnabled?: boolean } @@ -135,11 +134,10 @@ describe('RepoPageTabs', () => { isRepoPrivate, tierName = TierNames.PRO, isCurrentUserPartOfOrg = true, - componentTab = true, testAnalyticsEnabled = false, }: SetupArgs) { server.use( - graphql.query('GetRepoOverview', (info) => { + graphql.query('GetRepoOverview', () => { return HttpResponse.json({ data: mockRepoOverview({ language, @@ -151,10 +149,10 @@ describe('RepoPageTabs', () => { }) }), - graphql.query('OwnerTier', (info) => { + graphql.query('OwnerTier', () => { return HttpResponse.json({ data: { owner: { plan: { tierName } } } }) }), - graphql.query('GetRepo', (info) => { + graphql.query('GetRepo', () => { return HttpResponse.json({ data: mockRepo({ isCurrentUserPartOfOrg }) }) }) ) @@ -446,7 +444,7 @@ describe('useRepoTabs', () => { isCurrentUserPartOfOrg = true, }: SetupArgs) { server.use( - graphql.query('GetRepoOverview', (info) => { + graphql.query('GetRepoOverview', () => { return HttpResponse.json({ data: mockRepoOverview({ language, @@ -457,10 +455,10 @@ describe('useRepoTabs', () => { }), }) }), - graphql.query('OwnerTier', (info) => { + graphql.query('OwnerTier', () => { return HttpResponse.json({ data: { owner: { plan: { tierName } } } }) }), - graphql.query('GetRepo', (info) => { + graphql.query('GetRepo', () => { return HttpResponse.json({ data: mockRepo({ isCurrentUserPartOfOrg }) }) }) ) diff --git a/src/pages/RepoPage/context.test.tsx b/src/pages/RepoPage/context.test.tsx index 312b03dbc8..30c9607e99 100644 --- a/src/pages/RepoPage/context.test.tsx +++ b/src/pages/RepoPage/context.test.tsx @@ -79,7 +79,7 @@ describe('Repo breadcrumb context', () => { const user = userEvent.setup() server.use( - graphql.query('GetRepo', (info) => { + graphql.query('GetRepo', () => { return HttpResponse.json({ data: { owner: { diff --git a/src/pages/RepoPage/hooks/useJSorTSPendoTracking.test.tsx b/src/pages/RepoPage/hooks/useJSorTSPendoTracking.test.tsx index 9ece228309..9499b70080 100644 --- a/src/pages/RepoPage/hooks/useJSorTSPendoTracking.test.tsx +++ b/src/pages/RepoPage/hooks/useJSorTSPendoTracking.test.tsx @@ -124,10 +124,10 @@ interface SetupArgs { describe('useJSorTSPendoTracking', () => { function setup({ enablePendo = false, language = 'javascript' }: SetupArgs) { server.use( - graphql.query('CurrentUser', (info) => { + graphql.query('CurrentUser', () => { return HttpResponse.json({ data: mockUser }) }), - graphql.query('GetRepoOverview', (info) => { + graphql.query('GetRepoOverview', () => { return HttpResponse.json({ data: mockOverview(language) }) }), graphql.query('DetailOwner', (info) => { diff --git a/src/pages/SyncProviderPage/SyncProviderPage.test.tsx b/src/pages/SyncProviderPage/SyncProviderPage.test.tsx index 0b46303bcc..292a1e9bbf 100644 --- a/src/pages/SyncProviderPage/SyncProviderPage.test.tsx +++ b/src/pages/SyncProviderPage/SyncProviderPage.test.tsx @@ -27,7 +27,7 @@ const queryClient = new QueryClient({ }) const server = setupServer() -let testLocation: { pathname: string } = { +const testLocation: { pathname: string } = { pathname: '', } @@ -77,10 +77,10 @@ describe('SyncProviderPage', () => { } ) { server.use( - http.get('/internal/user', (info) => { + http.get('/internal/user', () => { return HttpResponse.json(user) }), - graphql.query('GetSyncProviders', (info) => { + graphql.query('GetSyncProviders', () => { if (noSyncProviders) { return HttpResponse.json({ data: { diff --git a/src/pages/TermsOfService/TermsOfService.test.tsx b/src/pages/TermsOfService/TermsOfService.test.tsx index 502154ffce..048ab16f6e 100644 --- a/src/pages/TermsOfService/TermsOfService.test.tsx +++ b/src/pages/TermsOfService/TermsOfService.test.tsx @@ -105,7 +105,7 @@ describe('TermsOfService', () => { }) server.use( - http.get('/internal/user', (info) => { + http.get('/internal/user', () => { return HttpResponse.json({ ...mockedUserData, ...internalUserData }) }), graphql.mutation('SigningTermsAgreement', (info) => { diff --git a/src/pages/TermsOfService/TermsOfService.tsx b/src/pages/TermsOfService/TermsOfService.tsx index 82209f471b..1e1e1a290b 100644 --- a/src/pages/TermsOfService/TermsOfService.tsx +++ b/src/pages/TermsOfService/TermsOfService.tsx @@ -195,7 +195,7 @@ export default function TermsOfService() {
{ function setup({ apiError = false }: SetupArgs = { apiError: false }) { server.use( - graphql.mutation('SigningTermsAgreement', (info) => { + graphql.mutation('SigningTermsAgreement', () => { if (apiError) { return HttpResponse.json( { errors: [{ message: 'error' }] }, @@ -63,7 +63,7 @@ describe('useSaveTermsAgreement', () => { } return HttpResponse.json({}) }), - graphql.query('CurrentUser', (info) => { + graphql.query('CurrentUser', () => { return HttpResponse.json({ data: { me: { username: '123' } } }) }) ) diff --git a/src/sentry.ts b/src/sentry.ts index 826488b7a0..6228b7e90c 100644 --- a/src/sentry.ts +++ b/src/sentry.ts @@ -127,7 +127,9 @@ export const setupSentry = ({ if (!tracePropagationTargets.includes(hostname)) { tracePropagationTargets.push(hostname) } - } catch {} + } catch { + // do nothing + } Sentry.init({ dsn: config.SENTRY_DSN, diff --git a/src/services/access/useDeleteSession.test.tsx b/src/services/access/useDeleteSession.test.tsx index d41de2d3c9..12234dc190 100644 --- a/src/services/access/useDeleteSession.test.tsx +++ b/src/services/access/useDeleteSession.test.tsx @@ -37,7 +37,7 @@ afterAll(() => { describe('useDeleteSession', () => { function setup() { server.use( - graphql.mutation('DeleteSession', (info) => { + graphql.mutation('DeleteSession', () => { return HttpResponse.json({ data: { deleteSession: { error: null } } }) }) ) diff --git a/src/services/access/useDeleteSession.ts b/src/services/access/useDeleteSession.ts index 7bc6366206..05f2ad4155 100644 --- a/src/services/access/useDeleteSession.ts +++ b/src/services/access/useDeleteSession.ts @@ -26,7 +26,7 @@ export function useDeleteSession({ provider }: UseDeleteSessionArgs) { query, variables, mutationPath: 'deleteSession', - }).then((res) => { + }).then(() => { queryClient.invalidateQueries(['sessions']) }) }, diff --git a/src/services/access/useGenerateUserToken.test.tsx b/src/services/access/useGenerateUserToken.test.tsx index 87029c0f63..563c5ea7a0 100644 --- a/src/services/access/useGenerateUserToken.test.tsx +++ b/src/services/access/useGenerateUserToken.test.tsx @@ -37,7 +37,7 @@ afterAll(() => { describe('useGenerateUserToken', () => { function setup() { server.use( - graphql.mutation(`CreateUserToken`, (info) => { + graphql.mutation(`CreateUserToken`, () => { return HttpResponse.json({ data: { createUserToken: { diff --git a/src/services/access/useRevokeUserToken.test.tsx b/src/services/access/useRevokeUserToken.test.tsx index 4011bfa769..e82b9fab9c 100644 --- a/src/services/access/useRevokeUserToken.test.tsx +++ b/src/services/access/useRevokeUserToken.test.tsx @@ -40,7 +40,7 @@ interface SetupArgs { describe('useRevokeUserToken', () => { function setup(dataReturned: SetupArgs) { server.use( - graphql.mutation('RevokeUserToken', (info) => { + graphql.mutation('RevokeUserToken', () => { return HttpResponse.json({ data: dataReturned }) }) ) diff --git a/src/services/access/useRevokeUserToken.ts b/src/services/access/useRevokeUserToken.ts index b834e7b17b..b5130708f2 100644 --- a/src/services/access/useRevokeUserToken.ts +++ b/src/services/access/useRevokeUserToken.ts @@ -22,7 +22,7 @@ export function useRevokeUserToken({ provider }: { provider: string }) { input: { tokenid }, }, mutationPath: 'revokeUserToken', - }).then((res) => { + }).then(() => { queryClient.invalidateQueries(['sessions']) }) }, diff --git a/src/services/access/useSessions.test.tsx b/src/services/access/useSessions.test.tsx index 7709859d71..ce58ca935b 100644 --- a/src/services/access/useSessions.test.tsx +++ b/src/services/access/useSessions.test.tsx @@ -109,7 +109,7 @@ describe('useSessions', () => { dataReturned = { me: null }, }: SetupArgs) { server.use( - graphql.query('MySessions', (info) => { + graphql.query('MySessions', () => { if (isUnsuccessfulParseError) { return HttpResponse.json({ data: {} }) } diff --git a/src/services/account/useAccountDetails.test.tsx b/src/services/account/useAccountDetails.test.tsx index a09d5f75de..18081b27a1 100644 --- a/src/services/account/useAccountDetails.test.tsx +++ b/src/services/account/useAccountDetails.test.tsx @@ -47,7 +47,7 @@ afterAll(() => { describe('useAccountDetails', () => { function setup() { server.use( - http.get(`/internal/${provider}/${owner}/account-details/`, (info) => { + http.get(`/internal/${provider}/${owner}/account-details/`, () => { return HttpResponse.json(accountDetailsObject) }) ) diff --git a/src/services/account/useAutoActivate.test.jsx b/src/services/account/useAutoActivate.test.jsx index f4a9285e49..783798f4a2 100644 --- a/src/services/account/useAutoActivate.test.jsx +++ b/src/services/account/useAutoActivate.test.jsx @@ -45,12 +45,9 @@ describe('useAutoActivate', () => { describe('options is set', () => { function setup() { server.use( - http.patch( - `/internal/${provider}/${owner}/account-details/`, - (info) => { - return HttpResponse.json({}) - } - ) + http.patch(`/internal/${provider}/${owner}/account-details/`, () => { + return HttpResponse.json({}) + }) ) } @@ -113,12 +110,9 @@ describe('useAutoActivate', () => { describe('opts is not set', () => { function setup() { server.use( - http.patch( - `/internal/${provider}/${owner}/account-details/`, - (info) => { - return HttpResponse.json({}) - } - ) + http.patch(`/internal/${provider}/${owner}/account-details/`, () => { + return HttpResponse.json({}) + }) ) } diff --git a/src/services/account/useAvailablePlans.test.tsx b/src/services/account/useAvailablePlans.test.tsx index 4924fa8653..2e204985f3 100644 --- a/src/services/account/useAvailablePlans.test.tsx +++ b/src/services/account/useAvailablePlans.test.tsx @@ -140,7 +140,7 @@ describe('useAvailablePlans', () => { isNullOwner = false, }: SetupArgs) { server.use( - graphql.query('GetAvailablePlans', (info) => { + graphql.query('GetAvailablePlans', () => { if (isUnsuccessfulParseError) { return HttpResponse.json({ data: mockUnsuccessfulParseError }) } else if (isNullOwner) { diff --git a/src/services/account/useEraseAccount.test.jsx b/src/services/account/useEraseAccount.test.jsx index d7307e8864..ad5f283f5a 100644 --- a/src/services/account/useEraseAccount.test.jsx +++ b/src/services/account/useEraseAccount.test.jsx @@ -42,7 +42,7 @@ afterAll(() => { describe('useEraseAccount', () => { function setup() { server.use( - http.delete(`/internal/${provider}/${owner}/account-details/`, (info) => { + http.delete(`/internal/${provider}/${owner}/account-details/`, () => { return HttpResponse.json({}) }) ) diff --git a/src/services/account/useInvoice.test.tsx b/src/services/account/useInvoice.test.tsx index 29417a7aa9..4c7d94fb79 100644 --- a/src/services/account/useInvoice.test.tsx +++ b/src/services/account/useInvoice.test.tsx @@ -41,7 +41,7 @@ afterAll(() => { describe('useInvoice', () => { function setup(hasError = false) { server.use( - graphql.query('Invoice', (info) => { + graphql.query('Invoice', () => { if (hasError) { return HttpResponse.json({ data: {} }) } diff --git a/src/services/account/useInvoices.test.tsx b/src/services/account/useInvoices.test.tsx index de1212a2e2..f464276831 100644 --- a/src/services/account/useInvoices.test.tsx +++ b/src/services/account/useInvoices.test.tsx @@ -46,7 +46,7 @@ describe('useInvoices', () => { function setup(hasError = false) { server.use( - graphql.query('Invoices', (info) => { + graphql.query('Invoices', () => { if (hasError) { return HttpResponse.json({ data: {} }) } diff --git a/src/services/account/usePlanData.test.tsx b/src/services/account/usePlanData.test.tsx index 333090e425..541aac1e7a 100644 --- a/src/services/account/usePlanData.test.tsx +++ b/src/services/account/usePlanData.test.tsx @@ -59,7 +59,7 @@ afterAll(() => { describe('usePlanData', () => { function setup({ trialData }: { trialData: any }) { server.use( - graphql.query('GetPlanData', (info) => { + graphql.query('GetPlanData', () => { return HttpResponse.json({ data: { owner: { ...trialData } } }) }) ) diff --git a/src/services/account/useSentryToken.test.tsx b/src/services/account/useSentryToken.test.tsx index 46c5db9daa..daf71c8047 100644 --- a/src/services/account/useSentryToken.test.tsx +++ b/src/services/account/useSentryToken.test.tsx @@ -75,7 +75,7 @@ describe('useSentryToken', () => { const mockRemoveItem = vi.spyOn(window.localStorage.__proto__, 'removeItem') server.use( - graphql.mutation('SendSentryToken', (info) => { + graphql.mutation('SendSentryToken', () => { if (isValidationError) { return HttpResponse.json({ data: { diff --git a/src/services/account/useUpdateBillingEmail.ts b/src/services/account/useUpdateBillingEmail.ts index 4004248dc7..27a1875d00 100644 --- a/src/services/account/useUpdateBillingEmail.ts +++ b/src/services/account/useUpdateBillingEmail.ts @@ -23,7 +23,7 @@ export function useUpdateBillingEmail({ provider, owner }: UsePlanDataArgs) { } return Api.patch({ path, provider, body }) }, - onSuccess: (data) => { + onSuccess: () => { queryClient.invalidateQueries(['accountDetails']) }, }) diff --git a/src/services/account/useUpdateCard.test.tsx b/src/services/account/useUpdateCard.test.tsx index fdcc31c7ac..74c27764b6 100644 --- a/src/services/account/useUpdateCard.test.tsx +++ b/src/services/account/useUpdateCard.test.tsx @@ -91,7 +91,7 @@ describe('useUpdateCard', () => { server.use( http.patch( `/internal/${provider}/${owner}/account-details/update_payment`, - (info) => { + () => { return HttpResponse.json(accountDetails) } ) @@ -127,7 +127,7 @@ describe('useUpdateCard', () => { server.use( http.patch( `/internal/${provider}/${owner}/account-details/update_payment`, - (info) => { + () => { return HttpResponse.json(accountDetails) } ) diff --git a/src/services/account/useUpdateSelfHostedSettings.test.tsx b/src/services/account/useUpdateSelfHostedSettings.test.tsx index 38ffe9b811..e6e053d06f 100644 --- a/src/services/account/useUpdateSelfHostedSettings.test.tsx +++ b/src/services/account/useUpdateSelfHostedSettings.test.tsx @@ -55,7 +55,7 @@ describe('updateSelfHostedSettings', () => { mocks.useAddNotification.mockReturnValue(mockAddToast) server.use( - graphql.mutation('UpdateSelfHostedSettings', (info) => { + graphql.mutation('UpdateSelfHostedSettings', () => { if (isValidationError) { return HttpResponse.json({ data: { diff --git a/src/services/account/useUpgradePlan.test.tsx b/src/services/account/useUpgradePlan.test.tsx index 342edb8cd1..3338c1b5f3 100644 --- a/src/services/account/useUpgradePlan.test.tsx +++ b/src/services/account/useUpgradePlan.test.tsx @@ -84,15 +84,12 @@ describe('useUpgradePlan', () => { describe('when called', () => { beforeEach(() => { server.use( - http.patch( - `/internal/${provider}/${owner}/account-details/`, - (info) => { - return HttpResponse.json({ - ...accountDetails, - checkoutSessionId: '1234', - }) - } - ) + http.patch(`/internal/${provider}/${owner}/account-details/`, () => { + return HttpResponse.json({ + ...accountDetails, + checkoutSessionId: '1234', + }) + }) ) }) @@ -129,15 +126,12 @@ describe('useUpgradePlan', () => { describe('when calling the mutation, which does not return a checkoutSessionId', () => { beforeEach(() => { server.use( - http.patch( - `/internal/${provider}/${owner}/account-details/`, - (info) => { - return HttpResponse.json({ - ...accountDetails, - checkoutSessionId: null, - }) - } - ) + http.patch(`/internal/${provider}/${owner}/account-details/`, () => { + return HttpResponse.json({ + ...accountDetails, + checkoutSessionId: null, + }) + }) ) }) diff --git a/src/services/ats/useRepoATS.test.tsx b/src/services/ats/useRepoATS.test.tsx index 5131dabde4..b3d4bd2121 100644 --- a/src/services/ats/useRepoATS.test.tsx +++ b/src/services/ats/useRepoATS.test.tsx @@ -76,7 +76,7 @@ describe('RepoATSInfo', () => { isNullOwner = false, }: SetupArgs) { server.use( - graphql.query('RepoATSInfo', (info) => { + graphql.query('RepoATSInfo', () => { if (isNotFoundError) { return HttpResponse.json({ data: mockNotFoundError }) } else if (isOwnerNotActivatedError) { @@ -145,7 +145,7 @@ describe('RepoATSInfo', () => { }) describe('returns NotFoundError __typename', () => { - let oldConsoleError = console.error + const oldConsoleError = console.error beforeEach(() => { console.error = () => null @@ -180,7 +180,7 @@ describe('RepoATSInfo', () => { }) describe('returns OwnerNotActivatedError __typename', () => { - let oldConsoleError = console.error + const oldConsoleError = console.error beforeEach(() => { console.error = () => null @@ -215,7 +215,7 @@ describe('RepoATSInfo', () => { }) describe('unsuccessful parse of zod schema', () => { - let oldConsoleError = console.error + const oldConsoleError = console.error beforeEach(() => { console.error = () => null diff --git a/src/services/branches/useBranch.test.tsx b/src/services/branches/useBranch.test.tsx index 62eb9584ce..1297ac2212 100644 --- a/src/services/branches/useBranch.test.tsx +++ b/src/services/branches/useBranch.test.tsx @@ -81,7 +81,7 @@ describe('useBranch', () => { isNullOwner = false, }: SetupArgs) { server.use( - graphql.query('GetBranch', (info) => { + graphql.query('GetBranch', () => { if (isNotFoundError) { return HttpResponse.json({ data: mockNotFoundError }) } else if (isOwnerNotActivatedError) { diff --git a/src/services/branches/useBranch.tsx b/src/services/branches/useBranch.tsx index 14e0222b94..2e8e8316c3 100644 --- a/src/services/branches/useBranch.tsx +++ b/src/services/branches/useBranch.tsx @@ -117,7 +117,7 @@ export const useBranch = ({ detail: (

Activation is required to view this repo, please{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} click here to activate your account.

diff --git a/src/services/branches/useBranchComponents.test.tsx b/src/services/branches/useBranchComponents.test.tsx index 065fcc2ce6..31823bb874 100644 --- a/src/services/branches/useBranchComponents.test.tsx +++ b/src/services/branches/useBranchComponents.test.tsx @@ -119,7 +119,7 @@ describe('useBranchComponents', () => { isFiltered = false, }: SetupArgs) { server.use( - graphql.query('GetBranchComponents', (info) => { + graphql.query('GetBranchComponents', () => { if (isNotFoundError) { return HttpResponse.json({ data: mockNotFoundError }) } else if (isOwnerNotActivatedError) { diff --git a/src/services/branches/useBranchComponents.tsx b/src/services/branches/useBranchComponents.tsx index 841507af47..a2c351a9a1 100644 --- a/src/services/branches/useBranchComponents.tsx +++ b/src/services/branches/useBranchComponents.tsx @@ -139,7 +139,7 @@ export const useBranchComponents = ({ detail: (

Activation is required to view this repo, please{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} click here to activate your account.

diff --git a/src/services/branches/useBranchHasCommits.test.tsx b/src/services/branches/useBranchHasCommits.test.tsx index df1c2a6433..84b4554203 100644 --- a/src/services/branches/useBranchHasCommits.test.tsx +++ b/src/services/branches/useBranchHasCommits.test.tsx @@ -113,7 +113,7 @@ describe('useBranchHasCommits', () => { commitsIsNull = false, }: SetupArgs) { server.use( - graphql.query('GetBranchCommits', (info) => { + graphql.query('GetBranchCommits', () => { if (isNotFoundError) { return HttpResponse.json({ data: mockNotFoundError }) } else if (isOwnerNotActivatedError) { diff --git a/src/services/branches/useBranchHasCommits.tsx b/src/services/branches/useBranchHasCommits.tsx index 48566c3d2d..c88da565a8 100644 --- a/src/services/branches/useBranchHasCommits.tsx +++ b/src/services/branches/useBranchHasCommits.tsx @@ -120,7 +120,7 @@ export const useBranchHasCommits = ({ detail: (

Activation is required to view this repo, please{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} click here to activate your account.

diff --git a/src/services/branches/useBranches.test.tsx b/src/services/branches/useBranches.test.tsx index 00c29e9564..cd18a6c7f4 100644 --- a/src/services/branches/useBranches.test.tsx +++ b/src/services/branches/useBranches.test.tsx @@ -97,7 +97,7 @@ describe('GetBranches', () => { return HttpResponse.json({ data: mockNullOwnerData }) } - const branchData = !!info.variables?.after ? branch2 : branch1 + const branchData = info.variables?.after ? branch2 : branch1 const hasNextPage = info.variables?.after ? false : true const endCursor = info.variables?.after ? 'second' : 'first' diff --git a/src/services/branches/useBranches.tsx b/src/services/branches/useBranches.tsx index 4aebbff235..711aa5a57f 100644 --- a/src/services/branches/useBranches.tsx +++ b/src/services/branches/useBranches.tsx @@ -167,7 +167,7 @@ export function useBranches({ detail: (

Activation is required to view this repo, please{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} click here to activate your account.

@@ -178,7 +178,7 @@ export function useBranches({ } const edges = data?.owner?.repository?.branches?.edges - let branches: Branch[] = [] + const branches: Branch[] = [] if (isArray(edges)) { for (const edge of edges) { if (edge?.node) { diff --git a/src/services/bundleAnalysis/BranchBundlesNamesQueryOpts.tsx b/src/services/bundleAnalysis/BranchBundlesNamesQueryOpts.tsx index 2f13591f64..2154f774a0 100644 --- a/src/services/bundleAnalysis/BranchBundlesNamesQueryOpts.tsx +++ b/src/services/bundleAnalysis/BranchBundlesNamesQueryOpts.tsx @@ -150,7 +150,7 @@ export const BranchBundlesNamesQueryOpts = ({ detail: (

Activation is required to view this repo, please{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} click here to activate your account.

diff --git a/src/services/bundleAnalysis/BundleTrendDataQueryOpts.test.tsx b/src/services/bundleAnalysis/BundleTrendDataQueryOpts.test.tsx index 1d8ad31506..2ee66719d7 100644 --- a/src/services/bundleAnalysis/BundleTrendDataQueryOpts.test.tsx +++ b/src/services/bundleAnalysis/BundleTrendDataQueryOpts.test.tsx @@ -141,7 +141,7 @@ describe('useBundleTrendData', () => { isUnsuccessfulParseError, }: SetupArgs) { server.use( - graphql.query('GetBundleTrend', (info) => { + graphql.query('GetBundleTrend', () => { if (isNotFoundError) { return HttpResponse.json({ data: mockRepoNotFound }) } else if (isOwnerNotActivatedError) { diff --git a/src/services/bundleAnalysis/BundleTrendDataQueryOpts.tsx b/src/services/bundleAnalysis/BundleTrendDataQueryOpts.tsx index 9566a8724f..6a8e9b7f9e 100644 --- a/src/services/bundleAnalysis/BundleTrendDataQueryOpts.tsx +++ b/src/services/bundleAnalysis/BundleTrendDataQueryOpts.tsx @@ -218,7 +218,7 @@ export const BundleTrendDataQueryOpts = ({ detail: (

Activation is required to view this repo, please{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} click here to activate your account.

diff --git a/src/services/bundleAnalysis/useBranchBundleSummary.test.tsx b/src/services/bundleAnalysis/useBranchBundleSummary.test.tsx index 9f30073058..d081a00e08 100644 --- a/src/services/bundleAnalysis/useBranchBundleSummary.test.tsx +++ b/src/services/bundleAnalysis/useBranchBundleSummary.test.tsx @@ -149,7 +149,7 @@ describe('useBranchBundleSummary', () => { return HttpResponse.json({ data: mockBranchBundleSummary }) }), - graphql.query('GetRepoOverview', (info) => { + graphql.query('GetRepoOverview', () => { return HttpResponse.json({ data: mockRepoOverview }) }) ) diff --git a/src/services/bundleAnalysis/useBranchBundleSummary.tsx b/src/services/bundleAnalysis/useBranchBundleSummary.tsx index 39120b4fef..be233a39e9 100644 --- a/src/services/bundleAnalysis/useBranchBundleSummary.tsx +++ b/src/services/bundleAnalysis/useBranchBundleSummary.tsx @@ -184,7 +184,7 @@ export const BranchBundleSummaryQueryOpts = ({ detail: (

Activation is required to view this repo, please{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} click here to activate your account.

diff --git a/src/services/bundleAnalysis/useBundleAssetModules.tsx b/src/services/bundleAnalysis/useBundleAssetModules.tsx index 6cbcf3258f..c39a3a0abb 100644 --- a/src/services/bundleAnalysis/useBundleAssetModules.tsx +++ b/src/services/bundleAnalysis/useBundleAssetModules.tsx @@ -202,7 +202,7 @@ export const BundleAssetModulesQueryOpts = ({ detail: (

Activation is required to view this repo, please{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} click here to activate your account.

diff --git a/src/services/bundleAnalysis/useBundleAssets.tsx b/src/services/bundleAnalysis/useBundleAssets.tsx index f9e005ca51..ba838ab9e1 100644 --- a/src/services/bundleAnalysis/useBundleAssets.tsx +++ b/src/services/bundleAnalysis/useBundleAssets.tsx @@ -299,7 +299,7 @@ export const BundleAssetsQueryOpts = ({ detail: (

Activation is required to view this repo, please{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} click here to activate your account.

diff --git a/src/services/bundleAnalysis/useBundleSummary.test.tsx b/src/services/bundleAnalysis/useBundleSummary.test.tsx index 9012b77c7a..2a8d8b440e 100644 --- a/src/services/bundleAnalysis/useBundleSummary.test.tsx +++ b/src/services/bundleAnalysis/useBundleSummary.test.tsx @@ -162,7 +162,7 @@ describe('useBundleSummary', () => { return HttpResponse.json({ data: mockBundleSummary }) }), - graphql.query('GetRepoOverview', (info) => { + graphql.query('GetRepoOverview', () => { return HttpResponse.json({ data: mockRepoOverview }) }) ) diff --git a/src/services/bundleAnalysis/useBundleSummary.tsx b/src/services/bundleAnalysis/useBundleSummary.tsx index 925d330361..4702e5934b 100644 --- a/src/services/bundleAnalysis/useBundleSummary.tsx +++ b/src/services/bundleAnalysis/useBundleSummary.tsx @@ -180,7 +180,7 @@ export const BundleSummaryQueryOpts = ({ detail: (

Activation is required to view this repo, please{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} click here to activate your account.

diff --git a/src/services/charts/mocks.ts b/src/services/charts/mocks.ts index e59f73eba3..db5654362c 100644 --- a/src/services/charts/mocks.ts +++ b/src/services/charts/mocks.ts @@ -3,11 +3,11 @@ import { http, HttpResponse } from 'msw' const repoUri = '/internal/charts/:provider/:owner/coverage/repository' -export const repoCoverageHandler = http.post(repoUri, (info) => { +export const repoCoverageHandler = http.post(repoUri, () => { return HttpResponse.json(exampleYearlyRes) }) -export const repoCoverageHandler404 = http.post(repoUri, (info) => { +export const repoCoverageHandler404 = http.post(repoUri, () => { return HttpResponse.json({}, { status: 404 }) }) diff --git a/src/services/charts/useBranchCoverageMeasurements.test.tsx b/src/services/charts/useBranchCoverageMeasurements.test.tsx index 0b1a251897..d77150eef8 100644 --- a/src/services/charts/useBranchCoverageMeasurements.test.tsx +++ b/src/services/charts/useBranchCoverageMeasurements.test.tsx @@ -97,7 +97,7 @@ describe('useBranchCoverageMeasurements', () => { isNullOwner = false, }: SetupArgs) { server.use( - graphql.query('GetBranchCoverageMeasurements', (info) => { + graphql.query('GetBranchCoverageMeasurements', () => { if (isNotFoundError) { return HttpResponse.json({ data: mockNotFoundError }) } else if (isOwnerNotActivatedError) { diff --git a/src/services/charts/useBranchCoverageMeasurements.tsx b/src/services/charts/useBranchCoverageMeasurements.tsx index a1e8a9937a..35d4265439 100644 --- a/src/services/charts/useBranchCoverageMeasurements.tsx +++ b/src/services/charts/useBranchCoverageMeasurements.tsx @@ -157,7 +157,7 @@ export const useBranchCoverageMeasurements = ({ detail: (

Activation is required to view this repo, please{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} click here to activate your account.

diff --git a/src/services/charts/useReposCoverageMeasurements.test.tsx b/src/services/charts/useReposCoverageMeasurements.test.tsx index 28d9dcc218..8b502fc334 100644 --- a/src/services/charts/useReposCoverageMeasurements.test.tsx +++ b/src/services/charts/useReposCoverageMeasurements.test.tsx @@ -49,7 +49,7 @@ interface SetupArgs { describe('useReposCoverageMeasurements', () => { function setup({ hasNoData = false, hasParsingError = false }: SetupArgs) { server.use( - graphql.query('GetReposCoverageMeasurements', (info) => { + graphql.query('GetReposCoverageMeasurements', () => { if (hasNoData) { return HttpResponse.json({ data: { owner: null } }) } else if (hasParsingError) { diff --git a/src/services/charts/useReposCoverageMeasurements.ts b/src/services/charts/useReposCoverageMeasurements.ts index 163582a94e..9f9fe38dc7 100644 --- a/src/services/charts/useReposCoverageMeasurements.ts +++ b/src/services/charts/useReposCoverageMeasurements.ts @@ -109,6 +109,6 @@ export const useReposCoverageMeasurements = ({ measurements: parsedData.data?.owner?.measurements ?? null, } }), - ...(!!opts ? opts : {}), + ...(opts ? opts : {}), }) } diff --git a/src/services/codecovAI/useCodecovAIInstallation.test.tsx b/src/services/codecovAI/useCodecovAIInstallation.test.tsx index 00c87db5b7..3cb42bdde3 100644 --- a/src/services/codecovAI/useCodecovAIInstallation.test.tsx +++ b/src/services/codecovAI/useCodecovAIInstallation.test.tsx @@ -46,7 +46,7 @@ interface SetupArgs { describe('useCodecovAIInstallation', () => { function setup({ isUnsuccessfulParseError = false }: SetupArgs) { server.use( - graphql.query('GetCodecovAIAppInstallInfo', (info) => { + graphql.query('GetCodecovAIAppInstallInfo', () => { if (isUnsuccessfulParseError) { return HttpResponse.json({ data: mockUnsuccessfulParseError }) } @@ -76,7 +76,7 @@ describe('useCodecovAIInstallation', () => { }) describe('unsuccessful parse of zod schema', () => { - let oldConsoleError = console.error + const oldConsoleError = console.error beforeEach(() => { console.error = () => null diff --git a/src/services/codecovAI/useCodecovAIInstalledRepos.test.tsx b/src/services/codecovAI/useCodecovAIInstalledRepos.test.tsx index b0391de68b..8ae5e9c469 100644 --- a/src/services/codecovAI/useCodecovAIInstalledRepos.test.tsx +++ b/src/services/codecovAI/useCodecovAIInstalledRepos.test.tsx @@ -46,7 +46,7 @@ interface SetupArgs { describe('useCodecovAIInstalledRepos', () => { function setup({ isUnsuccessfulParseError = false }: SetupArgs) { server.use( - graphql.query('GetCodecovAIInstalledRepos', (info) => { + graphql.query('GetCodecovAIInstalledRepos', () => { if (isUnsuccessfulParseError) { return HttpResponse.json({ data: mockUnsuccessfulParseError }) } @@ -76,7 +76,7 @@ describe('useCodecovAIInstalledRepos', () => { }) describe('unsuccessful parse of zod schema', () => { - let oldConsoleError = console.error + const oldConsoleError = console.error beforeEach(() => { console.error = () => null diff --git a/src/services/codecovEventMetrics/useStoreCodecovEventMetric.test.tsx b/src/services/codecovEventMetrics/useStoreCodecovEventMetric.test.tsx index 13b74464b7..b8b82fafd5 100644 --- a/src/services/codecovEventMetrics/useStoreCodecovEventMetric.test.tsx +++ b/src/services/codecovEventMetrics/useStoreCodecovEventMetric.test.tsx @@ -54,7 +54,7 @@ describe('useStoreCodecovEventMetric', () => { const mockGetItem = vi.spyOn(window.localStorage.__proto__, 'getItem') server.use( - graphql.mutation('storeEventMetric', (info) => { + graphql.mutation('storeEventMetric', () => { return HttpResponse.json({ data: { storeEventMetric: null } }) }) ) diff --git a/src/services/commit/mocks.ts b/src/services/commit/mocks.ts index 12cc9161fa..844d5c41f0 100644 --- a/src/services/commit/mocks.ts +++ b/src/services/commit/mocks.ts @@ -1,6 +1,6 @@ import { graphql, HttpResponse } from 'msw' -export const commitErrored = graphql.query('Commit', (info) => { +export const commitErrored = graphql.query('Commit', () => { return HttpResponse.json({ data: { owner: { @@ -57,7 +57,7 @@ export const commitOnePending = graphql.query('Commit', (info) => { }) }) -export const commitOneCarriedForward = graphql.query('Commit', (info) => { +export const commitOneCarriedForward = graphql.query('Commit', () => { return HttpResponse.json({ data: { owner: { @@ -93,7 +93,7 @@ export const commitOneCarriedForward = graphql.query('Commit', (info) => { }) }) -export const commitEmptyUploads = graphql.query('Commit', (info) => { +export const commitEmptyUploads = graphql.query('Commit', () => { return HttpResponse.json({ data: { owner: { @@ -106,7 +106,7 @@ export const commitEmptyUploads = graphql.query('Commit', (info) => { }) }) -export const compareTotalsEmpty = graphql.query('CompareTotals', (info) => { +export const compareTotalsEmpty = graphql.query('CompareTotals', () => { return HttpResponse.json({ data: { owner: null } }) }) diff --git a/src/services/commit/useCommit.test.tsx b/src/services/commit/useCommit.test.tsx index 59683d6b7d..d66154759e 100644 --- a/src/services/commit/useCommit.test.tsx +++ b/src/services/commit/useCommit.test.tsx @@ -304,7 +304,7 @@ describe('useCommit', () => { return HttpResponse.json({ data: dataToReturn }) } }), - graphql.query(`CompareTotals`, (info) => { + graphql.query(`CompareTotals`, () => { if (skipPolling) { return HttpResponse.json({ data: { owner: null } }) } @@ -640,10 +640,10 @@ describe('useCommit polling', () => { function setup() { nbCallCompare = 0 server.use( - graphql.query(`Commit`, (info) => { + graphql.query(`Commit`, () => { return HttpResponse.json({ data: dataReturned }) }), - graphql.query(`CompareTotals`, (info) => { + graphql.query(`CompareTotals`, () => { nbCallCompare++ // after 10 calls, the server returns that the commit is processed if (nbCallCompare < 1) { diff --git a/src/services/commit/useCommit.tsx b/src/services/commit/useCommit.tsx index 51ebbd3c4f..5214598e7f 100644 --- a/src/services/commit/useCommit.tsx +++ b/src/services/commit/useCommit.tsx @@ -381,7 +381,7 @@ export function useCommit({ detail: (

Activation is required to view this repo, please{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} click here to activate your account.

diff --git a/src/services/commit/useCommitBADropdownSummary.test.tsx b/src/services/commit/useCommitBADropdownSummary.test.tsx index 35a7a97449..61971153ca 100644 --- a/src/services/commit/useCommitBADropdownSummary.test.tsx +++ b/src/services/commit/useCommitBADropdownSummary.test.tsx @@ -93,7 +93,7 @@ describe('useCommitBADropdownSummary', () => { isOwnerNotActivatedError = false, }: SetupArgs = {}) { server.use( - graphql.query('CommitBADropdownSummary', (info) => { + graphql.query('CommitBADropdownSummary', () => { if (isNotFoundError) { return HttpResponse.json({ data: mockNotFoundError }) } else if (isOwnerNotActivatedError) { @@ -168,7 +168,7 @@ describe('useCommitBADropdownSummary', () => { }) describe('unsuccessful parse of zod schema', () => { - let oldConsoleError = console.error + const oldConsoleError = console.error beforeEach(() => { console.error = () => null @@ -204,7 +204,7 @@ describe('useCommitBADropdownSummary', () => { }) describe('returns NotFoundError __typename', () => { - let oldConsoleError = console.error + const oldConsoleError = console.error beforeEach(() => { console.error = () => null @@ -240,7 +240,7 @@ describe('useCommitBADropdownSummary', () => { }) describe('returns OwnerNotActivatedError __typename', () => { - let oldConsoleError = console.error + const oldConsoleError = console.error beforeEach(() => { console.error = () => null diff --git a/src/services/commit/useCommitBADropdownSummary.tsx b/src/services/commit/useCommitBADropdownSummary.tsx index a1c07ebbc2..16573f6560 100644 --- a/src/services/commit/useCommitBADropdownSummary.tsx +++ b/src/services/commit/useCommitBADropdownSummary.tsx @@ -171,7 +171,7 @@ export function useCommitBADropdownSummary({ detail: (

Activation is required to view this repo, please{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} click here to activate your account.

diff --git a/src/services/commit/useCommitBundleList.test.tsx b/src/services/commit/useCommitBundleList.test.tsx index 59ad639215..057500c8f5 100644 --- a/src/services/commit/useCommitBundleList.test.tsx +++ b/src/services/commit/useCommitBundleList.test.tsx @@ -128,7 +128,7 @@ describe('useCommitBundleList', () => { isOwnerNotActivatedError = false, }: SetupArgs = {}) { server.use( - graphql.query('CommitBundleList', (info) => { + graphql.query('CommitBundleList', () => { if (isNotFoundError) { return HttpResponse.json({ data: mockNotFoundError }) } else if (isOwnerNotActivatedError) { diff --git a/src/services/commit/useCommitBundleList.tsx b/src/services/commit/useCommitBundleList.tsx index 68bd0147e5..094216def6 100644 --- a/src/services/commit/useCommitBundleList.tsx +++ b/src/services/commit/useCommitBundleList.tsx @@ -193,7 +193,7 @@ export function useCommitBundleList({ detail: (

Activation is required to view this repo, please{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} click here to activate your account.

diff --git a/src/services/commit/useCommitComponents.test.tsx b/src/services/commit/useCommitComponents.test.tsx index 668ac86d5d..860733b8b7 100644 --- a/src/services/commit/useCommitComponents.test.tsx +++ b/src/services/commit/useCommitComponents.test.tsx @@ -89,7 +89,7 @@ describe('useCommitComponents', () => { isOwnerNotActivatedError = false, }: SetupArgs = {}) { server.use( - graphql.query('CommitComponents', (info) => { + graphql.query('CommitComponents', () => { if (isNotFoundError) { return HttpResponse.json({ data: mockNotFoundError }) } else if (isOwnerNotActivatedError) { diff --git a/src/services/commit/useCommitCoverageDropdownSummary.test.tsx b/src/services/commit/useCommitCoverageDropdownSummary.test.tsx index 81635252f9..fd9b9bc84c 100644 --- a/src/services/commit/useCommitCoverageDropdownSummary.test.tsx +++ b/src/services/commit/useCommitCoverageDropdownSummary.test.tsx @@ -97,7 +97,7 @@ describe('useCommitCoverageDropdownSummary', () => { isOwnerNotActivatedError = false, }: SetupArgs = {}) { server.use( - graphql.query('CommitDropdownSummary', (info) => { + graphql.query('CommitDropdownSummary', () => { if (isNotFoundError) { return HttpResponse.json({ data: mockNotFoundError }) } else if (isOwnerNotActivatedError) { diff --git a/src/services/commit/useCommitCoverageDropdownSummary.tsx b/src/services/commit/useCommitCoverageDropdownSummary.tsx index 067fe0a0bd..023d078efe 100644 --- a/src/services/commit/useCommitCoverageDropdownSummary.tsx +++ b/src/services/commit/useCommitCoverageDropdownSummary.tsx @@ -194,7 +194,7 @@ export function useCommitCoverageDropdownSummary({ detail: (

Activation is required to view this repo, please{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} click here to activate your account.

diff --git a/src/services/commit/useCommitTeam.test.tsx b/src/services/commit/useCommitTeam.test.tsx index b7c8d784d1..88b337f0c4 100644 --- a/src/services/commit/useCommitTeam.test.tsx +++ b/src/services/commit/useCommitTeam.test.tsx @@ -186,7 +186,7 @@ describe('useCommitTeam', () => { isNullOwner = false, }: SetupArgs) { server.use( - graphql.query('GetCommitTeam', (info) => { + graphql.query('GetCommitTeam', () => { if (isNotFoundError) { return HttpResponse.json({ data: mockNotFoundError }) } else if (isOwnerNotActivatedError) { @@ -199,7 +199,7 @@ describe('useCommitTeam', () => { return HttpResponse.json({ data: mockCommitData }) } }), - graphql.query('GetCompareTotalsTeam', (info) => { + graphql.query('GetCompareTotalsTeam', () => { return HttpResponse.json({ data: mockCompareData }) }) ) @@ -441,10 +441,10 @@ describe('useCommitTeam polling', () => { function setup() { let nbCallCompare = 0 server.use( - graphql.query(`GetCommitTeam`, (info) => { + graphql.query(`GetCommitTeam`, () => { return HttpResponse.json({ data: mockCommitData }) }), - graphql.query(`GetCompareTotalsTeam`, (info) => { + graphql.query(`GetCompareTotalsTeam`, () => { nbCallCompare++ if (nbCallCompare < 9) { diff --git a/src/services/commit/useCommitTeam.tsx b/src/services/commit/useCommitTeam.tsx index 0d4ac862ff..60a887b5fc 100644 --- a/src/services/commit/useCommitTeam.tsx +++ b/src/services/commit/useCommitTeam.tsx @@ -341,7 +341,7 @@ export function useCommitTeam({ detail: (

Activation is required to view this repo, please{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} click here to activate your account.

diff --git a/src/services/commit/useCommitYaml.test.tsx b/src/services/commit/useCommitYaml.test.tsx index 6c8005fb55..6556680e97 100644 --- a/src/services/commit/useCommitYaml.test.tsx +++ b/src/services/commit/useCommitYaml.test.tsx @@ -93,7 +93,7 @@ describe('useCommitYaml', () => { ownerNotActivatedError = false, }: SetupArgs) { server.use( - graphql.query(`CommitYaml`, (info) => { + graphql.query(`CommitYaml`, () => { if (badSchema) { return HttpResponse.json({ data: mockCommitYamlBadSchema }) } else if (notFoundError) { diff --git a/src/services/commit/useCommitYaml.tsx b/src/services/commit/useCommitYaml.tsx index 619d0cf9c7..c420d5130d 100644 --- a/src/services/commit/useCommitYaml.tsx +++ b/src/services/commit/useCommitYaml.tsx @@ -107,7 +107,7 @@ export function useCommitYaml({ detail: (

Activation is required to view this repo, please{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} click here to activate your account.

diff --git a/src/services/commit/useCompareTotals.test.tsx b/src/services/commit/useCompareTotals.test.tsx index dc10bfd1f8..093b375fe1 100644 --- a/src/services/commit/useCompareTotals.test.tsx +++ b/src/services/commit/useCompareTotals.test.tsx @@ -88,7 +88,7 @@ describe('useCompareTotals', () => { isNullOwner = false, }: SetupArgs) { server.use( - graphql.query('CompareTotals', (info) => { + graphql.query('CompareTotals', () => { if (isNotFoundError) { return HttpResponse.json({ data: mockNotFoundError }) } else if (isOwnerNotActivatedError) { diff --git a/src/services/commit/useCompareTotals.tsx b/src/services/commit/useCompareTotals.tsx index 2f4ebf391b..21631cfa9a 100644 --- a/src/services/commit/useCompareTotals.tsx +++ b/src/services/commit/useCompareTotals.tsx @@ -161,7 +161,7 @@ interface UseCompareTotalsArgs { owner: string repo: string commitid: string - filters?: {} + filters?: object opts?: UseQueryOptions> } @@ -222,7 +222,7 @@ export function useCompareTotals({ detail: (

Activation is required to view this repo, please{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} click here to activate your account.

diff --git a/src/services/commit/useCompareTotalsTeam.test.tsx b/src/services/commit/useCompareTotalsTeam.test.tsx index 175cdbb350..654ba6b960 100644 --- a/src/services/commit/useCompareTotalsTeam.test.tsx +++ b/src/services/commit/useCompareTotalsTeam.test.tsx @@ -96,7 +96,7 @@ describe('useCompareTotalsTeam', () => { isNullOwner = false, }: SetupArgs) { server.use( - graphql.query('GetCompareTotalsTeam', (info) => { + graphql.query('GetCompareTotalsTeam', () => { if (isNotFoundError) { return HttpResponse.json({ data: mockNotFoundError }) } else if (isOwnerNotActivatedError) { diff --git a/src/services/commit/useCompareTotalsTeam.tsx b/src/services/commit/useCompareTotalsTeam.tsx index dd1b11e27d..d4a87da701 100644 --- a/src/services/commit/useCompareTotalsTeam.tsx +++ b/src/services/commit/useCompareTotalsTeam.tsx @@ -149,7 +149,7 @@ interface UseCompareTotalsTeamArgs { owner: string repo: string commitid: string - filters?: {} + filters?: object opts?: UseQueryOptions | null> } @@ -210,7 +210,7 @@ export function useCompareTotalsTeam({ detail: (

Activation is required to view this repo, please{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} click here to activate your account.

diff --git a/src/services/commitErrors/useCommitErrors.test.tsx b/src/services/commitErrors/useCommitErrors.test.tsx index f123a4269b..c0aec79ce0 100644 --- a/src/services/commitErrors/useCommitErrors.test.tsx +++ b/src/services/commitErrors/useCommitErrors.test.tsx @@ -74,7 +74,7 @@ describe('useCommitErrors', () => { isUnsuccessfulParseError = false, }) { server.use( - graphql.query(`CommitErrors`, (info) => { + graphql.query(`CommitErrors`, () => { if (isNotFoundError) { return HttpResponse.json({ data: mockNotFoundError }) } else if (isOwnerNotActivatedError) { diff --git a/src/services/commitErrors/useCommitErrors.tsx b/src/services/commitErrors/useCommitErrors.tsx index 8f4bd9642a..17e3a55d2f 100644 --- a/src/services/commitErrors/useCommitErrors.tsx +++ b/src/services/commitErrors/useCommitErrors.tsx @@ -131,7 +131,7 @@ export function useCommitErrors() { detail: (

Activation is required to view this repo, please{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} click here to activate your account.

diff --git a/src/services/commits/useCommits.test.tsx b/src/services/commits/useCommits.test.tsx index 8fd2f55881..604c7e85fa 100644 --- a/src/services/commits/useCommits.test.tsx +++ b/src/services/commits/useCommits.test.tsx @@ -300,7 +300,7 @@ describe('GetCommits', () => { }) describe('when __typename is NotFoundError', () => { - let oldConsoleError = console.error + const oldConsoleError = console.error beforeEach(() => { console.error = () => null @@ -329,7 +329,7 @@ describe('GetCommits', () => { }) describe('when __typename is OwnerNotActivatedError', () => { - let oldConsoleError = console.error + const oldConsoleError = console.error beforeEach(() => { console.error = () => null @@ -358,7 +358,7 @@ describe('GetCommits', () => { }) describe('unsuccessful parse of zod schema', () => { - let oldConsoleError = console.error + const oldConsoleError = console.error beforeEach(() => { console.error = () => null diff --git a/src/services/commits/useCommits.tsx b/src/services/commits/useCommits.tsx index 7975ec2f70..9487b6de81 100644 --- a/src/services/commits/useCommits.tsx +++ b/src/services/commits/useCommits.tsx @@ -291,7 +291,7 @@ export function useCommits({ detail: (

Activation is required to view this repo, please{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} click here to activate your account.

diff --git a/src/services/comparison/useComparisonForCommitAndParent/useComparisonForCommitAndParent.test.tsx b/src/services/comparison/useComparisonForCommitAndParent/useComparisonForCommitAndParent.test.tsx index e8b800f263..6835b79d48 100644 --- a/src/services/comparison/useComparisonForCommitAndParent/useComparisonForCommitAndParent.test.tsx +++ b/src/services/comparison/useComparisonForCommitAndParent/useComparisonForCommitAndParent.test.tsx @@ -145,7 +145,7 @@ describe('useComparisonForCommitAndParent', () => { isUnsuccessfulParseError = false, }: SetupArgs) { server.use( - graphql.query('ImpactedFileComparedWithParent', (info) => { + graphql.query('ImpactedFileComparedWithParent', () => { if (isNotFoundError) { return HttpResponse.json({ data: mockNotFoundError }) } else if (isOwnerNotActivatedError) { diff --git a/src/services/comparison/useComparisonForCommitAndParent/useComparisonForCommitAndParent.tsx b/src/services/comparison/useComparisonForCommitAndParent/useComparisonForCommitAndParent.tsx index cbfc31cf63..4a495f283a 100644 --- a/src/services/comparison/useComparisonForCommitAndParent/useComparisonForCommitAndParent.tsx +++ b/src/services/comparison/useComparisonForCommitAndParent/useComparisonForCommitAndParent.tsx @@ -182,7 +182,7 @@ export function useComparisonForCommitAndParent({ detail: (

Activation is required to view this repo, please{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} click here to activate your account.

diff --git a/src/services/config/useLoginProviders.test.tsx b/src/services/config/useLoginProviders.test.tsx index ac62f384b2..c104ed87dd 100644 --- a/src/services/config/useLoginProviders.test.tsx +++ b/src/services/config/useLoginProviders.test.tsx @@ -43,7 +43,7 @@ interface SetupArgs { describe('useLoginProviders', () => { function setup({ loginProviders, hasParsingError }: SetupArgs) { server.use( - graphql.query('GetLoginProviders', (info) => { + graphql.query('GetLoginProviders', () => { if (hasParsingError) { return HttpResponse.json({ data: { idk: true } }) } diff --git a/src/services/config/useSyncProviders.test.tsx b/src/services/config/useSyncProviders.test.tsx index f63dbe93e5..df3d177263 100644 --- a/src/services/config/useSyncProviders.test.tsx +++ b/src/services/config/useSyncProviders.test.tsx @@ -40,7 +40,7 @@ interface SetupArgs { describe('useSyncProviders', () => { function setup({ syncProviders, hasParsingError }: SetupArgs) { server.use( - graphql.query('GetSyncProviders', (info) => { + graphql.query('GetSyncProviders', () => { if (hasParsingError) { return HttpResponse.json({ data: { idk: true } }) } diff --git a/src/services/defaultOrganization/useUpdateDefaultOrganization.test.tsx b/src/services/defaultOrganization/useUpdateDefaultOrganization.test.tsx index db49f39bcf..63df7ca801 100644 --- a/src/services/defaultOrganization/useUpdateDefaultOrganization.test.tsx +++ b/src/services/defaultOrganization/useUpdateDefaultOrganization.test.tsx @@ -32,7 +32,7 @@ const wrapper: React.FC = ({ children }) => ( describe('useUpdateDefaultOrganization', () => { function setup(data = {}, triggerError = false) { server.use( - graphql.mutation('updateDefaultOrganization', (info) => { + graphql.mutation('updateDefaultOrganization', () => { if (triggerError) { return HttpResponse.json({ data }) } else { diff --git a/src/services/deleteComponentMeasurements/useDeleteComponentMeasurements.ts b/src/services/deleteComponentMeasurements/useDeleteComponentMeasurements.ts index 6f5998c06b..75cb163c9c 100644 --- a/src/services/deleteComponentMeasurements/useDeleteComponentMeasurements.ts +++ b/src/services/deleteComponentMeasurements/useDeleteComponentMeasurements.ts @@ -55,7 +55,7 @@ export function useDeleteComponentMeasurements() { queryClient.invalidateQueries(['RepoFlags']) } }, - onError: (e) => { + onError: (_e) => { addToast({ type: 'error', text: 'There was an error deleting your component measurements', diff --git a/src/services/deleteFlag/useDeleteFlag.js b/src/services/deleteFlag/useDeleteFlag.js index 4ae763f0a1..ff006b072c 100644 --- a/src/services/deleteFlag/useDeleteFlag.js +++ b/src/services/deleteFlag/useDeleteFlag.js @@ -44,7 +44,7 @@ export function useDeleteFlag() { queryClient.invalidateQueries('RepoFlags') } }, - onError: (e) => { + onError: (_e) => { addToast({ type: 'error', text: 'There was an error deleting your flag', diff --git a/src/services/deleteFlag/useDeleteFlag.test.jsx b/src/services/deleteFlag/useDeleteFlag.test.jsx index 20a20042fc..ab31d97168 100644 --- a/src/services/deleteFlag/useDeleteFlag.test.jsx +++ b/src/services/deleteFlag/useDeleteFlag.test.jsx @@ -51,7 +51,7 @@ const wrapper = ({ children }) => ( describe('useDeleteFlag', () => { function setup(data = {}, triggerError = false) { server.use( - graphql.mutation('deleteFlag', (info) => { + graphql.mutation('deleteFlag', () => { if (triggerError) { return HttpResponse.json({ errors: [] }, { status: 500 }) } else { diff --git a/src/services/file/useCommitBasedCoverageForFileViewer.test.jsx b/src/services/file/useCommitBasedCoverageForFileViewer.test.jsx index 58f1d2f6e3..6d3c74e7fd 100644 --- a/src/services/file/useCommitBasedCoverageForFileViewer.test.jsx +++ b/src/services/file/useCommitBasedCoverageForFileViewer.test.jsx @@ -66,14 +66,9 @@ afterAll(() => { }) describe('useCommitBasedCoverageForFileViewer', () => { - function setup({ - mainCoverageData, - coverageWithFlags, - selectedFlags, - selectedComponents, - }) { + function setup({ mainCoverageData, coverageWithFlags, selectedFlags }) { server.use( - graphql.query('CoverageForFile', (info) => { + graphql.query('CoverageForFile', () => { if (Object.keys(coverageWithFlags).length > 0) { return HttpResponse.json({ data: mockFileMainCoverage(coverageWithFlags, selectedFlags), diff --git a/src/services/image/useImage.ts b/src/services/image/useImage.ts index 97a57f7203..e2a6a8660b 100644 --- a/src/services/image/useImage.ts +++ b/src/services/image/useImage.ts @@ -22,7 +22,7 @@ const imageExtCache = new Map() export function useImage({ src }: { src: string }) { const [, setIsLoading] = useState(true) - let imageCache = useMemo( + const imageCache = useMemo( () => (imageExtCache ? imageExtCache : new Map()), [] ) diff --git a/src/services/orgUploadToken/useOrgUploadToken.test.tsx b/src/services/orgUploadToken/useOrgUploadToken.test.tsx index 92eeb28dd5..f5384b8d3a 100644 --- a/src/services/orgUploadToken/useOrgUploadToken.test.tsx +++ b/src/services/orgUploadToken/useOrgUploadToken.test.tsx @@ -50,7 +50,7 @@ describe('useOrgUploadToken', () => { isNullOwner = false, }: SetupArgs) { server.use( - graphql.query('GetOrgUploadToken', (info) => { + graphql.query('GetOrgUploadToken', () => { if (isUnsuccessfulParseError) { return HttpResponse.json({ data: mockUnsuccessfulParseError }) } else if (isNullOwner) { diff --git a/src/services/orgUploadToken/useRegenerateOrgUploadToken.test.jsx b/src/services/orgUploadToken/useRegenerateOrgUploadToken.test.jsx index a79f7ef119..b8f4c68342 100644 --- a/src/services/orgUploadToken/useRegenerateOrgUploadToken.test.jsx +++ b/src/services/orgUploadToken/useRegenerateOrgUploadToken.test.jsx @@ -34,7 +34,7 @@ const wrapper = ({ children }) => ( describe('useRegenerateOrgUploadToken', () => { function setup() { server.use( - graphql.mutation('regenerateOrgUploadToken', (info) => { + graphql.mutation('regenerateOrgUploadToken', () => { return HttpResponse.json({ data }) }) ) diff --git a/src/services/pathContents/branch/dir/usePrefetchBranchDirEntry.test.tsx b/src/services/pathContents/branch/dir/usePrefetchBranchDirEntry.test.tsx index 15c0da6770..d8dced2244 100644 --- a/src/services/pathContents/branch/dir/usePrefetchBranchDirEntry.test.tsx +++ b/src/services/pathContents/branch/dir/usePrefetchBranchDirEntry.test.tsx @@ -151,7 +151,7 @@ describe('usePrefetchBranchDirEntry', () => { isUnsuccessfulParseError = false, }: SetupArgs) { server.use( - graphql.query('BranchContents', (info) => { + graphql.query('BranchContents', () => { if (isMissingCoverage) { return HttpResponse.json({ data: mockDataMissingCoverage }) } else if (isUnknownPath) { @@ -280,7 +280,7 @@ describe('usePrefetchBranchDirEntry', () => { }) describe('rejecting request', () => { - let oldConsoleError = console.error + const oldConsoleError = console.error beforeEach(() => { console.error = () => null diff --git a/src/services/pathContents/branch/dir/usePrefetchBranchDirEntry.tsx b/src/services/pathContents/branch/dir/usePrefetchBranchDirEntry.tsx index faa38474f1..996f516ab3 100644 --- a/src/services/pathContents/branch/dir/usePrefetchBranchDirEntry.tsx +++ b/src/services/pathContents/branch/dir/usePrefetchBranchDirEntry.tsx @@ -169,7 +169,7 @@ export function usePrefetchBranchDirEntry({ detail: (

Activation is required to view this repo, please{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} click here to activate your account.

diff --git a/src/services/pathContents/branch/dir/useRepoBranchContents.test.tsx b/src/services/pathContents/branch/dir/useRepoBranchContents.test.tsx index 5653d24b5e..c22a8c3eb4 100644 --- a/src/services/pathContents/branch/dir/useRepoBranchContents.test.tsx +++ b/src/services/pathContents/branch/dir/useRepoBranchContents.test.tsx @@ -150,7 +150,7 @@ describe('useRepoBranchContents', () => { isUnsuccessfulParseError = false, }: SetupArgs) { server.use( - graphql.query('BranchContents', (info) => { + graphql.query('BranchContents', () => { if (isMissingCoverage) { return HttpResponse.json({ data: mockDataMissingCoverage }) } else if (isUnknownPath) { @@ -276,7 +276,7 @@ describe('useRepoBranchContents', () => { }) describe('request rejects', () => { - let oldConsoleError = console.error + const oldConsoleError = console.error beforeEach(() => { console.error = () => null diff --git a/src/services/pathContents/branch/dir/useRepoBranchContents.tsx b/src/services/pathContents/branch/dir/useRepoBranchContents.tsx index 60119c1a97..979090b68f 100644 --- a/src/services/pathContents/branch/dir/useRepoBranchContents.tsx +++ b/src/services/pathContents/branch/dir/useRepoBranchContents.tsx @@ -100,7 +100,7 @@ interface RepoBranchContentsArgs { repo: string branch: string path: string - filters?: {} + filters?: object options?: { suspense?: boolean enabled?: boolean @@ -161,7 +161,7 @@ export function useRepoBranchContents({ detail: (

Activation is required to view this repo, please{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} click here to activate your account.

diff --git a/src/services/pathContents/branch/file/usePrefetchBranchFileEntry.test.tsx b/src/services/pathContents/branch/file/usePrefetchBranchFileEntry.test.tsx index 55757ed0a5..924daa1281 100644 --- a/src/services/pathContents/branch/file/usePrefetchBranchFileEntry.test.tsx +++ b/src/services/pathContents/branch/file/usePrefetchBranchFileEntry.test.tsx @@ -94,7 +94,7 @@ const mockData = { describe('usePrefetchBranchFileEntry', () => { function setup() { server.use( - graphql.query('CoverageForFile', (info) => { + graphql.query('CoverageForFile', () => { return HttpResponse.json({ data: mockData }) }) ) diff --git a/src/services/pathContents/commit/dir/usePrefetchCommitDirEntry.test.tsx b/src/services/pathContents/commit/dir/usePrefetchCommitDirEntry.test.tsx index 5b416d642b..00f17b802a 100644 --- a/src/services/pathContents/commit/dir/usePrefetchCommitDirEntry.test.tsx +++ b/src/services/pathContents/commit/dir/usePrefetchCommitDirEntry.test.tsx @@ -141,7 +141,7 @@ describe('usePrefetchCommitDirEntry', () => { isUnsuccessfulParse = false, }: SetupArgs) { server.use( - graphql.query('CommitPathContents', (info) => { + graphql.query('CommitPathContents', () => { if (isMissingCoverage) { return HttpResponse.json({ data: mockDataMissingCoverage }) } else if (isUnknownPath) { diff --git a/src/services/pathContents/commit/dir/usePrefetchCommitDirEntry.tsx b/src/services/pathContents/commit/dir/usePrefetchCommitDirEntry.tsx index cea2a7b478..a7df81f292 100644 --- a/src/services/pathContents/commit/dir/usePrefetchCommitDirEntry.tsx +++ b/src/services/pathContents/commit/dir/usePrefetchCommitDirEntry.tsx @@ -86,7 +86,7 @@ export function usePrefetchCommitDirEntry({ detail: (

Activation is required to view this repo, please{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} click here to activate your account.

diff --git a/src/services/pathContents/commit/dir/useRepoCommitContents.test.tsx b/src/services/pathContents/commit/dir/useRepoCommitContents.test.tsx index b17a0d7981..33586d943d 100644 --- a/src/services/pathContents/commit/dir/useRepoCommitContents.test.tsx +++ b/src/services/pathContents/commit/dir/useRepoCommitContents.test.tsx @@ -144,7 +144,7 @@ describe('useRepoCommitContents', () => { isUnsuccessfulParseError = false, }: SetupArgs) { server.use( - graphql.query('CommitPathContents', (info) => { + graphql.query('CommitPathContents', () => { if (isMissingCoverage) { return HttpResponse.json({ data: mockDataMissingCoverage }) } else if (isUnknownPath) { @@ -287,7 +287,7 @@ describe('useRepoCommitContents', () => { }) describe('owner not activated', () => { - let oldConsoleError = console.error + const oldConsoleError = console.error beforeEach(() => { console.error = () => null @@ -326,7 +326,7 @@ describe('useRepoCommitContents', () => { }) describe('failed to parse schema', () => { - let oldConsoleError = console.error + const oldConsoleError = console.error beforeEach(() => { console.error = () => null }) @@ -364,7 +364,7 @@ describe('useRepoCommitContents', () => { }) describe('not found error', () => { - let oldConsoleError = console.error + const oldConsoleError = console.error beforeEach(() => { console.error = () => null diff --git a/src/services/pathContents/commit/dir/useRepoCommitContents.tsx b/src/services/pathContents/commit/dir/useRepoCommitContents.tsx index 84ebb1f969..b03e32e84f 100644 --- a/src/services/pathContents/commit/dir/useRepoCommitContents.tsx +++ b/src/services/pathContents/commit/dir/useRepoCommitContents.tsx @@ -77,7 +77,7 @@ export const useRepoCommitContents = ({ detail: (

Activation is required to view this repo, please{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} click here to activate your account.

diff --git a/src/services/pathContents/commit/file/usePrefetchCommitFileEntry.tsx b/src/services/pathContents/commit/file/usePrefetchCommitFileEntry.tsx index da4229c672..942904e6c3 100644 --- a/src/services/pathContents/commit/file/usePrefetchCommitFileEntry.tsx +++ b/src/services/pathContents/commit/file/usePrefetchCommitFileEntry.tsx @@ -92,7 +92,7 @@ export function usePrefetchCommitFileEntry({ detail: (

Activation is required to view this repo, please{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} click here to activate your account.

diff --git a/src/services/pathContents/pull/dir/usePrefetchPullDirEntry.test.tsx b/src/services/pathContents/pull/dir/usePrefetchPullDirEntry.test.tsx index 606a93ded9..aed0a1dbab 100644 --- a/src/services/pathContents/pull/dir/usePrefetchPullDirEntry.test.tsx +++ b/src/services/pathContents/pull/dir/usePrefetchPullDirEntry.test.tsx @@ -95,7 +95,7 @@ describe('usePrefetchPullDirEntry', () => { ownerNotActivated = false, }) { server.use( - graphql.query('PullPathContents', (info) => { + graphql.query('PullPathContents', () => { if (invalidSchema) { return HttpResponse.json({ data: {} }) } else if (repositoryNotFound) { diff --git a/src/services/pathContents/pull/dir/usePrefetchPullDirEntry.tsx b/src/services/pathContents/pull/dir/usePrefetchPullDirEntry.tsx index c452b3a20f..dc8d5491b6 100644 --- a/src/services/pathContents/pull/dir/usePrefetchPullDirEntry.tsx +++ b/src/services/pathContents/pull/dir/usePrefetchPullDirEntry.tsx @@ -103,7 +103,7 @@ export function usePrefetchPullDirEntry({ detail: (

Activation is required to view this repo, please{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} click here to activate your account.

diff --git a/src/services/pathContents/pull/dir/useRepoPullContents.test.tsx b/src/services/pathContents/pull/dir/useRepoPullContents.test.tsx index e488ea7666..19579b00be 100644 --- a/src/services/pathContents/pull/dir/useRepoPullContents.test.tsx +++ b/src/services/pathContents/pull/dir/useRepoPullContents.test.tsx @@ -141,7 +141,7 @@ describe('useRepoPullContents', () => { isUnknownPath = false, }) { server.use( - graphql.query('PullPathContents', (info) => { + graphql.query('PullPathContents', () => { if (invalidSchema) { return HttpResponse.json({ data: {} }) } else if (repositoryNotFound) { diff --git a/src/services/pathContents/pull/dir/useRepoPullContents.tsx b/src/services/pathContents/pull/dir/useRepoPullContents.tsx index d83fcf1715..40bdbe653a 100644 --- a/src/services/pathContents/pull/dir/useRepoPullContents.tsx +++ b/src/services/pathContents/pull/dir/useRepoPullContents.tsx @@ -97,7 +97,7 @@ export function useRepoPullContents({ detail: (

Activation is required to view this repo, please{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} click here to activate your account.

diff --git a/src/services/pathContents/pull/file/usePrefetchPullFileEntry.test.tsx b/src/services/pathContents/pull/file/usePrefetchPullFileEntry.test.tsx index 0b75417168..f69022b27b 100644 --- a/src/services/pathContents/pull/file/usePrefetchPullFileEntry.test.tsx +++ b/src/services/pathContents/pull/file/usePrefetchPullFileEntry.test.tsx @@ -103,7 +103,7 @@ describe('usePrefetchPullFileEntry', () => { nullOwner = false, }) { server.use( - graphql.query('CoverageForFile', (info) => { + graphql.query('CoverageForFile', () => { if (invalidSchema) { return HttpResponse.json({}) } else if (repositoryNotFound) { diff --git a/src/services/pathContents/pull/file/usePrefetchPullFileEntry.tsx b/src/services/pathContents/pull/file/usePrefetchPullFileEntry.tsx index 824e180ad2..434976802c 100644 --- a/src/services/pathContents/pull/file/usePrefetchPullFileEntry.tsx +++ b/src/services/pathContents/pull/file/usePrefetchPullFileEntry.tsx @@ -77,7 +77,7 @@ export function usePrefetchPullFileEntry({ detail: (

Activation is required to view this repo, please{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} click here to activate your account.

diff --git a/src/services/pathContents/useFileWithMainCoverage.test.tsx b/src/services/pathContents/useFileWithMainCoverage.test.tsx index 22ee9146b4..f76175f59e 100644 --- a/src/services/pathContents/useFileWithMainCoverage.test.tsx +++ b/src/services/pathContents/useFileWithMainCoverage.test.tsx @@ -115,7 +115,7 @@ describe('useFileWithMainCoverage', () => { isNullOwner = false, }: SetupArgs) { server.use( - graphql.query('CoverageForFile', (info) => { + graphql.query('CoverageForFile', () => { if (isNotFoundError) { return HttpResponse.json({ data: mockNotFoundError }) } else if (isOwnerNotActivatedError) { diff --git a/src/services/pathContents/useFileWithMainCoverage.tsx b/src/services/pathContents/useFileWithMainCoverage.tsx index a615fcaf5d..32f1168cd0 100644 --- a/src/services/pathContents/useFileWithMainCoverage.tsx +++ b/src/services/pathContents/useFileWithMainCoverage.tsx @@ -81,7 +81,7 @@ export function useFileWithMainCoverage({ detail: (

Activation is required to view this repo, please{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet*/} click here to activate your account.

diff --git a/src/services/pull/usePrefetchSingleFileComp.test.tsx b/src/services/pull/usePrefetchSingleFileComp.test.tsx index a2f29faddb..a9ec719e74 100644 --- a/src/services/pull/usePrefetchSingleFileComp.test.tsx +++ b/src/services/pull/usePrefetchSingleFileComp.test.tsx @@ -182,7 +182,7 @@ describe('usePrefetchSingleFileComp', () => { isNullOwner = false, }: SetupArgs) { server.use( - graphql.query('ImpactedFileComparison', (info) => { + graphql.query('ImpactedFileComparison', () => { if (isRenamed) { return HttpResponse.json({ data: mockRenamedFile }) } else if (isDeleted) { diff --git a/src/services/pull/usePrefetchSingleFileComp.tsx b/src/services/pull/usePrefetchSingleFileComp.tsx index de30115a46..99e12ae7bd 100644 --- a/src/services/pull/usePrefetchSingleFileComp.tsx +++ b/src/services/pull/usePrefetchSingleFileComp.tsx @@ -84,7 +84,7 @@ interface UsePrefetchSingleFileCompArgs { repo: string pullId: string path: string - filters?: {} + filters?: object } export function usePrefetchSingleFileComp({ @@ -143,7 +143,7 @@ export function usePrefetchSingleFileComp({ detail: (

Activation is required to view this repo, please{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet*/} click here to activate your account.

diff --git a/src/services/pull/usePull.test.tsx b/src/services/pull/usePull.test.tsx index 677df437f8..d4697266a3 100644 --- a/src/services/pull/usePull.test.tsx +++ b/src/services/pull/usePull.test.tsx @@ -138,9 +138,9 @@ const repo = 'gazebo' describe('usePull', () => { afterEach(() => queryClient.clear()) - function setup(data: {}) { + function setup(data: object) { server.use( - graphql.query('Pull', (info) => { + graphql.query('Pull', () => { return HttpResponse.json({ data }) }) ) diff --git a/src/services/pull/usePull.tsx b/src/services/pull/usePull.tsx index 57d8988194..1f7de58e99 100644 --- a/src/services/pull/usePull.tsx +++ b/src/services/pull/usePull.tsx @@ -347,7 +347,7 @@ export function usePull({ detail: (

Activation is required to view this repo, please{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet*/} click here to activate your account.

diff --git a/src/services/pull/usePullBADropdownSummary.test.tsx b/src/services/pull/usePullBADropdownSummary.test.tsx index 8a5d3a306f..f3577028f2 100644 --- a/src/services/pull/usePullBADropdownSummary.test.tsx +++ b/src/services/pull/usePullBADropdownSummary.test.tsx @@ -95,7 +95,7 @@ describe('usePullBADropdownSummary', () => { isOwnerNotActivatedError = false, }: SetupArgs = {}) { server.use( - graphql.query('PullBADropdownSummary', (info) => { + graphql.query('PullBADropdownSummary', () => { if (isNotFoundError) { return HttpResponse.json({ data: mockNotFoundError }) } else if (isOwnerNotActivatedError) { diff --git a/src/services/pull/usePullBADropdownSummary.tsx b/src/services/pull/usePullBADropdownSummary.tsx index 794476a47a..b1446732e4 100644 --- a/src/services/pull/usePullBADropdownSummary.tsx +++ b/src/services/pull/usePullBADropdownSummary.tsx @@ -169,7 +169,7 @@ export function usePullBADropdownSummary({ detail: (

Activation is required to view this repo, please{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} click here to activate your account.

diff --git a/src/services/pull/usePullBundleComparisonList.test.tsx b/src/services/pull/usePullBundleComparisonList.test.tsx index 924441e344..0bd50b47b7 100644 --- a/src/services/pull/usePullBundleComparisonList.test.tsx +++ b/src/services/pull/usePullBundleComparisonList.test.tsx @@ -126,7 +126,7 @@ describe('usePullBundleComparisonList', () => { isOwnerNotActivatedError = false, }: SetupArgs = {}) { server.use( - graphql.query('PullBundleComparisonList', (info) => { + graphql.query('PullBundleComparisonList', () => { if (isNotFoundError) { return HttpResponse.json({ data: mockNotFoundError }) } else if (isOwnerNotActivatedError) { diff --git a/src/services/pull/usePullBundleComparisonList.tsx b/src/services/pull/usePullBundleComparisonList.tsx index bc6947ba2b..b9c6130beb 100644 --- a/src/services/pull/usePullBundleComparisonList.tsx +++ b/src/services/pull/usePullBundleComparisonList.tsx @@ -184,7 +184,7 @@ export function usePullBundleComparisonList({ detail: (

Activation is required to view this repo, please{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} click here to activate your account.

diff --git a/src/services/pull/usePullBundleHeadList.test.tsx b/src/services/pull/usePullBundleHeadList.test.tsx index be22eeec51..5253c3b77b 100644 --- a/src/services/pull/usePullBundleHeadList.test.tsx +++ b/src/services/pull/usePullBundleHeadList.test.tsx @@ -112,7 +112,7 @@ describe('usePullBundleHeadList', () => { isNullOwner = false, }: SetupArgs) { server.use( - graphql.query('PullBundleHeadList', (info) => { + graphql.query('PullBundleHeadList', () => { if (isNotFoundError) { return HttpResponse.json({ data: mockRepoNotFound }) } else if (isOwnerNotActivatedError) { @@ -125,7 +125,7 @@ describe('usePullBundleHeadList', () => { return HttpResponse.json({ data: mockPullBundleList }) }), - graphql.query('GetRepoOverview', (info) => { + graphql.query('GetRepoOverview', () => { return HttpResponse.json({ data: mockRepoOverview }) }) ) diff --git a/src/services/pull/usePullBundleHeadList.tsx b/src/services/pull/usePullBundleHeadList.tsx index f7281ee8ed..84da5753f0 100644 --- a/src/services/pull/usePullBundleHeadList.tsx +++ b/src/services/pull/usePullBundleHeadList.tsx @@ -156,7 +156,7 @@ export function usePullBundleHeadList({ detail: (

Activation is required to view this repo, please{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} click here to activate your account.

diff --git a/src/services/pull/usePullCompareTotalsTeam.test.tsx b/src/services/pull/usePullCompareTotalsTeam.test.tsx index 546a1bfabe..9cf25b214a 100644 --- a/src/services/pull/usePullCompareTotalsTeam.test.tsx +++ b/src/services/pull/usePullCompareTotalsTeam.test.tsx @@ -101,7 +101,7 @@ describe('usePullCompareTotalsTeam', () => { isNullOwner = false, }: SetupArgs) { server.use( - graphql.query('GetPullCompareTotalsTeam', (info) => { + graphql.query('GetPullCompareTotalsTeam', () => { if (isNotFoundError) { return HttpResponse.json({ data: mockNotFoundError }) } else if (isOwnerNotActivatedError) { diff --git a/src/services/pull/usePullCompareTotalsTeam.tsx b/src/services/pull/usePullCompareTotalsTeam.tsx index 209808398b..39eb34bc11 100644 --- a/src/services/pull/usePullCompareTotalsTeam.tsx +++ b/src/services/pull/usePullCompareTotalsTeam.tsx @@ -152,7 +152,7 @@ interface UseCompareTotalsTeamArgs { owner: string repo: string pullId: string - filters?: {} + filters?: object opts?: UseQueryOptions | null> } @@ -213,7 +213,7 @@ export function usePullCompareTotalsTeam({ detail: (

Activation is required to view this repo, please{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} click here to activate your account.

diff --git a/src/services/pull/usePullComponents.test.tsx b/src/services/pull/usePullComponents.test.tsx index 826ef85380..dd6dcc08e6 100644 --- a/src/services/pull/usePullComponents.test.tsx +++ b/src/services/pull/usePullComponents.test.tsx @@ -97,7 +97,7 @@ describe('usePullComponents', () => { isOwnerNotActivatedError = false, }: SetupArgs = {}) { server.use( - graphql.query('PullComponentsSelector', (info) => { + graphql.query('PullComponentsSelector', () => { if (isNotFoundError) { return HttpResponse.json({ data: mockNotFoundError }) } else if (isOwnerNotActivatedError) { diff --git a/src/services/pull/usePullCoverageDropdownSummary.test.tsx b/src/services/pull/usePullCoverageDropdownSummary.test.tsx index b5080c71a5..f988b12310 100644 --- a/src/services/pull/usePullCoverageDropdownSummary.test.tsx +++ b/src/services/pull/usePullCoverageDropdownSummary.test.tsx @@ -88,7 +88,7 @@ describe('usePullCoverageDropdownSummary', () => { isOwnerNotActivatedError = false, }: SetupArgs = {}) { server.use( - graphql.query('PullCoverageDropdownSummary', (info) => { + graphql.query('PullCoverageDropdownSummary', () => { if (isNotFoundError) { return HttpResponse.json({ data: mockNotFoundError }) } else if (isOwnerNotActivatedError) { diff --git a/src/services/pull/usePullCoverageDropdownSummary.tsx b/src/services/pull/usePullCoverageDropdownSummary.tsx index 59c6c43530..b74f28e724 100644 --- a/src/services/pull/usePullCoverageDropdownSummary.tsx +++ b/src/services/pull/usePullCoverageDropdownSummary.tsx @@ -152,7 +152,7 @@ export function usePullCoverageDropdownSummary({ detail: (

Activation is required to view this repo, please{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} click here to activate your account.

diff --git a/src/services/pull/usePullTeam.test.tsx b/src/services/pull/usePullTeam.test.tsx index 2747884e0b..d4e771a133 100644 --- a/src/services/pull/usePullTeam.test.tsx +++ b/src/services/pull/usePullTeam.test.tsx @@ -132,7 +132,7 @@ describe('usePullTeam', () => { isNullOwner = false, }: SetupArgs) { server.use( - graphql.query('GetPullTeam', (info) => { + graphql.query('GetPullTeam', () => { if (isNotFoundError) { return HttpResponse.json({ data: mockNotFoundError }) } else if (isOwnerNotActivatedError) { @@ -145,7 +145,7 @@ describe('usePullTeam', () => { return HttpResponse.json({ data: mockPullData }) } }), - graphql.query('GetPullCompareTotalsTeam', (info) => { + graphql.query('GetPullCompareTotalsTeam', () => { return HttpResponse.json({ data: mockCompareData }) }) ) @@ -343,10 +343,10 @@ describe('usePullTeam polling', () => { function setup() { let nbCallCompare = 0 server.use( - graphql.query(`GetPullTeam`, (info) => { + graphql.query(`GetPullTeam`, () => { return HttpResponse.json({ data: mockPullData }) }), - graphql.query(`GetPullCompareTotalsTeam`, (info) => { + graphql.query(`GetPullCompareTotalsTeam`, () => { nbCallCompare++ if (nbCallCompare < 9) { diff --git a/src/services/pull/usePullTeam.tsx b/src/services/pull/usePullTeam.tsx index 3a2cf040da..598be22543 100644 --- a/src/services/pull/usePullTeam.tsx +++ b/src/services/pull/usePullTeam.tsx @@ -234,7 +234,7 @@ export function usePullTeam({ detail: (

Activation is required to view this repo, please{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} click here to activate your account.

diff --git a/src/services/pull/useSingularImpactedFileComparison.test.tsx b/src/services/pull/useSingularImpactedFileComparison.test.tsx index e930ff0654..5daaff8163 100644 --- a/src/services/pull/useSingularImpactedFileComparison.test.tsx +++ b/src/services/pull/useSingularImpactedFileComparison.test.tsx @@ -122,7 +122,7 @@ describe('useSingularImpactedFileComparison', () => { isMissingBaseCommit = false, }) { server.use( - graphql.query('ImpactedFileComparison', (info) => { + graphql.query('ImpactedFileComparison', () => { if (isNotFoundError) { return HttpResponse.json({ data: mockNotFoundError }) } else if (isOwnerNotActivatedError) { diff --git a/src/services/pull/useSingularImpactedFileComparison.tsx b/src/services/pull/useSingularImpactedFileComparison.tsx index 0f3456cc6b..4eeecea822 100644 --- a/src/services/pull/useSingularImpactedFileComparison.tsx +++ b/src/services/pull/useSingularImpactedFileComparison.tsx @@ -149,7 +149,7 @@ export function useSingularImpactedFileComparison({ detail: (

Activation is required to view this repo, please{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} click here to activate your account.

diff --git a/src/services/pulls/usePulls.test.tsx b/src/services/pulls/usePulls.test.tsx index 3285cec9c5..37934f4ccf 100644 --- a/src/services/pulls/usePulls.test.tsx +++ b/src/services/pulls/usePulls.test.tsx @@ -290,7 +290,7 @@ describe('GetPulls', () => { }) describe('when __typename is NotFoundError', () => { - let oldConsoleError = console.error + const oldConsoleError = console.error beforeEach(() => { console.error = () => null @@ -330,7 +330,7 @@ describe('GetPulls', () => { }) describe('when __typename is OwnerNotActivatedError', () => { - let oldConsoleError = console.error + const oldConsoleError = console.error beforeEach(() => { console.error = () => null @@ -370,7 +370,7 @@ describe('GetPulls', () => { }) describe('unsuccessful parse of zod schema', () => { - let oldConsoleError = console.error + const oldConsoleError = console.error beforeEach(() => { console.error = () => null diff --git a/src/services/pulls/usePulls.tsx b/src/services/pulls/usePulls.tsx index 14eaa9597b..dde22d32a6 100644 --- a/src/services/pulls/usePulls.tsx +++ b/src/services/pulls/usePulls.tsx @@ -293,7 +293,7 @@ export function usePulls({ detail: (

Activation is required to view this repo, please{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} click here to activate your account.

diff --git a/src/services/repo/mocks.ts b/src/services/repo/mocks.ts index bff6850c4d..7db9f532c6 100644 --- a/src/services/repo/mocks.ts +++ b/src/services/repo/mocks.ts @@ -1,6 +1,6 @@ import { graphql, HttpResponse } from 'msw' -export const flagsSelectHandler = graphql.query('FlagsSelect', (info) => { +export const flagsSelectHandler = graphql.query('FlagsSelect', () => { return HttpResponse.json({ data: { owner: { @@ -47,68 +47,65 @@ export const flagsSelectHandler = graphql.query('FlagsSelect', (info) => { }) }) -export const flagMeasurementsHandler = graphql.query( - 'FlagMeasurements', - (info) => { - return HttpResponse.json({ - data: { - owner: { - repository: { - coverageAnalytics: { - flags: { - pageInfo: { - hasNextPage: false, - endCursor: 'bGF0ZXN0LXVwbG9hZGVy', - }, - edges: [ - { - node: { - name: 'unit-python-uploader', - percentCovered: null, - measurements: [], - }, +export const flagMeasurementsHandler = graphql.query('FlagMeasurements', () => { + return HttpResponse.json({ + data: { + owner: { + repository: { + coverageAnalytics: { + flags: { + pageInfo: { + hasNextPage: false, + endCursor: 'bGF0ZXN0LXVwbG9hZGVy', + }, + edges: [ + { + node: { + name: 'unit-python-uploader', + percentCovered: null, + measurements: [], }, - { - node: { - name: 'unit-latest-uploader', - percentCovered: null, - measurements: [], - }, + }, + { + node: { + name: 'unit-latest-uploader', + percentCovered: null, + measurements: [], }, - { - node: { - name: 'unit', - percentCovered: null, - measurements: [], - }, + }, + { + node: { + name: 'unit', + percentCovered: null, + measurements: [], }, - { - node: { - name: 'new_python_uploader', - percentCovered: null, - measurements: [], - }, + }, + { + node: { + name: 'new_python_uploader', + percentCovered: null, + measurements: [], }, - { - node: { - name: 'latest-uploader', - percentCovered: null, - measurements: [], - }, + }, + { + node: { + name: 'latest-uploader', + percentCovered: null, + measurements: [], }, - ], - }, + }, + ], }, }, }, }, - }) - } -) + }, + }) +}) export const backfillFlagMembershipsHandler = graphql.query( 'BackfillFlagMemberships', - (info) => { + () => { return HttpResponse.json({ data: { config: { diff --git a/src/services/repo/useActivateMeasurements.test.tsx b/src/services/repo/useActivateMeasurements.test.tsx index 62c17fe628..6c43c1bca3 100644 --- a/src/services/repo/useActivateMeasurements.test.tsx +++ b/src/services/repo/useActivateMeasurements.test.tsx @@ -23,7 +23,7 @@ afterAll(() => server.close()) describe('useActivateMeasurements', () => { function setup() { server.use( - graphql.mutation('ActivateMeasurements', (info) => { + graphql.mutation('ActivateMeasurements', () => { return HttpResponse.json({ data: { activateMeasurements: null } }) }) ) @@ -70,7 +70,7 @@ describe('useActivateMeasurements', () => { it('returns expected output', async () => { server.use( - graphql.mutation('ActivateMeasurements', (info) => { + graphql.mutation('ActivateMeasurements', () => { return HttpResponse.json({ data: { activateMeasurements: { @@ -117,7 +117,7 @@ describe('useActivateMeasurements', () => { it('returns expected output', async () => { server.use( - graphql.mutation('ActivateMeasurements', (info) => { + graphql.mutation('ActivateMeasurements', () => { return HttpResponse.json({ data: { activateMeasurements: { diff --git a/src/services/repo/useComponentsBackfilled.test.tsx b/src/services/repo/useComponentsBackfilled.test.tsx index 039312a599..272329cd3a 100644 --- a/src/services/repo/useComponentsBackfilled.test.tsx +++ b/src/services/repo/useComponentsBackfilled.test.tsx @@ -56,7 +56,7 @@ const dataReturned = { describe('useComponentsBackfilled', () => { function setup({ isSchemaValid = true } = {}) { server.use( - graphql.query('BackfillComponentMemberships', (info) => { + graphql.query('BackfillComponentMemberships', () => { if (!isSchemaValid) { return HttpResponse.json({}) } @@ -122,7 +122,7 @@ describe('useComponentsBackfilled', () => { beforeEach(() => { server.use( - graphql.query('BackfillComponentMemberships', (info) => { + graphql.query('BackfillComponentMemberships', () => { return HttpResponse.json({ data: { owner: { @@ -164,7 +164,7 @@ describe('useComponentsBackfilled', () => { beforeEach(() => { server.use( - graphql.query('BackfillComponentMemberships', (info) => { + graphql.query('BackfillComponentMemberships', () => { return HttpResponse.json({ data: { owner: { diff --git a/src/services/repo/useEncodeString.test.tsx b/src/services/repo/useEncodeString.test.tsx index f674e07b2f..04aa5cd823 100644 --- a/src/services/repo/useEncodeString.test.tsx +++ b/src/services/repo/useEncodeString.test.tsx @@ -49,7 +49,7 @@ describe('useEncodeString', () => { mocks.useAddNotification.mockReturnValue(mockAddToast) server.use( - graphql.mutation('EncodeSecretString', (info) => { + graphql.mutation('EncodeSecretString', () => { if (isErrorResponse) { return HttpResponse.json({ data: { diff --git a/src/services/repo/useEraseRepoContent.test.tsx b/src/services/repo/useEraseRepoContent.test.tsx index e6c73f7a26..5c9bb6b02c 100644 --- a/src/services/repo/useEraseRepoContent.test.tsx +++ b/src/services/repo/useEraseRepoContent.test.tsx @@ -40,7 +40,7 @@ afterAll(() => { describe('useEraseRepoContent', () => { function setup() { server.use( - graphql.mutation('EraseRepository', (info) => { + graphql.mutation('EraseRepository', () => { return HttpResponse.json({ data: { eraseRepository: { data: null } }, }) diff --git a/src/services/repo/useRepo.test.tsx b/src/services/repo/useRepo.test.tsx index efb0d70afb..cb05e68cfa 100644 --- a/src/services/repo/useRepo.test.tsx +++ b/src/services/repo/useRepo.test.tsx @@ -83,7 +83,7 @@ describe('useRepo', () => { isOwnerNotActivatedError?: boolean }) { server.use( - graphql.query('GetRepo', (info) => { + graphql.query('GetRepo', () => { if (failedToParseError) { return HttpResponse.json({ data: {} }) } else if (isOwnerNotActivatedError) { diff --git a/src/services/repo/useRepoBackfilled.test.tsx b/src/services/repo/useRepoBackfilled.test.tsx index 0047153cff..52cd339013 100644 --- a/src/services/repo/useRepoBackfilled.test.tsx +++ b/src/services/repo/useRepoBackfilled.test.tsx @@ -83,7 +83,7 @@ describe('useRepoBackfilled', () => { isUnsuccessfulParseError = false, }: SetupArgs) { server.use( - graphql.query('BackfillFlagMemberships', (info) => { + graphql.query('BackfillFlagMemberships', () => { if (isNotFoundError) { return HttpResponse.json({ data: mockRepoNotFound }) } else if (isOwnerNotActivatedError) { diff --git a/src/services/repo/useRepoBackfilled.tsx b/src/services/repo/useRepoBackfilled.tsx index 5705375ffd..15f4ab9432 100644 --- a/src/services/repo/useRepoBackfilled.tsx +++ b/src/services/repo/useRepoBackfilled.tsx @@ -114,7 +114,7 @@ export function useRepoBackfilled() { detail: (

Activation is required to view this repo, please{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} click here to activate your account.

diff --git a/src/services/repo/useRepoComponents.test.tsx b/src/services/repo/useRepoComponents.test.tsx index aaca1ed68f..664a0b96c5 100644 --- a/src/services/repo/useRepoComponents.test.tsx +++ b/src/services/repo/useRepoComponents.test.tsx @@ -76,7 +76,7 @@ describe('ComponentMeasurements', () => { isNotFoundError = false, } = {}) { server.use( - graphql.query('ComponentMeasurements', (info) => { + graphql.query('ComponentMeasurements', () => { if (isSchemaInvalid) { return HttpResponse.json({}) } diff --git a/src/services/repo/useRepoComponentsSelect.test.tsx b/src/services/repo/useRepoComponentsSelect.test.tsx index e192aa67af..e6d6ce4de4 100644 --- a/src/services/repo/useRepoComponentsSelect.test.tsx +++ b/src/services/repo/useRepoComponentsSelect.test.tsx @@ -66,7 +66,7 @@ describe('RepoComponentsYamlSelector', () => { isNotFoundError = false, } = {}) { server.use( - graphql.query('RepoComponentsSelector', (info) => { + graphql.query('RepoComponentsSelector', () => { if (isSchemaInvalid) { return HttpResponse.json({}) } diff --git a/src/services/repo/useRepoConfig.test.tsx b/src/services/repo/useRepoConfig.test.tsx index eaedad6d97..d7d1456632 100644 --- a/src/services/repo/useRepoConfig.test.tsx +++ b/src/services/repo/useRepoConfig.test.tsx @@ -75,7 +75,7 @@ describe('useRepoConfig', () => { isUnsuccessfulParseError = false, }: SetupArgs) { server.use( - graphql.query('RepoConfig', (info) => { + graphql.query('RepoConfig', () => { if (isNotFoundError) { return HttpResponse.json({ data: mockNotFoundError }) } else if (isOwnerNotActivatedError) { diff --git a/src/services/repo/useRepoConfig.tsx b/src/services/repo/useRepoConfig.tsx index 9fd15ce95e..d87d6e7338 100644 --- a/src/services/repo/useRepoConfig.tsx +++ b/src/services/repo/useRepoConfig.tsx @@ -121,7 +121,7 @@ export const useRepoConfig = ({ detail: (

Activation is required to view this repo, please{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} click here to activate your account.

diff --git a/src/services/repo/useRepoCoverage.test.tsx b/src/services/repo/useRepoCoverage.test.tsx index 7383ffddd2..cb797a4c29 100644 --- a/src/services/repo/useRepoCoverage.test.tsx +++ b/src/services/repo/useRepoCoverage.test.tsx @@ -89,7 +89,7 @@ describe('useRepoCoverage', () => { nullBranch = false, }: SetupArgs) { server.use( - graphql.query('GetRepoCoverage', (info) => { + graphql.query('GetRepoCoverage', () => { if (nullBranch) { return HttpResponse.json({ data: mockNullBranch }) } else if (badResponse) { diff --git a/src/services/repo/useRepoCoverage.tsx b/src/services/repo/useRepoCoverage.tsx index c03415faa8..01a6d08385 100644 --- a/src/services/repo/useRepoCoverage.tsx +++ b/src/services/repo/useRepoCoverage.tsx @@ -137,7 +137,7 @@ export function useRepoCoverage({ detail: (

Activation is required to view this repo, please{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} click here to activate your account.

diff --git a/src/services/repo/useRepoFlagsSelect.test.tsx b/src/services/repo/useRepoFlagsSelect.test.tsx index ddb3262314..5d9fe82e3f 100644 --- a/src/services/repo/useRepoFlagsSelect.test.tsx +++ b/src/services/repo/useRepoFlagsSelect.test.tsx @@ -141,7 +141,7 @@ describe('FlagsSelect', () => { } return HttpResponse.json({ data: dataReturned }) }), - graphql.query('PullFlagsSelect', (info) => { + graphql.query('PullFlagsSelect', () => { if (isUnsuccessfulParseError) { return HttpResponse.json({ data: invalidData }) } else if (isOwnerNotActivatedError) { diff --git a/src/services/repo/useRepoFlagsSelect.tsx b/src/services/repo/useRepoFlagsSelect.tsx index 64f916db2e..bc02d1af5e 100644 --- a/src/services/repo/useRepoFlagsSelect.tsx +++ b/src/services/repo/useRepoFlagsSelect.tsx @@ -318,7 +318,7 @@ function fetchRepoFlagsForPull({ detail: (

Activation is required to view this repo, please{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} click here to activate your account.

diff --git a/src/services/repo/useRepoOverview.test.tsx b/src/services/repo/useRepoOverview.test.tsx index 711b4b02b9..d0a6f9940b 100644 --- a/src/services/repo/useRepoOverview.test.tsx +++ b/src/services/repo/useRepoOverview.test.tsx @@ -82,7 +82,7 @@ describe('useRepoOverview', () => { language, }: SetupArgs) { server.use( - graphql.query('GetRepoOverview', (info) => { + graphql.query('GetRepoOverview', () => { if (isNotFoundError) { return HttpResponse.json({ data: mockNotFoundError }) } else if (isUnsuccessfulParseError) { diff --git a/src/services/repo/useRepoRateLimitStatus.test.tsx b/src/services/repo/useRepoRateLimitStatus.test.tsx index a2b35021a9..6dbfa44bcb 100644 --- a/src/services/repo/useRepoRateLimitStatus.test.tsx +++ b/src/services/repo/useRepoRateLimitStatus.test.tsx @@ -80,7 +80,7 @@ describe('useRepoRateLimitStatus', () => { isNullOwner = false, }: SetupArgs) { server.use( - graphql.query('GetRepoRateLimitStatus', (info) => { + graphql.query('GetRepoRateLimitStatus', () => { if (isNotFoundError) { return HttpResponse.json({ data: mockNotFoundError }) } else if (isOwnerNotActivatedError) { diff --git a/src/services/repo/useRepoSettings.test.tsx b/src/services/repo/useRepoSettings.test.tsx index 9dfefe6c08..15571e7d9f 100644 --- a/src/services/repo/useRepoSettings.test.tsx +++ b/src/services/repo/useRepoSettings.test.tsx @@ -86,7 +86,7 @@ describe('useRepoSettings', () => { isUnsuccessfulParseError = false, }) { server.use( - graphql.query('GetRepoSettings', (info) => { + graphql.query('GetRepoSettings', () => { if (isNotFoundError) { return HttpResponse.json({ data: mockNotFoundError }) } else if (isOwnerNotActivatedError) { diff --git a/src/services/repo/useRepoSettings.tsx b/src/services/repo/useRepoSettings.tsx index 3cbf57ca9a..8cd72e5da2 100644 --- a/src/services/repo/useRepoSettings.tsx +++ b/src/services/repo/useRepoSettings.tsx @@ -117,7 +117,7 @@ function fetchRepoSettingsDetails({ detail: (

Activation is required to view this repo, please{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} click here to activate your account.

diff --git a/src/services/repo/useRepoSettingsTeam.test.tsx b/src/services/repo/useRepoSettingsTeam.test.tsx index 8a2188b85d..0be86c918d 100644 --- a/src/services/repo/useRepoSettingsTeam.test.tsx +++ b/src/services/repo/useRepoSettingsTeam.test.tsx @@ -78,7 +78,7 @@ describe('useRepoSettingsTeam', () => { isUnsuccessfulParseError = false, }) { server.use( - graphql.query('GetRepoSettingsTeam', (info) => { + graphql.query('GetRepoSettingsTeam', () => { if (isNotFoundError) { return HttpResponse.json({ data: mockNotFoundError }) } else if (isUnsuccessfulParseError) { diff --git a/src/services/repo/useUpdateRepo.test.tsx b/src/services/repo/useUpdateRepo.test.tsx index f9d3ef947c..9fd24c5647 100644 --- a/src/services/repo/useUpdateRepo.test.tsx +++ b/src/services/repo/useUpdateRepo.test.tsx @@ -69,7 +69,7 @@ const repoDetails = { describe('useUpdateRepo', () => { function setup() { server.use( - http.patch(`internal/github/codecov/repos/test/`, (info) => { + http.patch(`internal/github/codecov/repos/test/`, () => { return HttpResponse.json(repoDetails) }) ) @@ -83,8 +83,8 @@ describe('useUpdateRepo', () => { wrapper: wrapper(), }) - // @ts-expect-error - result.current.mutate({}) + // @ts-expect-error - mutation hasn't been typed yet + result.current.mutate({ activated: true }) await waitFor(() => expect(result.current.isSuccess).toBeTruthy()) }) diff --git a/src/services/repoUploadToken/useRegenerateRepoUploadToken.test.tsx b/src/services/repoUploadToken/useRegenerateRepoUploadToken.test.tsx index 6ab2f979e6..0719ff1fa8 100644 --- a/src/services/repoUploadToken/useRegenerateRepoUploadToken.test.tsx +++ b/src/services/repoUploadToken/useRegenerateRepoUploadToken.test.tsx @@ -50,7 +50,7 @@ describe('useRegenerateRepoUploadToken', () => { mocks.useAddNotification.mockReturnValue(mockAddToast) server.use( - graphql.mutation('RegenerateRepositoryUploadToken', (info) => { + graphql.mutation('RegenerateRepositoryUploadToken', () => { if (isErrorResponse) { return HttpResponse.json({ data: { diff --git a/src/services/repositoryToken/useRegenerateRepositoryToken.test.jsx b/src/services/repositoryToken/useRegenerateRepositoryToken.test.jsx index 8cda8ea56a..faffd63741 100644 --- a/src/services/repositoryToken/useRegenerateRepositoryToken.test.jsx +++ b/src/services/repositoryToken/useRegenerateRepositoryToken.test.jsx @@ -60,7 +60,7 @@ describe('useRegenerateRepositoryToken', () => { mocks.useAddNotification.mockReturnValue(addNotification) server.use( - graphql.mutation('RegenerateRepositoryToken', (info) => { + graphql.mutation('RegenerateRepositoryToken', () => { if (triggerError) { return HttpResponse.json({ errors: [] }, { status: 500 }) } diff --git a/src/services/selfHosted/useSelfHostedCurrentUser.test.tsx b/src/services/selfHosted/useSelfHostedCurrentUser.test.tsx index abd38369d2..0cbb86c020 100644 --- a/src/services/selfHosted/useSelfHostedCurrentUser.test.tsx +++ b/src/services/selfHosted/useSelfHostedCurrentUser.test.tsx @@ -44,7 +44,7 @@ afterAll(() => { describe('useSelfHostedCurrentUser', () => { function setup() { server.use( - http.get('/internal/users/current', (info) => { + http.get('/internal/users/current', () => { return HttpResponse.json(user) }) ) diff --git a/src/services/selfHosted/useSelfHostedHasAdmins.test.tsx b/src/services/selfHosted/useSelfHostedHasAdmins.test.tsx index e95a16250c..29c317832a 100644 --- a/src/services/selfHosted/useSelfHostedHasAdmins.test.tsx +++ b/src/services/selfHosted/useSelfHostedHasAdmins.test.tsx @@ -31,7 +31,7 @@ afterAll(() => { describe('useSelfHostedHasAdmins', () => { function setup({ data }: { data: z.infer }) { server.use( - graphql.query('HasAdmins', (info) => { + graphql.query('HasAdmins', () => { return HttpResponse.json({ data }) }) ) diff --git a/src/services/selfHosted/useSelfHostedSeatsAndLicense.test.tsx b/src/services/selfHosted/useSelfHostedSeatsAndLicense.test.tsx index 87ce3443ec..2abaaad04b 100644 --- a/src/services/selfHosted/useSelfHostedSeatsAndLicense.test.tsx +++ b/src/services/selfHosted/useSelfHostedSeatsAndLicense.test.tsx @@ -45,7 +45,7 @@ interface SetupArgs { describe('useSelfHostedSeatsAndLicense', () => { function setup({ isUnsuccessfulParseError = false }: SetupArgs) { server.use( - graphql.query('SelfHostedSeatsAndLicense', (info) => { + graphql.query('SelfHostedSeatsAndLicense', () => { if (isUnsuccessfulParseError) { return HttpResponse.json({ data: mockUnsuccessfulParseError }) } else { diff --git a/src/services/selfHosted/useSelfHostedSeatsConfig.test.tsx b/src/services/selfHosted/useSelfHostedSeatsConfig.test.tsx index eb882c9043..91bc9aedb5 100644 --- a/src/services/selfHosted/useSelfHostedSeatsConfig.test.tsx +++ b/src/services/selfHosted/useSelfHostedSeatsConfig.test.tsx @@ -42,7 +42,7 @@ afterAll(() => { describe('useSelfHostedSeatsConfig', () => { function setup() { server.use( - graphql.query('Seats', (info) => { + graphql.query('Seats', () => { return HttpResponse.json({ data: mockData }) }) ) diff --git a/src/services/selfHosted/useSelfHostedSettings.test.tsx b/src/services/selfHosted/useSelfHostedSettings.test.tsx index 2b642aedf3..1734a1fbb0 100644 --- a/src/services/selfHosted/useSelfHostedSettings.test.tsx +++ b/src/services/selfHosted/useSelfHostedSettings.test.tsx @@ -44,7 +44,7 @@ afterAll(() => { describe('useSelfHostedSettings', () => { function setup({ invalidResponse = false }) { server.use( - graphql.query('SelfHostedSettings', (info) => { + graphql.query('SelfHostedSettings', () => { if (invalidResponse) { return HttpResponse.json({}) } diff --git a/src/services/tier/useTier.test.tsx b/src/services/tier/useTier.test.tsx index 5f7c8dca99..2035ae0a30 100644 --- a/src/services/tier/useTier.test.tsx +++ b/src/services/tier/useTier.test.tsx @@ -52,7 +52,7 @@ describe('useTier', () => { isNullOwner = false, }: SetupArgs) { server.use( - graphql.query('OwnerTier', (info) => { + graphql.query('OwnerTier', () => { if (isUnsuccessfulParseError) { return HttpResponse.json({ data: mockUnsuccessfulParseError }) } else if (isNullOwner) { diff --git a/src/services/tracking/useTracking.test.jsx b/src/services/tracking/useTracking.test.jsx index 0888099228..f08e979492 100644 --- a/src/services/tracking/useTracking.test.jsx +++ b/src/services/tracking/useTracking.test.jsx @@ -49,10 +49,10 @@ describe('useTracking', () => { } server.use( - graphql.query('CurrentUser', (info) => { + graphql.query('CurrentUser', () => { return HttpResponse.json({ data: user }) }), - graphql.query('DetailOwner', (info) => { + graphql.query('DetailOwner', () => { return HttpResponse.json({ data: { owner: 'codecov' } }) }) ) diff --git a/src/services/user/useInternalUser.test.tsx b/src/services/user/useInternalUser.test.tsx index ad4505cd1a..ad3e939efc 100644 --- a/src/services/user/useInternalUser.test.tsx +++ b/src/services/user/useInternalUser.test.tsx @@ -28,7 +28,7 @@ afterAll(() => { describe('useInternalUser', () => { function setup(hasError = false) { server.use( - http.get('/internal/user', (info) => { + http.get('/internal/user', () => { if (hasError) { return HttpResponse.json({}, { status: 400 }) } diff --git a/src/services/user/useIsCurrentUserAnAdmin.test.tsx b/src/services/user/useIsCurrentUserAnAdmin.test.tsx index 23889dd697..bb751d480f 100644 --- a/src/services/user/useIsCurrentUserAnAdmin.test.tsx +++ b/src/services/user/useIsCurrentUserAnAdmin.test.tsx @@ -37,7 +37,7 @@ afterAll(() => { describe('useIsCurrentUserAnAdmin', () => { function setup() { server.use( - graphql.query('DetailOwner', (info) => { + graphql.query('DetailOwner', () => { return HttpResponse.json({ data: { owner: { diff --git a/src/services/user/useMyContexts.test.tsx b/src/services/user/useMyContexts.test.tsx index 839a5759c0..0046371397 100644 --- a/src/services/user/useMyContexts.test.tsx +++ b/src/services/user/useMyContexts.test.tsx @@ -43,7 +43,7 @@ describe('useMyContexts', () => { return HttpResponse.json({}) } - const orgList = !!info.variables?.after ? orgList2 : orgList1 + const orgList = info.variables?.after ? orgList2 : orgList1 const hasNextPage = info.variables?.after ? false : true const endCursor = info.variables?.after ? 'second' : 'first' diff --git a/src/services/user/useOnboardUser.test.tsx b/src/services/user/useOnboardUser.test.tsx index b1e603d38a..57c93f4359 100644 --- a/src/services/user/useOnboardUser.test.tsx +++ b/src/services/user/useOnboardUser.test.tsx @@ -44,7 +44,7 @@ afterAll(() => { describe('useOnboardUser', () => { function setup() { server.use( - graphql.mutation('OnboardUser', (info) => { + graphql.mutation('OnboardUser', () => { const newUser = { ...user, onboardingCompleted: true, diff --git a/src/services/user/useOwner.test.jsx b/src/services/user/useOwner.test.jsx index 6a65fb5a33..77189fdde1 100644 --- a/src/services/user/useOwner.test.jsx +++ b/src/services/user/useOwner.test.jsx @@ -40,7 +40,7 @@ afterAll(() => { describe('useOwner', () => { function setup(dataReturned = undefined) { server.use( - graphql.query('DetailOwner', (info) => { + graphql.query('DetailOwner', () => { return HttpResponse.json({ data: { owner: dataReturned } }) }) ) diff --git a/src/services/user/useOwnerRateLimitStatus.test.tsx b/src/services/user/useOwnerRateLimitStatus.test.tsx index 9d50529752..6f89dfeca5 100644 --- a/src/services/user/useOwnerRateLimitStatus.test.tsx +++ b/src/services/user/useOwnerRateLimitStatus.test.tsx @@ -43,7 +43,7 @@ interface SetupArgs { describe('useOwnerRateLimitStatus', () => { function setup({ isUnsuccessfulParseError = false }: SetupArgs) { server.use( - graphql.query('GetOwnerRateLimitStatus', (info) => { + graphql.query('GetOwnerRateLimitStatus', () => { if (isUnsuccessfulParseError) { return HttpResponse.json({ data: mockUnsuccessfulParseError }) } diff --git a/src/services/user/useResyncUser.test.tsx b/src/services/user/useResyncUser.test.tsx index c8ab5c6187..7117143d44 100644 --- a/src/services/user/useResyncUser.test.tsx +++ b/src/services/user/useResyncUser.test.tsx @@ -43,12 +43,12 @@ describe('useResyncUser', () => { let syncStatus = false function setup() { server.use( - graphql.query('IsSyncing', (info) => { + graphql.query('IsSyncing', () => { return HttpResponse.json({ data: { me: { isSyncing: syncStatus } }, }) }), - graphql.mutation('SyncData', (info) => { + graphql.mutation('SyncData', () => { syncStatus = true return HttpResponse.json({ data: { syncWithGitProvider: { me: { isSyncing: syncStatus } } }, diff --git a/src/services/user/useUser.test.tsx b/src/services/user/useUser.test.tsx index 83c074e5a7..6d55a85638 100644 --- a/src/services/user/useUser.test.tsx +++ b/src/services/user/useUser.test.tsx @@ -85,9 +85,9 @@ afterAll(() => { }) describe('useUser', () => { - function setup(userData: User | {}) { + function setup(userData: User | object) { server.use( - graphql.query('CurrentUser', (info) => { + graphql.query('CurrentUser', () => { return HttpResponse.json({ data: userData }) }) ) diff --git a/src/services/users/mocks.js b/src/services/users/mocks.js index ac77192749..90d77c1439 100644 --- a/src/services/users/mocks.js +++ b/src/services/users/mocks.js @@ -4,7 +4,7 @@ import { http, HttpResponse } from 'msw' const usersUri = '/internal/:provider/:owner/users/?activated=&is_admin=&ordering=name&search=&page=1&page_size=50' -export const randomUsersHandler = http.get(usersUri, (info) => { +export const randomUsersHandler = http.get(usersUri, () => { return HttpResponse.json(usersObject) }) diff --git a/src/services/users/useInfiniteUser.test.tsx b/src/services/users/useInfiniteUser.test.tsx index 556925717b..64077d0064 100644 --- a/src/services/users/useInfiniteUser.test.tsx +++ b/src/services/users/useInfiniteUser.test.tsx @@ -60,7 +60,7 @@ beforeEach(() => { afterAll(() => server.close()) describe('useInfiniteUser', () => { - function setup(options = {}) { + function setup() { server.use( http.get('/internal/gh/codecov/users', (info) => { const searchParams = new URL(info.request.url).searchParams @@ -162,7 +162,7 @@ describe('useInfiniteUser', () => { beforeEach(() => { consoleSpy = vi.spyOn(console, 'error').mockImplementation(() => {}) server.use( - http.get('/internal/gh/codecov/users', (info) => { + http.get('/internal/gh/codecov/users', () => { return HttpResponse.json({ count: 2 }) }) ) diff --git a/src/services/users/useUpdateUser.test.jsx b/src/services/users/useUpdateUser.test.jsx index eee59f1420..bd958a6424 100644 --- a/src/services/users/useUpdateUser.test.jsx +++ b/src/services/users/useUpdateUser.test.jsx @@ -43,9 +43,9 @@ afterEach(() => { afterAll(() => server.close()) describe('useUpdateUser', () => { - function setup({ ownerid, body, opts = {} }) { + function setup({ body }) { server.use( - http.patch(`/internal/:provider/:owner/users/:ownerid`, (info) => { + http.patch(`/internal/:provider/:owner/users/:ownerid`, () => { return HttpResponse.json(body) }) ) diff --git a/src/services/users/useUsers.test.jsx b/src/services/users/useUsers.test.jsx index af3d892cee..e8a470957b 100644 --- a/src/services/users/useUsers.test.jsx +++ b/src/services/users/useUsers.test.jsx @@ -71,7 +71,7 @@ afterAll(() => { describe('useUsers', () => { function setup() { server.use( - http.get(`/internal/:provider/:owner/users`, (info) => { + http.get(`/internal/:provider/:owner/users`, () => { return HttpResponse.json(users) }) ) diff --git a/src/services/yaml/useYamlConfig.test.jsx b/src/services/yaml/useYamlConfig.test.jsx index 099f248141..a9e167ce7e 100644 --- a/src/services/yaml/useYamlConfig.test.jsx +++ b/src/services/yaml/useYamlConfig.test.jsx @@ -35,7 +35,7 @@ afterAll(() => { describe('useYamlConfig', () => { function setup(dataReturned = {}) { server.use( - http.post('/graphql/gh', (info) => { + http.post('/graphql/gh', () => { return HttpResponse.json({ data: dataReturned }) }) ) diff --git a/src/setupProxy.js b/src/setupProxy.js index 14059ab44a..733d83ba11 100644 --- a/src/setupProxy.js +++ b/src/setupProxy.js @@ -1,6 +1,6 @@ -const { createProxyMiddleware } = require('http-proxy-middleware') +import { createProxyMiddleware } from 'http-proxy-middleware' -module.exports = function (app) { +function runProxy(app) { if (process.env.PROXY_TO) { app.use( '/internal', @@ -18,3 +18,5 @@ module.exports = function (app) { ) } } + +export default runProxy diff --git a/src/shared/ContentsTable/TableEntries/BaseEntries/DirEntry.jsx b/src/shared/ContentsTable/TableEntries/BaseEntries/DirEntry.jsx index 6437f11993..c896c26af3 100644 --- a/src/shared/ContentsTable/TableEntries/BaseEntries/DirEntry.jsx +++ b/src/shared/ContentsTable/TableEntries/BaseEntries/DirEntry.jsx @@ -20,7 +20,7 @@ function DirEntry({ options: { ref: linkRef, commit: commitSha, - tree: !!urlPath ? `${urlPath}/${name}` : name, + tree: urlPath ? `${urlPath}/${name}` : name, queryParams, }, }} diff --git a/src/shared/ContentsTable/TableEntries/BaseEntries/FileEntry.jsx b/src/shared/ContentsTable/TableEntries/BaseEntries/FileEntry.jsx index 2ce13de5df..0b5fa598ee 100644 --- a/src/shared/ContentsTable/TableEntries/BaseEntries/FileEntry.jsx +++ b/src/shared/ContentsTable/TableEntries/BaseEntries/FileEntry.jsx @@ -44,11 +44,7 @@ function FileEntry({ options: { ref: linkRef, commit: commitSha, - tree: displayAsList - ? path - : !!urlPath - ? `${urlPath}/${name}` - : name, + tree: displayAsList ? path : urlPath ? `${urlPath}/${name}` : name, queryParams, }, }} diff --git a/src/shared/ContentsTable/TableEntries/BranchEntries/BranchDirEntry.test.jsx b/src/shared/ContentsTable/TableEntries/BranchEntries/BranchDirEntry.test.jsx index c759657073..6549b5f015 100644 --- a/src/shared/ContentsTable/TableEntries/BranchEntries/BranchDirEntry.test.jsx +++ b/src/shared/ContentsTable/TableEntries/BranchEntries/BranchDirEntry.test.jsx @@ -70,7 +70,7 @@ describe('BranchDirEntry', () => { const user = userEvent.setup() server.use( - graphql.query('BranchContents', (info) => { + graphql.query('BranchContents', () => { return HttpResponse.json({ data: mockData }) }) ) diff --git a/src/shared/ContentsTable/TableEntries/CommitEntries/CommitDirEntry.test.tsx b/src/shared/ContentsTable/TableEntries/CommitEntries/CommitDirEntry.test.tsx index a5ff68a677..95e47a8188 100644 --- a/src/shared/ContentsTable/TableEntries/CommitEntries/CommitDirEntry.test.tsx +++ b/src/shared/ContentsTable/TableEntries/CommitEntries/CommitDirEntry.test.tsx @@ -72,7 +72,7 @@ afterAll(() => { describe('CommitDirEntry', () => { function setup() { server.use( - graphql.query('CommitPathContents', (info) => { + graphql.query('CommitPathContents', () => { return HttpResponse.json({ data: mockData }) }) ) diff --git a/src/shared/ContentsTable/TableEntries/PullEntries/PullFileEntry.test.tsx b/src/shared/ContentsTable/TableEntries/PullEntries/PullFileEntry.test.tsx index d8b88aeb4d..9873cef513 100644 --- a/src/shared/ContentsTable/TableEntries/PullEntries/PullFileEntry.test.tsx +++ b/src/shared/ContentsTable/TableEntries/PullEntries/PullFileEntry.test.tsx @@ -81,7 +81,7 @@ afterAll(() => { describe('PullFileEntry', () => { function setup() { server.use( - graphql.query('CoverageForFile', (info) => { + graphql.query('CoverageForFile', () => { return HttpResponse.json({ data: mockData }) }) ) diff --git a/src/shared/ContentsTable/utils/adjustListIfUpDir.test.tsx b/src/shared/ContentsTable/utils/adjustListIfUpDir.test.tsx index 34e4930570..1135b06b29 100644 --- a/src/shared/ContentsTable/utils/adjustListIfUpDir.test.tsx +++ b/src/shared/ContentsTable/utils/adjustListIfUpDir.test.tsx @@ -28,7 +28,7 @@ describe('adjustListIfUpDir', () => { expect(result).toStrictEqual([ { name: ( - /* @ts-expect-error */ + /* @ts-expect-error - A hasn't been typed yet */
..
diff --git a/src/shared/GlobalBanners/MissingDesignatedAdmins/MissingDesignatedAdmins.test.jsx b/src/shared/GlobalBanners/MissingDesignatedAdmins/MissingDesignatedAdmins.test.jsx index dbeccef2de..3ce829d440 100644 --- a/src/shared/GlobalBanners/MissingDesignatedAdmins/MissingDesignatedAdmins.test.jsx +++ b/src/shared/GlobalBanners/MissingDesignatedAdmins/MissingDesignatedAdmins.test.jsx @@ -45,7 +45,7 @@ const wrapper = describe('MissingDesignatedAdmins', () => { function setup(overrideData) { server.use( - graphql.query('HasAdmins', (info) => { + graphql.query('HasAdmins', () => { if (overrideData) { return HttpResponse.json({ data: overrideData }) } diff --git a/src/shared/GlobalBanners/SelfHostedLicenseExpiration/LicenseExpirationModal/LicenseExpirationModal.tsx b/src/shared/GlobalBanners/SelfHostedLicenseExpiration/LicenseExpirationModal/LicenseExpirationModal.tsx index 10a6a66d4e..93209f205b 100644 --- a/src/shared/GlobalBanners/SelfHostedLicenseExpiration/LicenseExpirationModal/LicenseExpirationModal.tsx +++ b/src/shared/GlobalBanners/SelfHostedLicenseExpiration/LicenseExpirationModal/LicenseExpirationModal.tsx @@ -30,7 +30,8 @@ const LicenseExpirationModal: React.FC = ({ Seat limit reached All of the seats on the organization's plan have been used. - Please reach out to {/* @ts-expect-error */} + Please reach out to{' '} + {/* @ts-expect-error - A hasn't been typed yet */} = ({ Your license is about to expire. To avoid any interruption in service, please renew your license promptly. Follow{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} = ({ Looking for more control and customization? - Consider setting up a {/* @ts-expect-error */} + Consider setting up a{' '} + {/* @ts-expect-error - A hasn't been typed yet */} { const user = userEvent.setup({ delay: null }) server.use( - graphql.query('SelfHostedSeatsAndLicense', (info) => { + graphql.query('SelfHostedSeatsAndLicense', () => { if (isUndefined) { return HttpResponse.json({ data: { config: undefined } }) } diff --git a/src/shared/GlobalTopBanners/BundleFeedbackBanner/BundleFeedbackBanner.test.tsx b/src/shared/GlobalTopBanners/BundleFeedbackBanner/BundleFeedbackBanner.test.tsx index b7e66bcc2b..47b490e632 100644 --- a/src/shared/GlobalTopBanners/BundleFeedbackBanner/BundleFeedbackBanner.test.tsx +++ b/src/shared/GlobalTopBanners/BundleFeedbackBanner/BundleFeedbackBanner.test.tsx @@ -62,7 +62,7 @@ describe('BundleFeedbackBanner', () => { const mockGetItem = vi.spyOn(window.localStorage.__proto__, 'getItem') server.use( - graphql.query('GetRepoOverview', (info) => { + graphql.query('GetRepoOverview', () => { return HttpResponse.json({ data: mockOverview(bundleAnalysisEnabled) }) }) ) diff --git a/src/shared/GlobalTopBanners/OktaBanners/OktaBanners.test.tsx b/src/shared/GlobalTopBanners/OktaBanners/OktaBanners.test.tsx index 497050fb99..fc5e434d2e 100644 --- a/src/shared/GlobalTopBanners/OktaBanners/OktaBanners.test.tsx +++ b/src/shared/GlobalTopBanners/OktaBanners/OktaBanners.test.tsx @@ -42,7 +42,7 @@ afterAll(() => server.close()) describe('OktaBanners', () => { function setup(data = {}) { server.use( - graphql.query('GetOktaConfig', (info) => { + graphql.query('GetOktaConfig', () => { return HttpResponse.json({ data: data }) }) ) diff --git a/src/shared/GlobalTopBanners/ProPlanFeedbackBanner/ProPlanFeedbackBanner.test.tsx b/src/shared/GlobalTopBanners/ProPlanFeedbackBanner/ProPlanFeedbackBanner.test.tsx index 696ed03121..13d029c50a 100644 --- a/src/shared/GlobalTopBanners/ProPlanFeedbackBanner/ProPlanFeedbackBanner.test.tsx +++ b/src/shared/GlobalTopBanners/ProPlanFeedbackBanner/ProPlanFeedbackBanner.test.tsx @@ -78,10 +78,10 @@ describe('ProPlanFeedbackBanner', () => { const mockGetItem = vi.spyOn(window.localStorage.__proto__, 'getItem') server.use( - graphql.query('OwnerTier', (info) => { + graphql.query('OwnerTier', () => { return HttpResponse.json({ data: mockProTier }) }), - graphql.query('GetPlanData', (info) => { + graphql.query('GetPlanData', () => { return HttpResponse.json({ data: mockTrialData }) }) ) diff --git a/src/shared/GlobalTopBanners/TeamPlanFeedbackBanner/TeamPlanFeedbackBanner.test.tsx b/src/shared/GlobalTopBanners/TeamPlanFeedbackBanner/TeamPlanFeedbackBanner.test.tsx index 3245761033..8442010c95 100644 --- a/src/shared/GlobalTopBanners/TeamPlanFeedbackBanner/TeamPlanFeedbackBanner.test.tsx +++ b/src/shared/GlobalTopBanners/TeamPlanFeedbackBanner/TeamPlanFeedbackBanner.test.tsx @@ -65,7 +65,7 @@ describe('TeamPlanFeedbackBanner', () => { const mockGetItem = vi.spyOn(window.localStorage.__proto__, 'getItem') server.use( - graphql.query('OwnerTier', (info) => { + graphql.query('OwnerTier', () => { if (isPro) { return HttpResponse.json({ data: mockProTier }) } diff --git a/src/shared/GlobalTopBanners/TrialBanner/ExpiredBanner.tsx b/src/shared/GlobalTopBanners/TrialBanner/ExpiredBanner.tsx index e44050d056..8dba896916 100644 --- a/src/shared/GlobalTopBanners/TrialBanner/ExpiredBanner.tsx +++ b/src/shared/GlobalTopBanners/TrialBanner/ExpiredBanner.tsx @@ -12,7 +12,7 @@ const ExpiredBanner: React.FC = () => {

🎉 The organization's 14-day free Codecov Pro trial has ended.{' '} - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} Add payment method diff --git a/src/shared/GlobalTopBanners/TrialBanner/OngoingBanner.tsx b/src/shared/GlobalTopBanners/TrialBanner/OngoingBanner.tsx index 5b422cdf54..8fe4a3d6df 100644 --- a/src/shared/GlobalTopBanners/TrialBanner/OngoingBanner.tsx +++ b/src/shared/GlobalTopBanners/TrialBanner/OngoingBanner.tsx @@ -33,7 +33,7 @@ const OngoingBanner: React.FC = ({ dateDiff }) => { 👋 - {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */}  Upgrade now.

diff --git a/src/shared/GlobalTopBanners/TrialBanner/TrialBanner.test.tsx b/src/shared/GlobalTopBanners/TrialBanner/TrialBanner.test.tsx index 40dd200e9a..706abc845c 100644 --- a/src/shared/GlobalTopBanners/TrialBanner/TrialBanner.test.tsx +++ b/src/shared/GlobalTopBanners/TrialBanner/TrialBanner.test.tsx @@ -122,7 +122,7 @@ describe('TrialBanner', () => { config.IS_SELF_HOSTED = isSelfHosted server.use( - graphql.query('GetPlanData', (info) => { + graphql.query('GetPlanData', () => { let plan: any = basicPlan if (isTrialPlan) { @@ -154,7 +154,7 @@ describe('TrialBanner', () => { }, }) }), - graphql.query('DetailOwner', (info) => { + graphql.query('DetailOwner', () => { return HttpResponse.json({ data: { owner: { isCurrentUserPartOfOrg } }, }) diff --git a/src/shared/ListRepo/ListRepo.test.jsx b/src/shared/ListRepo/ListRepo.test.jsx index b94177bbe4..3b3ad96826 100644 --- a/src/shared/ListRepo/ListRepo.test.jsx +++ b/src/shared/ListRepo/ListRepo.test.jsx @@ -94,12 +94,12 @@ describe('ListRepo', () => { const user = userEvent.setup() server.use( - graphql.query('OwnerTier', (info) => { + graphql.query('OwnerTier', () => { return HttpResponse.json({ data: { owner: { plan: { tierName: tierValue } } }, }) }), - graphql.query('CurrentUser', (info) => { + graphql.query('CurrentUser', () => { return HttpResponse.json({ data: me }) }) ) diff --git a/src/shared/ListRepo/OrgControlTable/RepoOrgNotFound/RepoOrgNotFound.test.tsx b/src/shared/ListRepo/OrgControlTable/RepoOrgNotFound/RepoOrgNotFound.test.tsx index fdaf8ac56b..15c16de80a 100644 --- a/src/shared/ListRepo/OrgControlTable/RepoOrgNotFound/RepoOrgNotFound.test.tsx +++ b/src/shared/ListRepo/OrgControlTable/RepoOrgNotFound/RepoOrgNotFound.test.tsx @@ -41,13 +41,13 @@ describe('RepoOrgNotFound', () => { const triggerResync = vi.fn() server.use( - graphql.query('IsSyncing', (info) => { + graphql.query('IsSyncing', () => { return HttpResponse.json({ data: { me: { isSyncing: false } }, }) }), - graphql.query('GetOwnerRateLimitStatus', (info) => { + graphql.query('GetOwnerRateLimitStatus', () => { return HttpResponse.json({ data: { me: { owner: { isGithubRateLimited } } }, }) diff --git a/src/shared/ListRepo/ReposTable/ReposTable.test.tsx b/src/shared/ListRepo/ReposTable/ReposTable.test.tsx index 1ef47eef1a..b3c64b4bde 100644 --- a/src/shared/ListRepo/ReposTable/ReposTable.test.tsx +++ b/src/shared/ListRepo/ReposTable/ReposTable.test.tsx @@ -195,7 +195,7 @@ describe('ReposTable', () => { const reposForOwnerMock = vi.fn() const myReposMock = vi.fn() server.use( - graphql.query('DetailOwner', (info) => { + graphql.query('DetailOwner', () => { return HttpResponse.json({ data: { owner: { isCurrentUserPartOfOrg } }, }) @@ -261,17 +261,17 @@ describe('ReposTable', () => { }, }) }), - graphql.query('OwnerTier', (info) => { + graphql.query('OwnerTier', () => { return HttpResponse.json({ data: { owner: { plan: { tierName: tierValue } } }, }) }), - graphql.query('RepoConfig', (info) => { + graphql.query('RepoConfig', () => { return HttpResponse.json({ data: { owner: { repository: { repositoryConfig: mockRepoConfig } } }, }) }), - graphql.query('CurrentUser', (info) => { + graphql.query('CurrentUser', () => { return HttpResponse.json({ data: mockUser }) }) ) diff --git a/src/shared/ListRepo/ReposTable/getReposColumnsHelper.tsx b/src/shared/ListRepo/ReposTable/getReposColumnsHelper.tsx index 95a8ae1a8c..e52b691da0 100644 --- a/src/shared/ListRepo/ReposTable/getReposColumnsHelper.tsx +++ b/src/shared/ListRepo/ReposTable/getReposColumnsHelper.tsx @@ -28,11 +28,11 @@ export const getReposColumnsHelper = ({ const repo = info.row.original let pageName = 'new' - if (!!repo?.isDemo) { + if (repo?.isDemo) { pageName = 'demoRepo' - } else if (!!repo?.coverageEnabled) { + } else if (repo?.coverageEnabled) { pageName = 'repo' - } else if (!!repo?.bundleAnalysisEnabled) { + } else if (repo?.bundleAnalysisEnabled) { pageName = 'bundles' } diff --git a/src/shared/ListRepo/ReposTableTeam/ReposTableTeam.test.jsx b/src/shared/ListRepo/ReposTableTeam/ReposTableTeam.test.jsx index 42cd0d968f..4b0782311f 100644 --- a/src/shared/ListRepo/ReposTableTeam/ReposTableTeam.test.jsx +++ b/src/shared/ListRepo/ReposTableTeam/ReposTableTeam.test.jsx @@ -55,7 +55,7 @@ describe('ReposTableTeam', () => { graphql.query('GetReposTeam', (info) => { mockApiVars(info.variables) - if (!!info.variables.after) { + if (info.variables.after) { fetchNextPage(info.variables.after) } diff --git a/src/shared/ListRepo/ReposTableTeam/ReposTableTeam.tsx b/src/shared/ListRepo/ReposTableTeam/ReposTableTeam.tsx index b716c36759..ee78d834bd 100644 --- a/src/shared/ListRepo/ReposTableTeam/ReposTableTeam.tsx +++ b/src/shared/ListRepo/ReposTableTeam/ReposTableTeam.tsx @@ -72,9 +72,9 @@ const getColumns = ({ cell: (info) => { const repo = info.row.original let pageName = 'new' - if (!!repo?.coverageEnabled) { + if (repo?.coverageEnabled) { pageName = 'repo' - } else if (!!repo?.bundleAnalysisEnabled) { + } else if (repo?.bundleAnalysisEnabled) { pageName = 'bundles' } diff --git a/src/shared/RawFileViewer/RawFileViewer.test.tsx b/src/shared/RawFileViewer/RawFileViewer.test.tsx index a868293a72..00757272b7 100644 --- a/src/shared/RawFileViewer/RawFileViewer.test.tsx +++ b/src/shared/RawFileViewer/RawFileViewer.test.tsx @@ -53,7 +53,7 @@ window.scrollTo = scrollToMock window.scrollX = 100 class ResizeObserverMock { - callback = (x: any) => null + callback = (_x: any) => null constructor(callback: any) { this.callback = callback @@ -118,8 +118,8 @@ afterAll(() => { interface SetupArgs { content?: string | null - owner?: {} | null - coverage?: {} | null + owner?: object | null + coverage?: object | null isCriticalFile?: boolean } @@ -132,10 +132,10 @@ describe('RawFileViewer', () => { })) server.use( - graphql.query('DetailOwner', (info) => { + graphql.query('DetailOwner', () => { return HttpResponse.json({ data: { owner } }) }), - graphql.query('CoverageForFile', (info) => { + graphql.query('CoverageForFile', () => { return HttpResponse.json({ data: { owner: { diff --git a/src/shared/RawFileViewer/RawFileViewer.tsx b/src/shared/RawFileViewer/RawFileViewer.tsx index 7764ccb2e1..897f4e4a8a 100644 --- a/src/shared/RawFileViewer/RawFileViewer.tsx +++ b/src/shared/RawFileViewer/RawFileViewer.tsx @@ -72,7 +72,6 @@ interface CodeRendererContentProps { content?: string | null path: string coverageData?: Dictionary<'H' | 'M' | 'P'> - stickyPadding: number } function CodeRendererContent({ @@ -80,7 +79,6 @@ function CodeRendererContent({ content, path, coverageData, - stickyPadding, }: CodeRendererContentProps) { if (isUnsupportedFileType) { return ( @@ -114,7 +112,6 @@ interface RawFileViewerProps { title: string | React.ReactNode sticky?: boolean withKey?: boolean - stickyPadding?: number commit: string showFlagsSelect?: boolean showComponentsSelect?: boolean @@ -126,7 +123,6 @@ function RawFileViewer({ title, sticky = false, withKey = true, - stickyPadding, commit, showFlagsSelect = false, showComponentsSelect = false, @@ -186,8 +182,6 @@ function RawFileViewer({ content={content} path={path} coverageData={coverageData} - // just adding a fallback value here, as we'll be removing it with the move to the virtual file renderer - stickyPadding={stickyPadding ?? 0} />
diff --git a/src/shared/api/api.test.ts b/src/shared/api/api.test.ts index 8ff1d64b84..37650f83d1 100644 --- a/src/shared/api/api.test.ts +++ b/src/shared/api/api.test.ts @@ -63,13 +63,13 @@ function setup() { const data = await info.request.json() return HttpResponse.json(data) }), - http.delete('/internal/test', (info) => { + http.delete('/internal/test', () => { return HttpResponse.json(null) }), - graphql.query('MyInfo', (info) => { + graphql.query('MyInfo', () => { return HttpResponse.json({ data: { me: 'Codecov' } }) }), - graphql.query('ErrorQuery', (info) => { + graphql.query('ErrorQuery', () => { return HttpResponse.json({ data: { me: 'Codecov' } }, { status: 400 }) }), graphql.query('CoverageForFile', (info) => { @@ -87,7 +87,7 @@ function setup() { }, }) }), - graphql.mutation('CreateTokenUnauthorized', (info) => { + graphql.mutation('CreateTokenUnauthorized', () => { return HttpResponse.json({ data: { createApiToken: { @@ -98,7 +98,7 @@ function setup() { }, }) }), - graphql.mutation('CreateToken', (info) => { + graphql.mutation('CreateToken', () => { return HttpResponse.json({ data: { createApiToken: { @@ -108,7 +108,7 @@ function setup() { }, }) }), - graphql.query('UnauthorizationError', (info) => { + graphql.query('UnauthorizationError', () => { return HttpResponse.json( { errors: [ @@ -268,7 +268,7 @@ describe('when using a graphql request', () => { it('does not have the provider in the url for non-provider', async () => { setup() - const fetchMock = vi.fn((url, options) => { + const fetchMock = vi.fn((url) => { expect(url).toBe(`${config.API_URL}/graphql/`) return Promise.resolve({ ok: true, @@ -291,7 +291,7 @@ describe('when using a graphql request', () => { 'has the provider in the url for %s', async (provider) => { setup() - const fetchMock = vi.fn((url, options) => { + const fetchMock = vi.fn(() => { return Promise.resolve({ ok: true, json: async () => ({ data: { example: 'dummy data' } }), diff --git a/src/shared/api/api.ts b/src/shared/api/api.ts index 53ce947fb7..3e4423c845 100644 --- a/src/shared/api/api.ts +++ b/src/shared/api/api.ts @@ -11,9 +11,9 @@ interface _FetchArgs { path: string query: Record method?: string - body: {} + body: object provider?: string - extraHeaders?: {} + extraHeaders?: object signal?: AbortSignal } diff --git a/src/shared/api/helpers.test.ts b/src/shared/api/helpers.test.ts index bf8097cf3c..76773a5545 100644 --- a/src/shared/api/helpers.test.ts +++ b/src/shared/api/helpers.test.ts @@ -111,7 +111,7 @@ describe('rejectNetworkError', () => { data: {}, dev: 'useCoolHook - 404 not found', error: Error('not found'), - }).catch((e) => {}) + }).catch((_e) => {}) expect(mocks.addBreadcrumb).toHaveBeenCalledWith({ category: 'network.error', @@ -127,7 +127,7 @@ describe('rejectNetworkError', () => { data: {}, dev: 'useCoolHook - 404 not found', error: Error('not found'), - }).catch((e) => {}) + }).catch((_e) => {}) expect(mocks.setFingerprint).toHaveBeenCalledWith([ 'useCoolHook - 404 not found', @@ -140,7 +140,7 @@ describe('rejectNetworkError', () => { data: {}, dev: 'useCoolHook - 404 not found', error: Error('not found'), - }).catch((e) => {}) + }).catch((_e) => {}) expect(mocks.captureMessage).toHaveBeenCalledWith('Network Error') }) @@ -152,7 +152,7 @@ describe('rejectNetworkError', () => { status: 404, data: {}, dev: 'useCoolHook - 404 not found', - }).catch((e) => {}) + }).catch((_e) => {}) expect(mocks.addBreadcrumb).not.toHaveBeenCalled() expect(mocks.setFingerprint).not.toHaveBeenCalled() diff --git a/src/shared/treePaths/useCommitTreePath.ts b/src/shared/treePaths/useCommitTreePath.ts index 7e12da20d9..ad1056b2ff 100644 --- a/src/shared/treePaths/useCommitTreePath.ts +++ b/src/shared/treePaths/useCommitTreePath.ts @@ -5,7 +5,7 @@ import { useLocation, useParams } from 'react-router-dom' import { getFilePathParts } from 'shared/utils/url' -function getTreeLocation(paths: string[], location: string, index: number) { +function getTreeLocation(paths: string[], index: number) { return dropRight(paths, paths.length - index - 1).join('/') } @@ -37,7 +37,7 @@ export function useCommitTreePaths() { pageName: 'commitTreeView', text: location, options: { - tree: getTreeLocation(filePaths, location, index), + tree: getTreeLocation(filePaths, index), commit, queryParams, }, diff --git a/src/shared/treePaths/useTreePaths.test.tsx b/src/shared/treePaths/useTreePaths.test.tsx index 55fc1e2d24..c93a5dda17 100644 --- a/src/shared/treePaths/useTreePaths.test.tsx +++ b/src/shared/treePaths/useTreePaths.test.tsx @@ -80,7 +80,7 @@ interface SetupArgs { describe('useTreePaths', () => { function setup({ repoOverviewData }: SetupArgs) { server.use( - graphql.query('GetRepoOverview', (info) => { + graphql.query('GetRepoOverview', () => { return HttpResponse.json({ data: repoOverviewData }) }) ) diff --git a/src/shared/useRedirect/hooks.test.js b/src/shared/useRedirect/hooks.test.js index 2792893d22..7362af844c 100644 --- a/src/shared/useRedirect/hooks.test.js +++ b/src/shared/useRedirect/hooks.test.js @@ -23,8 +23,7 @@ describe('useRedirect', () => { it('location replace was called (redirected)', async () => { const { result } = renderHook(() => useRedirect({ href })) - const { hardRedirect } = result?.current - hardRedirect() + result?.current?.hardRedirect() expect(window.location.replace).toHaveBeenCalledTimes(1) }) diff --git a/src/shared/utils/animationFrameUtils.ts b/src/shared/utils/animationFrameUtils.ts index ea429f0848..3a924069c1 100644 --- a/src/shared/utils/animationFrameUtils.ts +++ b/src/shared/utils/animationFrameUtils.ts @@ -13,7 +13,7 @@ type AnimationTimeoutId = { } export function requestAnimationTimeout( - callback: Function, + callback: () => void, delay: number ): AnimationTimeoutId { let start: number diff --git a/src/shared/utils/billing.test.ts b/src/shared/utils/billing.test.ts index eb0274f96f..c7b7203c51 100644 --- a/src/shared/utils/billing.test.ts +++ b/src/shared/utils/billing.test.ts @@ -289,8 +289,7 @@ describe('formatNumberToUSD', () => { describe('formatTimestampToCalendarDate', () => { it('formats into calendar date', () => { - // @ts-expect-error - const value = formatTimestampToCalendarDate('1660000000') + const value = formatTimestampToCalendarDate(1660000000) expect(value).toBe('August 8, 2022') }) @@ -310,7 +309,7 @@ describe('lastTwoDigits', () => { }) it('return null when null', () => { - // @ts-expect-error + // @ts-expect-error - testing with a null const value = lastTwoDigits(null) expect(value).toBe(null) @@ -322,7 +321,7 @@ describe('getNextBillingDate', () => { it('returns formatted timestamp', () => { const value = getNextBillingDate({ subscriptionDetail: { - // @ts-expect-error + // @ts-expect-error - we're just testing this property we can ignore the other properties latestInvoice: { periodEnd: 1660000000, }, @@ -335,7 +334,7 @@ describe('getNextBillingDate', () => { describe('there is no timestamp', () => { it('returns null', () => { - // @ts-expect-error + // @ts-expect-error - testing when there are no properties const value = getNextBillingDate({}) expect(value).toBeNull() diff --git a/src/shared/utils/bundleAnalysis.ts b/src/shared/utils/bundleAnalysis.ts index 7b26e2ab68..152cc25087 100644 --- a/src/shared/utils/bundleAnalysis.ts +++ b/src/shared/utils/bundleAnalysis.ts @@ -20,7 +20,7 @@ export const formatSizeToString = (bytes: number) => { } if (positiveBytes >= KILOBYTE && positiveBytes < MEGABYTE) { - let kilobytes = bytes / KILOBYTE + const kilobytes = bytes / KILOBYTE return Intl.NumberFormat('en-US', { ...formatSettings, @@ -29,7 +29,7 @@ export const formatSizeToString = (bytes: number) => { } if (positiveBytes >= MEGABYTE && positiveBytes < GIGABYTE) { - let megabytes = bytes / MEGABYTE + const megabytes = bytes / MEGABYTE return Intl.NumberFormat('en-US', { ...formatSettings, diff --git a/src/shared/utils/camelizeKeys.test.ts b/src/shared/utils/camelizeKeys.test.ts index 3d1c2d0585..b7a72d9381 100644 --- a/src/shared/utils/camelizeKeys.test.ts +++ b/src/shared/utils/camelizeKeys.test.ts @@ -17,9 +17,9 @@ describe('camelizeKeys', () => { it('else passes through', () => { expect(camelizeKeys([1, 2, 3])).toStrictEqual([1, 2, 3]) - // @ts-expect-error + // @ts-expect-error - testing with a number expect(camelizeKeys(1)).toStrictEqual(1) - // @ts-expect-error + // @ts-expect-error - testing with a string expect(camelizeKeys('test')).toStrictEqual('test') expect(camelizeKeys()).toStrictEqual({}) }) diff --git a/src/shared/utils/fileviewer.tsx b/src/shared/utils/fileviewer.tsx index 32328d4af2..07f6277183 100644 --- a/src/shared/utils/fileviewer.tsx +++ b/src/shared/utils/fileviewer.tsx @@ -22,7 +22,7 @@ const baseBorder = 'relative border-ds-gray-tertiary border-r' const afterBorder = 'after:absolute after:inset-y-0 after:right-0' const targetedLineClass = 'bg-ds-blue-medium bg-opacity-25' -export const classNamePerLineState = (targeted: Boolean = false) => ({ +export const classNamePerLineState = (targeted: boolean = false) => ({ [LINE_STATE.COVERED]: cs(baseBorder, { 'bg-ds-coverage-covered font-normal': !targeted, [targetedLineClass]: targeted, @@ -50,7 +50,7 @@ export const classNamePerLineState = (targeted: Boolean = false) => ({ ), }) -export const classNamePerLineContent = (targeted: Boolean = false) => ({ +export const classNamePerLineContent = (targeted: boolean = false) => ({ [LINE_STATE.COVERED]: cs('bg-opacity-25', { 'bg-ds-coverage-covered': !targeted, [targetedLineClass]: targeted, diff --git a/src/shared/utils/graphql.ts b/src/shared/utils/graphql.ts index 1dd51bd349..af4da8b3a1 100644 --- a/src/shared/utils/graphql.ts +++ b/src/shared/utils/graphql.ts @@ -10,7 +10,7 @@ type Connection = | null export function mapEdges(connection: Connection) { - let edges = [] + const edges = [] if ( !isUndefined(connection) && !isNull(connection) && diff --git a/src/shared/utils/prism/prismLanguages.ts b/src/shared/utils/prism/prismLanguages.ts index 273566224a..2b663f5eb6 100644 --- a/src/shared/utils/prism/prismLanguages.ts +++ b/src/shared/utils/prism/prismLanguages.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-nocheck - We're adding this here because there are no types for the prismjs package even after installing the @types/prismjs package ;(async () => { // import languages with no extends() diff --git a/src/shared/utils/provider.test.ts b/src/shared/utils/provider.test.ts index 18d2328233..9684f7436b 100644 --- a/src/shared/utils/provider.test.ts +++ b/src/shared/utils/provider.test.ts @@ -60,8 +60,7 @@ describe('providerToName', () => { describe('when called with BitBucket', () => { it('returns BitBucket', () => { - // @ts-expect-error - expect(providerToName('BitBucket')).toBe('BitBucket') + expect(providerToName('bitbucket')).toBe('BitBucket') }) }) @@ -218,8 +217,7 @@ describe('providerToInternalProvider', () => { describe('when called with BitBucket', () => { it('returns bitbucket', () => { - // @ts-expect-error - expect(providerToInternalProvider('BitBucket')).toBe('bitbucket') + expect(providerToInternalProvider('bitbucket')).toBe('bitbucket') }) }) diff --git a/src/shared/utils/provider.ts b/src/shared/utils/provider.ts index 56c2d3499c..452bfaac69 100644 --- a/src/shared/utils/provider.ts +++ b/src/shared/utils/provider.ts @@ -55,7 +55,7 @@ export function getProviderCommitURL({ 'Github Enterprise': `${config.GHE_URL}/${owner}/${repo}/commit/${commit}`, 'Gitlab Enterprise': `${config.GLE_URL}/${owner}/${repo}/-/commit/${commit}`, 'BitBucket Server': `${config.BBS_URL}/${owner}/${repo}/commits/${commit}`, - // @ts-expect-error + // @ts-expect-error - provider could be undefined but it should be fine }[providerToName(provider)] } @@ -77,6 +77,6 @@ export function getProviderPullURL({ 'Github Enterprise': `${config.GHE_URL}/${owner}/${repo}/pull/${pullId}`, 'Gitlab Enterprise': `${config.GLE_URL}/${owner}/${repo}/-/merge_requests/${pullId}`, 'BitBucket Server': `${config.BBS_URL}/${owner}/${repo}/pull-requests/${pullId}`, - // @ts-expect-error + // @ts-expect-error - provider could be undefined but it should be fine }[providerToName(provider)] } diff --git a/src/shared/utils/snakeifyKeys.test.ts b/src/shared/utils/snakeifyKeys.test.ts index be7cc13638..dff205b31c 100644 --- a/src/shared/utils/snakeifyKeys.test.ts +++ b/src/shared/utils/snakeifyKeys.test.ts @@ -10,9 +10,9 @@ describe('snakeifyKeys', () => { it('else passes through', () => { expect(snakeifyKeys([1, 2, 3])).toStrictEqual([1, 2, 3]) - // @ts-expect-error + // @ts-expect-error - testing with a number expect(snakeifyKeys(1)).toStrictEqual(1) - // @ts-expect-error + // @ts-expect-error - testing with a string expect(snakeifyKeys('test')).toStrictEqual('test') }) }) diff --git a/src/ui/Alert/Alert.tsx b/src/ui/Alert/Alert.tsx index 25030f0ef7..7f4022c107 100644 --- a/src/ui/Alert/Alert.tsx +++ b/src/ui/Alert/Alert.tsx @@ -40,7 +40,7 @@ export function variantToIcon( variant?: string | null, customIconName?: keyof OutlineIconCollection | null ) { - let className = 'float-left -mt-1 mr-2 align-middle' + const className = 'float-left -mt-1 mr-2 align-middle' switch (variant) { case AlertOptions.ERROR: return ( diff --git a/src/ui/Button/Button.tsx b/src/ui/Button/Button.tsx index 8df8863c0e..449446bb41 100644 --- a/src/ui/Button/Button.tsx +++ b/src/ui/Button/Button.tsx @@ -107,7 +107,7 @@ function pickVariant( export interface AppLinkProps { pageName: string text?: string - options?: Object + options?: object activeClassName?: string showExternalIcon?: boolean type?: 'submit' | 'button' | 'reset' diff --git a/src/ui/Chart/Chart.test.tsx b/src/ui/Chart/Chart.test.tsx index 13c41a0e59..0ff3da19de 100644 --- a/src/ui/Chart/Chart.test.tsx +++ b/src/ui/Chart/Chart.test.tsx @@ -52,7 +52,7 @@ const chartConfig = { describe('Chart', () => { let resizeObserverMock: Mock - let oldConsoleWarn = console.warn + const oldConsoleWarn = console.warn beforeEach(() => { console.warn = () => null @@ -65,7 +65,7 @@ describe('Chart', () => { * This mock also allow us to use {@link notifyResizeObserverChange} to fire changes * from inside our test. */ - resizeObserverMock = vi.fn().mockImplementation((callback) => { + resizeObserverMock = vi.fn().mockImplementation((_callback) => { return { observe: vi.fn(), unobserve: vi.fn(), @@ -73,7 +73,7 @@ describe('Chart', () => { } }) - // @ts-ignore + // @ts-expect-error - need to remove the default resize observer delete window.ResizeObserver window.ResizeObserver = resizeObserverMock @@ -524,7 +524,7 @@ describe('Chart', () => { }) describe('chart is not wrapped in a container', () => { - let oldConsoleError = console.error + const oldConsoleError = console.error beforeEach(() => { console.error = () => null diff --git a/src/ui/Chart/Chart.tsx b/src/ui/Chart/Chart.tsx index 8373f0002e..08ab62ece1 100644 --- a/src/ui/Chart/Chart.tsx +++ b/src/ui/Chart/Chart.tsx @@ -151,7 +151,7 @@ const ChartTooltipContent = React.forwardRef< const item = payload?.[0] const key = `${labelKey || item?.dataKey || item?.name || 'value'}` const itemConfig = getPayloadConfigFromPayload(config, item, key) - let value = + const value = !labelKey && typeof label === 'string' ? config[label as keyof typeof config]?.label || label : itemConfig?.label diff --git a/src/ui/CodeRenderer/CriticalFileLabel/CriticalFileLabel.stories.jsx b/src/ui/CodeRenderer/CriticalFileLabel/CriticalFileLabel.stories.jsx index acb70208e4..c71c9d2b99 100644 --- a/src/ui/CodeRenderer/CriticalFileLabel/CriticalFileLabel.stories.jsx +++ b/src/ui/CodeRenderer/CriticalFileLabel/CriticalFileLabel.stories.jsx @@ -1,6 +1,6 @@ import CriticalFileLabel from '.' -const Template = (args) => +const Template = (args) => export const CriticalFileLabelDefault = Template.bind({}) diff --git a/src/ui/CodeRenderer/DiffLine/DiffLine.stories.tsx b/src/ui/CodeRenderer/DiffLine/DiffLine.stories.tsx index fade060822..5eaa4696a4 100644 --- a/src/ui/CodeRenderer/DiffLine/DiffLine.stories.tsx +++ b/src/ui/CodeRenderer/DiffLine/DiffLine.stories.tsx @@ -45,6 +45,7 @@ export const DiffLine: Story = { lineContent={line} getTokenProps={({ token, key }) => ({ children: token.content, + key, })} /> diff --git a/src/ui/CodeRenderer/DiffLine/DiffLine.test.tsx b/src/ui/CodeRenderer/DiffLine/DiffLine.test.tsx index f32c70a231..4e8f83f211 100644 --- a/src/ui/CodeRenderer/DiffLine/DiffLine.test.tsx +++ b/src/ui/CodeRenderer/DiffLine/DiffLine.test.tsx @@ -71,7 +71,7 @@ describe('DiffLine', () => { baseCoverage={null} hitCount={null} lineContent={content} - getTokenProps={({ token, key }) => ({})} + getTokenProps={() => ({})} />, { wrapper } ) @@ -95,7 +95,7 @@ describe('DiffLine', () => { baseCoverage="H" hitCount={null} lineContent={content} - getTokenProps={({ token, key }) => ({})} + getTokenProps={() => ({})} />, { wrapper } ) @@ -115,7 +115,7 @@ describe('DiffLine', () => { baseCoverage="H" hitCount={18} lineContent={content} - getTokenProps={({ token, key }) => ({})} + getTokenProps={() => ({})} />, { wrapper } ) @@ -139,7 +139,7 @@ describe('DiffLine', () => { baseCoverage={null} hitCount={null} lineContent={content} - getTokenProps={({ token, key }) => ({})} + getTokenProps={() => ({})} />, { wrapper } ) @@ -159,7 +159,7 @@ describe('DiffLine', () => { baseCoverage={null} hitCount={18} lineContent={content} - getTokenProps={({ token, key }) => ({})} + getTokenProps={() => ({})} />, { wrapper } ) @@ -183,7 +183,7 @@ describe('DiffLine', () => { baseCoverage="M" hitCount={null} lineContent={content} - getTokenProps={({ token, key }) => ({})} + getTokenProps={() => ({})} />, { wrapper } ) @@ -201,7 +201,7 @@ describe('DiffLine', () => { baseCoverage="M" hitCount={null} lineContent={content} - getTokenProps={({ token, key }) => ({})} + getTokenProps={() => ({})} />, { wrapper } ) @@ -219,7 +219,7 @@ describe('DiffLine', () => { baseCoverage="M" hitCount={18} lineContent={content} - getTokenProps={({ token, key }) => ({})} + getTokenProps={() => ({})} />, { wrapper } ) @@ -243,7 +243,7 @@ describe('DiffLine', () => { baseCoverage="M" hitCount={null} lineContent={content} - getTokenProps={({ token, key }) => ({})} + getTokenProps={() => ({})} />, { wrapper } ) @@ -260,7 +260,7 @@ describe('DiffLine', () => { baseCoverage="M" hitCount={18} lineContent={content} - getTokenProps={({ token, key }) => ({})} + getTokenProps={() => ({})} />, { wrapper } ) @@ -284,7 +284,7 @@ describe('DiffLine', () => { baseCoverage="P" hitCount={null} lineContent={content} - getTokenProps={({ token, key }) => ({})} + getTokenProps={() => ({})} />, { wrapper } ) @@ -301,7 +301,7 @@ describe('DiffLine', () => { baseCoverage="P" hitCount={null} lineContent={content} - getTokenProps={({ token, key }) => ({})} + getTokenProps={() => ({})} />, { wrapper } ) @@ -318,7 +318,7 @@ describe('DiffLine', () => { baseCoverage="P" hitCount={18} lineContent={content} - getTokenProps={({ token, key }) => ({})} + getTokenProps={() => ({})} />, { wrapper } ) @@ -350,7 +350,7 @@ describe('DiffLine', () => { baseCoverage={null} hitCount={null} lineContent={content} - getTokenProps={({ token, key }) => ({})} + getTokenProps={() => ({})} />, { wrapper } ) @@ -374,7 +374,7 @@ describe('DiffLine', () => { baseCoverage={null} hitCount={null} lineContent={content} - getTokenProps={({ token, key }) => ({})} + getTokenProps={() => ({})} />, { wrapper } ) @@ -400,7 +400,7 @@ describe('DiffLine', () => { baseCoverage={null} hitCount={null} lineContent={content} - getTokenProps={({ token, key }) => ({})} + getTokenProps={() => ({})} />, { wrapper } ) diff --git a/src/ui/CodeRenderer/DiffLine/DiffLine.tsx b/src/ui/CodeRenderer/DiffLine/DiffLine.tsx index 2cd1f1272d..670d23811b 100644 --- a/src/ui/CodeRenderer/DiffLine/DiffLine.tsx +++ b/src/ui/CodeRenderer/DiffLine/DiffLine.tsx @@ -16,7 +16,7 @@ type LineContent = { types: Array; content: string } export interface DiffLineProps { baseCoverage: LineType | null baseNumber?: string - getTokenProps: ({ token, key }: { token: LineContent; key: number }) => {} + getTokenProps: ({ token, key }: { token: LineContent; key: number }) => object headCoverage: LineType | null headNumber?: string hitCount: number | null diff --git a/src/ui/CodeRenderer/FileHeader/FileHeader.test.jsx b/src/ui/CodeRenderer/FileHeader/FileHeader.test.jsx index 78c0a3d3d0..191ff9d5fe 100644 --- a/src/ui/CodeRenderer/FileHeader/FileHeader.test.jsx +++ b/src/ui/CodeRenderer/FileHeader/FileHeader.test.jsx @@ -5,8 +5,6 @@ import FileHeader from './FileHeader' vi.mock('ui/CopyClipboard', () => ({ CopyClipboard: () => 'Copy Clipboard' })) describe('FileHeader', () => { - function setup(props) {} - describe('when provided with all props', () => { it('renders progress percent and change percent', () => { render( @@ -59,14 +57,6 @@ describe('FileHeader', () => { }) describe('when there are no coverage numbers', () => { - beforeEach(() => { - setup({ - header: '-16,7, +16,7', - headName: 'folder/file.js', - coverage: [], - }) - }) - it('renders progress percent and change percent', () => { render( { - function setup(addedProps?: {}) { + function setup(addedProps?: object) { const mockOnChange = vi.fn() const user = userEvent.setup() diff --git a/src/ui/Dropdown/Dropdown.tsx b/src/ui/Dropdown/Dropdown.tsx index b1fcc5f3ba..db10fc6231 100644 --- a/src/ui/Dropdown/Dropdown.tsx +++ b/src/ui/Dropdown/Dropdown.tsx @@ -11,8 +11,13 @@ import Icon from 'ui/Icon' const DropdownContext = React.createContext({ isOpen: false }) -interface DropdownProps - extends React.ComponentPropsWithoutRef {} +// this interface is being temporarily commented out, if we need to add custom +// props to DropdownProps, we can uncomment it and remove the type below +// interface DropdownProps +// extends React.ComponentPropsWithoutRef {} +type DropdownProps = React.ComponentPropsWithoutRef< + typeof DropdownMenuPrimitive.Root +> const Root = ({ ...props }: DropdownProps) => { const { defaultOpen = false } = props @@ -49,10 +54,11 @@ interface TriggerProps extends React.ComponentPropsWithoutRef, VariantProps {} +// TODO: remove forwardRef const Trigger = React.forwardRef< React.ElementRef, TriggerProps ->(({ children, className, ...props }, forwardedRef) => { +>(({ children, className, ...props }, _forwardedRef) => { const { isOpen } = React.useContext(DropdownContext) // below removes stray lingering outline after dropdown is closed diff --git a/src/ui/FileList/FileList.stories.tsx b/src/ui/FileList/FileList.stories.tsx index 62cbc41bd3..c39ca02ba0 100644 --- a/src/ui/FileList/FileList.stories.tsx +++ b/src/ui/FileList/FileList.stories.tsx @@ -243,7 +243,7 @@ function Example() { {row.original.path}
- {/* @ts-expect-error */} + {/* @ts-expect-error - A hasn't been typed yet */} View full file @@ -272,7 +272,7 @@ function Example() { baseCoverage={ coverage[Math.floor(Math.random() * 3) % 3] ?? null } - getTokenProps={({ token, key }) => ({})} + getTokenProps={() => ({})} /> )} /> diff --git a/src/ui/FileViewer/ToggleHeader/Title/Title.test.tsx b/src/ui/FileViewer/ToggleHeader/Title/Title.test.tsx index b337a3f36a..b8b2042195 100644 --- a/src/ui/FileViewer/ToggleHeader/Title/Title.test.tsx +++ b/src/ui/FileViewer/ToggleHeader/Title/Title.test.tsx @@ -203,7 +203,7 @@ describe('TitleFlags', () => { interface SetupArgs { isIntersecting?: boolean noNextPage?: boolean - backfillData?: {} + backfillData?: object } function setup( @@ -234,7 +234,7 @@ describe('TitleFlags', () => { return HttpResponse.json({ data: mockFirstResponse }) }), - graphql.query('BackfillFlagMemberships', (info) => { + graphql.query('BackfillFlagMemberships', () => { return HttpResponse.json({ data: backfillData }) }) ) diff --git a/src/ui/FileViewer/ToggleHeader/ToggleHeader.test.tsx b/src/ui/FileViewer/ToggleHeader/ToggleHeader.test.tsx index 2706726fbc..65db8226ec 100644 --- a/src/ui/FileViewer/ToggleHeader/ToggleHeader.test.tsx +++ b/src/ui/FileViewer/ToggleHeader/ToggleHeader.test.tsx @@ -82,10 +82,10 @@ afterAll(() => { describe('ToggleHeader', () => { function setup() { server.use( - graphql.query('BackfillFlagMemberships', (info) => { + graphql.query('BackfillFlagMemberships', () => { return HttpResponse.json({ data: mockBackfillResponse }) }), - graphql.query('FlagsSelect', (info) => { + graphql.query('FlagsSelect', () => { return HttpResponse.json({ data: mockFlagResponse }) }) ) diff --git a/src/ui/Icon/Icon.test.tsx b/src/ui/Icon/Icon.test.tsx index 9a226b866d..edc09d344a 100644 --- a/src/ui/Icon/Icon.test.tsx +++ b/src/ui/Icon/Icon.test.tsx @@ -12,7 +12,7 @@ describe('Icon', () => { describe("when rendered with a SVG we don't have", () => { it('renders nothing', () => { - // @ts-expect-error + // @ts-expect-error - testing with a string that doesn't exist const { container } = render() expect(container).toBeEmptyDOMElement() diff --git a/src/ui/MetricCard/MetricCard.tsx b/src/ui/MetricCard/MetricCard.tsx index 14824a8143..9f2ea0ba3e 100644 --- a/src/ui/MetricCard/MetricCard.tsx +++ b/src/ui/MetricCard/MetricCard.tsx @@ -5,7 +5,10 @@ import { cn } from 'shared/utils/cn' const metricCard = cva(['flex', 'flex-col', 'gap-1', 'px-4']) -interface MetricCardProps extends React.HTMLAttributes {} +// this interface is being temporarily commented out, if we need to add custom +// props to MetricCardProps, we can uncomment it and remove the type below +// interface MetricCardProps extends React.HTMLAttributes {} +type MetricCardProps = React.HTMLAttributes const MetricCardRoot = React.forwardRef( ({ className, children, ...props }, ref) => ( diff --git a/src/ui/MultiSelect/MultiSelect.jsx b/src/ui/MultiSelect/MultiSelect.jsx index 0394753992..38b787af57 100644 --- a/src/ui/MultiSelect/MultiSelect.jsx +++ b/src/ui/MultiSelect/MultiSelect.jsx @@ -191,15 +191,17 @@ const MultiSelect = forwardRef( })) const toggleItem = (selectedItem) => { - isItemSelected(selectedItem, selectedItems) - ? removeSelectedItem(selectedItem) - : addSelectedItem(selectedItem) + if (isItemSelected(selectedItem, selectedItems)) { + removeSelectedItem(selectedItem) + } else { + addSelectedItem(selectedItem) + } } const listItems = [ SELECT_ALL_BUTTON, ...selectedItems, - ...items?.filter((item) => !isItemSelected(item, selectedItems)), + ...(items?.filter((item) => !isItemSelected(item, selectedItems)) ?? []), ] const { @@ -231,7 +233,11 @@ const MultiSelect = forwardRef( switch (type) { case useCombobox.stateChangeTypes.InputKeyDownEnter: case useCombobox.stateChangeTypes.ItemClick: - isAllButton(selectedItem) ? reset() : toggleItem(selectedItem) + if (isAllButton(selectedItem)) { + reset() + } else { + toggleItem(selectedItem) + } break default: break diff --git a/src/ui/Select/Select.jsx b/src/ui/Select/Select.jsx index 6e7f07a22b..f8ad02f631 100644 --- a/src/ui/Select/Select.jsx +++ b/src/ui/Select/Select.jsx @@ -206,7 +206,7 @@ const Select = forwardRef( { 'border overflow-y-auto': isOpen, }, - !!onSearch ? 'top-16' : 'top-8 rounded' + onSearch ? 'top-16' : 'top-8 rounded' )} {...getMenuProps()} > diff --git a/src/ui/Sparkline/Sparkline.tsx b/src/ui/Sparkline/Sparkline.tsx index d8da578066..afae4f14e9 100644 --- a/src/ui/Sparkline/Sparkline.tsx +++ b/src/ui/Sparkline/Sparkline.tsx @@ -108,7 +108,7 @@ const Sparkline: React.FC = ({ > {description} - {data.map(({ start, end, mode, value }, i) => { + {data.map(({ start, end, mode, value }) => { // Inline styles are not performant but because this is memoized it should be ok. const properties = { '--start': start diff --git a/src/ui/SummaryDropdown/SummaryDropdown.tsx b/src/ui/SummaryDropdown/SummaryDropdown.tsx index 5077fc15a0..5fde208564 100644 --- a/src/ui/SummaryDropdown/SummaryDropdown.tsx +++ b/src/ui/SummaryDropdown/SummaryDropdown.tsx @@ -24,8 +24,11 @@ const SummaryDropdownRoot = forwardRef< SummaryDropdownRoot.displayName = 'SummaryDropdownRoot' -interface ItemProps - extends React.ComponentPropsWithoutRef {} +// this interface is being temporarily commented out, if we need to add custom +// props to ItemProps, we can uncomment it and remove the type below +// interface ItemProps +// extends React.ComponentPropsWithoutRef {} +type ItemProps = React.ComponentPropsWithoutRef const SummaryItem = forwardRef< React.ElementRef, @@ -56,6 +59,7 @@ const SummaryTrigger = forwardRef< >(({ children, className, ...props }, forwardedRef) => ( diff --git a/src/ui/SunburstChart/SunburstChart.jsx b/src/ui/SunburstChart/SunburstChart.jsx index fc00e39c3f..cb55705fb5 100644 --- a/src/ui/SunburstChart/SunburstChart.jsx +++ b/src/ui/SunburstChart/SunburstChart.jsx @@ -189,7 +189,7 @@ function SunburstChart({ reactHoverCallback({ target: p, type: 'file' }) } - function mouseout(_event, p) { + function mouseout(_event, _p) { select(this).attr('fill-opacity', 1) } diff --git a/src/ui/TopBanner/TopBanner.tsx b/src/ui/TopBanner/TopBanner.tsx index ad62f7459d..8e7f1a5899 100644 --- a/src/ui/TopBanner/TopBanner.tsx +++ b/src/ui/TopBanner/TopBanner.tsx @@ -89,16 +89,13 @@ const DismissButton: React.FC = ({ children }) => { } return ( - <> - {/* @ts-ignore */} - - + ) } diff --git a/src/ui/TruncatedMessage/TruncatedMessage.test.tsx b/src/ui/TruncatedMessage/TruncatedMessage.test.tsx index 7c0a255e7d..1c9e85ce8e 100644 --- a/src/ui/TruncatedMessage/TruncatedMessage.test.tsx +++ b/src/ui/TruncatedMessage/TruncatedMessage.test.tsx @@ -8,7 +8,7 @@ vi.mock('./hooks') describe('TruncatedMessage', () => { function setup({ canTruncate = false }) { - // @ts-expect-error + // @ts-expect-error - mocking out the hook useTruncation.mockImplementation(() => ({ ref: () => {}, canTruncate, diff --git a/src/ui/TruncatedMessage/hooks/useTruncation.test.ts b/src/ui/TruncatedMessage/hooks/useTruncation.test.ts index 3ec40af092..e27b82e14a 100644 --- a/src/ui/TruncatedMessage/hooks/useTruncation.test.ts +++ b/src/ui/TruncatedMessage/hooks/useTruncation.test.ts @@ -2,9 +2,9 @@ import { renderHook } from '@testing-library/react' import { useTruncation } from './useTruncation' -let entry: {} | undefined = {} +let entry: object | undefined = {} class ResizeObserver { - callback = (x: any) => null + callback = (_x: any) => null constructor(callback: any) { this.callback = callback diff --git a/src/ui/VirtualRenderers/VirtualDiffRenderer.test.tsx b/src/ui/VirtualRenderers/VirtualDiffRenderer.test.tsx index 3f6a1ffd14..71ae9b38da 100644 --- a/src/ui/VirtualRenderers/VirtualDiffRenderer.test.tsx +++ b/src/ui/VirtualRenderers/VirtualDiffRenderer.test.tsx @@ -43,7 +43,7 @@ window.scrollTo = scrollToMock window.scrollY = 100 class ResizeObserverMock { - callback = (x: any) => null + callback = (_x: any) => null constructor(callback: any) { this.callback = callback diff --git a/src/ui/VirtualRenderers/VirtualFileRenderer.test.tsx b/src/ui/VirtualRenderers/VirtualFileRenderer.test.tsx index c1d40ea8d3..512d04e395 100644 --- a/src/ui/VirtualRenderers/VirtualFileRenderer.test.tsx +++ b/src/ui/VirtualRenderers/VirtualFileRenderer.test.tsx @@ -41,7 +41,7 @@ window.scrollTo = scrollToMock window.scrollY = 100 class ResizeObserverMock { - callback = (x: any) => null + callback = (_x: any) => null constructor(callback: any) { this.callback = callback diff --git a/src/ui/VirtualRenderers/useIsOverflowing.test.ts b/src/ui/VirtualRenderers/useIsOverflowing.test.ts index 8ca8183124..8746b2067b 100644 --- a/src/ui/VirtualRenderers/useIsOverflowing.test.ts +++ b/src/ui/VirtualRenderers/useIsOverflowing.test.ts @@ -8,7 +8,7 @@ const mocks = vi.hoisted(() => ({ })) class ResizeObserverMock { - callback = (x: any) => null + callback = (_x: any) => null constructor(callback: any) { this.callback = callback diff --git a/src/ui/VirtualRenderers/useSyncScrollMargin.test.ts b/src/ui/VirtualRenderers/useSyncScrollMargin.test.ts index 406d3d8158..eafc7e0e34 100644 --- a/src/ui/VirtualRenderers/useSyncScrollMargin.test.ts +++ b/src/ui/VirtualRenderers/useSyncScrollMargin.test.ts @@ -3,7 +3,7 @@ import { renderHook } from '@testing-library/react' import { useSyncScrollMargin } from './useSyncScrollMargin' class ResizeObserverMock { - callback = (x: any) => null + callback = (_x: any) => null constructor(callback: any) { this.callback = callback diff --git a/src/ui/VirtualRenderers/useSyncTotalWidth.test.tsx b/src/ui/VirtualRenderers/useSyncTotalWidth.test.tsx index 20f2af9df2..4f06f747c8 100644 --- a/src/ui/VirtualRenderers/useSyncTotalWidth.test.tsx +++ b/src/ui/VirtualRenderers/useSyncTotalWidth.test.tsx @@ -14,7 +14,7 @@ window.scrollTo = scrollToMock window.scrollY = 100 class ResizeObserverMock { - callback = (x: any) => null + callback = (_x: any) => null constructor(callback: any) { this.callback = callback diff --git a/src/ui/VirtualRenderers/useSyncWrapperWidth.test.ts b/src/ui/VirtualRenderers/useSyncWrapperWidth.test.ts index 4f4eff3067..df4e6feb5f 100644 --- a/src/ui/VirtualRenderers/useSyncWrapperWidth.test.ts +++ b/src/ui/VirtualRenderers/useSyncWrapperWidth.test.ts @@ -3,7 +3,7 @@ import { act, renderHook } from '@testing-library/react' import { useSyncWrapperWidth } from './useSyncWrapperWidth' class ResizeObserverMock { - callback = (x: any) => null + callback = (_x: any) => null constructor(callback: any) { this.callback = callback diff --git a/src/vitest.setup.ts b/src/vitest.setup.ts index 761ec2ff06..8aa42fb3cd 100644 --- a/src/vitest.setup.ts +++ b/src/vitest.setup.ts @@ -35,7 +35,7 @@ beforeAll(() => { ...globalThis.jest, // This is a bit of a hack to get Vitest fake timers setup to work with waitFor and findBy's // GH Issue: https://github.com/testing-library/react-testing-library/issues/1197#issuecomment-1693824628 - // @ts-ignore-error + // @ts-expect-error - see above description advanceTimersByTime: vi.advanceTimersByTime.bind(vi), /* diff --git a/vite.config.mjs b/vite.config.mjs index 87a2fd124d..e995ca06bc 100644 --- a/vite.config.mjs +++ b/vite.config.mjs @@ -65,9 +65,9 @@ export default defineConfig((config) => { sourcemap: runSentryPlugin, rollupOptions: { output: { - entryFileNames: 'assets/[name].[hash:22].js', - chunkFileNames: 'assets/[name].[hash:22].js', - assetFileNames: 'assets/[name].[hash:22][extname]', + entryFileNames: 'assets/[name].[hash:21].js', + chunkFileNames: 'assets/[name].[hash:21].js', + assetFileNames: 'assets/[name].[hash:21][extname]', manualChunks: { vendor_react: ['react', 'react-dom', 'react/jsx-runtime'], vendor_react_router: [ diff --git a/yarn.lock b/yarn.lock index bc96ea58d1..d4e4bda763 100644 --- a/yarn.lock +++ b/yarn.lock @@ -174,7 +174,18 @@ __metadata: languageName: node linkType: hard -"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.10.4, @babel/code-frame@npm:^7.24.7": +"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.10.4": + version: 7.26.2 + resolution: "@babel/code-frame@npm:7.26.2" + dependencies: + "@babel/helper-validator-identifier": "npm:^7.25.9" + js-tokens: "npm:^4.0.0" + picocolors: "npm:^1.0.0" + checksum: 10c0/7d79621a6849183c415486af99b1a20b84737e8c11cd55b6544f688c51ce1fd710e6d869c3dd21232023da272a79b91efb3e83b5bc2dc65c1187c5fcd1b72ea8 + languageName: node + linkType: hard + +"@babel/code-frame@npm:^7.24.7": version: 7.24.7 resolution: "@babel/code-frame@npm:7.24.7" dependencies: @@ -382,7 +393,7 @@ __metadata: languageName: node linkType: hard -"@babel/generator@npm:^7.25.9, @babel/generator@npm:^7.26.0": +"@babel/generator@npm:^7.25.9": version: 7.26.0 resolution: "@babel/generator@npm:7.26.0" dependencies: @@ -395,16 +406,20 @@ __metadata: languageName: node linkType: hard -"@babel/helper-annotate-as-pure@npm:^7.18.6, @babel/helper-annotate-as-pure@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/helper-annotate-as-pure@npm:7.24.7" +"@babel/generator@npm:^7.26.0": + version: 7.26.3 + resolution: "@babel/generator@npm:7.26.3" dependencies: - "@babel/types": "npm:^7.24.7" - checksum: 10c0/4679f7df4dffd5b3e26083ae65228116c3da34c3fff2c11ae11b259a61baec440f51e30fd236f7a0435b9d471acd93d0bc5a95df8213cbf02b1e083503d81b9a + "@babel/parser": "npm:^7.26.3" + "@babel/types": "npm:^7.26.3" + "@jridgewell/gen-mapping": "npm:^0.3.5" + "@jridgewell/trace-mapping": "npm:^0.3.25" + jsesc: "npm:^3.0.2" + checksum: 10c0/54f260558e3e4ec8942da3cde607c35349bb983c3a7c5121243f96893fba3e8cd62e1f1773b2051f936f8c8a10987b758d5c7d76dbf2784e95bb63ab4843fa00 languageName: node linkType: hard -"@babel/helper-annotate-as-pure@npm:^7.25.9": +"@babel/helper-annotate-as-pure@npm:^7.18.6, @babel/helper-annotate-as-pure@npm:^7.25.9": version: 7.25.9 resolution: "@babel/helper-annotate-as-pure@npm:7.25.9" dependencies: @@ -413,6 +428,15 @@ __metadata: languageName: node linkType: hard +"@babel/helper-annotate-as-pure@npm:^7.24.7": + version: 7.24.7 + resolution: "@babel/helper-annotate-as-pure@npm:7.24.7" + dependencies: + "@babel/types": "npm:^7.24.7" + checksum: 10c0/4679f7df4dffd5b3e26083ae65228116c3da34c3fff2c11ae11b259a61baec440f51e30fd236f7a0435b9d471acd93d0bc5a95df8213cbf02b1e083503d81b9a + languageName: node + linkType: hard + "@babel/helper-builder-binary-assignment-operator-visitor@npm:^7.24.7": version: 7.24.7 resolution: "@babel/helper-builder-binary-assignment-operator-visitor@npm:7.24.7" @@ -433,7 +457,20 @@ __metadata: languageName: node linkType: hard -"@babel/helper-compilation-targets@npm:^7.22.6, @babel/helper-compilation-targets@npm:^7.24.7, @babel/helper-compilation-targets@npm:^7.24.8": +"@babel/helper-compilation-targets@npm:^7.22.6, @babel/helper-compilation-targets@npm:^7.25.9": + version: 7.25.9 + resolution: "@babel/helper-compilation-targets@npm:7.25.9" + dependencies: + "@babel/compat-data": "npm:^7.25.9" + "@babel/helper-validator-option": "npm:^7.25.9" + browserslist: "npm:^4.24.0" + lru-cache: "npm:^5.1.1" + semver: "npm:^6.3.1" + checksum: 10c0/a6b26a1e4222e69ef8e62ee19374308f060b007828bc11c65025ecc9e814aba21ff2175d6d3f8bf53c863edd728ee8f94ba7870f8f90a37d39552ad9933a8aaa + languageName: node + linkType: hard + +"@babel/helper-compilation-targets@npm:^7.24.7, @babel/helper-compilation-targets@npm:^7.24.8": version: 7.24.8 resolution: "@babel/helper-compilation-targets@npm:7.24.8" dependencies: @@ -472,19 +509,6 @@ __metadata: languageName: node linkType: hard -"@babel/helper-compilation-targets@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/helper-compilation-targets@npm:7.25.9" - dependencies: - "@babel/compat-data": "npm:^7.25.9" - "@babel/helper-validator-option": "npm:^7.25.9" - browserslist: "npm:^4.24.0" - lru-cache: "npm:^5.1.1" - semver: "npm:^6.3.1" - checksum: 10c0/a6b26a1e4222e69ef8e62ee19374308f060b007828bc11c65025ecc9e814aba21ff2175d6d3f8bf53c863edd728ee8f94ba7870f8f90a37d39552ad9933a8aaa - languageName: node - linkType: hard - "@babel/helper-create-class-features-plugin@npm:^7.18.6, @babel/helper-create-class-features-plugin@npm:^7.25.9": version: 7.25.9 resolution: "@babel/helper-create-class-features-plugin@npm:7.25.9" @@ -521,7 +545,20 @@ __metadata: languageName: node linkType: hard -"@babel/helper-create-regexp-features-plugin@npm:^7.18.6, @babel/helper-create-regexp-features-plugin@npm:^7.24.7": +"@babel/helper-create-regexp-features-plugin@npm:^7.18.6": + version: 7.26.3 + resolution: "@babel/helper-create-regexp-features-plugin@npm:7.26.3" + dependencies: + "@babel/helper-annotate-as-pure": "npm:^7.25.9" + regexpu-core: "npm:^6.2.0" + semver: "npm:^6.3.1" + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 10c0/266f30b99af621559467ed67634cb653408a9262930c0627c3d17691a9d477329fb4dabe4b1785cbf0490e892513d247836674271842d6a8da49fd0afae7d435 + languageName: node + linkType: hard + +"@babel/helper-create-regexp-features-plugin@npm:^7.24.7": version: 7.24.7 resolution: "@babel/helper-create-regexp-features-plugin@npm:7.24.7" dependencies: @@ -560,7 +597,7 @@ __metadata: languageName: node linkType: hard -"@babel/helper-define-polyfill-provider@npm:^0.6.1, @babel/helper-define-polyfill-provider@npm:^0.6.2": +"@babel/helper-define-polyfill-provider@npm:^0.6.1": version: 0.6.2 resolution: "@babel/helper-define-polyfill-provider@npm:0.6.2" dependencies: @@ -575,6 +612,21 @@ __metadata: languageName: node linkType: hard +"@babel/helper-define-polyfill-provider@npm:^0.6.2": + version: 0.6.3 + resolution: "@babel/helper-define-polyfill-provider@npm:0.6.3" + dependencies: + "@babel/helper-compilation-targets": "npm:^7.22.6" + "@babel/helper-plugin-utils": "npm:^7.22.5" + debug: "npm:^4.1.1" + lodash.debounce: "npm:^4.0.8" + resolve: "npm:^1.14.2" + peerDependencies: + "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 + checksum: 10c0/4320e3527645e98b6a0d5626fef815680e3b2b03ec36045de5e909b0f01546ab3674e96f50bf3bc8413f8c9037e5ee1a5f560ebdf8210426dad1c2c03c96184a + languageName: node + linkType: hard + "@babel/helper-environment-visitor@npm:^7.24.7": version: 7.24.7 resolution: "@babel/helper-environment-visitor@npm:7.24.7" @@ -741,20 +793,20 @@ __metadata: languageName: node linkType: hard -"@babel/helper-plugin-utils@npm:^7.0.0, @babel/helper-plugin-utils@npm:^7.10.4, @babel/helper-plugin-utils@npm:^7.12.13, @babel/helper-plugin-utils@npm:^7.14.5, @babel/helper-plugin-utils@npm:^7.18.6, @babel/helper-plugin-utils@npm:^7.20.2, @babel/helper-plugin-utils@npm:^7.22.5, @babel/helper-plugin-utils@npm:^7.24.7, @babel/helper-plugin-utils@npm:^7.24.8, @babel/helper-plugin-utils@npm:^7.8.0, @babel/helper-plugin-utils@npm:^7.8.3": - version: 7.24.8 - resolution: "@babel/helper-plugin-utils@npm:7.24.8" - checksum: 10c0/0376037f94a3bfe6b820a39f81220ac04f243eaee7193774b983e956c1750883ff236b30785795abbcda43fac3ece74750566830c2daa4d6e3870bb0dff34c2d - languageName: node - linkType: hard - -"@babel/helper-plugin-utils@npm:^7.25.9": +"@babel/helper-plugin-utils@npm:^7.0.0, @babel/helper-plugin-utils@npm:^7.10.4, @babel/helper-plugin-utils@npm:^7.14.5, @babel/helper-plugin-utils@npm:^7.18.6, @babel/helper-plugin-utils@npm:^7.20.2, @babel/helper-plugin-utils@npm:^7.22.5, @babel/helper-plugin-utils@npm:^7.25.9, @babel/helper-plugin-utils@npm:^7.8.0": version: 7.25.9 resolution: "@babel/helper-plugin-utils@npm:7.25.9" checksum: 10c0/483066a1ba36ff16c0116cd24f93de05de746a603a777cd695ac7a1b034928a65a4ecb35f255761ca56626435d7abdb73219eba196f9aa83b6c3c3169325599d languageName: node linkType: hard +"@babel/helper-plugin-utils@npm:^7.12.13, @babel/helper-plugin-utils@npm:^7.24.7, @babel/helper-plugin-utils@npm:^7.24.8, @babel/helper-plugin-utils@npm:^7.8.3": + version: 7.24.8 + resolution: "@babel/helper-plugin-utils@npm:7.24.8" + checksum: 10c0/0376037f94a3bfe6b820a39f81220ac04f243eaee7193774b983e956c1750883ff236b30785795abbcda43fac3ece74750566830c2daa4d6e3870bb0dff34c2d + languageName: node + linkType: hard + "@babel/helper-remap-async-to-generator@npm:^7.24.7": version: 7.24.7 resolution: "@babel/helper-remap-async-to-generator@npm:7.24.7" @@ -1053,7 +1105,18 @@ __metadata: languageName: node linkType: hard -"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.23.0, @babel/parser@npm:^7.24.7, @babel/parser@npm:^7.24.8": +"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.26.3": + version: 7.26.3 + resolution: "@babel/parser@npm:7.26.3" + dependencies: + "@babel/types": "npm:^7.26.3" + bin: + parser: ./bin/babel-parser.js + checksum: 10c0/48f736374e61cfd10ddbf7b80678514ae1f16d0e88bc793d2b505d73d9b987ea786fc8c2f7ee8f8b8c467df062030eb07fd0eb2168f0f541ca1f542775852cad + languageName: node + linkType: hard + +"@babel/parser@npm:^7.23.0, @babel/parser@npm:^7.24.7, @babel/parser@npm:^7.24.8": version: 7.24.8 resolution: "@babel/parser@npm:7.24.8" bin: @@ -3417,6 +3480,16 @@ __metadata: languageName: node linkType: hard +"@babel/types@npm:^7.26.3": + version: 7.26.3 + resolution: "@babel/types@npm:7.26.3" + dependencies: + "@babel/helper-string-parser": "npm:^7.25.9" + "@babel/helper-validator-identifier": "npm:^7.25.9" + checksum: 10c0/966c5242c5e55c8704bf7a7418e7be2703a0afa4d19a8480999d5a4ef13d095dd60686615fe5983cb7593b4b06ba3a7de8d6ca501c1d78bdd233a10d90be787b + languageName: node + linkType: hard + "@base2/pretty-print-object@npm:1.0.1": version: 1.0.1 resolution: "@base2/pretty-print-object@npm:1.0.1" @@ -3652,18 +3725,7 @@ __metadata: languageName: node linkType: hard -"@eslint-community/eslint-utils@npm:^4.2.0": - version: 4.4.0 - resolution: "@eslint-community/eslint-utils@npm:4.4.0" - dependencies: - eslint-visitor-keys: "npm:^3.3.0" - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - checksum: 10c0/7e559c4ce59cd3a06b1b5a517b593912e680a7f981ae7affab0d01d709e99cd5647019be8fafa38c350305bc32f1f7d42c7073edde2ab536c745e365f37b607e - languageName: node - linkType: hard - -"@eslint-community/eslint-utils@npm:^4.4.0": +"@eslint-community/eslint-utils@npm:^4.2.0, @eslint-community/eslint-utils@npm:^4.4.0": version: 4.4.1 resolution: "@eslint-community/eslint-utils@npm:4.4.1" dependencies: @@ -4258,7 +4320,7 @@ __metadata: languageName: node linkType: hard -"@radix-ui/react-collapsible@npm:1.1.0, @radix-ui/react-collapsible@npm:^1.0.3": +"@radix-ui/react-collapsible@npm:1.1.0": version: 1.1.0 resolution: "@radix-ui/react-collapsible@npm:1.1.0" dependencies: @@ -4284,6 +4346,32 @@ __metadata: languageName: node linkType: hard +"@radix-ui/react-collapsible@npm:^1.0.3": + version: 1.1.1 + resolution: "@radix-ui/react-collapsible@npm:1.1.1" + dependencies: + "@radix-ui/primitive": "npm:1.1.0" + "@radix-ui/react-compose-refs": "npm:1.1.0" + "@radix-ui/react-context": "npm:1.1.1" + "@radix-ui/react-id": "npm:1.1.0" + "@radix-ui/react-presence": "npm:1.1.1" + "@radix-ui/react-primitive": "npm:2.0.0" + "@radix-ui/react-use-controllable-state": "npm:1.1.0" + "@radix-ui/react-use-layout-effect": "npm:1.1.0" + peerDependencies: + "@types/react": "*" + "@types/react-dom": "*" + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + "@types/react": + optional: true + "@types/react-dom": + optional: true + checksum: 10c0/e3a510c8f3a31709add35c31e3e108a2bc4db2df06e9e50cb5f25144b1cf9596b8118ad2618f851fa7c1498e057938f641a842a6770b5b7b6cd068cd2b4914f1 + languageName: node + linkType: hard + "@radix-ui/react-collection@npm:1.1.0": version: 1.1.0 resolution: "@radix-ui/react-collection@npm:1.1.0" @@ -4332,6 +4420,19 @@ __metadata: languageName: node linkType: hard +"@radix-ui/react-context@npm:1.1.1": + version: 1.1.1 + resolution: "@radix-ui/react-context@npm:1.1.1" + peerDependencies: + "@types/react": "*" + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + "@types/react": + optional: true + checksum: 10c0/fc4ace9d79d7954c715ade765e06c95d7e1b12a63a536bcbe842fb904f03f88fc5bd6e38d44bd23243d37a270b4c44380fedddaeeae2d274f0b898a20665aba2 + languageName: node + linkType: hard + "@radix-ui/react-direction@npm:1.1.0": version: 1.1.0 resolution: "@radix-ui/react-direction@npm:1.1.0" @@ -4598,6 +4699,26 @@ __metadata: languageName: node linkType: hard +"@radix-ui/react-presence@npm:1.1.1": + version: 1.1.1 + resolution: "@radix-ui/react-presence@npm:1.1.1" + dependencies: + "@radix-ui/react-compose-refs": "npm:1.1.0" + "@radix-ui/react-use-layout-effect": "npm:1.1.0" + peerDependencies: + "@types/react": "*" + "@types/react-dom": "*" + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + peerDependenciesMeta: + "@types/react": + optional: true + "@types/react-dom": + optional: true + checksum: 10c0/777cda0406450ff5ca0e49235e486237723323d046a3382e35a0e78eededccfc95a76a9b5fecd7404dac793264762f4bc10111af1e08f8cc2d4d571d7971220e + languageName: node + linkType: hard + "@radix-ui/react-primitive@npm:2.0.0": version: 2.0.0 resolution: "@radix-ui/react-primitive@npm:2.0.0" @@ -4850,18 +4971,18 @@ __metadata: linkType: hard "@rollup/pluginutils@npm:^5.0.2": - version: 5.1.2 - resolution: "@rollup/pluginutils@npm:5.1.2" + version: 5.1.3 + resolution: "@rollup/pluginutils@npm:5.1.3" dependencies: "@types/estree": "npm:^1.0.0" estree-walker: "npm:^2.0.2" - picomatch: "npm:^2.3.1" + picomatch: "npm:^4.0.2" peerDependencies: rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 peerDependenciesMeta: rollup: optional: true - checksum: 10c0/30f4a98e91a8699b6666b64ecdc665439bd53dddbe964bbeca56da81ff889cfde3a3e059144b80c5a2d9b48aa158df18a45e9a847a33b757d3e8336b278b8836 + checksum: 10c0/ba46ad588733fb01d184ee3bc7a127d626158bc840b5874a94c129ff62689d12f16f537530709c54da6f3b71f67d705c4e09235b1dc9542e9d47ee8f2d0b8b9e languageName: node linkType: hard @@ -5240,7 +5361,7 @@ __metadata: languageName: node linkType: hard -"@storybook/addon-actions@npm:8.3.4, @storybook/addon-actions@npm:^8.3.4": +"@storybook/addon-actions@npm:8.3.4": version: 8.3.4 resolution: "@storybook/addon-actions@npm:8.3.4" dependencies: @@ -5255,6 +5376,21 @@ __metadata: languageName: node linkType: hard +"@storybook/addon-actions@npm:^8.3.4": + version: 8.4.6 + resolution: "@storybook/addon-actions@npm:8.4.6" + dependencies: + "@storybook/global": "npm:^5.0.0" + "@types/uuid": "npm:^9.0.1" + dequal: "npm:^2.0.2" + polished: "npm:^4.2.2" + uuid: "npm:^9.0.0" + peerDependencies: + storybook: ^8.4.6 + checksum: 10c0/80b2feceacb4ebe7f2be06b2fe3f49ded5ee08ca8bd036ff47a65d45d8796d29081ccadd0526984c8022bcfa24348e0ad4ce3f37cee4a60a928bae372bfc8afe + languageName: node + linkType: hard + "@storybook/addon-backgrounds@npm:8.3.4": version: 8.3.4 resolution: "@storybook/addon-backgrounds@npm:8.3.4" @@ -5396,7 +5532,7 @@ __metadata: languageName: node linkType: hard -"@storybook/blocks@npm:8.3.4, @storybook/blocks@npm:^8.3.4": +"@storybook/blocks@npm:8.3.4": version: 8.3.4 resolution: "@storybook/blocks@npm:8.3.4" dependencies: @@ -5427,7 +5563,27 @@ __metadata: languageName: node linkType: hard -"@storybook/builder-vite@npm:8.3.4, @storybook/builder-vite@npm:^8.3.4": +"@storybook/blocks@npm:^8.3.4": + version: 8.4.6 + resolution: "@storybook/blocks@npm:8.4.6" + dependencies: + "@storybook/csf": "npm:^0.1.11" + "@storybook/icons": "npm:^1.2.12" + ts-dedent: "npm:^2.0.0" + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta + storybook: ^8.4.6 + peerDependenciesMeta: + react: + optional: true + react-dom: + optional: true + checksum: 10c0/36d79c3aeb3d27f4ba966d62302e13fc17fd7b450dbfbcf538adfc6df3cfecb13c92f9d2542871fa747a77d7c770e413b358623049135355fb01454d6eb52d9a + languageName: node + linkType: hard + +"@storybook/builder-vite@npm:8.3.4": version: 8.3.4 resolution: "@storybook/builder-vite@npm:8.3.4" dependencies: @@ -5457,6 +5613,20 @@ __metadata: languageName: node linkType: hard +"@storybook/builder-vite@npm:^8.3.4": + version: 8.4.6 + resolution: "@storybook/builder-vite@npm:8.4.6" + dependencies: + "@storybook/csf-plugin": "npm:8.4.6" + browser-assert: "npm:^1.2.1" + ts-dedent: "npm:^2.0.0" + peerDependencies: + storybook: ^8.4.6 + vite: ^4.0.0 || ^5.0.0 || ^6.0.0 + checksum: 10c0/36998ffea04023a9f634ebbafe0d1ab3bd3e7c7fec8e8e6c4caef3ce0c94ce01fa44f332f40d0053edb788548f95096baf8561cd35c23fe3c9bcfd872f74f631 + languageName: node + linkType: hard + "@storybook/codemod@npm:8.2.6": version: 8.2.6 resolution: "@storybook/codemod@npm:8.2.6" @@ -5478,6 +5648,15 @@ __metadata: languageName: node linkType: hard +"@storybook/components@npm:8.4.6": + version: 8.4.6 + resolution: "@storybook/components@npm:8.4.6" + peerDependencies: + storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0 + checksum: 10c0/1622b2f12b6d18e5c495a623deb2930888b3e8b173a271cbe42a7cbd6e14e80b736c57792ea97d5269dff0e6c0db40385d3ea80ab6e46d4cb6e104aee6cac6bc + languageName: node + linkType: hard + "@storybook/components@npm:^8.3.4": version: 8.3.4 resolution: "@storybook/components@npm:8.3.4" @@ -5517,7 +5696,18 @@ __metadata: languageName: node linkType: hard -"@storybook/csf@npm:0.1.11, @storybook/csf@npm:^0.1.11": +"@storybook/csf-plugin@npm:8.4.6": + version: 8.4.6 + resolution: "@storybook/csf-plugin@npm:8.4.6" + dependencies: + unplugin: "npm:^1.3.1" + peerDependencies: + storybook: ^8.4.6 + checksum: 10c0/d771f36ee768c6ff62ecd930c6ff64a4ba45bdbb7f7fb41e5f4ffd02204e3f54b17ed091049b265a6d371922bf599bfe749eb9deabfcd7e2b4fb5a5444655241 + languageName: node + linkType: hard + +"@storybook/csf@npm:0.1.11": version: 0.1.11 resolution: "@storybook/csf@npm:0.1.11" dependencies: @@ -5535,6 +5725,15 @@ __metadata: languageName: node linkType: hard +"@storybook/csf@npm:^0.1.11": + version: 0.1.12 + resolution: "@storybook/csf@npm:0.1.12" + dependencies: + type-fest: "npm:^2.19.0" + checksum: 10c0/3d96a976ada67eb683279338d1eb6aa730b228107d4c4f6616ea7b94061899c1fdc11957a756e7bc0708d18cb39af0010c865d124efd84559cd82dcb2d8bc959 + languageName: node + linkType: hard + "@storybook/global@npm:^5.0.0": version: 5.0.0 resolution: "@storybook/global@npm:5.0.0" @@ -5542,7 +5741,7 @@ __metadata: languageName: node linkType: hard -"@storybook/icons@npm:^1.2.10": +"@storybook/icons@npm:^1.2.10, @storybook/icons@npm:^1.2.12": version: 1.2.12 resolution: "@storybook/icons@npm:1.2.12" peerDependencies: @@ -5552,6 +5751,15 @@ __metadata: languageName: node linkType: hard +"@storybook/manager-api@npm:8.4.6": + version: 8.4.6 + resolution: "@storybook/manager-api@npm:8.4.6" + peerDependencies: + storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0 + checksum: 10c0/5921ec72df0be765bd398aa906186c9b121a8b3415a7e1a10014a8d17c44aec386b59de3d240017bfc925be00c40a4da8d26991b5fa39023f23ba8efe1b0d58e + languageName: node + linkType: hard + "@storybook/manager-api@npm:^8.3.4": version: 8.3.4 resolution: "@storybook/manager-api@npm:8.3.4" @@ -5570,6 +5778,15 @@ __metadata: languageName: node linkType: hard +"@storybook/preview-api@npm:8.4.6": + version: 8.4.6 + resolution: "@storybook/preview-api@npm:8.4.6" + peerDependencies: + storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0 + checksum: 10c0/63967f4813c75e410634bff20189b5a670a061cfeeaa601ec07f0de82e2b4955af292836030d5a8432c3c7e48968285e121ed2bb55d2b5c70d17dbb4ada3c051 + languageName: node + linkType: hard + "@storybook/preview-api@npm:^8.3.4": version: 8.3.4 resolution: "@storybook/preview-api@npm:8.3.4" @@ -5590,6 +5807,17 @@ __metadata: languageName: node linkType: hard +"@storybook/react-dom-shim@npm:8.4.6": + version: 8.4.6 + resolution: "@storybook/react-dom-shim@npm:8.4.6" + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta + storybook: ^8.4.6 + checksum: 10c0/b97c6faa3adc3efe1b7b6f5e38476e040c0a988b14db68e368d704c68f3f4d4bf7866b36607c118a0483242921b34944b5f5f72614d9852476476f6ead462e5c + languageName: node + linkType: hard + "@storybook/react-vite@npm:^8.3.4": version: 8.3.4 resolution: "@storybook/react-vite@npm:8.3.4" @@ -5612,7 +5840,7 @@ __metadata: languageName: node linkType: hard -"@storybook/react@npm:8.3.4, @storybook/react@npm:^8.3.4": +"@storybook/react@npm:8.3.4": version: 8.3.4 resolution: "@storybook/react@npm:8.3.4" dependencies: @@ -5651,6 +5879,40 @@ __metadata: languageName: node linkType: hard +"@storybook/react@npm:^8.3.4": + version: 8.4.6 + resolution: "@storybook/react@npm:8.4.6" + dependencies: + "@storybook/components": "npm:8.4.6" + "@storybook/global": "npm:^5.0.0" + "@storybook/manager-api": "npm:8.4.6" + "@storybook/preview-api": "npm:8.4.6" + "@storybook/react-dom-shim": "npm:8.4.6" + "@storybook/theming": "npm:8.4.6" + peerDependencies: + "@storybook/test": 8.4.6 + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta + storybook: ^8.4.6 + typescript: ">= 4.2.x" + peerDependenciesMeta: + "@storybook/test": + optional: true + typescript: + optional: true + checksum: 10c0/1441f8ab3be91757647c6b1a05eb1ef0d78a454ffd14b01a14fdde00e92a8be8fc7c8408c4670b46bc20a5a04995514f0890e98ed6ee35c362ff36141da02f02 + languageName: node + linkType: hard + +"@storybook/theming@npm:8.4.6": + version: 8.4.6 + resolution: "@storybook/theming@npm:8.4.6" + peerDependencies: + storybook: ^8.2.0 || ^8.3.0-0 || ^8.4.0-0 || ^8.5.0-0 || ^8.6.0-0 + checksum: 10c0/7d9c8e5ef2c1d974cd5258301350a2345890326e7be7a5ed6bdd0db70fd1648c0bbb8ee1d905f8e66fa57b75c47aefe7ec9772ec0bfb9691d127dcc19286e4c9 + languageName: node + linkType: hard + "@storybook/theming@npm:^8.3.4": version: 8.3.4 resolution: "@storybook/theming@npm:8.3.4" @@ -6728,7 +6990,17 @@ __metadata: languageName: node linkType: hard -"@types/react@npm:*, @types/react@npm:^16.8.0 || ^17.0.0 || ^18.0.0, @types/react@npm:^18.3.1": +"@types/react@npm:*, @types/react@npm:^18.3.1": + version: 18.3.13 + resolution: "@types/react@npm:18.3.13" + dependencies: + "@types/prop-types": "npm:*" + csstype: "npm:^3.0.2" + checksum: 10c0/91815e00157deb179fa670aa2dfc491952698b7743ffddca0e3e0f16e7a18454f3f5ef72321a07386c49e721563b9d280dbbdfae039face764e2fdd8ad949d4b + languageName: node + linkType: hard + +"@types/react@npm:^16.8.0 || ^17.0.0 || ^18.0.0": version: 18.3.3 resolution: "@types/react@npm:18.3.3" dependencies: @@ -7247,7 +7519,7 @@ __metadata: languageName: node linkType: hard -"acorn@npm:^8.11.3, acorn@npm:^8.8.1, acorn@npm:^8.8.2, acorn@npm:^8.9.0": +"acorn@npm:^8.11.3": version: 8.12.1 resolution: "acorn@npm:8.12.1" bin: @@ -7265,6 +7537,15 @@ __metadata: languageName: node linkType: hard +"acorn@npm:^8.14.0, acorn@npm:^8.8.1, acorn@npm:^8.8.2, acorn@npm:^8.9.0": + version: 8.14.0 + resolution: "acorn@npm:8.14.0" + bin: + acorn: bin/acorn + checksum: 10c0/6d4ee461a7734b2f48836ee0fbb752903606e576cc100eb49340295129ca0b452f3ba91ddd4424a1d4406a98adfb2ebb6bd0ff4c49d7a0930c10e462719bbfd7 + languageName: node + linkType: hard + "adjust-sourcemap-loader@npm:^4.0.0": version: 4.0.0 resolution: "adjust-sourcemap-loader@npm:4.0.0" @@ -7419,7 +7700,7 @@ __metadata: languageName: node linkType: hard -"aria-query@npm:5.3.0, aria-query@npm:^5.0.0": +"aria-query@npm:5.3.0": version: 5.3.0 resolution: "aria-query@npm:5.3.0" dependencies: @@ -7428,7 +7709,7 @@ __metadata: languageName: node linkType: hard -"aria-query@npm:^5.3.2": +"aria-query@npm:^5.0.0, aria-query@npm:^5.3.2": version: 5.3.2 resolution: "aria-query@npm:5.3.2" checksum: 10c0/003c7e3e2cff5540bf7a7893775fc614de82b0c5dde8ae823d47b7a28a9d4da1f7ed85f340bdb93d5649caa927755f0e31ecc7ab63edfdfc00c8ef07e505e03e @@ -7874,16 +8155,16 @@ __metadata: linkType: hard "browserslist@npm:^4.23.3, browserslist@npm:^4.24.0": - version: 4.24.0 - resolution: "browserslist@npm:4.24.0" + version: 4.24.2 + resolution: "browserslist@npm:4.24.2" dependencies: - caniuse-lite: "npm:^1.0.30001663" - electron-to-chromium: "npm:^1.5.28" + caniuse-lite: "npm:^1.0.30001669" + electron-to-chromium: "npm:^1.5.41" node-releases: "npm:^2.0.18" - update-browserslist-db: "npm:^1.1.0" + update-browserslist-db: "npm:^1.1.1" bin: browserslist: cli.js - checksum: 10c0/95e76ad522753c4c470427f6e3c8a4bb5478ff448841e22b3d3e53f89ecaf17b6984666d6c7e715c370f1e7fa0cf684f42e34e554236a8b2fab38ea76b9e4c52 + checksum: 10c0/d747c9fb65ed7b4f1abcae4959405707ed9a7b835639f8a9ba0da2911995a6ab9b0648fd05baf2a4d4e3cf7f9fdbad56d3753f91881e365992c1d49c8d88ff7a languageName: node linkType: hard @@ -7979,10 +8260,10 @@ __metadata: languageName: node linkType: hard -"caniuse-lite@npm:^1.0.30001663": - version: 1.0.30001666 - resolution: "caniuse-lite@npm:1.0.30001666" - checksum: 10c0/2d49e9be676233c24717f12aad3d01b3e5f902b457fe1deefaa8d82e64786788a8f79381ae437c61b50e15c9aea8aeb59871b1d54cb4c28b9190d53d292e2339 +"caniuse-lite@npm:^1.0.30001669": + version: 1.0.30001686 + resolution: "caniuse-lite@npm:1.0.30001686" + checksum: 10c0/41748e81c17c1a6a0fd6e515c93c8620004171fe6706027e45f837fde71e97173e85141b0dc11e07d53b4782f3741a6651cb0f7d395cc1c1860892355eabdfa2 languageName: node linkType: hard @@ -8058,7 +8339,7 @@ __metadata: languageName: node linkType: hard -"chokidar@npm:^3.5.3, chokidar@npm:^3.6.0": +"chokidar@npm:^3.5.3": version: 3.6.0 resolution: "chokidar@npm:3.6.0" dependencies: @@ -8737,15 +9018,15 @@ __metadata: languageName: node linkType: hard -"debug@npm:4, debug@npm:^4.0.0, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.4": - version: 4.3.5 - resolution: "debug@npm:4.3.5" +"debug@npm:4, debug@npm:^4.0.0, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.4, debug@npm:^4.3.6": + version: 4.3.7 + resolution: "debug@npm:4.3.7" dependencies: - ms: "npm:2.1.2" + ms: "npm:^2.1.3" peerDependenciesMeta: supports-color: optional: true - checksum: 10c0/082c375a2bdc4f4469c99f325ff458adad62a3fc2c482d59923c260cb08152f34e2659f72b3767db8bb2f21ca81a60a42d1019605a412132d7b9f59363a005cc + checksum: 10c0/1471db19c3b06d485a622d62f65947a19a23fbd0dd73f7fd3eafb697eec5360cde447fb075919987899b1a2096e85d35d4eb5a4de09a57600ac9cf7e6c8e768b languageName: node linkType: hard @@ -8758,18 +9039,6 @@ __metadata: languageName: node linkType: hard -"debug@npm:^4.3.6": - version: 4.3.7 - resolution: "debug@npm:4.3.7" - dependencies: - ms: "npm:^2.1.3" - peerDependenciesMeta: - supports-color: - optional: true - checksum: 10c0/1471db19c3b06d485a622d62f65947a19a23fbd0dd73f7fd3eafb697eec5360cde447fb075919987899b1a2096e85d35d4eb5a4de09a57600ac9cf7e6c8e768b - languageName: node - linkType: hard - "debug@npm:~4.3.6": version: 4.3.6 resolution: "debug@npm:4.3.6" @@ -9056,10 +9325,10 @@ __metadata: languageName: node linkType: hard -"electron-to-chromium@npm:^1.5.28": - version: 1.5.31 - resolution: "electron-to-chromium@npm:1.5.31" - checksum: 10c0/e8aecd88c4c6d50a9d459b4b222865b855bab8f1b52e82913804e18b7884f2887bd76c61b3aa08c2ccbdcda098dd8486443f75bf770f0138f21dd9e63548fca7 +"electron-to-chromium@npm:^1.5.41": + version: 1.5.70 + resolution: "electron-to-chromium@npm:1.5.70" + checksum: 10c0/135dfe5b764eb54afcd70ec6084430ea562706570a7104eda8b69e694c3ec900f8d0a2f2e90f0fc86f7dbc6435dad427ec1732bb88f4e62cc5c86c55265ebcf4 languageName: node linkType: hard @@ -9169,7 +9438,7 @@ __metadata: languageName: node linkType: hard -"es-abstract@npm:^1.17.5, es-abstract@npm:^1.23.1, es-abstract@npm:^1.23.3": +"es-abstract@npm:^1.17.5, es-abstract@npm:^1.23.3, es-abstract@npm:^1.23.5": version: 1.23.5 resolution: "es-abstract@npm:1.23.5" dependencies: @@ -9454,7 +9723,14 @@ __metadata: languageName: node linkType: hard -"escalade@npm:^3.1.1, escalade@npm:^3.1.2": +"escalade@npm:^3.1.1, escalade@npm:^3.2.0": + version: 3.2.0 + resolution: "escalade@npm:3.2.0" + checksum: 10c0/ced4dd3a78e15897ed3be74e635110bbf3b08877b0a41be50dcb325ee0e0b5f65fc2d50e9845194d7c4633f327e2e1c6cce00a71b617c5673df0374201d67f65 + languageName: node + linkType: hard + +"escalade@npm:^3.1.2": version: 3.1.2 resolution: "escalade@npm:3.1.2" checksum: 10c0/6b4adafecd0682f3aa1cd1106b8fff30e492c7015b178bc81b2d2f75106dabea6c6d6e8508fc491bd58e597c74abb0e8e2368f943ecb9393d4162e3c2f3cf287 @@ -10488,7 +10764,7 @@ __metadata: languageName: node linkType: hard -"get-intrinsic@npm:^1.1.3, get-intrinsic@npm:^1.2.1, get-intrinsic@npm:^1.2.3, get-intrinsic@npm:^1.2.4": +"get-intrinsic@npm:^1.2.1, get-intrinsic@npm:^1.2.3, get-intrinsic@npm:^1.2.4": version: 1.2.4 resolution: "get-intrinsic@npm:1.2.4" dependencies: @@ -10700,11 +10976,9 @@ __metadata: linkType: hard "gopd@npm:^1.0.1": - version: 1.0.1 - resolution: "gopd@npm:1.0.1" - dependencies: - get-intrinsic: "npm:^1.1.3" - checksum: 10c0/505c05487f7944c552cee72087bf1567debb470d4355b1335f2c262d218ebbff805cd3715448fe29b4b380bae6912561d0467233e4165830efd28da241418c63 + version: 1.2.0 + resolution: "gopd@npm:1.2.0" + checksum: 10c0/50fff1e04ba2b7737c097358534eacadad1e68d24cccee3272e04e007bed008e68d2614f3987788428fd192a5ae3889d08fb2331417e4fc4a9ab366b2043cead languageName: node linkType: hard @@ -10766,13 +11040,20 @@ __metadata: languageName: node linkType: hard -"has-symbols@npm:^1.0.2, has-symbols@npm:^1.0.3": +"has-symbols@npm:^1.0.2": version: 1.0.3 resolution: "has-symbols@npm:1.0.3" checksum: 10c0/e6922b4345a3f37069cdfe8600febbca791c94988c01af3394d86ca3360b4b93928bbf395859158f88099cb10b19d98e3bbab7c9ff2c1bd09cf665ee90afa2c3 languageName: node linkType: hard +"has-symbols@npm:^1.0.3": + version: 1.1.0 + resolution: "has-symbols@npm:1.1.0" + checksum: 10c0/dde0a734b17ae51e84b10986e651c664379018d10b91b6b0e9b293eddb32f0f069688c841fb40f19e9611546130153e0a2a48fd7f512891fb000ddfa36f5a20e + languageName: node + linkType: hard + "has-tostringtag@npm:^1.0.0, has-tostringtag@npm:^1.0.2": version: 1.0.2 resolution: "has-tostringtag@npm:1.0.2" @@ -11014,20 +11295,20 @@ __metadata: languageName: node linkType: hard -"ignore@npm:^5.2.0, ignore@npm:^5.2.4": - version: 5.3.1 - resolution: "ignore@npm:5.3.1" - checksum: 10c0/703f7f45ffb2a27fb2c5a8db0c32e7dee66b33a225d28e8db4e1be6474795f606686a6e3bcc50e1aa12f2042db4c9d4a7d60af3250511de74620fbed052ea4cd - languageName: node - linkType: hard - -"ignore@npm:^5.3.1": +"ignore@npm:^5.2.0, ignore@npm:^5.3.1": version: 5.3.2 resolution: "ignore@npm:5.3.2" checksum: 10c0/f9f652c957983634ded1e7f02da3b559a0d4cc210fca3792cb67f1b153623c9c42efdc1c4121af171e295444459fc4a9201101fb041b1104a3c000bccb188337 languageName: node linkType: hard +"ignore@npm:^5.2.4": + version: 5.3.1 + resolution: "ignore@npm:5.3.1" + checksum: 10c0/703f7f45ffb2a27fb2c5a8db0c32e7dee66b33a225d28e8db4e1be6474795f606686a6e3bcc50e1aa12f2042db4c9d4a7d60af3250511de74620fbed052ea4cd + languageName: node + linkType: hard + "import-fresh@npm:^3.2.1, import-fresh@npm:^3.3.0": version: 3.3.0 resolution: "import-fresh@npm:3.3.0" @@ -11207,16 +11488,7 @@ __metadata: languageName: node linkType: hard -"is-core-module@npm:^2.13.0": - version: 2.14.0 - resolution: "is-core-module@npm:2.14.0" - dependencies: - hasown: "npm:^2.0.2" - checksum: 10c0/ae8dbc82bd20426558bc8d20ce290ce301c1cfd6ae4446266d10cacff4c63c67ab16440ade1d72ced9ec41c569fbacbcee01e293782ce568527c4cdf35936e4c - languageName: node - linkType: hard - -"is-core-module@npm:^2.15.1": +"is-core-module@npm:^2.13.0, is-core-module@npm:^2.15.1": version: 2.15.1 resolution: "is-core-module@npm:2.15.1" dependencies: @@ -11250,12 +11522,12 @@ __metadata: languageName: node linkType: hard -"is-finalizationregistry@npm:^1.0.2": - version: 1.0.2 - resolution: "is-finalizationregistry@npm:1.0.2" +"is-finalizationregistry@npm:^1.1.0": + version: 1.1.0 + resolution: "is-finalizationregistry@npm:1.1.0" dependencies: - call-bind: "npm:^1.0.2" - checksum: 10c0/81caecc984d27b1a35c68741156fc651fb1fa5e3e6710d21410abc527eb226d400c0943a167922b2e920f6b3e58b0dede9aa795882b038b85f50b3a4b877db86 + call-bind: "npm:^1.0.7" + checksum: 10c0/1cd94236bfb6e060fe2b973c8726a2782727f7d495b3e8e1d51d3e619c5a3345413706f555956eb5b12af15eba0414118f64a1b19d793ec36b5e6767a13836ac languageName: node linkType: hard @@ -11435,7 +11707,7 @@ __metadata: languageName: node linkType: hard -"is-string@npm:^1.0.5, is-string@npm:^1.0.7": +"is-string@npm:^1.0.5": version: 1.0.7 resolution: "is-string@npm:1.0.7" dependencies: @@ -11444,6 +11716,16 @@ __metadata: languageName: node linkType: hard +"is-string@npm:^1.0.7": + version: 1.1.0 + resolution: "is-string@npm:1.1.0" + dependencies: + call-bind: "npm:^1.0.7" + has-tostringtag: "npm:^1.0.2" + checksum: 10c0/2781bce7bfdb00276d000a7aafccad8038a7b5cb06abbfc638417a705dd41bca259977af78731dc8a87f170783c94c9f684bc086fc4856b623c1fd942c509b6b + languageName: node + linkType: hard + "is-symbol@npm:^1.0.2, is-symbol@npm:^1.0.3": version: 1.0.4 resolution: "is-symbol@npm:1.0.4" @@ -12128,7 +12410,14 @@ __metadata: languageName: node linkType: hard -"loupe@npm:^3.1.0, loupe@npm:^3.1.1": +"loupe@npm:^3.1.0": + version: 3.1.2 + resolution: "loupe@npm:3.1.2" + checksum: 10c0/b13c02e3ddd6a9d5f8bf84133b3242de556512d824dddeea71cce2dbd6579c8f4d672381c4e742d45cf4423d0701765b4a6e5fbc24701def16bc2b40f8daa96a + languageName: node + linkType: hard + +"loupe@npm:^3.1.1": version: 3.1.1 resolution: "loupe@npm:3.1.1" dependencies: @@ -12198,7 +12487,16 @@ __metadata: languageName: node linkType: hard -"magic-string@npm:^0.30.0, magic-string@npm:^0.30.11": +"magic-string@npm:^0.30.0": + version: 0.30.14 + resolution: "magic-string@npm:0.30.14" + dependencies: + "@jridgewell/sourcemap-codec": "npm:^1.5.0" + checksum: 10c0/c52c2a6e699dfa8a840e13154da35464a40cd8b07049b695a8b282883b0426c0811af1e36ac26860b4267289340b42772c156a5608e87be97b63d510e617e87a + languageName: node + linkType: hard + +"magic-string@npm:^0.30.11": version: 0.30.11 resolution: "magic-string@npm:0.30.11" dependencies: @@ -13328,14 +13626,7 @@ __metadata: languageName: node linkType: hard -"object-inspect@npm:^1.13.1": - version: 1.13.2 - resolution: "object-inspect@npm:1.13.2" - checksum: 10c0/b97835b4c91ec37b5fd71add84f21c3f1047d1d155d00c0fcd6699516c256d4fcc6ff17a1aced873197fe447f91a3964178fd2a67a1ee2120cdaf60e81a050b4 - languageName: node - linkType: hard - -"object-inspect@npm:^1.13.3": +"object-inspect@npm:^1.13.1, object-inspect@npm:^1.13.3": version: 1.13.3 resolution: "object-inspect@npm:1.13.3" checksum: 10c0/cc3f15213406be89ffdc54b525e115156086796a515410a8d390215915db9f23c8eab485a06f1297402f440a33715fe8f71a528c1dcbad6e1a3bcaf5a46921d4 @@ -13704,10 +13995,10 @@ __metadata: languageName: node linkType: hard -"picocolors@npm:^1.0.0, picocolors@npm:^1.0.1": - version: 1.0.1 - resolution: "picocolors@npm:1.0.1" - checksum: 10c0/c63cdad2bf812ef0d66c8db29583802355d4ca67b9285d846f390cc15c2f6ccb94e8cb7eb6a6e97fc5990a6d3ad4ae42d86c84d3146e667c739a4234ed50d400 +"picocolors@npm:^1.0.0, picocolors@npm:^1.0.1, picocolors@npm:^1.1.1": + version: 1.1.1 + resolution: "picocolors@npm:1.1.1" + checksum: 10c0/e2e3e8170ab9d7c7421969adaa7e1b31434f789afb9b3f115f6b96d91945041ac3ceb02e9ec6fe6510ff036bcc0bf91e69a1772edc0b707e12b19c0f2d6bcf58 languageName: node linkType: hard @@ -13895,7 +14186,7 @@ __metadata: languageName: node linkType: hard -"postcss@npm:^8.4.23, postcss@npm:^8.4.31, postcss@npm:^8.4.4": +"postcss@npm:^8.4.23": version: 8.4.39 resolution: "postcss@npm:8.4.39" dependencies: @@ -13906,6 +14197,17 @@ __metadata: languageName: node linkType: hard +"postcss@npm:^8.4.31, postcss@npm:^8.4.4": + version: 8.4.49 + resolution: "postcss@npm:8.4.49" + dependencies: + nanoid: "npm:^3.3.7" + picocolors: "npm:^1.1.1" + source-map-js: "npm:^1.2.1" + checksum: 10c0/f1b3f17aaf36d136f59ec373459f18129908235e65dbdc3aee5eef8eba0756106f52de5ec4682e29a2eab53eb25170e7e871b3e4b52a8f1de3d344a514306be3 + languageName: node + linkType: hard + "postcss@npm:^8.4.43": version: 8.4.47 resolution: "postcss@npm:8.4.47" @@ -13924,7 +14226,7 @@ __metadata: languageName: node linkType: hard -"prettier@npm:^3.1.1, prettier@npm:^3.3.3": +"prettier@npm:^3.1.1": version: 3.3.3 resolution: "prettier@npm:3.3.3" bin: @@ -13933,6 +14235,15 @@ __metadata: languageName: node linkType: hard +"prettier@npm:^3.3.3": + version: 3.4.2 + resolution: "prettier@npm:3.4.2" + bin: + prettier: bin/prettier.cjs + checksum: 10c0/99e076a26ed0aba4ebc043880d0f08bbb8c59a4c6641cdee6cdadf2205bdd87aa1d7823f50c3aea41e015e99878d37c58d7b5f0e663bba0ef047f94e36b96446 + languageName: node + linkType: hard + "pretty-format@npm:^27.0.2": version: 27.5.1 resolution: "pretty-format@npm:27.5.1" @@ -14578,17 +14889,17 @@ __metadata: linkType: hard "reflect.getprototypeof@npm:^1.0.4": - version: 1.0.6 - resolution: "reflect.getprototypeof@npm:1.0.6" + version: 1.0.7 + resolution: "reflect.getprototypeof@npm:1.0.7" dependencies: call-bind: "npm:^1.0.7" define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.1" + es-abstract: "npm:^1.23.5" es-errors: "npm:^1.3.0" get-intrinsic: "npm:^1.2.4" - globalthis: "npm:^1.0.3" - which-builtin-type: "npm:^1.1.3" - checksum: 10c0/baf4ef8ee6ff341600f4720b251cf5a6cb552d6a6ab0fdc036988c451bf16f920e5feb0d46bd4f530a5cce568f1f7aca2d77447ca798920749cfc52783c39b55 + gopd: "npm:^1.0.1" + which-builtin-type: "npm:^1.1.4" + checksum: 10c0/841814f7631b55ee42e198cb14a5c25c0752431ab8f0ad9794c32d46ab9fb0d5ba4939edac1f99a174a21443a1400a72bccbbb9ccd9277e4b4bf6d14aabb31c8 languageName: node linkType: hard @@ -14640,19 +14951,7 @@ __metadata: languageName: node linkType: hard -"regexp.prototype.flags@npm:^1.5.2": - version: 1.5.2 - resolution: "regexp.prototype.flags@npm:1.5.2" - dependencies: - call-bind: "npm:^1.0.6" - define-properties: "npm:^1.2.1" - es-errors: "npm:^1.3.0" - set-function-name: "npm:^2.0.1" - checksum: 10c0/0f3fc4f580d9c349f8b560b012725eb9c002f36daa0041b3fbf6f4238cb05932191a4d7d5db3b5e2caa336d5150ad0402ed2be81f711f9308fe7e1a9bf9bd552 - languageName: node - linkType: hard - -"regexp.prototype.flags@npm:^1.5.3": +"regexp.prototype.flags@npm:^1.5.2, regexp.prototype.flags@npm:^1.5.3": version: 1.5.3 resolution: "regexp.prototype.flags@npm:1.5.3" dependencies: @@ -14692,6 +14991,20 @@ __metadata: languageName: node linkType: hard +"regexpu-core@npm:^6.2.0": + version: 6.2.0 + resolution: "regexpu-core@npm:6.2.0" + dependencies: + regenerate: "npm:^1.4.2" + regenerate-unicode-properties: "npm:^10.2.0" + regjsgen: "npm:^0.8.0" + regjsparser: "npm:^0.12.0" + unicode-match-property-ecmascript: "npm:^2.0.0" + unicode-match-property-value-ecmascript: "npm:^2.1.0" + checksum: 10c0/bbcb83a854bf96ce4005ee4e4618b71c889cda72674ce6092432f0039b47890c2d0dfeb9057d08d440999d9ea03879ebbb7f26ca005ccf94390e55c348859b98 + languageName: node + linkType: hard + "regjsgen@npm:^0.8.0": version: 0.8.0 resolution: "regjsgen@npm:0.8.0" @@ -14710,6 +15023,17 @@ __metadata: languageName: node linkType: hard +"regjsparser@npm:^0.12.0": + version: 0.12.0 + resolution: "regjsparser@npm:0.12.0" + dependencies: + jsesc: "npm:~3.0.2" + bin: + regjsparser: bin/parser + checksum: 10c0/99d3e4e10c8c7732eb7aa843b8da2fd8b647fe144d3711b480e4647dc3bff4b1e96691ccf17f3ace24aa866a50b064236177cb25e6e4fbbb18285d99edaed83b + languageName: node + linkType: hard + "regjsparser@npm:^0.9.1": version: 0.9.1 resolution: "regjsparser@npm:0.9.1" @@ -15134,16 +15458,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.5.3, semver@npm:^7.5.4": - version: 7.6.2 - resolution: "semver@npm:7.6.2" - bin: - semver: bin/semver.js - checksum: 10c0/97d3441e97ace8be4b1976433d1c32658f6afaff09f143e52c593bae7eef33de19e3e369c88bd985ce1042c6f441c80c6803078d1de2a9988080b66684cbb30c - languageName: node - linkType: hard - -"semver@npm:^7.6.0": +"semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.5.3, semver@npm:^7.5.4, semver@npm:^7.6.0": version: 7.6.3 resolution: "semver@npm:7.6.3" bin: @@ -15373,14 +15688,7 @@ __metadata: languageName: node linkType: hard -"source-map-js@npm:^1.0.2, source-map-js@npm:^1.2.0": - version: 1.2.0 - resolution: "source-map-js@npm:1.2.0" - checksum: 10c0/7e5f896ac10a3a50fe2898e5009c58ff0dc102dcb056ed27a354623a0ece8954d4b2649e1a1b2b52ef2e161d26f8859c7710350930751640e71e374fe2d321a4 - languageName: node - linkType: hard - -"source-map-js@npm:^1.2.1": +"source-map-js@npm:^1.0.2, source-map-js@npm:^1.2.0, source-map-js@npm:^1.2.1": version: 1.2.1 resolution: "source-map-js@npm:1.2.1" checksum: 10c0/7bda1fc4c197e3c6ff17de1b8b2c20e60af81b63a52cb32ec5a5d67a20a7d42651e2cb34ebe93833c5a2a084377e17455854fee3e21e7925c64a51b6a52b0faf @@ -16557,14 +16865,12 @@ __metadata: linkType: hard "unplugin@npm:^1.10.1, unplugin@npm:^1.3.1": - version: 1.11.0 - resolution: "unplugin@npm:1.11.0" + version: 1.16.0 + resolution: "unplugin@npm:1.16.0" dependencies: - acorn: "npm:^8.11.3" - chokidar: "npm:^3.6.0" - webpack-sources: "npm:^3.2.3" - webpack-virtual-modules: "npm:^0.6.1" - checksum: 10c0/513d9da646cbbf7b69041c4a26f324c947a9533b729686c15597a5f05e25bfbb7c2dd28d944026ab2dc75b067aa385734260279e1f70d60fd46b4481de796735 + acorn: "npm:^8.14.0" + webpack-virtual-modules: "npm:^0.6.2" + checksum: 10c0/547f6bd5ec1dd7411533e68e73c60d5e9527e68d52aa326442650d084866ed3307ac68719068abae23ceab09db197cad43b382a7e69c2d8ca338b27802392fed languageName: node linkType: hard @@ -16597,6 +16903,20 @@ __metadata: languageName: node linkType: hard +"update-browserslist-db@npm:^1.1.1": + version: 1.1.1 + resolution: "update-browserslist-db@npm:1.1.1" + dependencies: + escalade: "npm:^3.2.0" + picocolors: "npm:^1.1.0" + peerDependencies: + browserslist: ">= 4.21.0" + bin: + update-browserslist-db: cli.js + checksum: 10c0/536a2979adda2b4be81b07e311bd2f3ad5e978690987956bc5f514130ad50cac87cd22c710b686d79731e00fbee8ef43efe5fcd72baa241045209195d43dcc80 + languageName: node + linkType: hard + "uri-js@npm:^4.2.2": version: 4.4.1 resolution: "uri-js@npm:4.4.1" @@ -16828,8 +17148,8 @@ __metadata: linkType: hard "vite@npm:^5.0.0": - version: 5.4.8 - resolution: "vite@npm:5.4.8" + version: 5.4.11 + resolution: "vite@npm:5.4.11" dependencies: esbuild: "npm:^0.21.3" fsevents: "npm:~2.3.3" @@ -16866,7 +17186,7 @@ __metadata: optional: true bin: vite: bin/vite.js - checksum: 10c0/af70af6d6316a3af71f44ebe3ab343bd66450d4157af73af3b32239e1b6ec43ff6f651d7cc4193b21ed3bff2e9356a3de9e96aee53857f39922e4a2d9fad75a1 + checksum: 10c0/d536bb7af57dd0eca2a808f95f5ff1d7b7ffb8d86e17c6893087680a0448bd0d15e07475270c8a6de65cb5115592d037130a1dd979dc76bcef8c1dda202a1874 languageName: node linkType: hard @@ -17024,7 +17344,7 @@ __metadata: languageName: node linkType: hard -"webpack-virtual-modules@npm:^0.6.1, webpack-virtual-modules@npm:^0.6.2": +"webpack-virtual-modules@npm:^0.6.2": version: 0.6.2 resolution: "webpack-virtual-modules@npm:0.6.2" checksum: 10c0/5ffbddf0e84bf1562ff86cf6fcf039c74edf09d78358a6904a09bbd4484e8bb6812dc385fe14330b715031892dcd8423f7a88278b57c9f5002c84c2860179add @@ -17080,15 +17400,16 @@ __metadata: languageName: node linkType: hard -"which-builtin-type@npm:^1.1.3": - version: 1.1.4 - resolution: "which-builtin-type@npm:1.1.4" +"which-builtin-type@npm:^1.1.4": + version: 1.2.0 + resolution: "which-builtin-type@npm:1.2.0" dependencies: + call-bind: "npm:^1.0.7" function.prototype.name: "npm:^1.1.6" has-tostringtag: "npm:^1.0.2" is-async-function: "npm:^2.0.0" is-date-object: "npm:^1.0.5" - is-finalizationregistry: "npm:^1.0.2" + is-finalizationregistry: "npm:^1.1.0" is-generator-function: "npm:^1.0.10" is-regex: "npm:^1.1.4" is-weakref: "npm:^1.0.2" @@ -17096,7 +17417,7 @@ __metadata: which-boxed-primitive: "npm:^1.0.2" which-collection: "npm:^1.0.2" which-typed-array: "npm:^1.1.15" - checksum: 10c0/a4a76d20d869a81b1dbb4adea31edc7e6c1a4466d3ab7c2cd757c9219d48d3723b04076c85583257b0f0f8e3ebe5af337248b8ceed57b9051cb97bce5bd881d1 + checksum: 10c0/7cd4a8ccfa6a3cb7c2296c716e7266b9f31a66f3e131fe7b185232c16d3ad21442046ec1798c4ec1e19dce7eb99c7751377192e5e734dc07042d14ec0f09b332 languageName: node linkType: hard