Enable ESLint react/no-deprecated (#24471)
This commit is contained in:
		@@ -22,7 +22,7 @@ class InlineAlert extends React.PureComponent {
 | 
			
		||||
 | 
			
		||||
  static TRANSITION_DELAY = 200;
 | 
			
		||||
 | 
			
		||||
  componentWillReceiveProps (nextProps) {
 | 
			
		||||
  UNSAFE_componentWillReceiveProps (nextProps) {
 | 
			
		||||
    if (!this.props.show && nextProps.show) {
 | 
			
		||||
      this.setState({ mountMessage: true });
 | 
			
		||||
    } else if (this.props.show && !nextProps.show) {
 | 
			
		||||
@@ -58,11 +58,11 @@ class AccountNote extends ImmutablePureComponent {
 | 
			
		||||
    saved: false,
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  componentWillMount () {
 | 
			
		||||
  UNSAFE_componentWillMount () {
 | 
			
		||||
    this._reset();
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  componentWillReceiveProps (nextProps) {
 | 
			
		||||
  UNSAFE_componentWillReceiveProps (nextProps) {
 | 
			
		||||
    const accountWillChange = !is(this.props.account, nextProps.account);
 | 
			
		||||
    const newState = {};
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -136,7 +136,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 });
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
@@ -34,7 +34,7 @@ class Blocks extends ImmutablePureComponent {
 | 
			
		||||
    multiColumn: PropTypes.bool,
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  componentWillMount () {
 | 
			
		||||
  UNSAFE_componentWillMount () {
 | 
			
		||||
    this.props.dispatch(fetchBlocks());
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -34,7 +34,7 @@ class Bookmarks extends ImmutablePureComponent {
 | 
			
		||||
    isLoading: PropTypes.bool,
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  componentWillMount () {
 | 
			
		||||
  UNSAFE_componentWillMount () {
 | 
			
		||||
    this.props.dispatch(fetchBookmarkedStatuses());
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -59,7 +59,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 {
 | 
			
		||||
 
 | 
			
		||||
@@ -212,7 +212,7 @@ class PrivacyDropdown extends React.PureComponent {
 | 
			
		||||
    this.props.onChange(value);
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  componentWillMount () {
 | 
			
		||||
  UNSAFE_componentWillMount () {
 | 
			
		||||
    const { intl: { formatMessage } } = this.props;
 | 
			
		||||
 | 
			
		||||
    this.options = [
 | 
			
		||||
 
 | 
			
		||||
@@ -34,7 +34,7 @@ class Blocks extends ImmutablePureComponent {
 | 
			
		||||
    multiColumn: PropTypes.bool,
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  componentWillMount () {
 | 
			
		||||
  UNSAFE_componentWillMount () {
 | 
			
		||||
    this.props.dispatch(fetchDomainBlocks());
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -34,7 +34,7 @@ class Favourites extends ImmutablePureComponent {
 | 
			
		||||
    isLoading: PropTypes.bool,
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  componentWillMount () {
 | 
			
		||||
  UNSAFE_componentWillMount () {
 | 
			
		||||
    this.props.dispatch(fetchFavouritedStatuses());
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -31,13 +31,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));
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
@@ -39,7 +39,7 @@ class FollowRequests extends ImmutablePureComponent {
 | 
			
		||||
    multiColumn: PropTypes.bool,
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  componentWillMount () {
 | 
			
		||||
  UNSAFE_componentWillMount () {
 | 
			
		||||
    this.props.dispatch(fetchFollowRequests());
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -42,7 +42,7 @@ class Lists extends ImmutablePureComponent {
 | 
			
		||||
    multiColumn: PropTypes.bool,
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  componentWillMount () {
 | 
			
		||||
  UNSAFE_componentWillMount () {
 | 
			
		||||
    this.props.dispatch(fetchLists());
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -35,7 +35,7 @@ class Mutes extends ImmutablePureComponent {
 | 
			
		||||
    multiColumn: PropTypes.bool,
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  componentWillMount () {
 | 
			
		||||
  UNSAFE_componentWillMount () {
 | 
			
		||||
    this.props.dispatch(fetchMutes());
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -93,7 +93,7 @@ class Notifications extends React.PureComponent {
 | 
			
		||||
    trackScroll: true,
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  componentWillMount() {
 | 
			
		||||
  UNSAFE_componentWillMount() {
 | 
			
		||||
    this.props.dispatch(mountNotifications());
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -29,7 +29,7 @@ class PinnedStatuses extends ImmutablePureComponent {
 | 
			
		||||
    multiColumn: PropTypes.bool,
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  componentWillMount () {
 | 
			
		||||
  UNSAFE_componentWillMount () {
 | 
			
		||||
    this.props.dispatch(fetchPinnedStatuses());
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -31,13 +31,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));
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
@@ -66,7 +66,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 });
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
@@ -207,7 +207,7 @@ class Status extends ImmutablePureComponent {
 | 
			
		||||
    loadedStatusId: undefined,
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  componentWillMount () {
 | 
			
		||||
  UNSAFE_componentWillMount () {
 | 
			
		||||
    this.props.dispatch(fetchStatus(this.props.params.statusId));
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
@@ -215,7 +215,7 @@ class Status extends ImmutablePureComponent {
 | 
			
		||||
    attachFullscreenListener(this.onFullScreenChange);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  componentWillReceiveProps (nextProps) {
 | 
			
		||||
  UNSAFE_componentWillReceiveProps (nextProps) {
 | 
			
		||||
    if (nextProps.params.statusId !== this.props.params.statusId && nextProps.params.statusId) {
 | 
			
		||||
      this._scrolledIntoView = false;
 | 
			
		||||
      this.props.dispatch(fetchStatus(nextProps.params.statusId));
 | 
			
		||||
 
 | 
			
		||||
@@ -33,11 +33,11 @@ class Bundle extends React.PureComponent {
 | 
			
		||||
    forceRender: false,
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  componentWillMount() {
 | 
			
		||||
  UNSAFE_componentWillMount() {
 | 
			
		||||
    this.load(this.props);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  componentWillReceiveProps(nextProps) {
 | 
			
		||||
  UNSAFE_componentWillReceiveProps(nextProps) {
 | 
			
		||||
    if (nextProps.fetchComponent !== this.props.fetchComponent) {
 | 
			
		||||
      this.load(nextProps);
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
@@ -76,7 +76,7 @@ export default class ColumnsArea extends ImmutablePureComponent {
 | 
			
		||||
    this.isRtlLayout = document.getElementsByTagName('body')[0].classList.contains('rtl');
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  componentWillUpdate(nextProps) {
 | 
			
		||||
  UNSAFE_componentWillUpdate(nextProps) {
 | 
			
		||||
    if (this.props.singleColumn !== nextProps.singleColumn && nextProps.singleColumn) {
 | 
			
		||||
      this.node.removeEventListener('wheel', this.handleWheel);
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
@@ -123,7 +123,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);
 | 
			
		||||
 
 | 
			
		||||
@@ -370,7 +370,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 });
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user