From b9379576094129ffee02b596fd3daaa93b043c73 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Sat, 1 Jul 2017 14:40:46 +0100 Subject: [PATCH] de-lint createRoom Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- .eslintignore.errorfiles | 1 - src/createRoom.js | 22 +++++++++++----------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/.eslintignore.errorfiles b/.eslintignore.errorfiles index 661cdebf41..1814d7ee83 100644 --- a/.eslintignore.errorfiles +++ b/.eslintignore.errorfiles @@ -116,7 +116,6 @@ src/components/views/voip/IncomingCallBox.js src/components/views/voip/VideoFeed.js src/components/views/voip/VideoView.js src/ContentMessages.js -src/createRoom.js src/DateUtils.js src/email.js src/extend.js diff --git a/src/createRoom.js b/src/createRoom.js index ce83f31c27..8aa15f315b 100644 --- a/src/createRoom.js +++ b/src/createRoom.js @@ -14,24 +14,24 @@ See the License for the specific language governing permissions and limitations under the License. */ -var MatrixClientPeg = require('./MatrixClientPeg'); -var Modal = require('./Modal'); -var sdk = require('./index'); +import MatrixClientPeg from './MatrixClientPeg'; +import Modal from './Modal'; +import sdk from './index'; import { _t } from './languageHandler'; -var dis = require("./dispatcher"); -var Rooms = require("./Rooms"); +import dis from "./dispatcher"; +import Rooms from "./Rooms"; -var q = require('q'); +import q from 'q'; /** * Create a new room, and switch to it. * - * Returns a promise which resolves to the room id, or null if the - * action was aborted or failed. - * * @param {object=} opts parameters for creating the room * @param {string=} opts.dmUserId If specified, make this a DM room for this user and invite them * @param {object=} opts.createOpts set of options to pass to createRoom call. + * + * @returns {Promise} which resolves to the room id, or null if the + * action was aborted or failed. */ function createRoom(opts) { opts = opts || {}; @@ -69,11 +69,11 @@ function createRoom(opts) { createOpts.initial_state = createOpts.initial_state || [ { content: { - guest_access: 'can_join' + guest_access: 'can_join', }, type: 'm.room.guest_access', state_key: '', - } + }, ]; const modal = Modal.createDialog(Loader, null, 'mx_Dialog_spinner');