From 4ff16644b58049377ecf474fa36d9c9ec4c356e3 Mon Sep 17 00:00:00 2001 From: Alan Greene Date: Fri, 26 Apr 2024 15:50:47 +0100 Subject: [PATCH 1/2] Run React jsx codemod to remove unnecessary `React` import Importing `React` is not required to use JSX, so run the codemod provided by the React team to refactor / eliminate these: `npx react-codemod update-react-imports` --- .eslintrc.cjs | 5 +++-- .storybook/Container.jsx | 7 +++---- .storybook/preview.jsx | 3 +-- index.jsx | 8 ++++---- .../components/src/components/Actions/Actions.jsx | 4 ++-- .../src/components/Actions/Actions.stories.jsx | 3 +-- .../src/components/Actions/Actions.test.jsx | 3 +-- .../DataTableSkeleton/DataTableSkeleton.jsx | 1 - .../src/components/DeleteModal/DeleteModal.jsx | 3 +-- .../src/components/DetailsHeader/DetailsHeader.jsx | 4 ++-- .../components/DetailsHeader/DetailsHeader.test.jsx | 4 +--- .../src/components/DotSpinner/DotSpinner.jsx | 3 +-- .../src/components/ErrorBoundary/ErrorBoundary.jsx | 6 +++--- .../components/ErrorBoundary/ErrorBoundary.test.jsx | 3 +-- .../src/components/FormattedDate/FormattedDate.jsx | 3 +-- .../components/FormattedDate/FormattedDate.test.jsx | 3 +-- .../FormattedDuration/FormattedDuration.jsx | 4 ++-- .../FormattedDuration/FormattedDuration.test.jsx | 3 +-- packages/components/src/components/Header/Header.jsx | 3 +-- .../src/components/Header/Header.stories.jsx | 4 +--- .../components/src/components/Header/Header.test.jsx | 3 +-- .../src/components/KeyValueList/KeyValueList.jsx | 3 +-- .../src/components/KeyValueList/KeyValueList.test.jsx | 3 +-- .../src/components/LabelFilter/LabelFilter.jsx | 4 ++-- .../src/components/LabelFilter/LabelFilter.test.jsx | 3 +-- packages/components/src/components/Link/Link.jsx | 3 +-- .../components/src/components/Loading/Loading.jsx | 3 +-- packages/components/src/components/Log/Log.jsx | 8 ++++---- .../components/src/components/Log/Log.stories.jsx | 4 +--- packages/components/src/components/Log/Log.test.jsx | 3 +-- .../components/src/components/LogFormat/LogFormat.jsx | 3 +-- .../src/components/LogFormat/LogFormat.test.jsx | 3 +-- .../src/components/LogoutButton/LogoutButton.jsx | 4 ++-- .../src/components/LogoutButton/LogoutButton.test.jsx | 3 +-- .../src/components/LogsToolbar/LogsToolbar.jsx | 3 +-- packages/components/src/components/Modal/Modal.jsx | 3 +-- .../PageErrorBoundary/PageErrorBoundary.jsx | 3 +-- .../PageErrorBoundary/PageErrorBoundary.test.jsx | 3 +-- packages/components/src/components/Param/index.jsx | 4 +--- .../src/components/PipelineRun/PipelineRun.jsx | 4 ++-- .../components/PipelineRun/PipelineRun.stories.jsx | 4 ++-- .../src/components/PipelineRun/PipelineRun.test.jsx | 6 +++--- .../src/components/PipelineRuns/PipelineRuns.jsx | 3 +-- .../components/PipelineRuns/PipelineRuns.stories.jsx | 3 +-- .../src/components/PipelineRuns/PipelineRuns.test.jsx | 4 +--- .../components/ResourceDetails/ResourceDetails.jsx | 3 +-- .../ResourceDetails/ResourceDetails.stories.jsx | 4 +--- .../ResourceDetails/ResourceDetails.test.jsx | 3 +-- .../components/src/components/RunHeader/RunHeader.jsx | 4 ++-- .../src/components/RunHeader/RunHeader.stories.jsx | 4 +--- .../src/components/RunHeader/RunHeader.test.jsx | 3 +-- .../components/src/components/Spinner/Spinner.jsx | 4 +--- .../StatusFilterDropdown/StatusFilterDropdown.jsx | 3 +-- .../src/components/StatusIcon/StatusIcon.jsx | 3 +-- .../src/components/StatusIcon/StatusIcon.stories.jsx | 3 +-- .../src/components/StatusIcon/StatusIcon.test.jsx | 3 +-- packages/components/src/components/Step/Step.jsx | 4 ++-- packages/components/src/components/Step/Step.test.jsx | 3 +-- .../src/components/StepDefinition/StepDefinition.jsx | 4 ++-- .../components/StepDefinition/StepDefinition.test.jsx | 3 +-- .../src/components/StepDetails/StepDetails.jsx | 3 +-- .../components/StepDetails/StepDetails.stories.jsx | 4 +--- .../src/components/StepDetails/StepDetails.test.jsx | 3 +-- packages/components/src/components/Table/Table.jsx | 3 +-- .../components/src/components/Table/Table.stories.jsx | 3 +-- .../components/src/components/Table/Table.test.jsx | 3 +-- packages/components/src/components/Tabs/Tabs.jsx | 8 ++++---- .../components/src/components/Tabs/Tabs.stories.jsx | 4 +--- packages/components/src/components/Task/Task.jsx | 4 ++-- .../components/src/components/Task/Task.stories.jsx | 4 ++-- packages/components/src/components/Task/Task.test.jsx | 3 +-- .../src/components/TaskRunDetails/TaskRunDetails.jsx | 4 ++-- .../components/TaskRunDetails/TaskRunDetails.test.jsx | 3 +-- .../components/src/components/TaskRuns/TaskRuns.jsx | 3 +-- .../src/components/TaskRuns/TaskRuns.test.jsx | 3 +-- .../components/src/components/TaskTree/TaskTree.jsx | 1 - .../src/components/TaskTree/TaskTree.stories.jsx | 4 ++-- .../src/components/TaskTree/TaskTree.test.jsx | 3 +-- .../components/src/components/TextInput/TextInput.jsx | 3 +-- .../src/components/TextInput/TextInput.test.jsx | 3 +-- .../components/TooltipDropdown/TooltipDropdown.jsx | 3 +-- .../TooltipDropdown/TooltipDropdown.stories.jsx | 4 +--- .../TooltipDropdown/TooltipDropdown.test.jsx | 3 +-- .../components/src/components/Trigger/Trigger.jsx | 3 +-- .../src/components/Trigger/Trigger.test.jsx | 1 - .../src/components/ViewYAML/SyntaxHighlighter.jsx | 3 +-- .../components/src/components/ViewYAML/ViewYAML.jsx | 3 +-- .../src/components/ViewYAML/ViewYAML.test.jsx | 3 +-- packages/components/src/utils/test.jsx | 11 ++++------- packages/graph/src/components/Edge/Edge.jsx | 3 +-- packages/graph/src/components/Graph.jsx | 4 ++-- packages/graph/src/components/Graph/Graph.jsx | 4 ++-- packages/graph/src/components/InlineLoading.jsx | 4 +--- packages/graph/src/components/Node.jsx | 4 ++-- packages/graph/src/components/Node.stories.jsx | 4 +--- packages/graph/src/components/Node/Node.jsx | 4 ++-- packages/graph/src/components/NodeLink.jsx | 3 +-- packages/graph/src/components/PanZoom.jsx | 6 +++--- packages/graph/src/components/PipelineGraph.jsx | 4 ++-- .../graph/src/components/PipelineGraph.stories.jsx | 3 +-- .../graph/src/components/StatusIcon/StatusIcon.jsx | 3 +-- .../graph/src/components/ZoomablePipelineGraph.jsx | 6 +++--- .../src/components/ZoomablePipelineGraph.stories.jsx | 3 +-- src/api/utils.js | 6 +++--- src/containers/About/About.jsx | 4 ++-- src/containers/About/About.test.jsx | 3 +-- src/containers/App/App.jsx | 2 +- src/containers/App/App.test.jsx | 3 +-- .../ClusterInterceptors/ClusterInterceptors.jsx | 3 +-- .../ClusterInterceptors/ClusterInterceptors.test.jsx | 3 +-- src/containers/ClusterTasks/ClusterTasks.jsx | 4 ++-- .../ClusterTasksDropdown/ClusterTasksDropdown.jsx | 3 +-- .../ClusterTasksDropdown.test.jsx | 3 +-- .../ClusterTriggerBinding/ClusterTriggerBinding.jsx | 3 +-- .../ClusterTriggerBinding.test.jsx | 3 +-- .../ClusterTriggerBindings/ClusterTriggerBindings.jsx | 3 +-- .../ClusterTriggerBindings.test.jsx | 3 +-- src/containers/CreateCustomRun/CreateCustomRun.jsx | 6 +++--- .../CreateCustomRun/CreateCustomRun.test.jsx | 3 +-- .../CreatePipelineRun/CreatePipelineRun.jsx | 6 +++--- .../CreatePipelineRun/CreatePipelineRun.test.jsx | 3 +-- src/containers/CreateTaskRun/CreateTaskRun.jsx | 6 +++--- src/containers/CreateTaskRun/CreateTaskRun.test.jsx | 3 +-- .../CustomResourceDefinition.jsx | 3 +-- src/containers/CustomRun/CustomRun.jsx | 4 ++-- src/containers/CustomRuns/CustomRuns.jsx | 4 ++-- src/containers/EventListener/EventListener.jsx | 3 +-- .../EventListener/EventListener.stories.jsx | 3 +-- src/containers/EventListener/EventListener.test.jsx | 3 +-- src/containers/EventListeners/EventListeners.jsx | 3 +-- src/containers/EventListeners/EventListeners.test.jsx | 3 +-- src/containers/Extension/Extension.jsx | 6 +++--- src/containers/Extensions/Extensions.jsx | 3 +-- src/containers/HeaderBarContent/HeaderBarContent.jsx | 4 ++-- .../HeaderBarContent/HeaderBarContent.test.jsx | 3 +-- src/containers/ImportResources/ImportResources.jsx | 4 ++-- .../ImportResources/ImportResources.test.jsx | 3 +-- src/containers/Interceptors/Interceptors.jsx | 3 +-- src/containers/Interceptors/Interceptors.test.jsx | 3 +-- src/containers/LabelFilter/LabelFilter.jsx | 3 +-- src/containers/ListPageLayout/ListPageLayout.jsx | 4 ++-- .../ListPageLayout/ListPageLayout.stories.jsx | 3 +-- src/containers/ListPageLayout/ListPageLayout.test.jsx | 4 +--- src/containers/LoadingShell/LoadingShell.jsx | 3 +-- .../NamespacesDropdown/NamespacesDropdown.jsx | 3 +-- .../NamespacesDropdown/NamespacesDropdown.test.jsx | 3 +-- src/containers/NotFound/NotFound.jsx | 3 +-- src/containers/NotFound/NotFound.stories.jsx | 4 +--- src/containers/PipelineRun/PipelineRun.jsx | 4 ++-- src/containers/PipelineRun/PipelineRun.test.jsx | 3 +-- src/containers/PipelineRuns/PipelineRuns.jsx | 4 ++-- src/containers/PipelineRuns/PipelineRuns.test.jsx | 3 +-- src/containers/Pipelines/Pipelines.jsx | 4 ++-- .../PipelinesDropdown/PipelinesDropdown.jsx | 3 +-- .../PipelinesDropdown/PipelinesDropdown.test.jsx | 3 +-- src/containers/ReadWriteRoute/ReadWriteRoute.jsx | 4 +--- src/containers/ResourceList/ResourceList.jsx | 3 +-- .../ServiceAccountsDropdown.jsx | 3 +-- .../ServiceAccountsDropdown.test.jsx | 3 +-- src/containers/Settings/Settings.jsx | 3 +-- src/containers/Settings/Settings.test.jsx | 3 +-- src/containers/SideNav/SideNav.jsx | 3 +-- src/containers/SideNav/SideNav.test.jsx | 3 +-- src/containers/TaskRun/TaskRun.jsx | 6 +++--- src/containers/TaskRuns/TaskRuns.jsx | 4 ++-- src/containers/TaskRuns/TaskRuns.test.jsx | 3 +-- src/containers/Tasks/Tasks.jsx | 4 ++-- src/containers/TasksDropdown/TasksDropdown.jsx | 3 +-- src/containers/TasksDropdown/TasksDropdown.test.jsx | 3 +-- src/containers/Trigger/Trigger.jsx | 3 +-- src/containers/Trigger/Trigger.test.jsx | 3 +-- src/containers/TriggerBinding/TriggerBinding.jsx | 3 +-- src/containers/TriggerBinding/TriggerBinding.test.jsx | 3 +-- src/containers/TriggerBindings/TriggerBindings.jsx | 3 +-- .../TriggerBindings/TriggerBindings.test.jsx | 3 +-- src/containers/TriggerTemplate/TriggerTemplate.jsx | 6 +++--- .../TriggerTemplate/TriggerTemplate.test.jsx | 1 - src/containers/TriggerTemplates/TriggerTemplates.jsx | 3 +-- .../TriggerTemplates/TriggerTemplates.test.jsx | 3 +-- src/containers/Triggers/Triggers.jsx | 3 +-- src/containers/Triggers/Triggers.test.jsx | 3 +-- src/containers/YAMLEditor/YAMLEditor.jsx | 4 ++-- src/containers/YAMLEditor/YAMLEditor.test.jsx | 3 +-- src/utils/index.jsx | 3 +-- src/utils/test.jsx | 3 +-- 185 files changed, 251 insertions(+), 405 deletions(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index b9b8d59c4..0b5d5988e 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -20,7 +20,8 @@ module.exports = { 'airbnb', 'plugin:prettier/recommended', 'plugin:cypress/recommended', - 'plugin:storybook/recommended' + 'plugin:storybook/recommended', + 'plugin:react/jsx-runtime' ], globals: { afterAll: true, diff --git a/.storybook/Container.jsx b/.storybook/Container.jsx index d70173a1c..dbc8140bb 100644 --- a/.storybook/Container.jsx +++ b/.storybook/Container.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { IntlProvider } from 'react-intl'; import { createMemoryHistory } from 'history'; import { Router, Switch } from 'react-router-dom'; @@ -35,9 +34,9 @@ export default function Container({ - + - + diff --git a/.storybook/preview.jsx b/.storybook/preview.jsx index ae7129e79..c6b67a378 100644 --- a/.storybook/preview.jsx +++ b/.storybook/preview.jsx @@ -1,5 +1,5 @@ /* -Copyright 2020-2023 The Tekton Authors +Copyright 2020-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { withThemeByClassName } from '@storybook/addon-themes'; import Container from './Container'; diff --git a/index.jsx b/index.jsx index a691459a0..f7308af20 100644 --- a/index.jsx +++ b/index.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -12,7 +12,7 @@ limitations under the License. */ /* istanbul ignore file */ -import React from 'react'; +import { StrictMode } from 'react'; import ReactDOM from 'react-dom'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { ReactQueryDevtools } from '@tanstack/react-query-devtools'; @@ -39,9 +39,9 @@ const enableReactQueryDevTools = ReactDOM.render( - + - + {enableReactQueryDevTools && } , document.getElementById('root') diff --git a/packages/components/src/components/Actions/Actions.jsx b/packages/components/src/components/Actions/Actions.jsx index b14bdaa9f..ba35af76f 100644 --- a/packages/components/src/components/Actions/Actions.jsx +++ b/packages/components/src/components/Actions/Actions.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React, { Component } from 'react'; +import { Component } from 'react'; import { injectIntl } from 'react-intl'; import { Button, diff --git a/packages/components/src/components/Actions/Actions.stories.jsx b/packages/components/src/components/Actions/Actions.stories.jsx index a2f577f8f..c4b7f8a0a 100644 --- a/packages/components/src/components/Actions/Actions.stories.jsx +++ b/packages/components/src/components/Actions/Actions.stories.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { TrashCan16 } from '@carbon/icons-react'; import Actions from './Actions'; diff --git a/packages/components/src/components/Actions/Actions.test.jsx b/packages/components/src/components/Actions/Actions.test.jsx index 61d38240b..dbaaa556e 100644 --- a/packages/components/src/components/Actions/Actions.test.jsx +++ b/packages/components/src/components/Actions/Actions.test.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { fireEvent, waitFor } from '@testing-library/react'; import { render } from '../../utils/test'; import Actions from './Actions'; diff --git a/packages/components/src/components/DataTableSkeleton/DataTableSkeleton.jsx b/packages/components/src/components/DataTableSkeleton/DataTableSkeleton.jsx index da7bc76b6..f3bdaa06e 100644 --- a/packages/components/src/components/DataTableSkeleton/DataTableSkeleton.jsx +++ b/packages/components/src/components/DataTableSkeleton/DataTableSkeleton.jsx @@ -17,7 +17,6 @@ limitations under the License. /* eslint-disable jsx-a11y/control-has-associated-label */ import PropTypes from 'prop-types'; -import React from 'react'; import { getCarbonPrefix } from '@tektoncd/dashboard-utils'; const carbonPrefix = getCarbonPrefix(); diff --git a/packages/components/src/components/DeleteModal/DeleteModal.jsx b/packages/components/src/components/DeleteModal/DeleteModal.jsx index 867d878fa..195c67df9 100644 --- a/packages/components/src/components/DeleteModal/DeleteModal.jsx +++ b/packages/components/src/components/DeleteModal/DeleteModal.jsx @@ -1,5 +1,5 @@ /* -Copyright 2021-2023 The Tekton Authors +Copyright 2021-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -12,7 +12,6 @@ limitations under the License. */ /* istanbul ignore file */ -import React from 'react'; import { useIntl } from 'react-intl'; import Modal from '../Modal'; diff --git a/packages/components/src/components/DetailsHeader/DetailsHeader.jsx b/packages/components/src/components/DetailsHeader/DetailsHeader.jsx index 7f047037f..342db3389 100644 --- a/packages/components/src/components/DetailsHeader/DetailsHeader.jsx +++ b/packages/components/src/components/DetailsHeader/DetailsHeader.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React, { Component } from 'react'; +import { Component } from 'react'; import { Pending24 as DefaultIcon } from '@carbon/icons-react'; import { injectIntl } from 'react-intl'; import { getStatus } from '@tektoncd/dashboard-utils'; diff --git a/packages/components/src/components/DetailsHeader/DetailsHeader.test.jsx b/packages/components/src/components/DetailsHeader/DetailsHeader.test.jsx index fedc47f62..81e932f86 100644 --- a/packages/components/src/components/DetailsHeader/DetailsHeader.test.jsx +++ b/packages/components/src/components/DetailsHeader/DetailsHeader.test.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,8 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; - import DetailsHeader from './DetailsHeader'; import { render } from '../../utils/test'; diff --git a/packages/components/src/components/DotSpinner/DotSpinner.jsx b/packages/components/src/components/DotSpinner/DotSpinner.jsx index e0f6c359a..8c7a6f290 100644 --- a/packages/components/src/components/DotSpinner/DotSpinner.jsx +++ b/packages/components/src/components/DotSpinner/DotSpinner.jsx @@ -1,5 +1,5 @@ /* -Copyright 2021-2023 The Tekton Authors +Copyright 2021-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { classNames } from '@tektoncd/dashboard-utils'; export default function Spinner({ className }) { diff --git a/packages/components/src/components/ErrorBoundary/ErrorBoundary.jsx b/packages/components/src/components/ErrorBoundary/ErrorBoundary.jsx index af8247b81..22fc5a4a1 100644 --- a/packages/components/src/components/ErrorBoundary/ErrorBoundary.jsx +++ b/packages/components/src/components/ErrorBoundary/ErrorBoundary.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,12 +11,12 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; +import { Component } from 'react'; import { InlineNotification } from 'carbon-components-react'; import { getErrorMessage } from '@tektoncd/dashboard-utils'; import { injectIntl } from 'react-intl'; -class ErrorBoundary extends React.Component { +class ErrorBoundary extends Component { state = { error: null }; static getDerivedStateFromError(error) { diff --git a/packages/components/src/components/ErrorBoundary/ErrorBoundary.test.jsx b/packages/components/src/components/ErrorBoundary/ErrorBoundary.test.jsx index 4b2e5aa5e..0b447aaa2 100644 --- a/packages/components/src/components/ErrorBoundary/ErrorBoundary.test.jsx +++ b/packages/components/src/components/ErrorBoundary/ErrorBoundary.test.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { render } from '../../utils/test'; import ErrorBoundary from './ErrorBoundary'; diff --git a/packages/components/src/components/FormattedDate/FormattedDate.jsx b/packages/components/src/components/FormattedDate/FormattedDate.jsx index f7f8426e5..dffab487f 100644 --- a/packages/components/src/components/FormattedDate/FormattedDate.jsx +++ b/packages/components/src/components/FormattedDate/FormattedDate.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { FormattedDate, FormattedRelativeTime, useIntl } from 'react-intl'; const FormattedDateWrapper = ({ diff --git a/packages/components/src/components/FormattedDate/FormattedDate.test.jsx b/packages/components/src/components/FormattedDate/FormattedDate.test.jsx index 93d5be3bd..3a6e9950c 100644 --- a/packages/components/src/components/FormattedDate/FormattedDate.test.jsx +++ b/packages/components/src/components/FormattedDate/FormattedDate.test.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { render } from '../../utils/test'; import FormattedDate from './FormattedDate'; diff --git a/packages/components/src/components/FormattedDuration/FormattedDuration.jsx b/packages/components/src/components/FormattedDuration/FormattedDuration.jsx index f82ff871a..096b2cd7f 100644 --- a/packages/components/src/components/FormattedDuration/FormattedDuration.jsx +++ b/packages/components/src/components/FormattedDuration/FormattedDuration.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React, { Component } from 'react'; +import { Component } from 'react'; import { defineMessages, injectIntl } from 'react-intl'; import FormattedDuration from 'react-intl-formatted-duration'; diff --git a/packages/components/src/components/FormattedDuration/FormattedDuration.test.jsx b/packages/components/src/components/FormattedDuration/FormattedDuration.test.jsx index 170000dd9..d4c24dcd6 100644 --- a/packages/components/src/components/FormattedDuration/FormattedDuration.test.jsx +++ b/packages/components/src/components/FormattedDuration/FormattedDuration.test.jsx @@ -1,5 +1,5 @@ /* -Copyright 2020-2023 The Tekton Authors +Copyright 2020-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { render } from '../../utils/test'; import FormattedDuration from './FormattedDuration'; diff --git a/packages/components/src/components/Header/Header.jsx b/packages/components/src/components/Header/Header.jsx index a1952047c..003a3384b 100644 --- a/packages/components/src/components/Header/Header.jsx +++ b/packages/components/src/components/Header/Header.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { useIntl } from 'react-intl'; import { Header as CarbonHeader, diff --git a/packages/components/src/components/Header/Header.stories.jsx b/packages/components/src/components/Header/Header.stories.jsx index 74732a8da..c7fe218ea 100644 --- a/packages/components/src/components/Header/Header.stories.jsx +++ b/packages/components/src/components/Header/Header.stories.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,8 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; - import Header from '.'; import LogoutButton from '../LogoutButton'; diff --git a/packages/components/src/components/Header/Header.test.jsx b/packages/components/src/components/Header/Header.test.jsx index 9c670d293..796d660bd 100644 --- a/packages/components/src/components/Header/Header.test.jsx +++ b/packages/components/src/components/Header/Header.test.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { fireEvent } from '@testing-library/react'; import { renderWithRouter } from '../../utils/test'; diff --git a/packages/components/src/components/KeyValueList/KeyValueList.jsx b/packages/components/src/components/KeyValueList/KeyValueList.jsx index b281d936b..a435c462d 100644 --- a/packages/components/src/components/KeyValueList/KeyValueList.jsx +++ b/packages/components/src/components/KeyValueList/KeyValueList.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { useIntl } from 'react-intl'; import { Button, TextInput } from 'carbon-components-react'; import { AddAlt24 as Add, SubtractAlt16 as Remove } from '@carbon/icons-react'; diff --git a/packages/components/src/components/KeyValueList/KeyValueList.test.jsx b/packages/components/src/components/KeyValueList/KeyValueList.test.jsx index 41d38d526..283c90107 100644 --- a/packages/components/src/components/KeyValueList/KeyValueList.test.jsx +++ b/packages/components/src/components/KeyValueList/KeyValueList.test.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { fireEvent } from '@testing-library/react'; import KeyValueList from './KeyValueList'; import { render } from '../../utils/test'; diff --git a/packages/components/src/components/LabelFilter/LabelFilter.jsx b/packages/components/src/components/LabelFilter/LabelFilter.jsx index 2563ae303..0e51eead3 100644 --- a/packages/components/src/components/LabelFilter/LabelFilter.jsx +++ b/packages/components/src/components/LabelFilter/LabelFilter.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React, { Component } from 'react'; +import { Component } from 'react'; import { injectIntl } from 'react-intl'; import { Button, diff --git a/packages/components/src/components/LabelFilter/LabelFilter.test.jsx b/packages/components/src/components/LabelFilter/LabelFilter.test.jsx index d842bf776..25ce4228e 100644 --- a/packages/components/src/components/LabelFilter/LabelFilter.test.jsx +++ b/packages/components/src/components/LabelFilter/LabelFilter.test.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { fireEvent, waitFor } from '@testing-library/react'; import LabelFilter from './LabelFilter'; diff --git a/packages/components/src/components/Link/Link.jsx b/packages/components/src/components/Link/Link.jsx index bb65e42a2..b7086602b 100644 --- a/packages/components/src/components/Link/Link.jsx +++ b/packages/components/src/components/Link/Link.jsx @@ -1,5 +1,5 @@ /* -Copyright 2022-2023 The Tekton Authors +Copyright 2022-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -12,7 +12,6 @@ limitations under the License. */ /* istanbul ignore file */ -import React from 'react'; import { Link as CarbonLink } from 'carbon-components-react'; export default function Link({ navigate, ...rest }) { diff --git a/packages/components/src/components/Loading/Loading.jsx b/packages/components/src/components/Loading/Loading.jsx index 32ffc5ec6..e67308a95 100644 --- a/packages/components/src/components/Loading/Loading.jsx +++ b/packages/components/src/components/Loading/Loading.jsx @@ -1,5 +1,5 @@ /* -Copyright 2023 The Tekton Authors +Copyright 2023-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -12,7 +12,6 @@ limitations under the License. */ /* istanbul ignore file */ -import React from 'react'; import { useIntl } from 'react-intl'; import { Loading as CarbonLoading } from 'carbon-components-react'; import { getCarbonPrefix } from '@tektoncd/dashboard-utils'; diff --git a/packages/components/src/components/Log/Log.jsx b/packages/components/src/components/Log/Log.jsx index fd2671515..27b5c8e4a 100644 --- a/packages/components/src/components/Log/Log.jsx +++ b/packages/components/src/components/Log/Log.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React, { Component } from 'react'; +import { Component, createRef } from 'react'; import { Button, SkeletonText } from 'carbon-components-react'; import { FixedSizeList as List } from 'react-window'; import { injectIntl } from 'react-intl'; @@ -46,8 +46,8 @@ export class LogContainer extends Component { constructor(props) { super(props); this.state = { loading: true }; - this.logRef = React.createRef(); - this.textRef = React.createRef(); + this.logRef = createRef(); + this.textRef = createRef(); } componentDidMount() { diff --git a/packages/components/src/components/Log/Log.stories.jsx b/packages/components/src/components/Log/Log.stories.jsx index b4b65afbe..8a1eb1f09 100644 --- a/packages/components/src/components/Log/Log.stories.jsx +++ b/packages/components/src/components/Log/Log.stories.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,8 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; - import Log from './Log'; import LogsToolbar from '../LogsToolbar'; diff --git a/packages/components/src/components/Log/Log.test.jsx b/packages/components/src/components/Log/Log.test.jsx index b3a908eb2..af3426037 100644 --- a/packages/components/src/components/Log/Log.test.jsx +++ b/packages/components/src/components/Log/Log.test.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { fireEvent, waitFor } from '@testing-library/react'; import Log from './Log'; import { render } from '../../utils/test'; diff --git a/packages/components/src/components/LogFormat/LogFormat.jsx b/packages/components/src/components/LogFormat/LogFormat.jsx index ca532745e..3c868359c 100644 --- a/packages/components/src/components/LogFormat/LogFormat.jsx +++ b/packages/components/src/components/LogFormat/LogFormat.jsx @@ -1,5 +1,5 @@ /* -Copyright 2020-2023 The Tekton Authors +Copyright 2020-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import PropTypes from 'prop-types'; import tlds from 'tlds'; import LinkifyIt from 'linkify-it'; diff --git a/packages/components/src/components/LogFormat/LogFormat.test.jsx b/packages/components/src/components/LogFormat/LogFormat.test.jsx index 295d83aaa..04d83bcff 100644 --- a/packages/components/src/components/LogFormat/LogFormat.test.jsx +++ b/packages/components/src/components/LogFormat/LogFormat.test.jsx @@ -1,5 +1,5 @@ /* -Copyright 2020-2023 The Tekton Authors +Copyright 2020-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { render } from '../../utils/test'; import LogFormat from './LogFormat'; diff --git a/packages/components/src/components/LogoutButton/LogoutButton.jsx b/packages/components/src/components/LogoutButton/LogoutButton.jsx index 0be46f172..de3bf0181 100644 --- a/packages/components/src/components/LogoutButton/LogoutButton.jsx +++ b/packages/components/src/components/LogoutButton/LogoutButton.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -14,7 +14,7 @@ limitations under the License. import { Logout20 as LogoutIcon } from '@carbon/icons-react'; import { HeaderGlobalAction } from 'carbon-components-react'; import { injectIntl } from 'react-intl'; -import React, { Component } from 'react'; +import { Component } from 'react'; export class LogoutButton extends Component { state = { diff --git a/packages/components/src/components/LogoutButton/LogoutButton.test.jsx b/packages/components/src/components/LogoutButton/LogoutButton.test.jsx index ee5c15a25..91feecad4 100644 --- a/packages/components/src/components/LogoutButton/LogoutButton.test.jsx +++ b/packages/components/src/components/LogoutButton/LogoutButton.test.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { waitFor } from '@testing-library/react'; import { renderWithRouter } from '../../utils/test'; import Logout from './LogoutButton'; diff --git a/packages/components/src/components/LogsToolbar/LogsToolbar.jsx b/packages/components/src/components/LogsToolbar/LogsToolbar.jsx index 3e5dc7cf9..460a8c448 100644 --- a/packages/components/src/components/LogsToolbar/LogsToolbar.jsx +++ b/packages/components/src/components/LogsToolbar/LogsToolbar.jsx @@ -1,5 +1,5 @@ /* -Copyright 2020-2023 The Tekton Authors +Copyright 2020-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ /* istanbul ignore file */ -import React from 'react'; import { useIntl } from 'react-intl'; import { Download16, diff --git a/packages/components/src/components/Modal/Modal.jsx b/packages/components/src/components/Modal/Modal.jsx index 37b420e63..ab1f35183 100644 --- a/packages/components/src/components/Modal/Modal.jsx +++ b/packages/components/src/components/Modal/Modal.jsx @@ -1,5 +1,5 @@ /* -Copyright 2020-2023 The Tekton Authors +Copyright 2020-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -12,7 +12,6 @@ limitations under the License. */ /* istanbul ignore file */ -import React from 'react'; import { useIntl } from 'react-intl'; import { Modal as CarbonModal } from 'carbon-components-react'; diff --git a/packages/components/src/components/PageErrorBoundary/PageErrorBoundary.jsx b/packages/components/src/components/PageErrorBoundary/PageErrorBoundary.jsx index 37bca90cd..46813abb9 100644 --- a/packages/components/src/components/PageErrorBoundary/PageErrorBoundary.jsx +++ b/packages/components/src/components/PageErrorBoundary/PageErrorBoundary.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { useIntl } from 'react-intl'; import { useLocation } from 'react-router-dom-v5-compat'; diff --git a/packages/components/src/components/PageErrorBoundary/PageErrorBoundary.test.jsx b/packages/components/src/components/PageErrorBoundary/PageErrorBoundary.test.jsx index 18df61277..3a7637641 100644 --- a/packages/components/src/components/PageErrorBoundary/PageErrorBoundary.test.jsx +++ b/packages/components/src/components/PageErrorBoundary/PageErrorBoundary.test.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { renderWithRouter } from '../../utils/test'; import PageErrorBoundary from './PageErrorBoundary'; diff --git a/packages/components/src/components/Param/index.jsx b/packages/components/src/components/Param/index.jsx index 6b0a886ac..baacf78e4 100644 --- a/packages/components/src/components/Param/index.jsx +++ b/packages/components/src/components/Param/index.jsx @@ -1,5 +1,5 @@ /* -Copyright 2020-2023 The Tekton Authors +Copyright 2020-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -12,8 +12,6 @@ limitations under the License. */ /* istanbul ignore file */ -import React from 'react'; - import ViewYAML from '../ViewYAML'; export default function Param({ children }) { diff --git a/packages/components/src/components/PipelineRun/PipelineRun.jsx b/packages/components/src/components/PipelineRun/PipelineRun.jsx index e782f9433..d7971ccb6 100644 --- a/packages/components/src/components/PipelineRun/PipelineRun.jsx +++ b/packages/components/src/components/PipelineRun/PipelineRun.jsx @@ -11,7 +11,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React, { Component } from 'react'; +import { Component, Fragment } from 'react'; import PropTypes from 'prop-types'; import { InlineNotification, SkeletonText } from 'carbon-components-react'; import { injectIntl } from 'react-intl'; @@ -86,7 +86,7 @@ export /* istanbul ignore next */ class PipelineRunContainer extends Component { } const LogsRoot = - isLogsMaximized && maximizedLogsContainer ? Portal : React.Fragment; + isLogsMaximized && maximizedLogsContainer ? Portal : Fragment; return ( { } }; - class TestWrapper extends React.Component { + class TestWrapper extends ReactComponent { state = { selectedStepId: null, selectedTaskId: null diff --git a/packages/components/src/components/PipelineRuns/PipelineRuns.jsx b/packages/components/src/components/PipelineRuns/PipelineRuns.jsx index 36a681ae3..272a849d4 100644 --- a/packages/components/src/components/PipelineRuns/PipelineRuns.jsx +++ b/packages/components/src/components/PipelineRuns/PipelineRuns.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { useIntl } from 'react-intl'; import { Link } from 'react-router-dom'; import { getStatus, urls } from '@tektoncd/dashboard-utils'; diff --git a/packages/components/src/components/PipelineRuns/PipelineRuns.stories.jsx b/packages/components/src/components/PipelineRuns/PipelineRuns.stories.jsx index 4cb6d9244..3bcfb065f 100644 --- a/packages/components/src/components/PipelineRuns/PipelineRuns.stories.jsx +++ b/packages/components/src/components/PipelineRuns/PipelineRuns.stories.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -12,7 +12,6 @@ limitations under the License. */ /* eslint-disable formatjs/no-literal-string-in-jsx */ -import React from 'react'; import { getStatus } from '@tektoncd/dashboard-utils'; import { action } from '@storybook/addon-actions'; import { TrashCan32 as Delete } from '@carbon/icons-react'; diff --git a/packages/components/src/components/PipelineRuns/PipelineRuns.test.jsx b/packages/components/src/components/PipelineRuns/PipelineRuns.test.jsx index 8cf301665..c3ac8c5c5 100644 --- a/packages/components/src/components/PipelineRuns/PipelineRuns.test.jsx +++ b/packages/components/src/components/PipelineRuns/PipelineRuns.test.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,8 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; - import { render, renderWithRouter } from '../../utils/test'; import PipelineRuns from './PipelineRuns'; diff --git a/packages/components/src/components/ResourceDetails/ResourceDetails.jsx b/packages/components/src/components/ResourceDetails/ResourceDetails.jsx index 76b25cbc0..516f1037d 100644 --- a/packages/components/src/components/ResourceDetails/ResourceDetails.jsx +++ b/packages/components/src/components/ResourceDetails/ResourceDetails.jsx @@ -1,5 +1,5 @@ /* -Copyright 2020-2023 The Tekton Authors +Copyright 2020-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import PropTypes from 'prop-types'; import { useIntl } from 'react-intl'; import { InlineNotification, SkeletonText, Tag } from 'carbon-components-react'; diff --git a/packages/components/src/components/ResourceDetails/ResourceDetails.stories.jsx b/packages/components/src/components/ResourceDetails/ResourceDetails.stories.jsx index d19887413..b012f5496 100644 --- a/packages/components/src/components/ResourceDetails/ResourceDetails.stories.jsx +++ b/packages/components/src/components/ResourceDetails/ResourceDetails.stories.jsx @@ -1,5 +1,5 @@ /* -Copyright 2020-2023 The Tekton Authors +Copyright 2020-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -12,8 +12,6 @@ limitations under the License. */ /* eslint-disable formatjs/no-literal-string-in-jsx */ -import React from 'react'; - import ResourceDetails from '.'; const resource = { diff --git a/packages/components/src/components/ResourceDetails/ResourceDetails.test.jsx b/packages/components/src/components/ResourceDetails/ResourceDetails.test.jsx index 58b170121..de62ff9a5 100644 --- a/packages/components/src/components/ResourceDetails/ResourceDetails.test.jsx +++ b/packages/components/src/components/ResourceDetails/ResourceDetails.test.jsx @@ -1,5 +1,5 @@ /* -Copyright 2020-2023 The Tekton Authors +Copyright 2020-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { fireEvent, waitFor } from '@testing-library/react'; import { render } from '../../utils/test'; import ResourceDetails from './ResourceDetails'; diff --git a/packages/components/src/components/RunHeader/RunHeader.jsx b/packages/components/src/components/RunHeader/RunHeader.jsx index ad85e08d1..3ef5b6226 100644 --- a/packages/components/src/components/RunHeader/RunHeader.jsx +++ b/packages/components/src/components/RunHeader/RunHeader.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React, { Component } from 'react'; +import { Component } from 'react'; import { injectIntl } from 'react-intl'; import { CopyButton, SkeletonPlaceholder } from 'carbon-components-react'; import { copyToClipboard } from '@tektoncd/dashboard-utils'; diff --git a/packages/components/src/components/RunHeader/RunHeader.stories.jsx b/packages/components/src/components/RunHeader/RunHeader.stories.jsx index 36390bddf..45f0ff829 100644 --- a/packages/components/src/components/RunHeader/RunHeader.stories.jsx +++ b/packages/components/src/components/RunHeader/RunHeader.stories.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -12,8 +12,6 @@ limitations under the License. */ /* eslint-disable formatjs/no-literal-string-in-jsx */ -import React from 'react'; - import RunHeader from './RunHeader'; const now = new Date(); diff --git a/packages/components/src/components/RunHeader/RunHeader.test.jsx b/packages/components/src/components/RunHeader/RunHeader.test.jsx index b69cc38f7..862f90d05 100644 --- a/packages/components/src/components/RunHeader/RunHeader.test.jsx +++ b/packages/components/src/components/RunHeader/RunHeader.test.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { renderWithRouter } from '../../utils/test'; import RunHeader from './RunHeader'; diff --git a/packages/components/src/components/Spinner/Spinner.jsx b/packages/components/src/components/Spinner/Spinner.jsx index 56abf3967..bafc31053 100644 --- a/packages/components/src/components/Spinner/Spinner.jsx +++ b/packages/components/src/components/Spinner/Spinner.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,8 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; - import { Renew20 as SpinnerIcon } from '@carbon/icons-react'; export default function Spinner({ children, className }) { diff --git a/packages/components/src/components/StatusFilterDropdown/StatusFilterDropdown.jsx b/packages/components/src/components/StatusFilterDropdown/StatusFilterDropdown.jsx index 658957b4d..bcf88924c 100644 --- a/packages/components/src/components/StatusFilterDropdown/StatusFilterDropdown.jsx +++ b/packages/components/src/components/StatusFilterDropdown/StatusFilterDropdown.jsx @@ -1,5 +1,5 @@ /* -Copyright 2020-2023 The Tekton Authors +Copyright 2020-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ /* istanbul ignore file */ -import React from 'react'; import { useIntl } from 'react-intl'; import { Dropdown } from 'carbon-components-react'; import { diff --git a/packages/components/src/components/StatusIcon/StatusIcon.jsx b/packages/components/src/components/StatusIcon/StatusIcon.jsx index 6b207b3f3..c1b8d4fdf 100644 --- a/packages/components/src/components/StatusIcon/StatusIcon.jsx +++ b/packages/components/src/components/StatusIcon/StatusIcon.jsx @@ -1,5 +1,5 @@ /* -Copyright 2020-2023 The Tekton Authors +Copyright 2020-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { CheckmarkFilled20 as CheckmarkFilled, CheckmarkFilledWarning20 as CheckmarkFilledWarning, diff --git a/packages/components/src/components/StatusIcon/StatusIcon.stories.jsx b/packages/components/src/components/StatusIcon/StatusIcon.stories.jsx index d659e75e1..77385cddd 100644 --- a/packages/components/src/components/StatusIcon/StatusIcon.stories.jsx +++ b/packages/components/src/components/StatusIcon/StatusIcon.stories.jsx @@ -1,5 +1,5 @@ /* -Copyright 2020-2023 The Tekton Authors +Copyright 2020-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -12,7 +12,6 @@ limitations under the License. */ /* eslint-disable formatjs/no-literal-string-in-jsx */ -import React from 'react'; import { Pending20 as DefaultStepIcon, PendingFilled20 as DefaultTaskIcon, diff --git a/packages/components/src/components/StatusIcon/StatusIcon.test.jsx b/packages/components/src/components/StatusIcon/StatusIcon.test.jsx index e296cc9c3..67e07b7ce 100644 --- a/packages/components/src/components/StatusIcon/StatusIcon.test.jsx +++ b/packages/components/src/components/StatusIcon/StatusIcon.test.jsx @@ -1,5 +1,5 @@ /* -Copyright 2021-2023 The Tekton Authors +Copyright 2021-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { render } from '@testing-library/react'; import StatusIcon from './StatusIcon'; diff --git a/packages/components/src/components/Step/Step.jsx b/packages/components/src/components/Step/Step.jsx index 1b7ae829b..4e67f324e 100644 --- a/packages/components/src/components/Step/Step.jsx +++ b/packages/components/src/components/Step/Step.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React, { Component } from 'react'; +import { Component } from 'react'; import { injectIntl } from 'react-intl'; import { Pending20 as DefaultIcon } from '@carbon/icons-react'; diff --git a/packages/components/src/components/Step/Step.test.jsx b/packages/components/src/components/Step/Step.test.jsx index 91803f5fa..f53c49689 100644 --- a/packages/components/src/components/Step/Step.test.jsx +++ b/packages/components/src/components/Step/Step.test.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { fireEvent } from '@testing-library/react'; import Step from './Step'; import { render } from '../../utils/test'; diff --git a/packages/components/src/components/StepDefinition/StepDefinition.jsx b/packages/components/src/components/StepDefinition/StepDefinition.jsx index 9ebb6a91c..05ddc0ca4 100644 --- a/packages/components/src/components/StepDefinition/StepDefinition.jsx +++ b/packages/components/src/components/StepDefinition/StepDefinition.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React, { PureComponent } from 'react'; +import { PureComponent } from 'react'; import { injectIntl } from 'react-intl'; import ViewYAML from '../ViewYAML'; diff --git a/packages/components/src/components/StepDefinition/StepDefinition.test.jsx b/packages/components/src/components/StepDefinition/StepDefinition.test.jsx index 7e2030e4b..67ef7c447 100644 --- a/packages/components/src/components/StepDefinition/StepDefinition.test.jsx +++ b/packages/components/src/components/StepDefinition/StepDefinition.test.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { render } from '../../utils/test'; import StepDefinition from './StepDefinition'; diff --git a/packages/components/src/components/StepDetails/StepDetails.jsx b/packages/components/src/components/StepDetails/StepDetails.jsx index 067b5d242..2e10df53a 100644 --- a/packages/components/src/components/StepDetails/StepDetails.jsx +++ b/packages/components/src/components/StepDetails/StepDetails.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import PropTypes from 'prop-types'; import { useIntl } from 'react-intl'; import { getStatus, getStepStatusReason } from '@tektoncd/dashboard-utils'; diff --git a/packages/components/src/components/StepDetails/StepDetails.stories.jsx b/packages/components/src/components/StepDetails/StepDetails.stories.jsx index a3049023f..7767329d0 100644 --- a/packages/components/src/components/StepDetails/StepDetails.stories.jsx +++ b/packages/components/src/components/StepDetails/StepDetails.stories.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,8 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; - import Log from '../Log'; import StepDetails from './StepDetails'; diff --git a/packages/components/src/components/StepDetails/StepDetails.test.jsx b/packages/components/src/components/StepDetails/StepDetails.test.jsx index 426a9c493..b65d52dbe 100644 --- a/packages/components/src/components/StepDetails/StepDetails.test.jsx +++ b/packages/components/src/components/StepDetails/StepDetails.test.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { fireEvent } from '@testing-library/react'; import { renderWithRouter } from '../../utils/test'; diff --git a/packages/components/src/components/Table/Table.jsx b/packages/components/src/components/Table/Table.jsx index 31dbb81ed..bf1abf8ba 100644 --- a/packages/components/src/components/Table/Table.jsx +++ b/packages/components/src/components/Table/Table.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { useIntl } from 'react-intl'; import PropTypes from 'prop-types'; import { diff --git a/packages/components/src/components/Table/Table.stories.jsx b/packages/components/src/components/Table/Table.stories.jsx index abfdfba73..9875e76af 100644 --- a/packages/components/src/components/Table/Table.stories.jsx +++ b/packages/components/src/components/Table/Table.stories.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { action } from '@storybook/addon-actions'; import { Dropdown } from 'carbon-components-react'; import { diff --git a/packages/components/src/components/Table/Table.test.jsx b/packages/components/src/components/Table/Table.test.jsx index 24a3e7041..5b55b61bf 100644 --- a/packages/components/src/components/Table/Table.test.jsx +++ b/packages/components/src/components/Table/Table.test.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { fireEvent } from '@testing-library/react'; import { ALL_NAMESPACES } from '@tektoncd/dashboard-utils'; diff --git a/packages/components/src/components/Tabs/Tabs.jsx b/packages/components/src/components/Tabs/Tabs.jsx index c213be22f..fb16922cf 100644 --- a/packages/components/src/components/Tabs/Tabs.jsx +++ b/packages/components/src/components/Tabs/Tabs.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -12,7 +12,7 @@ limitations under the License. */ /* istanbul ignore file */ -import React from 'react'; +import { Children, cloneElement } from 'react'; import { TabContent as CarbonTabContent, Tabs as CarbonTabs @@ -27,11 +27,11 @@ const TabContent = ({ selected, ...other }) => const Tabs = ({ children, ...other }) => ( - {React.Children.map(children, tab => { + {Children.map(children, tab => { if (!tab) { return null; } - return React.cloneElement(tab, { + return cloneElement(tab, { renderContent: TabContent }); }).filter(Boolean)} diff --git a/packages/components/src/components/Tabs/Tabs.stories.jsx b/packages/components/src/components/Tabs/Tabs.stories.jsx index 5db0d8984..17885ce16 100644 --- a/packages/components/src/components/Tabs/Tabs.stories.jsx +++ b/packages/components/src/components/Tabs/Tabs.stories.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -12,8 +12,6 @@ limitations under the License. */ /* eslint-disable formatjs/no-literal-string-in-jsx */ -import React from 'react'; - import Tabs from '.'; import Tab from '../Tab'; diff --git a/packages/components/src/components/Task/Task.jsx b/packages/components/src/components/Task/Task.jsx index 19d75694c..aa3c75a46 100644 --- a/packages/components/src/components/Task/Task.jsx +++ b/packages/components/src/components/Task/Task.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React, { Component } from 'react'; +import { Component } from 'react'; import { injectIntl } from 'react-intl'; import { OverflowMenu, OverflowMenuItem } from 'carbon-components-react'; import { diff --git a/packages/components/src/components/Task/Task.stories.jsx b/packages/components/src/components/Task/Task.stories.jsx index 8c587e8c8..d5827dcb2 100644 --- a/packages/components/src/components/Task/Task.stories.jsx +++ b/packages/components/src/components/Task/Task.stories.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React, { useState } from 'react'; +import { useState } from 'react'; import { action } from '@storybook/addon-actions'; import Task from './Task'; diff --git a/packages/components/src/components/Task/Task.test.jsx b/packages/components/src/components/Task/Task.test.jsx index b1b015764..d2e3ad4ab 100644 --- a/packages/components/src/components/Task/Task.test.jsx +++ b/packages/components/src/components/Task/Task.test.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { fireEvent } from '@testing-library/react'; import Task from './Task'; import { render } from '../../utils/test'; diff --git a/packages/components/src/components/TaskRunDetails/TaskRunDetails.jsx b/packages/components/src/components/TaskRunDetails/TaskRunDetails.jsx index b9dc37723..9cddf03fd 100644 --- a/packages/components/src/components/TaskRunDetails/TaskRunDetails.jsx +++ b/packages/components/src/components/TaskRunDetails/TaskRunDetails.jsx @@ -1,5 +1,5 @@ /* -Copyright 2020-2023 The Tekton Authors +Copyright 2020-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React, { useEffect, useState } from 'react'; +import { useEffect, useState } from 'react'; import PropTypes from 'prop-types'; import { useIntl } from 'react-intl'; import { getParams, taskRunHasWarning } from '@tektoncd/dashboard-utils'; diff --git a/packages/components/src/components/TaskRunDetails/TaskRunDetails.test.jsx b/packages/components/src/components/TaskRunDetails/TaskRunDetails.test.jsx index b4be707eb..05a52dd43 100644 --- a/packages/components/src/components/TaskRunDetails/TaskRunDetails.test.jsx +++ b/packages/components/src/components/TaskRunDetails/TaskRunDetails.test.jsx @@ -1,5 +1,5 @@ /* -Copyright 2020-2023 The Tekton Authors +Copyright 2020-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { fireEvent } from '@testing-library/react'; import { render } from '../../utils/test'; diff --git a/packages/components/src/components/TaskRuns/TaskRuns.jsx b/packages/components/src/components/TaskRuns/TaskRuns.jsx index faa652185..f27f7151c 100644 --- a/packages/components/src/components/TaskRuns/TaskRuns.jsx +++ b/packages/components/src/components/TaskRuns/TaskRuns.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { useIntl } from 'react-intl'; import { Link } from 'react-router-dom'; import { diff --git a/packages/components/src/components/TaskRuns/TaskRuns.test.jsx b/packages/components/src/components/TaskRuns/TaskRuns.test.jsx index de6404be3..605f95c21 100644 --- a/packages/components/src/components/TaskRuns/TaskRuns.test.jsx +++ b/packages/components/src/components/TaskRuns/TaskRuns.test.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { getCarbonPrefix } from '@tektoncd/dashboard-utils'; import { render, renderWithRouter } from '../../utils/test'; diff --git a/packages/components/src/components/TaskTree/TaskTree.jsx b/packages/components/src/components/TaskTree/TaskTree.jsx index fa361cd5f..a38393f50 100644 --- a/packages/components/src/components/TaskTree/TaskTree.jsx +++ b/packages/components/src/components/TaskTree/TaskTree.jsx @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { getStatus, labels as labelConstants } from '@tektoncd/dashboard-utils'; import Task from '../Task'; diff --git a/packages/components/src/components/TaskTree/TaskTree.stories.jsx b/packages/components/src/components/TaskTree/TaskTree.stories.jsx index 5646fb9a7..f93163af4 100644 --- a/packages/components/src/components/TaskTree/TaskTree.stories.jsx +++ b/packages/components/src/components/TaskTree/TaskTree.stories.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React, { useState } from 'react'; +import { useState } from 'react'; import TaskTree from './TaskTree'; diff --git a/packages/components/src/components/TaskTree/TaskTree.test.jsx b/packages/components/src/components/TaskTree/TaskTree.test.jsx index 7fcdc7cec..c0e67f78b 100644 --- a/packages/components/src/components/TaskTree/TaskTree.test.jsx +++ b/packages/components/src/components/TaskTree/TaskTree.test.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { fireEvent } from '@testing-library/react'; import TaskTree from './TaskTree'; import { render } from '../../utils/test'; diff --git a/packages/components/src/components/TextInput/TextInput.jsx b/packages/components/src/components/TextInput/TextInput.jsx index 88852a83d..dc3785a1b 100644 --- a/packages/components/src/components/TextInput/TextInput.jsx +++ b/packages/components/src/components/TextInput/TextInput.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { TextInput as CarbonTextInput, TextInputSkeleton diff --git a/packages/components/src/components/TextInput/TextInput.test.jsx b/packages/components/src/components/TextInput/TextInput.test.jsx index 2a54fc0bb..08cc7f57a 100644 --- a/packages/components/src/components/TextInput/TextInput.test.jsx +++ b/packages/components/src/components/TextInput/TextInput.test.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { render } from '@testing-library/react'; import TextInput from './TextInput'; diff --git a/packages/components/src/components/TooltipDropdown/TooltipDropdown.jsx b/packages/components/src/components/TooltipDropdown/TooltipDropdown.jsx index 7752877b6..ffb4871c4 100644 --- a/packages/components/src/components/TooltipDropdown/TooltipDropdown.jsx +++ b/packages/components/src/components/TooltipDropdown/TooltipDropdown.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { useIntl } from 'react-intl'; import { ComboBox, DropdownSkeleton } from 'carbon-components-react'; import { getCarbonPrefix, getTranslateWithId } from '@tektoncd/dashboard-utils'; diff --git a/packages/components/src/components/TooltipDropdown/TooltipDropdown.stories.jsx b/packages/components/src/components/TooltipDropdown/TooltipDropdown.stories.jsx index c29fc07e1..597301f1c 100644 --- a/packages/components/src/components/TooltipDropdown/TooltipDropdown.stories.jsx +++ b/packages/components/src/components/TooltipDropdown/TooltipDropdown.stories.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,8 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; - import TooltipDropdown from './TooltipDropdown'; export default { diff --git a/packages/components/src/components/TooltipDropdown/TooltipDropdown.test.jsx b/packages/components/src/components/TooltipDropdown/TooltipDropdown.test.jsx index ff5b1f8dd..7fd02ab16 100644 --- a/packages/components/src/components/TooltipDropdown/TooltipDropdown.test.jsx +++ b/packages/components/src/components/TooltipDropdown/TooltipDropdown.test.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { fireEvent } from '@testing-library/react'; import { render } from '../../utils/test'; diff --git a/packages/components/src/components/Trigger/Trigger.jsx b/packages/components/src/components/Trigger/Trigger.jsx index 4415a9acc..8ffe2b9dc 100644 --- a/packages/components/src/components/Trigger/Trigger.jsx +++ b/packages/components/src/components/Trigger/Trigger.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { useIntl } from 'react-intl'; import { Link } from 'react-router-dom'; import { diff --git a/packages/components/src/components/Trigger/Trigger.test.jsx b/packages/components/src/components/Trigger/Trigger.test.jsx index eff489ef2..13fb9a834 100644 --- a/packages/components/src/components/Trigger/Trigger.test.jsx +++ b/packages/components/src/components/Trigger/Trigger.test.jsx @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import Trigger from './Trigger'; import { renderWithRouter } from '../../utils/test'; diff --git a/packages/components/src/components/ViewYAML/SyntaxHighlighter.jsx b/packages/components/src/components/ViewYAML/SyntaxHighlighter.jsx index d661c2fb0..5c4b61f0e 100644 --- a/packages/components/src/components/ViewYAML/SyntaxHighlighter.jsx +++ b/packages/components/src/components/ViewYAML/SyntaxHighlighter.jsx @@ -1,5 +1,5 @@ /* -Copyright 2021-2023 The Tekton Authors +Copyright 2021-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -12,7 +12,6 @@ limitations under the License. */ /* istanbul ignore file */ -import React from 'react'; import jsYaml from 'js-yaml'; import { getCarbonPrefix } from '@tektoncd/dashboard-utils'; diff --git a/packages/components/src/components/ViewYAML/ViewYAML.jsx b/packages/components/src/components/ViewYAML/ViewYAML.jsx index 1f74fe0cd..8d17453a2 100644 --- a/packages/components/src/components/ViewYAML/ViewYAML.jsx +++ b/packages/components/src/components/ViewYAML/ViewYAML.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import PropTypes from 'prop-types'; import jsYaml from 'js-yaml'; import { classNames, getCarbonPrefix } from '@tektoncd/dashboard-utils'; diff --git a/packages/components/src/components/ViewYAML/ViewYAML.test.jsx b/packages/components/src/components/ViewYAML/ViewYAML.test.jsx index 8508e742f..eada25633 100644 --- a/packages/components/src/components/ViewYAML/ViewYAML.test.jsx +++ b/packages/components/src/components/ViewYAML/ViewYAML.test.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { render } from '@testing-library/react'; import ViewYAML from './ViewYAML'; diff --git a/packages/components/src/utils/test.jsx b/packages/components/src/utils/test.jsx index d4591ebd5..efb37d481 100644 --- a/packages/components/src/utils/test.jsx +++ b/packages/components/src/utils/test.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,7 @@ See the License for the specific language governing permissions and limitations under the License. */ /* istanbul ignore file */ -import React from 'react'; +import { Fragment } from 'react'; import { BrowserRouter, Switch } from 'react-router-dom'; import { CompatRoute, CompatRouter } from 'react-router-dom-v5-compat'; import { render as baseRender } from '@testing-library/react'; @@ -39,7 +39,7 @@ export function renderWithRouter( path = '/', rerender, route = '/', - wrapper: Wrapper = React.Fragment, + wrapper: Wrapper = Fragment, ...otherOptions } = {} ) { @@ -64,10 +64,7 @@ function IntlWrapper({ children }) { ); } -export function render( - ui, - { rerender, wrapper: Wrapper = React.Fragment } = {} -) { +export function render(ui, { rerender, wrapper: Wrapper = Fragment } = {}) { return (rerender || baseRender)(ui, { wrapper: ({ children }) => ( diff --git a/packages/graph/src/components/Edge/Edge.jsx b/packages/graph/src/components/Edge/Edge.jsx index 3dcef96c7..193754d88 100644 --- a/packages/graph/src/components/Edge/Edge.jsx +++ b/packages/graph/src/components/Edge/Edge.jsx @@ -1,5 +1,5 @@ /* -Copyright 2022-2023 The Tekton Authors +Copyright 2022-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import CarbonEdge from '@carbon/charts-react/diagrams/Edge/Edge'; import { path as d3Path } from 'd3-path'; diff --git a/packages/graph/src/components/Graph.jsx b/packages/graph/src/components/Graph.jsx index f9af0cc2e..ec02e3c06 100644 --- a/packages/graph/src/components/Graph.jsx +++ b/packages/graph/src/components/Graph.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,7 @@ See the License for the specific language governing permissions and limitations under the License. */ /* istanbul ignore file */ -import React, { Component } from 'react'; +import { Component } from 'react'; import { Graph as VXGraph } from '@visx/network'; import ELK from 'elkjs/lib/elk.bundled'; diff --git a/packages/graph/src/components/Graph/Graph.jsx b/packages/graph/src/components/Graph/Graph.jsx index d57a9cd2f..8026c54fd 100644 --- a/packages/graph/src/components/Graph/Graph.jsx +++ b/packages/graph/src/components/Graph/Graph.jsx @@ -1,5 +1,5 @@ /* -Copyright 2022-2023 The Tekton Authors +Copyright 2022-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -12,7 +12,7 @@ limitations under the License. */ /* istanbul ignore file */ -import React, { useEffect, useState } from 'react'; +import { useEffect, useState } from 'react'; import ELK from 'elkjs/lib/elk.bundled'; import { ArrowRightMarker } from '@carbon/charts-react/diagrams/Marker'; diff --git a/packages/graph/src/components/InlineLoading.jsx b/packages/graph/src/components/InlineLoading.jsx index 406f05380..6b5a28b56 100644 --- a/packages/graph/src/components/InlineLoading.jsx +++ b/packages/graph/src/components/InlineLoading.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,8 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ /* istanbul ignore file */ -import React from 'react'; - const InlineLoading = props => ( { diff --git a/packages/graph/src/components/PanZoom.jsx b/packages/graph/src/components/PanZoom.jsx index 9c5a264c7..f896a0bdf 100644 --- a/packages/graph/src/components/PanZoom.jsx +++ b/packages/graph/src/components/PanZoom.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,7 @@ See the License for the specific language governing permissions and limitations under the License. */ /* istanbul ignore file */ -import React from 'react'; +import { Component } from 'react'; import { localPoint } from '@visx/event'; const initialState = { @@ -23,7 +23,7 @@ const initialState = { } }; -export default class PanZoom extends React.Component { +export default class PanZoom extends Component { state = initialState; reset = () => { diff --git a/packages/graph/src/components/PipelineGraph.jsx b/packages/graph/src/components/PipelineGraph.jsx index a7f4ba797..90bc8de92 100644 --- a/packages/graph/src/components/PipelineGraph.jsx +++ b/packages/graph/src/components/PipelineGraph.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,7 @@ See the License for the specific language governing permissions and limitations under the License. */ /* istanbul ignore file */ -import React, { Component } from 'react'; +import { Component } from 'react'; import buildGraphData from '../buildGraphData'; import Graph from './Graph'; diff --git a/packages/graph/src/components/PipelineGraph.stories.jsx b/packages/graph/src/components/PipelineGraph.stories.jsx index 6bc63879f..7ee2e58ec 100644 --- a/packages/graph/src/components/PipelineGraph.stories.jsx +++ b/packages/graph/src/components/PipelineGraph.stories.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { action } from '@storybook/addon-actions'; import PipelineGraph from './PipelineGraph'; diff --git a/packages/graph/src/components/StatusIcon/StatusIcon.jsx b/packages/graph/src/components/StatusIcon/StatusIcon.jsx index 5edb9662d..fceab34f4 100644 --- a/packages/graph/src/components/StatusIcon/StatusIcon.jsx +++ b/packages/graph/src/components/StatusIcon/StatusIcon.jsx @@ -1,5 +1,5 @@ /* -Copyright 2022-2023 The Tekton Authors +Copyright 2022-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { Misuse16 as FailedIcon, Branch16 as GitIcon, diff --git a/packages/graph/src/components/ZoomablePipelineGraph.jsx b/packages/graph/src/components/ZoomablePipelineGraph.jsx index 908487cfe..2afea63c1 100644 --- a/packages/graph/src/components/ZoomablePipelineGraph.jsx +++ b/packages/graph/src/components/ZoomablePipelineGraph.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -12,7 +12,7 @@ limitations under the License. */ /* istanbul ignore file */ -import React from 'react'; +import { Component } from 'react'; import { injectIntl } from 'react-intl'; import { Button } from 'carbon-components-react'; @@ -32,7 +32,7 @@ const height = 600; const minZoom = 0.1; const maxZoom = 10; -class ZoomablePipelineGraph extends React.Component { +class ZoomablePipelineGraph extends Component { state = { isPanningEnabled: false }; diff --git a/packages/graph/src/components/ZoomablePipelineGraph.stories.jsx b/packages/graph/src/components/ZoomablePipelineGraph.stories.jsx index 41cce964d..702d1f26c 100644 --- a/packages/graph/src/components/ZoomablePipelineGraph.stories.jsx +++ b/packages/graph/src/components/ZoomablePipelineGraph.stories.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { action } from '@storybook/addon-actions'; import ZoomablePipelineGraph from './ZoomablePipelineGraph'; diff --git a/src/api/utils.js b/src/api/utils.js index 7f119c0f4..512bef96c 100644 --- a/src/api/utils.js +++ b/src/api/utils.js @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React, { useContext, useEffect, useRef, useState } from 'react'; +import { createContext, useContext, useEffect, useRef, useState } from 'react'; import { useQuery, useQueryClient } from '@tanstack/react-query'; import { ALL_NAMESPACES } from '@tektoncd/dashboard-utils'; @@ -126,7 +126,7 @@ export function getTektonAPI( ); } -export const NamespaceContext = React.createContext(); +export const NamespaceContext = createContext(); NamespaceContext.displayName = 'Namespace'; function getResourceVersion(resource) { diff --git a/src/containers/About/About.jsx b/src/containers/About/About.jsx index c306e4fb7..884a9c4e6 100644 --- a/src/containers/About/About.jsx +++ b/src/containers/About/About.jsx @@ -1,5 +1,5 @@ /* -Copyright 2020-2023 The Tekton Authors +Copyright 2020-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -12,7 +12,7 @@ limitations under the License. */ /* istanbul ignore file */ -import React, { Fragment } from 'react'; +import { Fragment } from 'react'; import { useIntl } from 'react-intl'; import { ClickableTile as CarbonClickableTile, diff --git a/src/containers/About/About.test.jsx b/src/containers/About/About.test.jsx index 17f505243..5c0459246 100644 --- a/src/containers/About/About.test.jsx +++ b/src/containers/About/About.test.jsx @@ -1,5 +1,5 @@ /* -Copyright 2020-2023 The Tekton Authors +Copyright 2020-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { render } from '../../utils/test'; import * as api from '../../api'; diff --git a/src/containers/App/App.jsx b/src/containers/App/App.jsx index e7681e33b..f55cbbbf8 100644 --- a/src/containers/App/App.jsx +++ b/src/containers/App/App.jsx @@ -11,7 +11,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React, { useMemo, useState } from 'react'; +import { useMemo, useState } from 'react'; import { useQuery, useQueryClient } from '@tanstack/react-query'; import { hot } from 'react-hot-loader/root'; import { Link, Redirect, HashRouter as Router, Switch } from 'react-router-dom'; diff --git a/src/containers/App/App.test.jsx b/src/containers/App/App.test.jsx index 319b404df..b397da0cd 100644 --- a/src/containers/App/App.test.jsx +++ b/src/containers/App/App.test.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { fireEvent, waitFor } from '@testing-library/react'; import { App } from './App'; diff --git a/src/containers/ClusterInterceptors/ClusterInterceptors.jsx b/src/containers/ClusterInterceptors/ClusterInterceptors.jsx index afe0a409c..a522e8997 100644 --- a/src/containers/ClusterInterceptors/ClusterInterceptors.jsx +++ b/src/containers/ClusterInterceptors/ClusterInterceptors.jsx @@ -1,5 +1,5 @@ /* -Copyright 2021-2023 The Tekton Authors +Copyright 2021-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { Link } from 'react-router-dom'; import { useLocation } from 'react-router-dom-v5-compat'; import { useIntl } from 'react-intl'; diff --git a/src/containers/ClusterInterceptors/ClusterInterceptors.test.jsx b/src/containers/ClusterInterceptors/ClusterInterceptors.test.jsx index 5b88e27f6..1243a33d9 100644 --- a/src/containers/ClusterInterceptors/ClusterInterceptors.test.jsx +++ b/src/containers/ClusterInterceptors/ClusterInterceptors.test.jsx @@ -1,5 +1,5 @@ /* -Copyright 2021-2023 The Tekton Authors +Copyright 2021-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { paths, urls } from '@tektoncd/dashboard-utils'; import { renderWithRouter } from '../../utils/test'; diff --git a/src/containers/ClusterTasks/ClusterTasks.jsx b/src/containers/ClusterTasks/ClusterTasks.jsx index a30b9bf3d..b38a51ccd 100644 --- a/src/containers/ClusterTasks/ClusterTasks.jsx +++ b/src/containers/ClusterTasks/ClusterTasks.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -12,7 +12,7 @@ limitations under the License. */ /* istanbul ignore file */ -import React, { useState } from 'react'; +import { useState } from 'react'; import { Link } from 'react-router-dom'; import { useLocation } from 'react-router-dom-v5-compat'; import { useIntl } from 'react-intl'; diff --git a/src/containers/ClusterTasksDropdown/ClusterTasksDropdown.jsx b/src/containers/ClusterTasksDropdown/ClusterTasksDropdown.jsx index 4c630439b..e904c6ce4 100644 --- a/src/containers/ClusterTasksDropdown/ClusterTasksDropdown.jsx +++ b/src/containers/ClusterTasksDropdown/ClusterTasksDropdown.jsx @@ -1,5 +1,5 @@ /* -Copyright 2020-2023 The Tekton Authors +Copyright 2020-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { useIntl } from 'react-intl'; import { TooltipDropdown } from '@tektoncd/dashboard-components'; diff --git a/src/containers/ClusterTasksDropdown/ClusterTasksDropdown.test.jsx b/src/containers/ClusterTasksDropdown/ClusterTasksDropdown.test.jsx index 57bd8f6ff..361447252 100644 --- a/src/containers/ClusterTasksDropdown/ClusterTasksDropdown.test.jsx +++ b/src/containers/ClusterTasksDropdown/ClusterTasksDropdown.test.jsx @@ -1,5 +1,5 @@ /* -Copyright 2020-2023 The Tekton Authors +Copyright 2020-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { fireEvent, getNodeText } from '@testing-library/react'; import { render } from '../../utils/test'; diff --git a/src/containers/ClusterTriggerBinding/ClusterTriggerBinding.jsx b/src/containers/ClusterTriggerBinding/ClusterTriggerBinding.jsx index 5569e07dc..fdb1b0b51 100644 --- a/src/containers/ClusterTriggerBinding/ClusterTriggerBinding.jsx +++ b/src/containers/ClusterTriggerBinding/ClusterTriggerBinding.jsx @@ -1,5 +1,5 @@ /* -Copyright 2020-2023 The Tekton Authors +Copyright 2020-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -12,7 +12,6 @@ limitations under the License. */ /* istanbul ignore file */ -import React from 'react'; import { useLocation, useNavigate, diff --git a/src/containers/ClusterTriggerBinding/ClusterTriggerBinding.test.jsx b/src/containers/ClusterTriggerBinding/ClusterTriggerBinding.test.jsx index ae40c6491..34bb915f4 100644 --- a/src/containers/ClusterTriggerBinding/ClusterTriggerBinding.test.jsx +++ b/src/containers/ClusterTriggerBinding/ClusterTriggerBinding.test.jsx @@ -1,5 +1,5 @@ /* -Copyright 2020-2023 The Tekton Authors +Copyright 2020-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { fireEvent, waitFor } from '@testing-library/react'; import { createIntl } from 'react-intl'; import { paths, urls } from '@tektoncd/dashboard-utils'; diff --git a/src/containers/ClusterTriggerBindings/ClusterTriggerBindings.jsx b/src/containers/ClusterTriggerBindings/ClusterTriggerBindings.jsx index 13ab3ef97..e8db44dca 100644 --- a/src/containers/ClusterTriggerBindings/ClusterTriggerBindings.jsx +++ b/src/containers/ClusterTriggerBindings/ClusterTriggerBindings.jsx @@ -1,5 +1,5 @@ /* -Copyright 2020-2023 The Tekton Authors +Copyright 2020-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { Link } from 'react-router-dom'; import { useLocation } from 'react-router-dom-v5-compat'; import { useIntl } from 'react-intl'; diff --git a/src/containers/ClusterTriggerBindings/ClusterTriggerBindings.test.jsx b/src/containers/ClusterTriggerBindings/ClusterTriggerBindings.test.jsx index eb08c64b5..72c0fe09d 100644 --- a/src/containers/ClusterTriggerBindings/ClusterTriggerBindings.test.jsx +++ b/src/containers/ClusterTriggerBindings/ClusterTriggerBindings.test.jsx @@ -1,5 +1,5 @@ /* -Copyright 2020-2023 The Tekton Authors +Copyright 2020-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { fireEvent } from '@testing-library/react'; import { renderWithRouter } from '../../utils/test'; diff --git a/src/containers/CreateCustomRun/CreateCustomRun.jsx b/src/containers/CreateCustomRun/CreateCustomRun.jsx index 390d539f7..4a088b594 100644 --- a/src/containers/CreateCustomRun/CreateCustomRun.jsx +++ b/src/containers/CreateCustomRun/CreateCustomRun.jsx @@ -1,5 +1,5 @@ /* -Copyright 2023 The Tekton Authors +Copyright 2023-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -12,7 +12,7 @@ limitations under the License. */ /* istanbul ignore file */ -import React, { Suspense } from 'react'; +import { lazy, Suspense } from 'react'; import { useLocation, useNavigate } from 'react-router-dom-v5-compat'; import yaml from 'js-yaml'; import { ALL_NAMESPACES, urls, useTitleSync } from '@tektoncd/dashboard-utils'; @@ -26,7 +26,7 @@ import { useSelectedNamespace } from '../../api'; -const YAMLEditor = React.lazy(() => import('../YAMLEditor')); +const YAMLEditor = lazy(() => import('../YAMLEditor')); function CreateCustomRun() { const intl = useIntl(); diff --git a/src/containers/CreateCustomRun/CreateCustomRun.test.jsx b/src/containers/CreateCustomRun/CreateCustomRun.test.jsx index 7cb9abd9a..bb6bc5392 100644 --- a/src/containers/CreateCustomRun/CreateCustomRun.test.jsx +++ b/src/containers/CreateCustomRun/CreateCustomRun.test.jsx @@ -1,5 +1,5 @@ /* -Copyright 2023 The Tekton Authors +Copyright 2023-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { fireEvent, waitFor } from '@testing-library/react'; import { renderWithRouter } from '../../utils/test'; diff --git a/src/containers/CreatePipelineRun/CreatePipelineRun.jsx b/src/containers/CreatePipelineRun/CreatePipelineRun.jsx index b0e5ae552..19cef86e5 100644 --- a/src/containers/CreatePipelineRun/CreatePipelineRun.jsx +++ b/src/containers/CreatePipelineRun/CreatePipelineRun.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -12,7 +12,7 @@ limitations under the License. */ /* istanbul ignore file */ -import React, { Suspense, useState } from 'react'; +import { lazy, Suspense, useState } from 'react'; import { useLocation, useNavigate } from 'react-router-dom-v5-compat'; import keyBy from 'lodash.keyby'; import yaml from 'js-yaml'; @@ -48,7 +48,7 @@ import { } from '../../api'; import { isValidLabel } from '../../utils'; -const YAMLEditor = React.lazy(() => import('../YAMLEditor')); +const YAMLEditor = lazy(() => import('../YAMLEditor')); const initialState = { creating: false, diff --git a/src/containers/CreatePipelineRun/CreatePipelineRun.test.jsx b/src/containers/CreatePipelineRun/CreatePipelineRun.test.jsx index 5ebbfaf5c..e61fd149b 100644 --- a/src/containers/CreatePipelineRun/CreatePipelineRun.test.jsx +++ b/src/containers/CreatePipelineRun/CreatePipelineRun.test.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { fireEvent, waitFor } from '@testing-library/react'; import { renderWithRouter } from '../../utils/test'; diff --git a/src/containers/CreateTaskRun/CreateTaskRun.jsx b/src/containers/CreateTaskRun/CreateTaskRun.jsx index c24a94266..86ff88bd8 100644 --- a/src/containers/CreateTaskRun/CreateTaskRun.jsx +++ b/src/containers/CreateTaskRun/CreateTaskRun.jsx @@ -1,5 +1,5 @@ /* -Copyright 2020-2023 The Tekton Authors +Copyright 2020-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -12,7 +12,7 @@ limitations under the License. */ /* istanbul ignore file */ -import React, { Suspense, useState } from 'react'; +import { lazy, Suspense, useState } from 'react'; import { useLocation, useNavigate } from 'react-router-dom-v5-compat'; import keyBy from 'lodash.keyby'; import yaml from 'js-yaml'; @@ -50,7 +50,7 @@ import { } from '../../api'; import { isValidLabel } from '../../utils'; -const YAMLEditor = React.lazy(() => import('../YAMLEditor')); +const YAMLEditor = lazy(() => import('../YAMLEditor')); const clusterTaskItem = { id: 'clustertask', text: 'ClusterTask' }; const taskItem = { id: 'task', text: 'Task' }; diff --git a/src/containers/CreateTaskRun/CreateTaskRun.test.jsx b/src/containers/CreateTaskRun/CreateTaskRun.test.jsx index 32901218a..ffd1cce98 100644 --- a/src/containers/CreateTaskRun/CreateTaskRun.test.jsx +++ b/src/containers/CreateTaskRun/CreateTaskRun.test.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { fireEvent, waitFor } from '@testing-library/react'; import { ALL_NAMESPACES } from '@tektoncd/dashboard-utils'; diff --git a/src/containers/CustomResourceDefinition/CustomResourceDefinition.jsx b/src/containers/CustomResourceDefinition/CustomResourceDefinition.jsx index 42f251e93..58a958d7f 100644 --- a/src/containers/CustomResourceDefinition/CustomResourceDefinition.jsx +++ b/src/containers/CustomResourceDefinition/CustomResourceDefinition.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -12,7 +12,6 @@ limitations under the License. */ /* istanbul ignore file */ -import React from 'react'; import { useLocation, useNavigate, diff --git a/src/containers/CustomRun/CustomRun.jsx b/src/containers/CustomRun/CustomRun.jsx index 3ca83c74e..2bd337938 100644 --- a/src/containers/CustomRun/CustomRun.jsx +++ b/src/containers/CustomRun/CustomRun.jsx @@ -1,5 +1,5 @@ /* -Copyright 2022-2023 The Tekton Authors +Copyright 2022-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -12,7 +12,7 @@ limitations under the License. */ /* istanbul ignore file */ -import React, { useState } from 'react'; +import { useState } from 'react'; import { Link } from 'react-router-dom'; import { useLocation, diff --git a/src/containers/CustomRuns/CustomRuns.jsx b/src/containers/CustomRuns/CustomRuns.jsx index 5c42cb719..6a11b2cca 100644 --- a/src/containers/CustomRuns/CustomRuns.jsx +++ b/src/containers/CustomRuns/CustomRuns.jsx @@ -1,5 +1,5 @@ /* -Copyright 2022-2023 The Tekton Authors +Copyright 2022-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -12,7 +12,7 @@ limitations under the License. */ /* istanbul ignore file */ -import React, { useEffect, useState } from 'react'; +import { useEffect, useState } from 'react'; import { Link } from 'react-router-dom'; import { useLocation, diff --git a/src/containers/EventListener/EventListener.jsx b/src/containers/EventListener/EventListener.jsx index f4cdd59ab..efc7bab37 100644 --- a/src/containers/EventListener/EventListener.jsx +++ b/src/containers/EventListener/EventListener.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -12,7 +12,6 @@ limitations under the License. */ /* istanbul ignore file */ -import React from 'react'; import { Link } from 'react-router-dom'; import { useLocation, diff --git a/src/containers/EventListener/EventListener.stories.jsx b/src/containers/EventListener/EventListener.stories.jsx index a341fadc5..3528ab688 100644 --- a/src/containers/EventListener/EventListener.stories.jsx +++ b/src/containers/EventListener/EventListener.stories.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { createIntl } from 'react-intl'; diff --git a/src/containers/EventListener/EventListener.test.jsx b/src/containers/EventListener/EventListener.test.jsx index 2e374dafb..25fb80df0 100644 --- a/src/containers/EventListener/EventListener.test.jsx +++ b/src/containers/EventListener/EventListener.test.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { paths, urls } from '@tektoncd/dashboard-utils'; import { waitFor } from '@testing-library/react'; import { createIntl } from 'react-intl'; diff --git a/src/containers/EventListeners/EventListeners.jsx b/src/containers/EventListeners/EventListeners.jsx index 3aec1cbdb..6cf660abd 100644 --- a/src/containers/EventListeners/EventListeners.jsx +++ b/src/containers/EventListeners/EventListeners.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { Link } from 'react-router-dom'; import { useLocation, useParams } from 'react-router-dom-v5-compat'; import { useIntl } from 'react-intl'; diff --git a/src/containers/EventListeners/EventListeners.test.jsx b/src/containers/EventListeners/EventListeners.test.jsx index 1ca3077bf..1d0631628 100644 --- a/src/containers/EventListeners/EventListeners.test.jsx +++ b/src/containers/EventListeners/EventListeners.test.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { fireEvent } from '@testing-library/react'; import { ALL_NAMESPACES } from '@tektoncd/dashboard-utils'; diff --git a/src/containers/Extension/Extension.jsx b/src/containers/Extension/Extension.jsx index 89cda6ace..49c8e2736 100644 --- a/src/containers/Extension/Extension.jsx +++ b/src/containers/Extension/Extension.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -12,7 +12,7 @@ limitations under the License. */ /* istanbul ignore file */ -import React, { Suspense, useState } from 'react'; +import { lazy, Suspense, useState } from 'react'; import { useIntl } from 'react-intl'; import { ErrorBoundary } from '@tektoncd/dashboard-components'; import { paths, urls, useTitleSync } from '@tektoncd/dashboard-utils'; @@ -23,7 +23,7 @@ import { paths, urls, useTitleSync } from '@tektoncd/dashboard-utils'; function Extension({ displayName: resourceName, source }) { const intl = useIntl(); const [ExtensionComponent] = useState(() => - React.lazy(() => import(/* @vite-ignore */ source)) + lazy(() => import(/* @vite-ignore */ source)) ); useTitleSync({ diff --git a/src/containers/Extensions/Extensions.jsx b/src/containers/Extensions/Extensions.jsx index 32349f0ea..1fe2f3ee1 100644 --- a/src/containers/Extensions/Extensions.jsx +++ b/src/containers/Extensions/Extensions.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -12,7 +12,6 @@ limitations under the License. */ /* istanbul ignore file */ -import React from 'react'; import { useIntl } from 'react-intl'; import { Link } from 'react-router-dom'; import { InlineNotification } from 'carbon-components-react'; diff --git a/src/containers/HeaderBarContent/HeaderBarContent.jsx b/src/containers/HeaderBarContent/HeaderBarContent.jsx index 585df3211..02a80fa35 100644 --- a/src/containers/HeaderBarContent/HeaderBarContent.jsx +++ b/src/containers/HeaderBarContent/HeaderBarContent.jsx @@ -1,5 +1,5 @@ /* -Copyright 2022-2023 The Tekton Authors +Copyright 2022-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -10,7 +10,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ -import React, { useEffect } from 'react'; +import { useEffect } from 'react'; import { generatePath, useLocation, diff --git a/src/containers/HeaderBarContent/HeaderBarContent.test.jsx b/src/containers/HeaderBarContent/HeaderBarContent.test.jsx index a5f296a66..d412d787f 100644 --- a/src/containers/HeaderBarContent/HeaderBarContent.test.jsx +++ b/src/containers/HeaderBarContent/HeaderBarContent.test.jsx @@ -1,5 +1,5 @@ /* -Copyright 2022-2023 The Tekton Authors +Copyright 2022-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { fireEvent, waitFor } from '@testing-library/react'; import { ALL_NAMESPACES } from '@tektoncd/dashboard-utils'; diff --git a/src/containers/ImportResources/ImportResources.jsx b/src/containers/ImportResources/ImportResources.jsx index b88a6e48a..5943c0dc6 100644 --- a/src/containers/ImportResources/ImportResources.jsx +++ b/src/containers/ImportResources/ImportResources.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React, { useState } from 'react'; +import { useState } from 'react'; import { useIntl } from 'react-intl'; import { Accordion, diff --git a/src/containers/ImportResources/ImportResources.test.jsx b/src/containers/ImportResources/ImportResources.test.jsx index 058df61ab..e27c24920 100644 --- a/src/containers/ImportResources/ImportResources.test.jsx +++ b/src/containers/ImportResources/ImportResources.test.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { fireEvent, waitFor } from '@testing-library/react'; import { ALL_NAMESPACES, diff --git a/src/containers/Interceptors/Interceptors.jsx b/src/containers/Interceptors/Interceptors.jsx index 3a2008790..587077996 100644 --- a/src/containers/Interceptors/Interceptors.jsx +++ b/src/containers/Interceptors/Interceptors.jsx @@ -1,5 +1,5 @@ /* -Copyright 2022-2023 The Tekton Authors +Copyright 2022-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { Link } from 'react-router-dom'; import { useLocation, useParams } from 'react-router-dom-v5-compat'; import { useIntl } from 'react-intl'; diff --git a/src/containers/Interceptors/Interceptors.test.jsx b/src/containers/Interceptors/Interceptors.test.jsx index 45a476384..fac4abc17 100644 --- a/src/containers/Interceptors/Interceptors.test.jsx +++ b/src/containers/Interceptors/Interceptors.test.jsx @@ -1,5 +1,5 @@ /* -Copyright 2022-2023 The Tekton Authors +Copyright 2022-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { fireEvent } from '@testing-library/react'; import { ALL_NAMESPACES } from '@tektoncd/dashboard-utils'; diff --git a/src/containers/LabelFilter/LabelFilter.jsx b/src/containers/LabelFilter/LabelFilter.jsx index af0a15964..c53bf22d4 100644 --- a/src/containers/LabelFilter/LabelFilter.jsx +++ b/src/containers/LabelFilter/LabelFilter.jsx @@ -1,5 +1,5 @@ /* -Copyright 2020-2023 The Tekton Authors +Copyright 2020-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { LabelFilter } from '@tektoncd/dashboard-components'; import { getAddFilterHandler, diff --git a/src/containers/ListPageLayout/ListPageLayout.jsx b/src/containers/ListPageLayout/ListPageLayout.jsx index eb2c4f747..fc5e3e3c4 100644 --- a/src/containers/ListPageLayout/ListPageLayout.jsx +++ b/src/containers/ListPageLayout/ListPageLayout.jsx @@ -1,5 +1,5 @@ /* -Copyright 2020-2023 The Tekton Authors +Copyright 2020-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React, { useEffect, useState } from 'react'; +import { useEffect, useState } from 'react'; import PropTypes from 'prop-types'; import { useLocation, useNavigate } from 'react-router-dom-v5-compat'; import { useIntl } from 'react-intl'; diff --git a/src/containers/ListPageLayout/ListPageLayout.stories.jsx b/src/containers/ListPageLayout/ListPageLayout.stories.jsx index d2bf30be0..79aafc7d3 100644 --- a/src/containers/ListPageLayout/ListPageLayout.stories.jsx +++ b/src/containers/ListPageLayout/ListPageLayout.stories.jsx @@ -1,5 +1,5 @@ /* -Copyright 2020-2023 The Tekton Authors +Copyright 2020-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -12,7 +12,6 @@ limitations under the License. */ /* eslint-disable formatjs/no-literal-string-in-jsx */ -import React from 'react'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { Table } from '@tektoncd/dashboard-components'; diff --git a/src/containers/ListPageLayout/ListPageLayout.test.jsx b/src/containers/ListPageLayout/ListPageLayout.test.jsx index 01858dae2..27c2490ad 100644 --- a/src/containers/ListPageLayout/ListPageLayout.test.jsx +++ b/src/containers/ListPageLayout/ListPageLayout.test.jsx @@ -1,5 +1,5 @@ /* -Copyright 2020-2023 The Tekton Authors +Copyright 2020-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,8 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; - import { renderWithRouter } from '../../utils/test'; import { ListPageLayout } from './ListPageLayout'; diff --git a/src/containers/LoadingShell/LoadingShell.jsx b/src/containers/LoadingShell/LoadingShell.jsx index e82484e1c..7f8d72209 100644 --- a/src/containers/LoadingShell/LoadingShell.jsx +++ b/src/containers/LoadingShell/LoadingShell.jsx @@ -1,5 +1,5 @@ /* -Copyright 2020-2023 The Tekton Authors +Copyright 2020-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -12,7 +12,6 @@ limitations under the License. */ /* istanbul ignore file */ -import React from 'react'; import { useIntl } from 'react-intl'; import { SkeletonText as CarbonSkeletonText, diff --git a/src/containers/NamespacesDropdown/NamespacesDropdown.jsx b/src/containers/NamespacesDropdown/NamespacesDropdown.jsx index 0d1a68108..232eb8cc6 100644 --- a/src/containers/NamespacesDropdown/NamespacesDropdown.jsx +++ b/src/containers/NamespacesDropdown/NamespacesDropdown.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { useIntl } from 'react-intl'; import { ALL_NAMESPACES } from '@tektoncd/dashboard-utils'; import { TooltipDropdown } from '@tektoncd/dashboard-components'; diff --git a/src/containers/NamespacesDropdown/NamespacesDropdown.test.jsx b/src/containers/NamespacesDropdown/NamespacesDropdown.test.jsx index 404cdc28a..dd13b4555 100644 --- a/src/containers/NamespacesDropdown/NamespacesDropdown.test.jsx +++ b/src/containers/NamespacesDropdown/NamespacesDropdown.test.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { fireEvent, getNodeText } from '@testing-library/react'; import { render } from '../../utils/test'; diff --git a/src/containers/NotFound/NotFound.jsx b/src/containers/NotFound/NotFound.jsx index 448b47b9a..da621eb82 100644 --- a/src/containers/NotFound/NotFound.jsx +++ b/src/containers/NotFound/NotFound.jsx @@ -1,5 +1,5 @@ /* -Copyright 2021-2023 The Tekton Authors +Copyright 2021-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -12,7 +12,6 @@ limitations under the License. */ /* istanbul ignore file */ -import React from 'react'; import { useIntl } from 'react-intl'; import { Link } from 'react-router-dom'; import { Column, Grid, Row } from 'carbon-components-react'; diff --git a/src/containers/NotFound/NotFound.stories.jsx b/src/containers/NotFound/NotFound.stories.jsx index ff8578d07..d890f673c 100644 --- a/src/containers/NotFound/NotFound.stories.jsx +++ b/src/containers/NotFound/NotFound.stories.jsx @@ -1,5 +1,5 @@ /* -Copyright 2021-2023 The Tekton Authors +Copyright 2021-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,8 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; - import { NamespaceContext } from '../../api'; import NotFound from './NotFound'; diff --git a/src/containers/PipelineRun/PipelineRun.jsx b/src/containers/PipelineRun/PipelineRun.jsx index e01069e48..cd655661b 100644 --- a/src/containers/PipelineRun/PipelineRun.jsx +++ b/src/containers/PipelineRun/PipelineRun.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React, { useEffect, useRef, useState } from 'react'; +import { useEffect, useRef, useState } from 'react'; import { Actions, PipelineRun } from '@tektoncd/dashboard-components'; import { getCarbonPrefix, diff --git a/src/containers/PipelineRun/PipelineRun.test.jsx b/src/containers/PipelineRun/PipelineRun.test.jsx index e06e615e6..fc4398e44 100644 --- a/src/containers/PipelineRun/PipelineRun.test.jsx +++ b/src/containers/PipelineRun/PipelineRun.test.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { waitFor } from '@testing-library/react'; import { createIntl } from 'react-intl'; import { paths, urls } from '@tektoncd/dashboard-utils'; diff --git a/src/containers/PipelineRuns/PipelineRuns.jsx b/src/containers/PipelineRuns/PipelineRuns.jsx index 1d3723853..cd5d69b32 100644 --- a/src/containers/PipelineRuns/PipelineRuns.jsx +++ b/src/containers/PipelineRuns/PipelineRuns.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -12,7 +12,7 @@ limitations under the License. */ /* istanbul ignore file */ -import React, { useEffect, useState } from 'react'; +import { useEffect, useState } from 'react'; import { useLocation, useNavigate, diff --git a/src/containers/PipelineRuns/PipelineRuns.test.jsx b/src/containers/PipelineRuns/PipelineRuns.test.jsx index 051835b1f..96b8535c5 100644 --- a/src/containers/PipelineRuns/PipelineRuns.test.jsx +++ b/src/containers/PipelineRuns/PipelineRuns.test.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { fireEvent, waitFor } from '@testing-library/react'; import { paths, urls } from '@tektoncd/dashboard-utils'; diff --git a/src/containers/Pipelines/Pipelines.jsx b/src/containers/Pipelines/Pipelines.jsx index a0d7d0f63..cf42738e9 100644 --- a/src/containers/Pipelines/Pipelines.jsx +++ b/src/containers/Pipelines/Pipelines.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -12,7 +12,7 @@ limitations under the License. */ /* istanbul ignore file */ -import React, { useState } from 'react'; +import { useState } from 'react'; import { Link } from 'react-router-dom'; import { useLocation, useParams } from 'react-router-dom-v5-compat'; import { diff --git a/src/containers/PipelinesDropdown/PipelinesDropdown.jsx b/src/containers/PipelinesDropdown/PipelinesDropdown.jsx index ddad146bb..85b2dc204 100644 --- a/src/containers/PipelinesDropdown/PipelinesDropdown.jsx +++ b/src/containers/PipelinesDropdown/PipelinesDropdown.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { useIntl } from 'react-intl'; import { ALL_NAMESPACES } from '@tektoncd/dashboard-utils'; import { TooltipDropdown } from '@tektoncd/dashboard-components'; diff --git a/src/containers/PipelinesDropdown/PipelinesDropdown.test.jsx b/src/containers/PipelinesDropdown/PipelinesDropdown.test.jsx index 80112fae5..cedd842ec 100644 --- a/src/containers/PipelinesDropdown/PipelinesDropdown.test.jsx +++ b/src/containers/PipelinesDropdown/PipelinesDropdown.test.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { fireEvent, getNodeText } from '@testing-library/react'; import { ALL_NAMESPACES } from '@tektoncd/dashboard-utils'; import { render } from '../../utils/test'; diff --git a/src/containers/ReadWriteRoute/ReadWriteRoute.jsx b/src/containers/ReadWriteRoute/ReadWriteRoute.jsx index 438067ac9..26c3dad24 100644 --- a/src/containers/ReadWriteRoute/ReadWriteRoute.jsx +++ b/src/containers/ReadWriteRoute/ReadWriteRoute.jsx @@ -1,5 +1,5 @@ /* -Copyright 2020-2023 The Tekton Authors +Copyright 2020-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,8 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ /* istanbul ignore file */ -import React from 'react'; - import { useIsReadOnly } from '../../api'; import NotFound from '../NotFound'; diff --git a/src/containers/ResourceList/ResourceList.jsx b/src/containers/ResourceList/ResourceList.jsx index 37dadb931..5b4446743 100644 --- a/src/containers/ResourceList/ResourceList.jsx +++ b/src/containers/ResourceList/ResourceList.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ /* istanbul ignore file */ -import React from 'react'; import { useIntl } from 'react-intl'; import { Link } from 'react-router-dom'; import { useLocation, useParams } from 'react-router-dom-v5-compat'; diff --git a/src/containers/ServiceAccountsDropdown/ServiceAccountsDropdown.jsx b/src/containers/ServiceAccountsDropdown/ServiceAccountsDropdown.jsx index 0dc4e4bf7..26ad795d6 100644 --- a/src/containers/ServiceAccountsDropdown/ServiceAccountsDropdown.jsx +++ b/src/containers/ServiceAccountsDropdown/ServiceAccountsDropdown.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { useIntl } from 'react-intl'; import { ALL_NAMESPACES } from '@tektoncd/dashboard-utils'; import { TooltipDropdown } from '@tektoncd/dashboard-components'; diff --git a/src/containers/ServiceAccountsDropdown/ServiceAccountsDropdown.test.jsx b/src/containers/ServiceAccountsDropdown/ServiceAccountsDropdown.test.jsx index 22670c980..62b25bd56 100644 --- a/src/containers/ServiceAccountsDropdown/ServiceAccountsDropdown.test.jsx +++ b/src/containers/ServiceAccountsDropdown/ServiceAccountsDropdown.test.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { fireEvent, getNodeText } from '@testing-library/react'; import { render } from '../../utils/test'; diff --git a/src/containers/Settings/Settings.jsx b/src/containers/Settings/Settings.jsx index 081ab8480..2b9795a2f 100644 --- a/src/containers/Settings/Settings.jsx +++ b/src/containers/Settings/Settings.jsx @@ -1,5 +1,5 @@ /* -Copyright 2021-2023 The Tekton Authors +Copyright 2021-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { useIntl } from 'react-intl'; import { useTitleSync } from '@tektoncd/dashboard-utils'; import { RadioTile, TileGroup, Toggle } from 'carbon-components-react'; diff --git a/src/containers/Settings/Settings.test.jsx b/src/containers/Settings/Settings.test.jsx index 36b593131..1b7c293c5 100644 --- a/src/containers/Settings/Settings.test.jsx +++ b/src/containers/Settings/Settings.test.jsx @@ -1,5 +1,5 @@ /* -Copyright 2021-2023 The Tekton Authors +Copyright 2021-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { fireEvent, within } from '@testing-library/react'; import { render } from '../../utils/test'; diff --git a/src/containers/SideNav/SideNav.jsx b/src/containers/SideNav/SideNav.jsx index 8d267588c..afe188bfb 100644 --- a/src/containers/SideNav/SideNav.jsx +++ b/src/containers/SideNav/SideNav.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { matchPath } from 'react-router-dom'; import { NavLink, useLocation } from 'react-router-dom-v5-compat'; import { useIntl } from 'react-intl'; diff --git a/src/containers/SideNav/SideNav.test.jsx b/src/containers/SideNav/SideNav.test.jsx index f354e0054..77fb32cfe 100644 --- a/src/containers/SideNav/SideNav.test.jsx +++ b/src/containers/SideNav/SideNav.test.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { waitFor } from '@testing-library/react'; import { renderWithRouter } from '../../utils/test'; diff --git a/src/containers/TaskRun/TaskRun.jsx b/src/containers/TaskRun/TaskRun.jsx index a83d9ba8f..eec19a9da 100644 --- a/src/containers/TaskRun/TaskRun.jsx +++ b/src/containers/TaskRun/TaskRun.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -12,7 +12,7 @@ limitations under the License. */ /* istanbul ignore file */ -import React, { useRef, useState } from 'react'; +import { Fragment, useRef, useState } from 'react'; import { useIntl } from 'react-intl'; import { Link } from 'react-router-dom'; import { @@ -155,7 +155,7 @@ export function TaskRunContainer() { onFallback: setIsUsingExternalLogs }); - const LogsRoot = isLogsMaximized ? Portal : React.Fragment; + const LogsRoot = isLogsMaximized ? Portal : Fragment; return ( {rows.map((row, index) => ( - + {row.cells.map(cell => ( {cell.value} @@ -201,7 +201,7 @@ export /* istanbul ignore next */ function TriggerTemplateContainer() { /> )} - + ))} diff --git a/src/containers/TriggerTemplate/TriggerTemplate.test.jsx b/src/containers/TriggerTemplate/TriggerTemplate.test.jsx index 3c46551c0..624b48117 100644 --- a/src/containers/TriggerTemplate/TriggerTemplate.test.jsx +++ b/src/containers/TriggerTemplate/TriggerTemplate.test.jsx @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { fireEvent, waitFor } from '@testing-library/react'; import { createIntl } from 'react-intl'; import { paths, urls } from '@tektoncd/dashboard-utils'; diff --git a/src/containers/TriggerTemplates/TriggerTemplates.jsx b/src/containers/TriggerTemplates/TriggerTemplates.jsx index e451c4332..99d625603 100644 --- a/src/containers/TriggerTemplates/TriggerTemplates.jsx +++ b/src/containers/TriggerTemplates/TriggerTemplates.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { Link } from 'react-router-dom'; import { useLocation, useParams } from 'react-router-dom-v5-compat'; import { useIntl } from 'react-intl'; diff --git a/src/containers/TriggerTemplates/TriggerTemplates.test.jsx b/src/containers/TriggerTemplates/TriggerTemplates.test.jsx index 6d777280e..db121aac9 100644 --- a/src/containers/TriggerTemplates/TriggerTemplates.test.jsx +++ b/src/containers/TriggerTemplates/TriggerTemplates.test.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { fireEvent } from '@testing-library/react'; import { ALL_NAMESPACES } from '@tektoncd/dashboard-utils'; diff --git a/src/containers/Triggers/Triggers.jsx b/src/containers/Triggers/Triggers.jsx index bd20b43f1..93d771c22 100644 --- a/src/containers/Triggers/Triggers.jsx +++ b/src/containers/Triggers/Triggers.jsx @@ -1,5 +1,5 @@ /* -Copyright 2021-2023 The Tekton Authors +Copyright 2021-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { Link } from 'react-router-dom'; import { useLocation, useParams } from 'react-router-dom-v5-compat'; import { useIntl } from 'react-intl'; diff --git a/src/containers/Triggers/Triggers.test.jsx b/src/containers/Triggers/Triggers.test.jsx index 4e0c98a2a..263ea041e 100644 --- a/src/containers/Triggers/Triggers.test.jsx +++ b/src/containers/Triggers/Triggers.test.jsx @@ -1,5 +1,5 @@ /* -Copyright 2021-2023 The Tekton Authors +Copyright 2021-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { paths, urls } from '@tektoncd/dashboard-utils'; import { renderWithRouter } from '../../utils/test'; diff --git a/src/containers/YAMLEditor/YAMLEditor.jsx b/src/containers/YAMLEditor/YAMLEditor.jsx index b8895bd04..9b55dd9d1 100644 --- a/src/containers/YAMLEditor/YAMLEditor.jsx +++ b/src/containers/YAMLEditor/YAMLEditor.jsx @@ -1,5 +1,5 @@ /* -Copyright 2022-2023 The Tekton Authors +Copyright 2022-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -18,7 +18,7 @@ import { InlineNotification } from 'carbon-components-react'; import yaml from 'js-yaml'; -import React, { useEffect, useState } from 'react'; +import { useEffect, useState } from 'react'; import CodeMirror from '@uiw/react-codemirror'; import { StreamLanguage } from '@codemirror/language'; import { yaml as yamlMode } from '@codemirror/legacy-modes/mode/yaml'; diff --git a/src/containers/YAMLEditor/YAMLEditor.test.jsx b/src/containers/YAMLEditor/YAMLEditor.test.jsx index f113fda54..61a78aa11 100644 --- a/src/containers/YAMLEditor/YAMLEditor.test.jsx +++ b/src/containers/YAMLEditor/YAMLEditor.test.jsx @@ -1,5 +1,5 @@ /* -Copyright 2022-2023 The Tekton Authors +Copyright 2022-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { fireEvent, waitFor } from '@testing-library/react'; import { renderWithRouter } from '../../utils/test'; diff --git a/src/utils/index.jsx b/src/utils/index.jsx index d85a60ad0..6d3867d63 100644 --- a/src/utils/index.jsx +++ b/src/utils/index.jsx @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -11,7 +11,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React from 'react'; import { LogsToolbar } from '@tektoncd/dashboard-components'; import { getExternalLogURL, getPodLog, getPodLogURL } from '../api'; diff --git a/src/utils/test.jsx b/src/utils/test.jsx index 4a3416c46..9df54e795 100644 --- a/src/utils/test.jsx +++ b/src/utils/test.jsx @@ -1,5 +1,5 @@ /* -Copyright 2021-2023 The Tekton Authors +Copyright 2021-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -12,7 +12,6 @@ limitations under the License. */ /* istanbul ignore file */ -import React from 'react'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { render as baseRender, From 99c0ec0b1420eaea3e38d2aff36b34c9aec7df02 Mon Sep 17 00:00:00 2001 From: Alan Greene Date: Fri, 26 Apr 2024 16:18:05 +0100 Subject: [PATCH 2/2] Only allow .jsx extension for files containing JSX In order to ensure the build is performant, vite is configured to only run the JSX transform on files with a .jsx extension. Ensure that only files containing JSX have a .jsx extension to avoid unnecessary processing. --- .eslintrc.cjs | 2 +- .storybook/Container.jsx | 1 + .storybook/main.js | 6 +++--- ...bleSkeleton.stories.jsx => DataTableSkeleton.stories.js} | 2 +- .../{DeleteModal.stories.jsx => DeleteModal.stories.js} | 2 +- .../{DetailsHeader.stories.jsx => DetailsHeader.stories.js} | 2 +- .../{DotSpinner.stories.jsx => DotSpinner.stories.js} | 2 +- .../{FormattedDate.stories.jsx => FormattedDate.stories.js} | 2 +- ...tedDuration.stories.jsx => FormattedDuration.stories.js} | 2 +- .../{KeyValueList.stories.jsx => KeyValueList.stories.js} | 2 +- .../{LabelFilter.stories.jsx => LabelFilter.stories.js} | 2 +- .../{LogFormat.stories.jsx => LogFormat.stories.js} | 2 +- .../{LogsToolbar.stories.jsx => LogsToolbar.stories.js} | 2 +- .../Spinner/{Spinner.stories.jsx => Spinner.stories.js} | 2 +- .../components/Step/{Step.stories.jsx => Step.stories.js} | 2 +- ...StepDefinition.stories.jsx => StepDefinition.stories.js} | 2 +- ...TaskRunDetails.stories.jsx => TaskRunDetails.stories.js} | 2 +- .../{TextInput.stories.jsx => TextInput.stories.js} | 2 +- .../Trigger/{Trigger.stories.jsx => Trigger.stories.js} | 2 +- .../ViewYAML/{ViewYAML.stories.jsx => ViewYAML.stories.js} | 2 +- .../src/components/{Graph.stories.jsx => Graph.stories.js} | 2 +- .../Graph/{Graph.stories.jsx => Graph.stories.js} | 2 +- .../components/Node/{Node.stories.jsx => Node.stories.js} | 2 +- packages/graph/src/components/{PanZoom.jsx => PanZoom.js} | 0 .../{StatusIcon.stories.jsx => StatusIcon.stories.js} | 2 +- .../{LoadingShell.stories.jsx => LoadingShell.stories.js} | 2 +- 26 files changed, 27 insertions(+), 26 deletions(-) rename packages/components/src/components/DataTableSkeleton/{DataTableSkeleton.stories.jsx => DataTableSkeleton.stories.js} (97%) rename packages/components/src/components/DeleteModal/{DeleteModal.stories.jsx => DeleteModal.stories.js} (96%) rename packages/components/src/components/DetailsHeader/{DetailsHeader.stories.jsx => DetailsHeader.stories.js} (98%) rename packages/components/src/components/DotSpinner/{DotSpinner.stories.jsx => DotSpinner.stories.js} (94%) rename packages/components/src/components/FormattedDate/{FormattedDate.stories.jsx => FormattedDate.stories.js} (95%) rename packages/components/src/components/FormattedDuration/{FormattedDuration.stories.jsx => FormattedDuration.stories.js} (96%) rename packages/components/src/components/KeyValueList/{KeyValueList.stories.jsx => KeyValueList.stories.js} (98%) rename packages/components/src/components/LabelFilter/{LabelFilter.stories.jsx => LabelFilter.stories.js} (95%) rename packages/components/src/components/LogFormat/{LogFormat.stories.jsx => LogFormat.stories.js} (98%) rename packages/components/src/components/LogsToolbar/{LogsToolbar.stories.jsx => LogsToolbar.stories.js} (94%) rename packages/components/src/components/Spinner/{Spinner.stories.jsx => Spinner.stories.js} (94%) rename packages/components/src/components/Step/{Step.stories.jsx => Step.stories.js} (96%) rename packages/components/src/components/StepDefinition/{StepDefinition.stories.jsx => StepDefinition.stories.js} (96%) rename packages/components/src/components/TaskRunDetails/{TaskRunDetails.stories.jsx => TaskRunDetails.stories.js} (99%) rename packages/components/src/components/TextInput/{TextInput.stories.jsx => TextInput.stories.js} (96%) rename packages/components/src/components/Trigger/{Trigger.stories.jsx => Trigger.stories.js} (98%) rename packages/components/src/components/ViewYAML/{ViewYAML.stories.jsx => ViewYAML.stories.js} (97%) rename packages/graph/src/components/{Graph.stories.jsx => Graph.stories.js} (94%) rename packages/graph/src/components/Graph/{Graph.stories.jsx => Graph.stories.js} (98%) rename packages/graph/src/components/Node/{Node.stories.jsx => Node.stories.js} (98%) rename packages/graph/src/components/{PanZoom.jsx => PanZoom.js} (100%) rename packages/graph/src/components/StatusIcon/{StatusIcon.stories.jsx => StatusIcon.stories.js} (97%) rename src/containers/LoadingShell/{LoadingShell.stories.jsx => LoadingShell.stories.js} (94%) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 0b5d5988e..e10661858 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -91,7 +91,7 @@ module.exports = { 'react/forbid-prop-types': 'off', 'react/function-component-definition': 'off', 'react/jsx-curly-newline': 'off', - 'react/jsx-filename-extension': 'off', + 'react/jsx-filename-extension': ['error', { allow: 'as-needed' }], 'react/jsx-no-bind': 'off', 'react/jsx-props-no-spreading': 'off', 'react/no-unstable-nested-components': 'off', diff --git a/.storybook/Container.jsx b/.storybook/Container.jsx index dbc8140bb..1a7254c40 100644 --- a/.storybook/Container.jsx +++ b/.storybook/Container.jsx @@ -11,6 +11,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +import { StrictMode } from 'react'; import { IntlProvider } from 'react-intl'; import { createMemoryHistory } from 'history'; import { Router, Switch } from 'react-router-dom'; diff --git a/.storybook/main.js b/.storybook/main.js index 0defb7fde..382459066 100644 --- a/.storybook/main.js +++ b/.storybook/main.js @@ -46,9 +46,9 @@ const config = { }, stories: (_config, { configType }) => ([ { directory: '.', files: 'Welcome.mdx' }, - configType === 'DEVELOPMENT' ? { directory: '../src', files: '**/*.stories.jsx', titlePrefix: 'Containers' } : null, - { directory: '../packages/components', files: '**/*.stories.jsx', titlePrefix: 'Components' }, - { directory: '../packages/graph', files: '**/*.stories.jsx', titlePrefix: 'Experimental/Graph' } + configType === 'DEVELOPMENT' ? { directory: '../src', files: '**/*.stories.@(js|jsx)', titlePrefix: 'Containers' } : null, + { directory: '../packages/components', files: '**/*.stories.@(js|jsx)', titlePrefix: 'Components' }, + { directory: '../packages/graph', files: '**/*.stories.@(js|jsx)', titlePrefix: 'Experimental/Graph' } ].filter(Boolean)), async viteFinal(config, { configType }) { // fallback to default to resolve issue with MDX rendering diff --git a/packages/components/src/components/DataTableSkeleton/DataTableSkeleton.stories.jsx b/packages/components/src/components/DataTableSkeleton/DataTableSkeleton.stories.js similarity index 97% rename from packages/components/src/components/DataTableSkeleton/DataTableSkeleton.stories.jsx rename to packages/components/src/components/DataTableSkeleton/DataTableSkeleton.stories.js index 1202ef335..2a409ecfa 100644 --- a/packages/components/src/components/DataTableSkeleton/DataTableSkeleton.stories.jsx +++ b/packages/components/src/components/DataTableSkeleton/DataTableSkeleton.stories.js @@ -1,5 +1,5 @@ /* -Copyright 2020-2023 The Tekton Authors +Copyright 2020-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/packages/components/src/components/DeleteModal/DeleteModal.stories.jsx b/packages/components/src/components/DeleteModal/DeleteModal.stories.js similarity index 96% rename from packages/components/src/components/DeleteModal/DeleteModal.stories.jsx rename to packages/components/src/components/DeleteModal/DeleteModal.stories.js index c4f9d2a6b..58c2c3d46 100644 --- a/packages/components/src/components/DeleteModal/DeleteModal.stories.jsx +++ b/packages/components/src/components/DeleteModal/DeleteModal.stories.js @@ -1,5 +1,5 @@ /* -Copyright 2021-2023 The Tekton Authors +Copyright 2021-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/packages/components/src/components/DetailsHeader/DetailsHeader.stories.jsx b/packages/components/src/components/DetailsHeader/DetailsHeader.stories.js similarity index 98% rename from packages/components/src/components/DetailsHeader/DetailsHeader.stories.jsx rename to packages/components/src/components/DetailsHeader/DetailsHeader.stories.js index 0551fb812..93edccc86 100644 --- a/packages/components/src/components/DetailsHeader/DetailsHeader.stories.jsx +++ b/packages/components/src/components/DetailsHeader/DetailsHeader.stories.js @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/packages/components/src/components/DotSpinner/DotSpinner.stories.jsx b/packages/components/src/components/DotSpinner/DotSpinner.stories.js similarity index 94% rename from packages/components/src/components/DotSpinner/DotSpinner.stories.jsx rename to packages/components/src/components/DotSpinner/DotSpinner.stories.js index 54bce8c5b..9a4c906a5 100644 --- a/packages/components/src/components/DotSpinner/DotSpinner.stories.jsx +++ b/packages/components/src/components/DotSpinner/DotSpinner.stories.js @@ -1,5 +1,5 @@ /* -Copyright 2021-2023 The Tekton Authors +Copyright 2021-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/packages/components/src/components/FormattedDate/FormattedDate.stories.jsx b/packages/components/src/components/FormattedDate/FormattedDate.stories.js similarity index 95% rename from packages/components/src/components/FormattedDate/FormattedDate.stories.jsx rename to packages/components/src/components/FormattedDate/FormattedDate.stories.js index 6691c8b26..255e93068 100644 --- a/packages/components/src/components/FormattedDate/FormattedDate.stories.jsx +++ b/packages/components/src/components/FormattedDate/FormattedDate.stories.js @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/packages/components/src/components/FormattedDuration/FormattedDuration.stories.jsx b/packages/components/src/components/FormattedDuration/FormattedDuration.stories.js similarity index 96% rename from packages/components/src/components/FormattedDuration/FormattedDuration.stories.jsx rename to packages/components/src/components/FormattedDuration/FormattedDuration.stories.js index 6d95fe844..739939f31 100644 --- a/packages/components/src/components/FormattedDuration/FormattedDuration.stories.jsx +++ b/packages/components/src/components/FormattedDuration/FormattedDuration.stories.js @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/packages/components/src/components/KeyValueList/KeyValueList.stories.jsx b/packages/components/src/components/KeyValueList/KeyValueList.stories.js similarity index 98% rename from packages/components/src/components/KeyValueList/KeyValueList.stories.jsx rename to packages/components/src/components/KeyValueList/KeyValueList.stories.js index f70162b3b..9dba63c5b 100644 --- a/packages/components/src/components/KeyValueList/KeyValueList.stories.jsx +++ b/packages/components/src/components/KeyValueList/KeyValueList.stories.js @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/packages/components/src/components/LabelFilter/LabelFilter.stories.jsx b/packages/components/src/components/LabelFilter/LabelFilter.stories.js similarity index 95% rename from packages/components/src/components/LabelFilter/LabelFilter.stories.jsx rename to packages/components/src/components/LabelFilter/LabelFilter.stories.js index 3d68992a5..39436d225 100644 --- a/packages/components/src/components/LabelFilter/LabelFilter.stories.jsx +++ b/packages/components/src/components/LabelFilter/LabelFilter.stories.js @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/packages/components/src/components/LogFormat/LogFormat.stories.jsx b/packages/components/src/components/LogFormat/LogFormat.stories.js similarity index 98% rename from packages/components/src/components/LogFormat/LogFormat.stories.jsx rename to packages/components/src/components/LogFormat/LogFormat.stories.js index 583ed1545..02d9adbab 100644 --- a/packages/components/src/components/LogFormat/LogFormat.stories.jsx +++ b/packages/components/src/components/LogFormat/LogFormat.stories.js @@ -1,5 +1,5 @@ /* -Copyright 2020-2023 The Tekton Authors +Copyright 2020-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/packages/components/src/components/LogsToolbar/LogsToolbar.stories.jsx b/packages/components/src/components/LogsToolbar/LogsToolbar.stories.js similarity index 94% rename from packages/components/src/components/LogsToolbar/LogsToolbar.stories.jsx rename to packages/components/src/components/LogsToolbar/LogsToolbar.stories.js index 3d542060c..5b26c9b76 100644 --- a/packages/components/src/components/LogsToolbar/LogsToolbar.stories.jsx +++ b/packages/components/src/components/LogsToolbar/LogsToolbar.stories.js @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/packages/components/src/components/Spinner/Spinner.stories.jsx b/packages/components/src/components/Spinner/Spinner.stories.js similarity index 94% rename from packages/components/src/components/Spinner/Spinner.stories.jsx rename to packages/components/src/components/Spinner/Spinner.stories.js index 94a103392..f248bd77e 100644 --- a/packages/components/src/components/Spinner/Spinner.stories.jsx +++ b/packages/components/src/components/Spinner/Spinner.stories.js @@ -1,5 +1,5 @@ /* -Copyright 2021-2023 The Tekton Authors +Copyright 2021-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/packages/components/src/components/Step/Step.stories.jsx b/packages/components/src/components/Step/Step.stories.js similarity index 96% rename from packages/components/src/components/Step/Step.stories.jsx rename to packages/components/src/components/Step/Step.stories.js index 3386c68d9..63cafbb50 100644 --- a/packages/components/src/components/Step/Step.stories.jsx +++ b/packages/components/src/components/Step/Step.stories.js @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/packages/components/src/components/StepDefinition/StepDefinition.stories.jsx b/packages/components/src/components/StepDefinition/StepDefinition.stories.js similarity index 96% rename from packages/components/src/components/StepDefinition/StepDefinition.stories.jsx rename to packages/components/src/components/StepDefinition/StepDefinition.stories.js index 668d0a2e7..5b350db32 100644 --- a/packages/components/src/components/StepDefinition/StepDefinition.stories.jsx +++ b/packages/components/src/components/StepDefinition/StepDefinition.stories.js @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/packages/components/src/components/TaskRunDetails/TaskRunDetails.stories.jsx b/packages/components/src/components/TaskRunDetails/TaskRunDetails.stories.js similarity index 99% rename from packages/components/src/components/TaskRunDetails/TaskRunDetails.stories.jsx rename to packages/components/src/components/TaskRunDetails/TaskRunDetails.stories.js index 280f070b4..bb9a608d3 100644 --- a/packages/components/src/components/TaskRunDetails/TaskRunDetails.stories.jsx +++ b/packages/components/src/components/TaskRunDetails/TaskRunDetails.stories.js @@ -1,5 +1,5 @@ /* -Copyright 2020-2023 The Tekton Authors +Copyright 2020-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/packages/components/src/components/TextInput/TextInput.stories.jsx b/packages/components/src/components/TextInput/TextInput.stories.js similarity index 96% rename from packages/components/src/components/TextInput/TextInput.stories.jsx rename to packages/components/src/components/TextInput/TextInput.stories.js index 9c609a5eb..ec9a1963a 100644 --- a/packages/components/src/components/TextInput/TextInput.stories.jsx +++ b/packages/components/src/components/TextInput/TextInput.stories.js @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/packages/components/src/components/Trigger/Trigger.stories.jsx b/packages/components/src/components/Trigger/Trigger.stories.js similarity index 98% rename from packages/components/src/components/Trigger/Trigger.stories.jsx rename to packages/components/src/components/Trigger/Trigger.stories.js index ddbf52ec0..2c2f93519 100644 --- a/packages/components/src/components/Trigger/Trigger.stories.jsx +++ b/packages/components/src/components/Trigger/Trigger.stories.js @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/packages/components/src/components/ViewYAML/ViewYAML.stories.jsx b/packages/components/src/components/ViewYAML/ViewYAML.stories.js similarity index 97% rename from packages/components/src/components/ViewYAML/ViewYAML.stories.jsx rename to packages/components/src/components/ViewYAML/ViewYAML.stories.js index 11d75c0d1..7e3eff8c6 100644 --- a/packages/components/src/components/ViewYAML/ViewYAML.stories.jsx +++ b/packages/components/src/components/ViewYAML/ViewYAML.stories.js @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/packages/graph/src/components/Graph.stories.jsx b/packages/graph/src/components/Graph.stories.js similarity index 94% rename from packages/graph/src/components/Graph.stories.jsx rename to packages/graph/src/components/Graph.stories.js index 955fff81f..581912cf2 100644 --- a/packages/graph/src/components/Graph.stories.jsx +++ b/packages/graph/src/components/Graph.stories.js @@ -1,5 +1,5 @@ /* -Copyright 2019-2023 The Tekton Authors +Copyright 2019-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/packages/graph/src/components/Graph/Graph.stories.jsx b/packages/graph/src/components/Graph/Graph.stories.js similarity index 98% rename from packages/graph/src/components/Graph/Graph.stories.jsx rename to packages/graph/src/components/Graph/Graph.stories.js index 75df45095..d91351a2a 100644 --- a/packages/graph/src/components/Graph/Graph.stories.jsx +++ b/packages/graph/src/components/Graph/Graph.stories.js @@ -1,5 +1,5 @@ /* -Copyright 2022-2023 The Tekton Authors +Copyright 2022-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/packages/graph/src/components/Node/Node.stories.jsx b/packages/graph/src/components/Node/Node.stories.js similarity index 98% rename from packages/graph/src/components/Node/Node.stories.jsx rename to packages/graph/src/components/Node/Node.stories.js index f7d22a42a..31f1e828e 100644 --- a/packages/graph/src/components/Node/Node.stories.jsx +++ b/packages/graph/src/components/Node/Node.stories.js @@ -1,5 +1,5 @@ /* -Copyright 2023 The Tekton Authors +Copyright 2023-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/packages/graph/src/components/PanZoom.jsx b/packages/graph/src/components/PanZoom.js similarity index 100% rename from packages/graph/src/components/PanZoom.jsx rename to packages/graph/src/components/PanZoom.js diff --git a/packages/graph/src/components/StatusIcon/StatusIcon.stories.jsx b/packages/graph/src/components/StatusIcon/StatusIcon.stories.js similarity index 97% rename from packages/graph/src/components/StatusIcon/StatusIcon.stories.jsx rename to packages/graph/src/components/StatusIcon/StatusIcon.stories.js index 2594229a9..234eb3bcf 100644 --- a/packages/graph/src/components/StatusIcon/StatusIcon.stories.jsx +++ b/packages/graph/src/components/StatusIcon/StatusIcon.stories.js @@ -1,5 +1,5 @@ /* -Copyright 2023 The Tekton Authors +Copyright 2023-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/src/containers/LoadingShell/LoadingShell.stories.jsx b/src/containers/LoadingShell/LoadingShell.stories.js similarity index 94% rename from src/containers/LoadingShell/LoadingShell.stories.jsx rename to src/containers/LoadingShell/LoadingShell.stories.js index eea78b4c1..e5e8c36d5 100644 --- a/src/containers/LoadingShell/LoadingShell.stories.jsx +++ b/src/containers/LoadingShell/LoadingShell.stories.js @@ -1,5 +1,5 @@ /* -Copyright 2020-2023 The Tekton Authors +Copyright 2020-2024 The Tekton Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at