~cytrogen/masto-fe

e8fc445e14f81cd3bf0dbddde5078b7fab690329 — Nick Schonning 2 years ago 79c43b6
[Glitch] Enable ESLint react/no-deprecated

Port b878e3d8dfaf3cf61f7af9d16afbe9c89b91ab62 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
24 files changed, 28 insertions(+), 28 deletions(-)

M app/javascript/flavours/glitch/components/autosuggest_input.jsx
M app/javascript/flavours/glitch/components/autosuggest_textarea.jsx
M app/javascript/flavours/glitch/components/media_gallery.jsx
M app/javascript/flavours/glitch/components/modal_root.jsx
M app/javascript/flavours/glitch/features/account_timeline/index.jsx
M app/javascript/flavours/glitch/features/audio/index.jsx
M app/javascript/flavours/glitch/features/blocks/index.jsx
M app/javascript/flavours/glitch/features/bookmarked_statuses/index.jsx
M app/javascript/flavours/glitch/features/compose/components/emoji_picker_dropdown.jsx
M app/javascript/flavours/glitch/features/domain_blocks/index.jsx
M app/javascript/flavours/glitch/features/favourited_statuses/index.jsx
M app/javascript/flavours/glitch/features/favourites/index.jsx
M app/javascript/flavours/glitch/features/follow_requests/index.jsx
M app/javascript/flavours/glitch/features/getting_started/index.jsx
M app/javascript/flavours/glitch/features/list_timeline/index.jsx
M app/javascript/flavours/glitch/features/lists/index.jsx
M app/javascript/flavours/glitch/features/mutes/index.jsx
M app/javascript/flavours/glitch/features/pinned_statuses/index.jsx
M app/javascript/flavours/glitch/features/reblogs/index.jsx
M app/javascript/flavours/glitch/features/status/components/card.jsx
M app/javascript/flavours/glitch/features/ui/components/bundle.jsx
M app/javascript/flavours/glitch/features/ui/components/onboarding_modal.jsx
M app/javascript/flavours/glitch/features/ui/index.jsx
M app/javascript/flavours/glitch/features/video/index.jsx
M app/javascript/flavours/glitch/components/autosuggest_input.jsx => app/javascript/flavours/glitch/components/autosuggest_input.jsx +1 -1
@@ 154,7 154,7 @@ export default class AutosuggestInput extends ImmutablePureComponent {
    this.input.focus();
  };

  componentWillReceiveProps (nextProps) {
  UNSAFE_componentWillReceiveProps (nextProps) {
    if (nextProps.suggestions !== this.props.suggestions && nextProps.suggestions.size > 0 && this.state.suggestionsHidden && this.state.focused) {
      this.setState({ suggestionsHidden: false });
    }

M app/javascript/flavours/glitch/components/autosuggest_textarea.jsx => app/javascript/flavours/glitch/components/autosuggest_textarea.jsx +1 -1
@@ 153,7 153,7 @@ export default class AutosuggestTextarea extends ImmutablePureComponent {
    this.textarea.focus();
  };

  componentWillReceiveProps (nextProps) {
  UNSAFE_componentWillReceiveProps (nextProps) {
    if (nextProps.suggestions !== this.props.suggestions && nextProps.suggestions.size > 0 && this.state.suggestionsHidden && this.state.focused) {
      this.setState({ suggestionsHidden: false });
    }

M app/javascript/flavours/glitch/components/media_gallery.jsx => app/javascript/flavours/glitch/components/media_gallery.jsx +1 -1
@@ 254,7 254,7 @@ class MediaGallery extends React.PureComponent {
    window.removeEventListener('resize', this.handleResize);
  }

  componentWillReceiveProps (nextProps) {
  UNSAFE_componentWillReceiveProps (nextProps) {
    if (!is(nextProps.media, this.props.media) && nextProps.visible === undefined) {
      this.setState({ visible: displayMedia !== 'hide_all' && !nextProps.sensitive || displayMedia === 'show_all' });
    } else if (!is(nextProps.visible, this.props.visible) && nextProps.visible !== undefined) {

M app/javascript/flavours/glitch/components/modal_root.jsx => app/javascript/flavours/glitch/components/modal_root.jsx +1 -1
@@ 62,7 62,7 @@ export default class ModalRoot extends React.PureComponent {
    }
  }

  componentWillReceiveProps (nextProps) {
  UNSAFE_componentWillReceiveProps (nextProps) {
    if (!!nextProps.children && !this.props.children) {
      this.activeElement = document.activeElement;


M app/javascript/flavours/glitch/features/account_timeline/index.jsx => app/javascript/flavours/glitch/features/account_timeline/index.jsx +1 -1
@@ 122,7 122,7 @@ class AccountTimeline extends ImmutablePureComponent {
    }
  }

  componentWillReceiveProps (nextProps) {
  UNSAFE_componentWillReceiveProps (nextProps) {
    const { dispatch } = this.props;

    if ((nextProps.params.accountId !== this.props.params.accountId && nextProps.params.accountId) || nextProps.withReplies !== this.props.withReplies) {

M app/javascript/flavours/glitch/features/audio/index.jsx => app/javascript/flavours/glitch/features/audio/index.jsx +1 -1
@@ 142,7 142,7 @@ class Audio extends React.PureComponent {
    }
  }

  componentWillReceiveProps (nextProps) {
  UNSAFE_componentWillReceiveProps (nextProps) {
    if (!is(nextProps.visible, this.props.visible) && nextProps.visible !== undefined) {
      this.setState({ revealed: nextProps.visible });
    }

M app/javascript/flavours/glitch/features/blocks/index.jsx => app/javascript/flavours/glitch/features/blocks/index.jsx +1 -1
@@ 34,7 34,7 @@ class Blocks extends ImmutablePureComponent {
    multiColumn: PropTypes.bool,
  };

  componentWillMount () {
  UNSAFE_componentWillMount () {
    this.props.dispatch(fetchBlocks());
  }


M app/javascript/flavours/glitch/features/bookmarked_statuses/index.jsx => app/javascript/flavours/glitch/features/bookmarked_statuses/index.jsx +1 -1
@@ 34,7 34,7 @@ class Bookmarks extends ImmutablePureComponent {
    isLoading: PropTypes.bool,
  };

  componentWillMount () {
  UNSAFE_componentWillMount () {
    this.props.dispatch(fetchBookmarkedStatuses());
  }


M app/javascript/flavours/glitch/features/compose/components/emoji_picker_dropdown.jsx => app/javascript/flavours/glitch/features/compose/components/emoji_picker_dropdown.jsx +1 -1
@@ 60,7 60,7 @@ class ModifierPickerMenu extends React.PureComponent {
    this.props.onSelect(e.currentTarget.getAttribute('data-index') * 1);
  };

  componentWillReceiveProps (nextProps) {
  UNSAFE_componentWillReceiveProps (nextProps) {
    if (nextProps.active) {
      this.attachListeners();
    } else {

M app/javascript/flavours/glitch/features/domain_blocks/index.jsx => app/javascript/flavours/glitch/features/domain_blocks/index.jsx +1 -1
@@ 34,7 34,7 @@ class Blocks extends ImmutablePureComponent {
    multiColumn: PropTypes.bool,
  };

  componentWillMount () {
  UNSAFE_componentWillMount () {
    this.props.dispatch(fetchDomainBlocks());
  }


M app/javascript/flavours/glitch/features/favourited_statuses/index.jsx => app/javascript/flavours/glitch/features/favourited_statuses/index.jsx +1 -1
@@ 34,7 34,7 @@ class Favourites extends ImmutablePureComponent {
    isLoading: PropTypes.bool,
  };

  componentWillMount () {
  UNSAFE_componentWillMount () {
    this.props.dispatch(fetchFavouritedStatuses());
  }


M app/javascript/flavours/glitch/features/favourites/index.jsx => app/javascript/flavours/glitch/features/favourites/index.jsx +2 -2
@@ 32,13 32,13 @@ class Favourites extends ImmutablePureComponent {
    intl: PropTypes.object.isRequired,
  };

  componentWillMount () {
  UNSAFE_componentWillMount () {
    if (!this.props.accountIds) {
      this.props.dispatch(fetchFavourites(this.props.params.statusId));
    }
  }

  componentWillReceiveProps (nextProps) {
  UNSAFE_componentWillReceiveProps (nextProps) {
    if (nextProps.params.statusId !== this.props.params.statusId && nextProps.params.statusId) {
      this.props.dispatch(fetchFavourites(nextProps.params.statusId));
    }

M app/javascript/flavours/glitch/features/follow_requests/index.jsx => app/javascript/flavours/glitch/features/follow_requests/index.jsx +1 -1
@@ 39,7 39,7 @@ class FollowRequests extends ImmutablePureComponent {
    multiColumn: PropTypes.bool,
  };

  componentWillMount () {
  UNSAFE_componentWillMount () {
    this.props.dispatch(fetchFollowRequests());
  }


M app/javascript/flavours/glitch/features/getting_started/index.jsx => app/javascript/flavours/glitch/features/getting_started/index.jsx +1 -1
@@ 96,7 96,7 @@ class GettingStarted extends ImmutablePureComponent {
    openSettings: PropTypes.func.isRequired,
  };

  componentWillMount () {
  UNSAFE_componentWillMount () {
    this.props.fetchLists();
  }


M app/javascript/flavours/glitch/features/list_timeline/index.jsx => app/javascript/flavours/glitch/features/list_timeline/index.jsx +1 -1
@@ 76,7 76,7 @@ class ListTimeline extends React.PureComponent {
    this.disconnect = dispatch(connectListStream(id));
  }

  componentWillReceiveProps (nextProps) {
  UNSAFE_componentWillReceiveProps (nextProps) {
    const { dispatch } = this.props;
    const { id } = nextProps.params;


M app/javascript/flavours/glitch/features/lists/index.jsx => app/javascript/flavours/glitch/features/lists/index.jsx +1 -1
@@ 42,7 42,7 @@ class Lists extends ImmutablePureComponent {
    multiColumn: PropTypes.bool,
  };

  componentWillMount () {
  UNSAFE_componentWillMount () {
    this.props.dispatch(fetchLists());
  }


M app/javascript/flavours/glitch/features/mutes/index.jsx => app/javascript/flavours/glitch/features/mutes/index.jsx +1 -1
@@ 35,7 35,7 @@ class Mutes extends ImmutablePureComponent {
    multiColumn: PropTypes.bool,
  };

  componentWillMount () {
  UNSAFE_componentWillMount () {
    this.props.dispatch(fetchMutes());
  }


M app/javascript/flavours/glitch/features/pinned_statuses/index.jsx => app/javascript/flavours/glitch/features/pinned_statuses/index.jsx +1 -1
@@ 29,7 29,7 @@ class PinnedStatuses extends ImmutablePureComponent {
    multiColumn: PropTypes.bool,
  };

  componentWillMount () {
  UNSAFE_componentWillMount () {
    this.props.dispatch(fetchPinnedStatuses());
  }


M app/javascript/flavours/glitch/features/reblogs/index.jsx => app/javascript/flavours/glitch/features/reblogs/index.jsx +2 -2
@@ 32,13 32,13 @@ class Reblogs extends ImmutablePureComponent {
    intl: PropTypes.object.isRequired,
  };

  componentWillMount () {
  UNSAFE_componentWillMount () {
    if (!this.props.accountIds) {
      this.props.dispatch(fetchReblogs(this.props.params.statusId));
    }
  }

  componentWillReceiveProps(nextProps) {
  UNSAFE_componentWillReceiveProps(nextProps) {
    if (nextProps.params.statusId !== this.props.params.statusId && nextProps.params.statusId) {
      this.props.dispatch(fetchReblogs(nextProps.params.statusId));
    }

M app/javascript/flavours/glitch/features/status/components/card.jsx => app/javascript/flavours/glitch/features/status/components/card.jsx +1 -1
@@ 57,7 57,7 @@ export default class Card extends React.PureComponent {
    revealed: !this.props.sensitive,
  };

  componentWillReceiveProps (nextProps) {
  UNSAFE_componentWillReceiveProps (nextProps) {
    if (!Immutable.is(this.props.card, nextProps.card)) {
      this.setState({ embedded: false, previewLoaded: false });
    }

M app/javascript/flavours/glitch/features/ui/components/bundle.jsx => app/javascript/flavours/glitch/features/ui/components/bundle.jsx +2 -2
@@ 33,11 33,11 @@ class Bundle extends React.Component {
    forceRender: false,
  };

  componentWillMount() {
  UNSAFE_componentWillMount() {
    this.load(this.props);
  }

  componentWillReceiveProps(nextProps) {
  UNSAFE_componentWillReceiveProps(nextProps) {
    if (nextProps.fetchComponent !== this.props.fetchComponent) {
      this.load(nextProps);
    }

M app/javascript/flavours/glitch/features/ui/components/onboarding_modal.jsx => app/javascript/flavours/glitch/features/ui/components/onboarding_modal.jsx +1 -1
@@ 184,7 184,7 @@ class OnboardingModal extends React.PureComponent {
    currentIndex: 0,
  };

  componentWillMount() {
  UNSAFE_componentWillMount() {
    const { myAccount, admin, domain, intl } = this.props;
    this.pages = [
      <PageOne key='1' acct={myAccount.get('acct')} domain={domain} />,

M app/javascript/flavours/glitch/features/ui/index.jsx => app/javascript/flavours/glitch/features/ui/index.jsx +2 -2
@@ 133,7 133,7 @@ class SwitchingColumnsArea extends React.PureComponent {
    mobile: PropTypes.bool,
  };

  componentWillMount () {
  UNSAFE_componentWillMount () {
    if (this.props.mobile) {
      document.body.classList.toggle('layout-single-column', true);
      document.body.classList.toggle('layout-multiple-columns', false);


@@ 438,7 438,7 @@ class UI extends React.Component {
    }
  }

  componentWillReceiveProps (nextProps) {
  UNSAFE_componentWillReceiveProps (nextProps) {
    if (nextProps.layout_local_setting !== this.props.layout_local_setting) {
      const layout = layoutFromWindow(nextProps.layout_local_setting);


M app/javascript/flavours/glitch/features/video/index.jsx => app/javascript/flavours/glitch/features/video/index.jsx +1 -1
@@ 373,7 373,7 @@ class Video extends React.PureComponent {
    }
  }

  componentWillReceiveProps (nextProps) {
  UNSAFE_componentWillReceiveProps (nextProps) {
    if (!is(nextProps.visible, this.props.visible) && nextProps.visible !== undefined) {
      this.setState({ revealed: nextProps.visible });
    }