From e716c1738cb037ce88b1f9634cabe57bdfcecc25 Mon Sep 17 00:00:00 2001 From: Ilya Daynatovich Date: Wed, 14 Dec 2016 12:36:42 +0200 Subject: [PATCH] Fix lint errs --- react/features/app/components/App.web.js | 8 +++- .../conference/components/Conference.web.js | 37 ++++++++++++------- 2 files changed, 30 insertions(+), 15 deletions(-) diff --git a/react/features/app/components/App.web.js b/react/features/app/components/App.web.js index e4ba79a202..34cb7c2420 100644 --- a/react/features/app/components/App.web.js +++ b/react/features/app/components/App.web.js @@ -1,4 +1,4 @@ -/* global APP, $ */ +/* global APP, JitsiMeetJS, loggingConfig $ */ import React from 'react'; import { Provider } from 'react-redux'; import { compose } from 'redux'; @@ -19,7 +19,10 @@ import settings from '../../../../modules/settings/Settings'; import URLProcessor from '../../../../modules/config/URLProcessor'; import getTokenData from '../../../../modules/tokendata/TokenData'; import JitsiMeetLogStorage from '../../../../modules/util/JitsiMeetLogStorage'; + +// eslint-disable-next-line max-len import KeyboardShortcut from '../../../../modules/keyboardshortcut/keyboardshortcut'; + const Logger = require('jitsi-meet-logger'); const LogCollector = Logger.LogCollector; @@ -103,7 +106,8 @@ export class App extends AbstractApp { * @returns {void} */ function configureLoggingLevels() { - // NOTE The library Logger is separated from the app loggers, so the levels + // NOTE The library Logger is separated from + // the app loggers, so the levels // have to be set in two places // Set default logging level diff --git a/react/features/conference/components/Conference.web.js b/react/features/conference/components/Conference.web.js index 10fca732bb..70ce7c7254 100644 --- a/react/features/conference/components/Conference.web.js +++ b/react/features/conference/components/Conference.web.js @@ -1,4 +1,5 @@ -/* global APP, $, interfaceConfig */ +/* global APP, $, interfaceConfig, config */ + import React, { Component } from 'react'; import { connect as reactReduxConnect } from 'react-redux'; @@ -10,6 +11,8 @@ import ConferenceUrl from '../../../../modules/URL/ConferenceUrl'; import HttpConfigFetch from '../../../../modules/config/HttpConfigFetch'; import BoshAddressChoice from '../../../../modules/config/BoshAddressChoice'; +const logger = require('jitsi-meet-logger').getLogger(__filename); + /** * For legacy reasons, inline style for display none. * @type {{display: string}} @@ -30,6 +33,7 @@ class Conference extends Component { * @inheritdoc */ componentDidMount() { + /** * If JWT token data it will be used for local user settings. * @@ -39,11 +43,16 @@ class Conference extends Component { const localUser = APP.tokenData.caller; if (localUser) { - APP.settings.setEmail((localUser.getEmail() || '').trim(), true); - APP.settings.setAvatarUrl((localUser.getAvatarUrl() || '').trim()); - APP.settings.setDisplayName((localUser.getName() || '').trim(), true); + const email = localUser.getEmail(); + const avatarUrl = localUser.getAvatarUrl(); + const name = localUser.getName(); + + APP.settings.setEmail((email || '').trim(), true); + APP.settings.setAvatarUrl((avatarUrl || '').trim()); + APP.settings.setDisplayName((name || '').trim(), true); } } + /** * Initialization of the app. * @@ -55,26 +64,28 @@ class Conference extends Component { // Initialize the conference URL handler APP.ConferenceUrl = new ConferenceUrl(window.location); } + /** - * If we have an HTTP endpoint for getting config.json configured we're going to - * read it and override properties from config.js and interfaceConfig.js. - * If there is no endpoint we'll just continue with initialization. - * Keep in mind that if the endpoint has been configured and we fail to obtain - * the config for any reason then the conference won't start and error message - * will be displayed to the user. + * If we have an HTTP endpoint for getting config.json configured + * we're going to read it and override properties from config.js and + * interfaceConfig.js. If there is no endpoint we'll just + * continue with initialization. + * Keep in mind that if the endpoint has been configured and we fail + * to obtain the config for any reason then the conference won't + * start and error message will be displayed to the user. * * @returns {void} */ function obtainConfigAndInit() { - const roomName = APP.conference.roomName; + const room = APP.conference.roomName; if (config.configLocation) { const configFetch = HttpConfigFetch; const location = config.configLocation; - configFetch.obtainConfig(location, roomName, obtainConfigHandler); + configFetch.obtainConfig(location, room, obtainConfigHandler); } else { - BoshAddressChoice.chooseAddress(config, roomName); + BoshAddressChoice.chooseAddress(config, room); init(); } }