Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to new JSX transform #5353

Merged
merged 4 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"presets": [
"@babel/preset-env",
"@babel/preset-react",
["@babel/preset-react", { "runtime": "automatic" }],
"@babel/preset-typescript"
],
"plugins": [
Expand Down
1 change: 1 addition & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export default config(
{ fixStyle: 'inline-type-imports' },
],
'lingui/no-expression-in-message': 'off',
'react/react-in-jsx-scope': 'off',
'no-restricted-imports': [
'error',
{
Expand Down
2 changes: 1 addition & 1 deletion src/actions/action.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { type MessageDescriptor, i18n } from '@lingui/core';
import { Button } from '@patternfly/react-core';
import { DropdownItem } from '@patternfly/react-core/deprecated';
import React, { type ReactNode } from 'react';
import { type ReactNode } from 'react';
import { Tooltip } from 'src/components';
import { type PermissionContextType } from 'src/permissions';

Expand Down
1 change: 0 additions & 1 deletion src/actions/ansible-remote-delete.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { msg, t } from '@lingui/core/macro';
import React from 'react';
import { AnsibleRemoteAPI } from 'src/api';
import { DeleteAnsibleRemoteModal } from 'src/components';
import { canDeleteAnsibleRemote } from 'src/permissions';
Expand Down
2 changes: 1 addition & 1 deletion src/actions/ansible-repository-collection-version-add.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { msg, plural, t } from '@lingui/core/macro';
import { Button, Checkbox, Modal } from '@patternfly/react-core';
import { Td, Tr } from '@patternfly/react-table';
import React, { useState } from 'react';
import { useState } from 'react';
import {
AnsibleRepositoryAPI,
type AnsibleRepositoryType,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { msg, t } from '@lingui/core/macro';
import { Trans } from '@lingui/react/macro';
import { Text } from '@patternfly/react-core';
import React, { useState } from 'react';
import { useState } from 'react';
import { AnsibleRepositoryAPI } from 'src/api';
import { DeleteModal } from 'src/components';
import { canEditAnsibleRepository } from 'src/permissions';
Expand Down
1 change: 0 additions & 1 deletion src/actions/ansible-repository-copy.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { msg, t } from '@lingui/core/macro';
import React from 'react';
import { getRepoURL, repositoryBasePath } from 'src/utilities';
import { Action } from './action';

Expand Down
1 change: 0 additions & 1 deletion src/actions/ansible-repository-delete.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { msg, t } from '@lingui/core/macro';
import React from 'react';
import { AnsibleDistributionAPI, AnsibleRepositoryAPI } from 'src/api';
import { DeleteAnsibleRepositoryModal } from 'src/components';
import { canDeleteAnsibleRepository } from 'src/permissions';
Expand Down
2 changes: 1 addition & 1 deletion src/actions/ansible-repository-sync.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { msg, t } from '@lingui/core/macro';
import { Trans } from '@lingui/react/macro';
import { Button, FormGroup, Modal, Switch } from '@patternfly/react-core';
import React, { useEffect, useState } from 'react';
import { useEffect, useState } from 'react';
import { Link } from 'react-router-dom';
import { AnsibleRepositoryAPI } from 'src/api';
import { HelpButton, Spinner } from 'src/components';
Expand Down
2 changes: 1 addition & 1 deletion src/actions/ansible-repository-version-revert.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { msg, t } from '@lingui/core/macro';
import { Trans } from '@lingui/react/macro';
import { Button, Modal } from '@patternfly/react-core';
import React, { useState } from 'react';
import { useState } from 'react';
import { AnsibleRepositoryAPI } from 'src/api';
import { Spinner } from 'src/components';
import { canRevertAnsibleRepositoryVersion } from 'src/permissions';
Expand Down
2 changes: 1 addition & 1 deletion src/components/access-tab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
import { DropdownItem } from '@patternfly/react-core/deprecated';
import { Table, Tbody, Td, Tr } from '@patternfly/react-table';
import { sortBy } from 'lodash';
import React, { Component } from 'react';
import { Component } from 'react';
import { Link } from 'react-router-dom';
import { type GroupType, type RoleType } from 'src/api';
import {
Expand Down
2 changes: 1 addition & 1 deletion src/components/alert-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
AlertActionCloseButton,
type AlertProps,
} from '@patternfly/react-core';
import React, { type ReactNode } from 'react';
import { type ReactNode } from 'react';
import { Alert } from 'src/components';

interface IProps {
Expand Down
2 changes: 1 addition & 1 deletion src/components/ansible-repository-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
TextInput,
} from '@patternfly/react-core';
import { Select, SelectOption } from '@patternfly/react-core/deprecated';
import React, { useEffect, useState } from 'react';
import { useEffect, useState } from 'react';
import { AnsibleRemoteAPI, type AnsibleRepositoryType } from 'src/api';
import {
FormFieldHelper,
Expand Down
2 changes: 1 addition & 1 deletion src/components/applied-filters.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { t } from '@lingui/core/macro';
import { Button } from '@patternfly/react-core';
import React, { type CSSProperties } from 'react';
import { type CSSProperties } from 'react';
import { Chip, ChipGroup } from 'src/components';
import { ParamHelper, type ParamType } from 'src/utilities';

Expand Down
2 changes: 1 addition & 1 deletion src/components/approval-row.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import DownloadIcon from '@patternfly/react-icons/dist/esm/icons/download-icon';
import ExclamationCircleIcon from '@patternfly/react-icons/dist/esm/icons/exclamation-circle-icon';
import ExclamationTriangleIcon from '@patternfly/react-icons/dist/esm/icons/exclamation-triangle-icon';
import { Td, Tr } from '@patternfly/react-table';
import React, { Fragment } from 'react';
import { Fragment } from 'react';
import { Link } from 'react-router-dom';
import {
CollectionAPI,
Expand Down
1 change: 0 additions & 1 deletion src/components/approve-modal.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { t } from '@lingui/core/macro';
import React from 'react';
import {
AnsibleRepositoryAPI,
type CollectionVersionSearch,
Expand Down
2 changes: 1 addition & 1 deletion src/components/base-header.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Title } from '@patternfly/react-core';
import React, { type ReactNode, useEffect } from 'react';
import { type ReactNode, useEffect } from 'react';
import { useHubContext } from 'src/loaders/app-context';
import './header.scss';

Expand Down
1 change: 0 additions & 1 deletion src/components/breadcrumbs.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { BreadcrumbItem } from '@patternfly/react-core';
import React from 'react';
import { Link } from 'react-router-dom';
import { Breadcrumb } from 'src/components';

Expand Down
2 changes: 1 addition & 1 deletion src/components/card-list-switcher.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import ListIcon from '@patternfly/react-icons/dist/esm/icons/list-icon';
import ThLargeIcon from '@patternfly/react-icons/dist/esm/icons/th-large-icon';
import cx from 'classnames';
import React, { type FunctionComponent } from 'react';
import { type FunctionComponent } from 'react';
import { Icon } from 'src/components';
import { ParamHelper } from 'src/utilities';
import './switcher.scss';
Expand Down
2 changes: 1 addition & 1 deletion src/components/collection-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
TextVariants,
} from '@patternfly/react-core';
import ArrowRightIcon from '@patternfly/react-icons/dist/esm/icons/arrow-right-icon';
import React, { type ReactNode } from 'react';
import { type ReactNode } from 'react';
import { Link } from 'react-router-dom';
import { type CollectionVersionSearch } from 'src/api';
import {
Expand Down
1 change: 0 additions & 1 deletion src/components/collection-content-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { Toolbar, ToolbarGroup, ToolbarItem } from '@patternfly/react-core';
import ExclamationTriangleIcon from '@patternfly/react-icons/dist/esm/icons/exclamation-triangle-icon';
import { Table, Tbody, Td, Th, Thead, Tr } from '@patternfly/react-table';
import cx from 'classnames';
import React from 'react';
import { Link } from 'react-router-dom';
import { type CollectionVersionSearch, type ContentSummaryType } from 'src/api';
import { EmptyStateCustom, SearchInput } from 'src/components';
Expand Down
1 change: 0 additions & 1 deletion src/components/collection-dependencies-list.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { t } from '@lingui/core/macro';
import { List, ListItem } from '@patternfly/react-core';
import React from 'react';
import { Link } from 'react-router-dom';
import { type CollectionVersion, type CollectionVersionSearch } from 'src/api';
import { EmptyStateNoData, HelpButton } from 'src/components';
Expand Down
1 change: 0 additions & 1 deletion src/components/collection-dropdown.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { t } from '@lingui/core/macro';
import { DropdownItem } from '@patternfly/react-core/deprecated';
import React from 'react';
import { StatefulDropdown } from 'src/components';
import { useHubContext } from 'src/loaders/app-context';
import { DeleteCollectionUtils } from 'src/utilities';
Expand Down
2 changes: 1 addition & 1 deletion src/components/collection-header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
SelectOption,
SelectVariant,
} from '@patternfly/react-core/deprecated';
import React, { Fragment, useEffect, useState } from 'react';
import { Fragment, useEffect, useState } from 'react';
import { Navigate } from 'react-router-dom';
import {
CertificateUploadAPI,
Expand Down
2 changes: 1 addition & 1 deletion src/components/collection-info.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
SplitItem,
} from '@patternfly/react-core';
import DownloadIcon from '@patternfly/react-icons/dist/esm/icons/download-icon';
import React, { useRef } from 'react';
import { useRef } from 'react';
import { Link } from 'react-router-dom';
import {
CollectionAPI,
Expand Down
2 changes: 1 addition & 1 deletion src/components/collection-list-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
TextContent,
TextVariants,
} from '@patternfly/react-core';
import React, { type ReactNode } from 'react';
import { type ReactNode } from 'react';
import { Link } from 'react-router-dom';
import { type CollectionVersionSearch } from 'src/api';
import {
Expand Down
2 changes: 1 addition & 1 deletion src/components/collection-list.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { t } from '@lingui/core/macro';
import { DataList } from '@patternfly/react-core';
import React, { type ReactNode } from 'react';
import { type ReactNode } from 'react';
import { type CollectionVersionSearch } from 'src/api';
import {
CollectionListItem,
Expand Down
1 change: 0 additions & 1 deletion src/components/collection-usedby-dependencies-list.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { t } from '@lingui/core/macro';
import { Table, Tbody, Td, Tr } from '@patternfly/react-table';
import React from 'react';
import { Link } from 'react-router-dom';
import { type CollectionUsedByDependencies } from 'src/api';
import {
Expand Down
2 changes: 1 addition & 1 deletion src/components/compound-filter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
} from '@patternfly/react-core/deprecated';
import FilterIcon from '@patternfly/react-icons/dist/esm/icons/filter-icon';
import SearchIcon from '@patternfly/react-icons/dist/esm/icons/search-icon';
import React, { useState } from 'react';
import { useState } from 'react';
import { StatefulDropdown, Typeahead } from 'src/components';
import { ParamHelper } from 'src/utilities';

Expand Down
2 changes: 1 addition & 1 deletion src/components/confirm-modal.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { t } from '@lingui/core/macro';
import { Button, Modal } from '@patternfly/react-core';
import React, { type ReactNode } from 'react';
import { type ReactNode } from 'react';
import { Spinner } from 'src/components';

interface IProps {
Expand Down
1 change: 0 additions & 1 deletion src/components/copy-collection-to-repository-modal.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { t } from '@lingui/core/macro';
import React from 'react';
import {
AnsibleRepositoryAPI,
type CollectionVersionSearch,
Expand Down
1 change: 0 additions & 1 deletion src/components/copy-url.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { t } from '@lingui/core/macro';
import React from 'react';
import { ClipboardCopy } from 'src/components';

export const CopyURL = ({
Expand Down
2 changes: 1 addition & 1 deletion src/components/data-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
TextInput,
type TextInputTypes,
} from '@patternfly/react-core';
import React, { type ReactElement, type ReactNode } from 'react';
import { type ReactElement, type ReactNode } from 'react';
import { FormFieldHelper } from 'src/components';
import { type ErrorMessagesType } from 'src/utilities';

Expand Down
1 change: 0 additions & 1 deletion src/components/date-component.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { DateTime } from 'luxon';
import React from 'react';
import { Tooltip } from 'src/components';
import { language as locale } from 'src/l10n';

Expand Down
2 changes: 1 addition & 1 deletion src/components/delete-ansible-remote-modal.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { t } from '@lingui/core/macro';
import { Trans } from '@lingui/react/macro';
import { Text } from '@patternfly/react-core';
import React, { useState } from 'react';
import { useState } from 'react';
import { DeleteModal } from 'src/components';

interface IProps {
Expand Down
2 changes: 1 addition & 1 deletion src/components/delete-ansible-repository-modal.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { t } from '@lingui/core/macro';
import { Trans } from '@lingui/react/macro';
import { Text } from '@patternfly/react-core';
import React, { useState } from 'react';
import { useState } from 'react';
import { DeleteModal } from 'src/components';

interface IProps {
Expand Down
1 change: 0 additions & 1 deletion src/components/delete-collection-modal.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { t } from '@lingui/core/macro';
import { Trans } from '@lingui/react/macro';
import { Checkbox, Text } from '@patternfly/react-core';
import React from 'react';
import { type CollectionVersionSearch } from 'src/api';
import { DeleteModal } from 'src/components';

Expand Down
2 changes: 1 addition & 1 deletion src/components/delete-execution-environment-modal.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { t } from '@lingui/core/macro';
import { Trans } from '@lingui/react/macro';
import { Checkbox, Text } from '@patternfly/react-core';
import React, { useState } from 'react';
import { useState } from 'react';
import { ExecutionEnvironmentAPI } from 'src/api';
import { DeleteModal } from 'src/components';
import { jsxErrorMessage, waitForTask } from 'src/utilities';
Expand Down
1 change: 0 additions & 1 deletion src/components/delete-group-modal.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { t } from '@lingui/core/macro';
import { Trans } from '@lingui/react/macro';
import { List, ListItem } from '@patternfly/react-core';
import React from 'react';
import { type UserType } from 'src/api';
import { Alert, DeleteModal, Spinner } from 'src/components';

Expand Down
2 changes: 1 addition & 1 deletion src/components/delete-modal.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { t } from '@lingui/core/macro';
import { Button, Modal, type ModalProps } from '@patternfly/react-core';
import React, { type ReactNode } from 'react';
import { type ReactNode } from 'react';
import { Spinner } from 'src/components';

interface IProps {
Expand Down
2 changes: 1 addition & 1 deletion src/components/delete-user-modal.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { t } from '@lingui/core/macro';
import { Trans } from '@lingui/react/macro';
import React, { useState } from 'react';
import { useState } from 'react';
import { UserAPI, type UserType } from 'src/api';
import { DeleteModal } from 'src/components';
import { useHubContext } from 'src/loaders/app-context';
Expand Down
1 change: 0 additions & 1 deletion src/components/deprecated-tag.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { t } from '@lingui/core/macro';
import React from 'react';

export const DeprecatedTag = () => (
<div
Expand Down
2 changes: 1 addition & 1 deletion src/components/detail-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
ToolbarItem,
} from '@patternfly/react-core';
import { Table, Tbody } from '@patternfly/react-table';
import React, { type ReactNode, useEffect, useState } from 'react';
import { type ReactNode, useEffect, useState } from 'react';
import { type ActionType } from 'src/actions';
import {
AppliedFilters,
Expand Down
2 changes: 1 addition & 1 deletion src/components/details.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
DescriptionListGroup,
DescriptionListTerm,
} from '@patternfly/react-core';
import React, { type ReactNode } from 'react';
import { type ReactNode } from 'react';

interface IProps {
item?: object;
Expand Down
1 change: 0 additions & 1 deletion src/components/download-count.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { t } from '@lingui/core/macro';
import { Trans } from '@lingui/react/macro';
import DownloadIcon from '@patternfly/react-icons/dist/esm/icons/download-icon';
import React from 'react';
import { Tooltip } from 'src/components';
import { language } from 'src/l10n';

Expand Down
2 changes: 1 addition & 1 deletion src/components/download-signature-grid-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
SplitItem,
} from '@patternfly/react-core';
import DownloadIcon from '@patternfly/react-icons/dist/esm/icons/download-icon';
import React, { useEffect, useState } from 'react';
import { useEffect, useState } from 'react';
import { CollectionAPI, type CollectionVersionSearch } from 'src/api';
import { LoadingSpinner } from 'src/components';
import { useHubContext } from 'src/loaders/app-context';
Expand Down
6 changes: 1 addition & 5 deletions src/components/empty-state-custom.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@ import {
EmptyStateIcon,
EmptyStateVariant,
} from '@patternfly/react-core';
import React, {
type ComponentClass,
type ReactElement,
type ReactNode,
} from 'react';
import { type ComponentClass, type ReactElement, type ReactNode } from 'react';

interface IProps {
icon?: ComponentClass;
Expand Down
1 change: 0 additions & 1 deletion src/components/empty-state-filter.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { t } from '@lingui/core/macro';
import { Button } from '@patternfly/react-core';
import SearchIcon from '@patternfly/react-icons/dist/esm/icons/search-icon';
import React from 'react';
import { EmptyStateCustom } from 'src/components';

interface IProps {
Expand Down
2 changes: 1 addition & 1 deletion src/components/empty-state-no-data.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import CubesIcon from '@patternfly/react-icons/dist/esm/icons/cubes-icon';
import PlusCircleIcon from '@patternfly/react-icons/dist/esm/icons/plus-circle-icon';
import React, { type ReactElement, type ReactNode } from 'react';
import { type ReactElement, type ReactNode } from 'react';
import { EmptyStateCustom } from 'src/components';

interface IProps {
Expand Down
Loading
Loading