From 517dee413e79559caafb502d526eb48c737a1349 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Sat, 29 Aug 2020 12:57:11 +0100 Subject: [PATCH] Delint --- src/components/structures/TimelinePanel.js | 2 ++ src/components/structures/auth/Login.js | 3 ++- src/components/structures/auth/Registration.js | 1 + src/components/views/auth/RegistrationForm.js | 2 +- src/components/views/dialogs/BaseDialog.js | 2 +- src/components/views/dialogs/SetEmailDialog.js | 2 +- src/components/views/dialogs/SetMxIdDialog.js | 2 +- src/components/views/elements/EditableText.js | 5 ++++- src/components/views/elements/Pill.js | 1 + src/components/views/elements/PowerSelector.js | 1 + src/components/views/groups/GroupRoomInfo.js | 1 + src/components/views/rooms/AppsDrawer.js | 1 + src/components/views/rooms/EventTile.js | 2 ++ 13 files changed, 19 insertions(+), 6 deletions(-) diff --git a/src/components/structures/TimelinePanel.js b/src/components/structures/TimelinePanel.js index d1c977f2ca..daa18bb290 100644 --- a/src/components/structures/TimelinePanel.js +++ b/src/components/structures/TimelinePanel.js @@ -221,6 +221,7 @@ class TimelinePanel extends React.Component { } // TODO: [REACT-WARNING] Move into constructor + // eslint-disable-next-line camelcase UNSAFE_componentWillMount() { if (this.props.manageReadReceipts) { this.updateReadReceiptOnUserActivity(); @@ -233,6 +234,7 @@ class TimelinePanel extends React.Component { } // TODO: [REACT-WARNING] Replace with appropriate lifecycle event + // eslint-disable-next-line camelcase UNSAFE_componentWillReceiveProps(newProps) { if (newProps.timelineSet !== this.props.timelineSet) { // throw new Error("changing timelineSet on a TimelinePanel is not supported"); diff --git a/src/components/structures/auth/Login.js b/src/components/structures/auth/Login.js index 44a03929cf..9a639ed58a 100644 --- a/src/components/structures/auth/Login.js +++ b/src/components/structures/auth/Login.js @@ -52,7 +52,7 @@ _td("Invalid base_url for m.identity_server"); _td("Identity server URL does not appear to be a valid identity server"); _td("General failure"); -/** +/* * A wire component which glues together login UI components and Login logic */ export default class LoginComponent extends React.Component { @@ -133,6 +133,7 @@ export default class LoginComponent extends React.Component { } // TODO: [REACT-WARNING] Replace with appropriate lifecycle event + // eslint-disable-next-line camelcase UNSAFE_componentWillReceiveProps(newProps) { if (newProps.serverConfig.hsUrl === this.props.serverConfig.hsUrl && newProps.serverConfig.isUrl === this.props.serverConfig.isUrl) return; diff --git a/src/components/structures/auth/Registration.js b/src/components/structures/auth/Registration.js index 408d97382c..630e04da9c 100644 --- a/src/components/structures/auth/Registration.js +++ b/src/components/structures/auth/Registration.js @@ -124,6 +124,7 @@ export default class Registration extends React.Component { } // TODO: [REACT-WARNING] Replace with appropriate lifecycle event + // eslint-disable-next-line camelcase UNSAFE_componentWillReceiveProps(newProps) { if (newProps.serverConfig.hsUrl === this.props.serverConfig.hsUrl && newProps.serverConfig.isUrl === this.props.serverConfig.isUrl) return; diff --git a/src/components/views/auth/RegistrationForm.js b/src/components/views/auth/RegistrationForm.js index bd10c829e3..ca3e30bf41 100644 --- a/src/components/views/auth/RegistrationForm.js +++ b/src/components/views/auth/RegistrationForm.js @@ -38,7 +38,7 @@ const FIELD_PASSWORD_CONFIRM = 'field_password_confirm'; const PASSWORD_MIN_SCORE = 3; // safely unguessable: moderate protection from offline slow-hash scenario. -/** +/* * A pure UI component which displays a registration form. */ export default class RegistrationForm extends React.Component { diff --git a/src/components/views/dialogs/BaseDialog.js b/src/components/views/dialogs/BaseDialog.js index 55760e54fc..9ba5368ee5 100644 --- a/src/components/views/dialogs/BaseDialog.js +++ b/src/components/views/dialogs/BaseDialog.js @@ -27,7 +27,7 @@ import {MatrixClientPeg} from '../../../MatrixClientPeg'; import { _t } from "../../../languageHandler"; import MatrixClientContext from "../../../contexts/MatrixClientContext"; -/** +/* * Basic container for modal dialogs. * * Includes a div for the title, and a keypress handler which cancels the diff --git a/src/components/views/dialogs/SetEmailDialog.js b/src/components/views/dialogs/SetEmailDialog.js index 75a6a74352..6514d94dc9 100644 --- a/src/components/views/dialogs/SetEmailDialog.js +++ b/src/components/views/dialogs/SetEmailDialog.js @@ -24,7 +24,7 @@ import { _t } from '../../../languageHandler'; import Modal from '../../../Modal'; -/** +/* * Prompt the user to set an email address. * * On success, `onFinished(true)` is called. diff --git a/src/components/views/dialogs/SetMxIdDialog.js b/src/components/views/dialogs/SetMxIdDialog.js index c580575f1a..090def5e54 100644 --- a/src/components/views/dialogs/SetMxIdDialog.js +++ b/src/components/views/dialogs/SetMxIdDialog.js @@ -28,7 +28,7 @@ import { SAFE_LOCALPART_REGEX } from '../../../Registration'; // sending a request to the server const USERNAME_CHECK_DEBOUNCE_MS = 250; -/** +/* * Prompt the user to set a display name. * * On success, `onFinished(true, newDisplayName)` is called. diff --git a/src/components/views/elements/EditableText.js b/src/components/views/elements/EditableText.js index 5a2c042b83..e28fcffbf8 100644 --- a/src/components/views/elements/EditableText.js +++ b/src/components/views/elements/EditableText.js @@ -72,6 +72,7 @@ export default class EditableText extends React.Component { }; // TODO: [REACT-WARNING] Replace with appropriate lifecycle event + // eslint-disable-next-line camelcase UNSAFE_componentWillReceiveProps(nextProps) { if (nextProps.initialValue !== this.props.initialValue) { this.value = nextProps.initialValue; @@ -214,7 +215,9 @@ export default class EditableText extends React.Component { const {className, editable, initialValue, label, labelClassName} = this.props; let editableEl; - if (!editable || (this.state.phase === EditableText.Phases.Display && (label || labelClassName) && !this.value)) { + if (!editable || (this.state.phase === EditableText.Phases.Display && + (label || labelClassName) && !this.value) + ) { // show the label editableEl =