From b7b449434dd5859ac8a66a240683766101044ab6 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 15 Aug 2017 09:10:13 +0100 Subject: [PATCH] Lint --- .eslintignore.errorfiles | 1 - .../views/dialogs/UserPickerDialog.js | 18 ++++++++---------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/.eslintignore.errorfiles b/.eslintignore.errorfiles index 55eaf75e4b..2018961854 100644 --- a/.eslintignore.errorfiles +++ b/.eslintignore.errorfiles @@ -33,7 +33,6 @@ src/components/views/create_room/CreateRoomButton.js src/components/views/create_room/Presets.js src/components/views/create_room/RoomAlias.js src/components/views/dialogs/ChatCreateOrReuseDialog.js -src/components/views/dialogs/ChatInviteDialog.js src/components/views/dialogs/DeactivateAccountDialog.js src/components/views/dialogs/InteractiveAuthDialog.js src/components/views/dialogs/SetMxIdDialog.js diff --git a/src/components/views/dialogs/UserPickerDialog.js b/src/components/views/dialogs/UserPickerDialog.js index 5627a814c0..7dc1be7d25 100644 --- a/src/components/views/dialogs/UserPickerDialog.js +++ b/src/components/views/dialogs/UserPickerDialog.js @@ -20,14 +20,10 @@ import PropTypes from 'prop-types'; import { _t } from '../../../languageHandler'; import sdk from '../../../index'; import { getAddressType } from '../../../Invite'; -import createRoom from '../../../createRoom'; import MatrixClientPeg from '../../../MatrixClientPeg'; -import DMRoomMap from '../../../utils/DMRoomMap'; -import Modal from '../../../Modal'; import AccessibleButton from '../elements/AccessibleButton'; import Promise from 'bluebird'; -import dis from '../../../dispatcher'; -import { addressTypes, InviteAddressType } from '../../../Invite.js'; +import { addressTypes } from '../../../Invite.js'; const TRUNCATE_QUERY_LIST = 40; const QUERY_USER_DIRECTORY_DEBOUNCE_MS = 200; @@ -330,7 +326,7 @@ module.exports = React.createClass({ // not like they leak. this._cancelThreepidLookup = function() { cancelled = true; - } + }; // wait a bit to let the user finish typing return Promise.delay(500).then(() => { @@ -362,13 +358,13 @@ module.exports = React.createClass({ const AddressSelector = sdk.getComponent("elements.AddressSelector"); this.scrollElement = null; - let query = []; + const query = []; // create the invite list if (this.state.inviteList.length > 0) { const AddressTile = sdk.getComponent("elements.AddressTile"); for (let i = 0; i < this.state.inviteList.length; i++) { query.push( - + , ); } } @@ -390,7 +386,9 @@ module.exports = React.createClass({ let error; let addressSelector; if (this.state.error) { - error =
{_t("You have entered an invalid contact. Try using their Matrix ID or email address.")}
; + error =
+ {_t("You have entered an invalid contact. Try using their Matrix ID or email address.")} +
; } else if (this.state.searchError) { error =
{this.state.searchError}
; } else if ( @@ -433,5 +431,5 @@ module.exports = React.createClass({ ); - } + }, });