Skip to content

Commit

Permalink
chore(lint): Replaced rest React imports to the suggested (#3575)
Browse files Browse the repository at this point in the history
  • Loading branch information
tjiang-box authored Jul 11, 2024
1 parent 28280db commit df50bf2
Show file tree
Hide file tree
Showing 390 changed files with 390 additions and 390 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { shallow } from 'enzyme';
import AccessibleSVG from '../AccessibleSVG';

Expand Down
2 changes: 1 addition & 1 deletion src/components/avatar/AvatarImage.js.flow
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// @flow
import React from 'react';
import * as React from 'react';

type Props = {
className?: string,
Expand Down
2 changes: 1 addition & 1 deletion src/components/avatar/AvatarInitials.js.flow
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// @flow
import React from 'react';
import * as React from 'react';
import { avatarColors } from '../../styles/variables';

const getInitials = name => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/avatar/__tests__/Avatar.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { shallow, mount } from 'enzyme';
import { act } from 'react-dom/test-utils';
import { IntlShape } from 'react-intl';
Expand Down
2 changes: 1 addition & 1 deletion src/components/avatar/__tests__/AvatarImage.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { shallow } from 'enzyme';

import AvatarImage from '../AvatarImage';
Expand Down
2 changes: 1 addition & 1 deletion src/components/avatar/__tests__/AvatarInitials.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { shallow } from 'enzyme';

import AvatarInitials from '../AvatarInitials';
Expand Down
2 changes: 1 addition & 1 deletion src/components/avatar/__tests__/UnknownUserAvatar.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { shallow } from 'enzyme';
import UnknownUserAvatar from '../UnknownUserAvatar';

Expand Down
2 changes: 1 addition & 1 deletion src/components/badge/__tests__/Badge.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { shallow } from 'enzyme';

import Badge from '../Badge';
Expand Down
2 changes: 1 addition & 1 deletion src/components/badge/__tests__/BetaBadge.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { shallow } from 'enzyme';

import BetaBadge from '../BetaBadge';
Expand Down
2 changes: 1 addition & 1 deletion src/components/badge/__tests__/TrialBadge.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { shallow } from 'enzyme';

import TrialBadge from '../TrialBadge';
Expand Down
2 changes: 1 addition & 1 deletion src/components/badge/__tests__/UpgradeBadge.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { shallow } from 'enzyme';

import UpgradeBadge from '../UpgradeBadge';
Expand Down
2 changes: 1 addition & 1 deletion src/components/badgeable/__tests__/Badgeable.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { shallow } from 'enzyme';

import Badgeable from '../Badgeable';
Expand Down
2 changes: 1 addition & 1 deletion src/components/button-group/__test__/ButtonGroup.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { mount } from 'enzyme';

import Button from '../../button';
Expand Down
2 changes: 1 addition & 1 deletion src/components/button/__tests__/Button.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import sinon from 'sinon';
import { shallow } from 'enzyme';

Expand Down
2 changes: 1 addition & 1 deletion src/components/checkbox/__tests__/CheckboxField.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable no-console */
import React from 'react';
import * as React from 'react';
import { shallow } from 'enzyme';

import CheckboxField, { CheckboxFieldProps } from '../CheckboxField';
Expand Down
2 changes: 1 addition & 1 deletion src/components/checkbox/__tests__/CheckboxTooltip.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { shallow, ShallowWrapper } from 'enzyme';

import CheckboxTooltip from '../CheckboxTooltip';
Expand Down
2 changes: 1 addition & 1 deletion src/components/close-button/__tests__/CloseButton.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';

import { render, screen, fireEvent } from '@testing-library/react';

Expand Down
2 changes: 1 addition & 1 deletion src/components/collapsible/__tests__/Collapsible.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import sinon from 'sinon';
import { shallow, ShallowWrapper } from 'enzyme';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { shallow } from 'enzyme';

import ContactDatalistItem from '../ContactDatalistItem';
Expand Down
2 changes: 1 addition & 1 deletion src/components/context-menu/__tests__/ContextMenu.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { mount, shallow, ReactWrapper } from 'enzyme';
import sinon from 'sinon';

Expand Down
2 changes: 1 addition & 1 deletion src/components/count-badge/__tests__/CountBadge.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { shallow } from 'enzyme';

import CountBadge from '../CountBadge';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import sinon from 'sinon';
import { shallow } from 'enzyme';
import DatalistItem from '..';
Expand Down
2 changes: 1 addition & 1 deletion src/components/error-mask/__tests__/ErrorMask.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { shallow, ShallowWrapper } from 'enzyme';

import ErrorMask from '..';
Expand Down
2 changes: 1 addition & 1 deletion src/components/fieldset/__tests__/Fieldset.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { shallow } from 'enzyme';

import Fieldset from '../Fieldset';
Expand Down
2 changes: 1 addition & 1 deletion src/components/header/__tests__/Header.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { shallow } from 'enzyme';

import Header from '..';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { shallow, ShallowWrapper } from 'enzyme';

import Button from '../../button/Button';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { shallow, ShallowWrapper } from 'enzyme';

import ImageTooltipContent from '../ImageTooltipContent';
Expand Down
2 changes: 1 addition & 1 deletion src/components/label-pill/__tests__/LabelPill.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { mount } from 'enzyme';

import LabelPill, { LabelPillStatus } from '..';
Expand Down
2 changes: 1 addition & 1 deletion src/components/label/__tests__/HiddenLabel.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { shallow } from 'enzyme';
import HiddenLabel from '../HiddenLabel';

Expand Down
2 changes: 1 addition & 1 deletion src/components/label/__tests__/Label.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { shallow, mount } from 'enzyme';

import InfoIconWithTooltip from '../InfoIconWithTooltip';
Expand Down
2 changes: 1 addition & 1 deletion src/components/label/__tests__/LabelPrimitive.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { shallow } from 'enzyme';
import LabelPrimitive from '../LabelPrimitive';

Expand Down
2 changes: 1 addition & 1 deletion src/components/label/__tests__/StandardLabel.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { shallow } from 'enzyme';
import StandardLabel from '../StandardLabel';

Expand Down
2 changes: 1 addition & 1 deletion src/components/link/__tests__/Link.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable jsx-a11y/anchor-is-valid */
import React from 'react';
import * as React from 'react';
import { shallow, mount } from 'enzyme';
import sinon from 'sinon';

Expand Down
2 changes: 1 addition & 1 deletion src/components/loading-indicator/LoadingIndicator.js.flow
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// @flow
import React from 'react';
import * as React from 'react';

import './Crawler.scss';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { shallow } from 'enzyme';

import LoadingIndicator, { LoadingIndicatorSize } from '..';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { shallow } from 'enzyme';
import makeLoadable from '../makeLoadable';
import { LoadingIndicatorProps } from '../LoadingIndicator';
Expand Down
2 changes: 1 addition & 1 deletion src/components/logo/__tests__/Logo.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { shallow } from 'enzyme';

import Logo from '..';
Expand Down
2 changes: 1 addition & 1 deletion src/components/media/__tests__/Media.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { mount, shallow } from 'enzyme';

import Media from '../Media';
Expand Down
2 changes: 1 addition & 1 deletion src/components/media/__tests__/MediaFigure.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { shallow } from 'enzyme';

import MediaFigure from '../MediaFigure';
Expand Down
2 changes: 1 addition & 1 deletion src/components/media/__tests__/MediaMenu.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { mount } from 'enzyme';

import MediaMenu from '../MediaMenu';
Expand Down
2 changes: 1 addition & 1 deletion src/components/menu/MenuSeparator.js.flow
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// @flow
import React from 'react';
import * as React from 'react';

const MenuSeparator = () => <li role="separator" />;

Expand Down
2 changes: 1 addition & 1 deletion src/components/menu/MenuSeparator.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import classNames from 'classnames';

export interface MenuSeparatorProps {
Expand Down
2 changes: 1 addition & 1 deletion src/components/menu/__tests__/Menu.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable jsx-a11y/anchor-is-valid */
import React from 'react';
import * as React from 'react';
import { mount, shallow } from 'enzyme';
import sinon from 'sinon';

Expand Down
2 changes: 1 addition & 1 deletion src/components/menu/__tests__/MenuHeader.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { render, screen, fireEvent } from '@testing-library/react';

import MenuContext from '../MenuContext';
Expand Down
2 changes: 1 addition & 1 deletion src/components/menu/__tests__/MenuItem.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import sinon from 'sinon';
import { shallow } from 'enzyme';

Expand Down
2 changes: 1 addition & 1 deletion src/components/menu/__tests__/MenuLinkItem.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { shallow } from 'enzyme';

import MenuLinkItem from '../MenuLinkItem';
Expand Down
2 changes: 1 addition & 1 deletion src/components/menu/__tests__/MenuSectionHeader.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { shallow } from 'enzyme';

import MenuSectionHeader from '../MenuSectionHeader';
Expand Down
2 changes: 1 addition & 1 deletion src/components/menu/__tests__/MenuSeparator.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { shallow } from 'enzyme';

import MenuSeparator from '../MenuSeparator';
Expand Down
2 changes: 1 addition & 1 deletion src/components/menu/__tests__/SelectMenuItem.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { shallow } from 'enzyme';

import SelectMenuItem from '../SelectMenuItem';
Expand Down
2 changes: 1 addition & 1 deletion src/components/menu/__tests__/SelectMenuLinkItem.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { shallow } from 'enzyme';

import SelectMenuLinkItem from '../SelectMenuLinkItem';
Expand Down
2 changes: 1 addition & 1 deletion src/components/menu/__tests__/SubmenuItem.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { shallow } from 'enzyme';

import SubmenuItem from '../SubmenuItem';
Expand Down
2 changes: 1 addition & 1 deletion src/components/nudge/__tests__/Nudge.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { shallow } from 'enzyme';

import RelayPlanet140 from '../../../illustration/RelayPlanet140';
Expand Down
2 changes: 1 addition & 1 deletion src/components/plain-button/__tests__/PlainButton.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { shallow } from 'enzyme';
import PlainButton from '../PlainButton';

Expand Down
2 changes: 1 addition & 1 deletion src/components/portal/Portal.js.flow
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// @flow
import React from 'react';
import * as React from 'react';
import { createPortal } from 'react-dom';

type Props = {
Expand Down
2 changes: 1 addition & 1 deletion src/components/preview/PreviewLoadingRing.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import classNames from 'classnames';
import './PreviewLoadingRing.scss';

Expand Down
2 changes: 1 addition & 1 deletion src/components/preview/__tests__/PreviewLoading.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { shallow } from 'enzyme';
import { PreviewLoading, PreviewLoadingRing, getIcon } from '..';
import { bdlBoxBlue } from '../../../styles/variables';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { shallow } from 'enzyme';
import PreviewLoadingRing from '../PreviewLoadingRing';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { shallow } from 'enzyme';
import PrimaryButton from '..';
import Button from '../../button';
Expand Down
2 changes: 1 addition & 1 deletion src/components/progress-bar/ProgressBar.js.flow
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// @flow
import React from 'react';
import * as React from 'react';

import './ProgressBar.scss';

Expand Down
2 changes: 1 addition & 1 deletion src/components/progress-bar/ProgressBar.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';

import './ProgressBar.scss';

Expand Down
2 changes: 1 addition & 1 deletion src/components/progress-bar/__tests__/ProgressBar.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { shallow } from 'enzyme';

import ProgressBar from '..';
Expand Down
2 changes: 1 addition & 1 deletion src/components/radar/__tests__/RadarAnimation.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { shallow } from 'enzyme';
import RadarAnimation, { RadarAnimationProps, RadarAnimationPosition } from '../RadarAnimation';

Expand Down
2 changes: 1 addition & 1 deletion src/components/radio/__tests__/RadioButton.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { shallow } from 'enzyme';

import RadioButton from '../RadioButton';
Expand Down
2 changes: 1 addition & 1 deletion src/components/radio/__tests__/RadioButtonField.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable no-console */
import React from 'react';
import * as React from 'react';
import { shallow } from 'enzyme';

import RadioButtonField, { RadioButtonFieldProps } from '../RadioButtonField';
Expand Down
Loading

0 comments on commit df50bf2

Please sign in to comment.