Enforce import order with ESLint (#25096)
This commit is contained in:
		
							parent
							
								
									b896b16cb3
								
							
						
					
					
						commit
						d27216dc46
					
				
					 355 changed files with 2304 additions and 1366 deletions
				
			
		| 
						 | 
				
			
			@ -1,14 +1,19 @@
 | 
			
		|||
import { PureComponent } from 'react';
 | 
			
		||||
import PropTypes from 'prop-types';
 | 
			
		||||
import { connect } from 'react-redux';
 | 
			
		||||
import { IconButton } from '../../../components/icon_button';
 | 
			
		||||
import ImmutablePropTypes from 'react-immutable-proptypes';
 | 
			
		||||
import DropdownMenuContainer from '../../../containers/dropdown_menu_container';
 | 
			
		||||
import { PureComponent } from 'react';
 | 
			
		||||
 | 
			
		||||
import { defineMessages, injectIntl } from 'react-intl';
 | 
			
		||||
import { me } from '../../../initial_state';
 | 
			
		||||
 | 
			
		||||
import classNames from 'classnames';
 | 
			
		||||
 | 
			
		||||
import ImmutablePropTypes from 'react-immutable-proptypes';
 | 
			
		||||
import { connect } from 'react-redux';
 | 
			
		||||
 | 
			
		||||
import { PERMISSION_MANAGE_USERS, PERMISSION_MANAGE_FEDERATION } from 'mastodon/permissions';
 | 
			
		||||
 | 
			
		||||
import { IconButton } from '../../../components/icon_button';
 | 
			
		||||
import DropdownMenuContainer from '../../../containers/dropdown_menu_container';
 | 
			
		||||
import { me } from '../../../initial_state';
 | 
			
		||||
 | 
			
		||||
const messages = defineMessages({
 | 
			
		||||
  delete: { id: 'status.delete', defaultMessage: 'Delete' },
 | 
			
		||||
  redraft: { id: 'status.redraft', defaultMessage: 'Delete & re-draft' },
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,13 +1,18 @@
 | 
			
		|||
import { PureComponent } from 'react';
 | 
			
		||||
import punycode from 'punycode';
 | 
			
		||||
 | 
			
		||||
import PropTypes from 'prop-types';
 | 
			
		||||
import { PureComponent } from 'react';
 | 
			
		||||
 | 
			
		||||
import { FormattedMessage } from 'react-intl';
 | 
			
		||||
 | 
			
		||||
import classnames from 'classnames';
 | 
			
		||||
 | 
			
		||||
import Immutable from 'immutable';
 | 
			
		||||
import ImmutablePropTypes from 'react-immutable-proptypes';
 | 
			
		||||
import { FormattedMessage } from 'react-intl';
 | 
			
		||||
import punycode from 'punycode';
 | 
			
		||||
import classnames from 'classnames';
 | 
			
		||||
 | 
			
		||||
import { Blurhash } from 'mastodon/components/blurhash';
 | 
			
		||||
import { Icon }  from 'mastodon/components/icon';
 | 
			
		||||
import { useBlurhash } from 'mastodon/initial_state';
 | 
			
		||||
import { Blurhash } from 'mastodon/components/blurhash';
 | 
			
		||||
 | 
			
		||||
const IDNA_PREFIX = 'xn--';
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,21 +1,27 @@
 | 
			
		|||
import PropTypes from 'prop-types';
 | 
			
		||||
 | 
			
		||||
import { injectIntl, defineMessages, FormattedDate, FormattedMessage } from 'react-intl';
 | 
			
		||||
 | 
			
		||||
import classNames from 'classnames';
 | 
			
		||||
import { Link } from 'react-router-dom';
 | 
			
		||||
 | 
			
		||||
import ImmutablePropTypes from 'react-immutable-proptypes';
 | 
			
		||||
import ImmutablePureComponent from 'react-immutable-pure-component';
 | 
			
		||||
 | 
			
		||||
import { AnimatedNumber } from 'mastodon/components/animated_number';
 | 
			
		||||
import EditedTimestamp from 'mastodon/components/edited_timestamp';
 | 
			
		||||
import { Icon }  from 'mastodon/components/icon';
 | 
			
		||||
import PictureInPicturePlaceholder from 'mastodon/components/picture_in_picture_placeholder';
 | 
			
		||||
 | 
			
		||||
import { Avatar } from '../../../components/avatar';
 | 
			
		||||
import { DisplayName } from '../../../components/display_name';
 | 
			
		||||
import StatusContent from '../../../components/status_content';
 | 
			
		||||
import MediaGallery from '../../../components/media_gallery';
 | 
			
		||||
import { Link } from 'react-router-dom';
 | 
			
		||||
import { injectIntl, defineMessages, FormattedDate, FormattedMessage } from 'react-intl';
 | 
			
		||||
import Card from './card';
 | 
			
		||||
import ImmutablePureComponent from 'react-immutable-pure-component';
 | 
			
		||||
import Video from '../../video';
 | 
			
		||||
import StatusContent from '../../../components/status_content';
 | 
			
		||||
import Audio from '../../audio';
 | 
			
		||||
import scheduleIdleTask from '../../ui/util/schedule_idle_task';
 | 
			
		||||
import classNames from 'classnames';
 | 
			
		||||
import { Icon }  from 'mastodon/components/icon';
 | 
			
		||||
import { AnimatedNumber } from 'mastodon/components/animated_number';
 | 
			
		||||
import PictureInPicturePlaceholder from 'mastodon/components/picture_in_picture_placeholder';
 | 
			
		||||
import EditedTimestamp from 'mastodon/components/edited_timestamp';
 | 
			
		||||
import Video from '../../video';
 | 
			
		||||
 | 
			
		||||
import Card from './card';
 | 
			
		||||
 | 
			
		||||
const messages = defineMessages({
 | 
			
		||||
  public_short: { id: 'privacy.public.short', defaultMessage: 'Public' },
 | 
			
		||||
| 
						 | 
				
			
			@ -207,7 +213,7 @@ class DetailedStatus extends ImmutablePureComponent {
 | 
			
		|||
    } else if (this.context.router) {
 | 
			
		||||
      reblogLink = (
 | 
			
		||||
        <>
 | 
			
		||||
           · 
 | 
			
		||||
           ·
 | 
			
		||||
          <Link to={`/@${status.getIn(['account', 'acct'])}/${status.get('id')}/reblogs`} className='detailed-status__link'>
 | 
			
		||||
            <Icon id={reblogIcon} />
 | 
			
		||||
            <span className='detailed-status__reblogs'>
 | 
			
		||||
| 
						 | 
				
			
			@ -219,7 +225,7 @@ class DetailedStatus extends ImmutablePureComponent {
 | 
			
		|||
    } else {
 | 
			
		||||
      reblogLink = (
 | 
			
		||||
        <>
 | 
			
		||||
           · 
 | 
			
		||||
           ·
 | 
			
		||||
          <a href={`/interact/${status.get('id')}?type=reblog`} className='detailed-status__link' onClick={this.handleModalLink}>
 | 
			
		||||
            <Icon id={reblogIcon} />
 | 
			
		||||
            <span className='detailed-status__reblogs'>
 | 
			
		||||
| 
						 | 
				
			
			@ -253,7 +259,7 @@ class DetailedStatus extends ImmutablePureComponent {
 | 
			
		|||
    if (status.get('edited_at')) {
 | 
			
		||||
      edited = (
 | 
			
		||||
        <>
 | 
			
		||||
           · 
 | 
			
		||||
           ·
 | 
			
		||||
          <EditedTimestamp statusId={status.get('id')} timestamp={status.get('edited_at')} />
 | 
			
		||||
        </>
 | 
			
		||||
      );
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,6 +1,10 @@
 | 
			
		|||
import { defineMessages, injectIntl } from 'react-intl';
 | 
			
		||||
 | 
			
		||||
import { connect } from 'react-redux';
 | 
			
		||||
import DetailedStatus from '../components/detailed_status';
 | 
			
		||||
import { makeGetStatus, makeGetPictureInPicture } from '../../../selectors';
 | 
			
		||||
 | 
			
		||||
import { showAlertForError } from '../../../actions/alerts';
 | 
			
		||||
import { initBlockModal } from '../../../actions/blocks';
 | 
			
		||||
import { initBoostModal } from '../../../actions/boosts';
 | 
			
		||||
import {
 | 
			
		||||
  replyCompose,
 | 
			
		||||
  mentionCompose,
 | 
			
		||||
| 
						 | 
				
			
			@ -14,6 +18,9 @@ import {
 | 
			
		|||
  pin,
 | 
			
		||||
  unpin,
 | 
			
		||||
} from '../../../actions/interactions';
 | 
			
		||||
import { openModal } from '../../../actions/modal';
 | 
			
		||||
import { initMuteModal } from '../../../actions/mutes';
 | 
			
		||||
import { initReport } from '../../../actions/reports';
 | 
			
		||||
import {
 | 
			
		||||
  muteStatus,
 | 
			
		||||
  unmuteStatus,
 | 
			
		||||
| 
						 | 
				
			
			@ -21,14 +28,9 @@ import {
 | 
			
		|||
  hideStatus,
 | 
			
		||||
  revealStatus,
 | 
			
		||||
} from '../../../actions/statuses';
 | 
			
		||||
import { initMuteModal } from '../../../actions/mutes';
 | 
			
		||||
import { initBlockModal } from '../../../actions/blocks';
 | 
			
		||||
import { initBoostModal } from '../../../actions/boosts';
 | 
			
		||||
import { initReport } from '../../../actions/reports';
 | 
			
		||||
import { openModal } from '../../../actions/modal';
 | 
			
		||||
import { defineMessages, injectIntl } from 'react-intl';
 | 
			
		||||
import { boostModal, deleteModal } from '../../../initial_state';
 | 
			
		||||
import { showAlertForError } from '../../../actions/alerts';
 | 
			
		||||
import { makeGetStatus, makeGetPictureInPicture } from '../../../selectors';
 | 
			
		||||
import DetailedStatus from '../components/detailed_status';
 | 
			
		||||
 | 
			
		||||
const messages = defineMessages({
 | 
			
		||||
  deleteConfirm: { id: 'confirmations.delete.confirm', defaultMessage: 'Delete' },
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,9 +1,51 @@
 | 
			
		|||
import Immutable from 'immutable';
 | 
			
		||||
import { connect } from 'react-redux';
 | 
			
		||||
import PropTypes from 'prop-types';
 | 
			
		||||
 | 
			
		||||
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
 | 
			
		||||
 | 
			
		||||
import classNames from 'classnames';
 | 
			
		||||
import { Helmet } from 'react-helmet';
 | 
			
		||||
 | 
			
		||||
import Immutable from 'immutable';
 | 
			
		||||
import ImmutablePropTypes from 'react-immutable-proptypes';
 | 
			
		||||
import ImmutablePureComponent from 'react-immutable-pure-component';
 | 
			
		||||
import { connect } from 'react-redux';
 | 
			
		||||
import { createSelector } from 'reselect';
 | 
			
		||||
 | 
			
		||||
import { HotKeys } from 'react-hotkeys';
 | 
			
		||||
 | 
			
		||||
import { Icon }  from 'mastodon/components/icon';
 | 
			
		||||
import LoadingIndicator from 'mastodon/components/loading_indicator';
 | 
			
		||||
import ScrollContainer from 'mastodon/containers/scroll_container';
 | 
			
		||||
import BundleColumnError from 'mastodon/features/ui/components/bundle_column_error';
 | 
			
		||||
 | 
			
		||||
import {
 | 
			
		||||
  unblockAccount,
 | 
			
		||||
  unmuteAccount,
 | 
			
		||||
} from '../../actions/accounts';
 | 
			
		||||
import { initBlockModal } from '../../actions/blocks';
 | 
			
		||||
import { initBoostModal } from '../../actions/boosts';
 | 
			
		||||
import {
 | 
			
		||||
  replyCompose,
 | 
			
		||||
  mentionCompose,
 | 
			
		||||
  directCompose,
 | 
			
		||||
} from '../../actions/compose';
 | 
			
		||||
import {
 | 
			
		||||
  blockDomain,
 | 
			
		||||
  unblockDomain,
 | 
			
		||||
} from '../../actions/domain_blocks';
 | 
			
		||||
import {
 | 
			
		||||
  favourite,
 | 
			
		||||
  unfavourite,
 | 
			
		||||
  bookmark,
 | 
			
		||||
  unbookmark,
 | 
			
		||||
  reblog,
 | 
			
		||||
  unreblog,
 | 
			
		||||
  pin,
 | 
			
		||||
  unpin,
 | 
			
		||||
} from '../../actions/interactions';
 | 
			
		||||
import { openModal } from '../../actions/modal';
 | 
			
		||||
import { initMuteModal } from '../../actions/mutes';
 | 
			
		||||
import { initReport } from '../../actions/reports';
 | 
			
		||||
import {
 | 
			
		||||
  fetchStatus,
 | 
			
		||||
  muteStatus,
 | 
			
		||||
| 
						 | 
				
			
			@ -15,51 +57,16 @@ import {
 | 
			
		|||
  translateStatus,
 | 
			
		||||
  undoStatusTranslation,
 | 
			
		||||
} from '../../actions/statuses';
 | 
			
		||||
import LoadingIndicator from 'mastodon/components/loading_indicator';
 | 
			
		||||
import DetailedStatus from './components/detailed_status';
 | 
			
		||||
import ActionBar from './components/action_bar';
 | 
			
		||||
import Column from '../ui/components/column';
 | 
			
		||||
import {
 | 
			
		||||
  favourite,
 | 
			
		||||
  unfavourite,
 | 
			
		||||
  bookmark,
 | 
			
		||||
  unbookmark,
 | 
			
		||||
  reblog,
 | 
			
		||||
  unreblog,
 | 
			
		||||
  pin,
 | 
			
		||||
  unpin,
 | 
			
		||||
} from '../../actions/interactions';
 | 
			
		||||
import {
 | 
			
		||||
  replyCompose,
 | 
			
		||||
  mentionCompose,
 | 
			
		||||
  directCompose,
 | 
			
		||||
} from '../../actions/compose';
 | 
			
		||||
import {
 | 
			
		||||
  unblockAccount,
 | 
			
		||||
  unmuteAccount,
 | 
			
		||||
} from '../../actions/accounts';
 | 
			
		||||
import {
 | 
			
		||||
  blockDomain,
 | 
			
		||||
  unblockDomain,
 | 
			
		||||
} from '../../actions/domain_blocks';
 | 
			
		||||
import { initMuteModal } from '../../actions/mutes';
 | 
			
		||||
import { initBlockModal } from '../../actions/blocks';
 | 
			
		||||
import { initBoostModal } from '../../actions/boosts';
 | 
			
		||||
import { initReport } from '../../actions/reports';
 | 
			
		||||
import { makeGetStatus, makeGetPictureInPicture } from '../../selectors';
 | 
			
		||||
import ScrollContainer from 'mastodon/containers/scroll_container';
 | 
			
		||||
import ColumnHeader from '../../components/column_header';
 | 
			
		||||
import StatusContainer from '../../containers/status_container';
 | 
			
		||||
import { openModal } from '../../actions/modal';
 | 
			
		||||
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
 | 
			
		||||
import ImmutablePureComponent from 'react-immutable-pure-component';
 | 
			
		||||
import { HotKeys } from 'react-hotkeys';
 | 
			
		||||
import { boostModal, deleteModal } from '../../initial_state';
 | 
			
		||||
import { attachFullscreenListener, detachFullscreenListener, isFullscreen } from '../ui/util/fullscreen';
 | 
			
		||||
import { textForScreenReader, defaultMediaVisibility } from '../../components/status';
 | 
			
		||||
import { Icon }  from 'mastodon/components/icon';
 | 
			
		||||
import { Helmet } from 'react-helmet';
 | 
			
		||||
import BundleColumnError from 'mastodon/features/ui/components/bundle_column_error';
 | 
			
		||||
import StatusContainer from '../../containers/status_container';
 | 
			
		||||
import { boostModal, deleteModal } from '../../initial_state';
 | 
			
		||||
import { makeGetStatus, makeGetPictureInPicture } from '../../selectors';
 | 
			
		||||
import Column from '../ui/components/column';
 | 
			
		||||
import { attachFullscreenListener, detachFullscreenListener, isFullscreen } from '../ui/util/fullscreen';
 | 
			
		||||
 | 
			
		||||
import ActionBar from './components/action_bar';
 | 
			
		||||
import DetailedStatus from './components/detailed_status';
 | 
			
		||||
 | 
			
		||||
const messages = defineMessages({
 | 
			
		||||
  deleteConfirm: { id: 'confirmations.delete.confirm', defaultMessage: 'Delete' },
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Reference in a new issue