Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
Prepare for eslint 4
Lyubo Marinov25ec8ac6a779
diff --git a/modules/UI/side_pannels/chat/Chat.js b/modules/UI/side_pannels/chat/Chat.jsindex d2556fa662..6b1a643c7f 100644--- a/modules/UI/side_pannels/chat/Chat.js+++ b/modules/UI/side_pannels/chat/Chat.js@@ -304,7 +304,7 @@ var Chat = {$('#chatconversation').append('<div class="errorMessage"><b>Error: </b>' + 'Your message' +- (originalText? (' \"'+ originalText + '\"') : "") ++ (originalText? (` "${originalText}"`) : "") +' was not sent.' +(errorMessage? (' Reason: ' + errorMessage) : '') + '</div>');$('#chatconversation').animate(diff --git a/react/features/app/functions.native.js b/react/features/app/functions.native.jsindex 1eb7b67205..cbb4aacb8c 100644--- a/react/features/app/functions.native.js+++ b/react/features/app/functions.native.js@@ -44,16 +44,16 @@ function _fixURIStringHierPart(uri) {// hipchat.comlet regex= new RegExp(- `^${_URI_PROTOCOL_PATTERN}//hipchat\\.com/video/call/`,- 'gi');+ `^${_URI_PROTOCOL_PATTERN}//hipchat\\.com/video/call/`,+ 'gi');let match = regex.exec(uri);if (!match) {// enso.meregex= new RegExp(- `^${_URI_PROTOCOL_PATTERN}//enso\\.me/(?:call|meeting)/`,- 'gi');+ `^${_URI_PROTOCOL_PATTERN}//enso\\.me/(?:call|meeting)/`,+ 'gi');match = regex.exec(uri);}if (match) {diff --git a/react/features/base/conference/actions.js b/react/features/base/conference/actions.jsindex 1e1c29fcb7..83fbd643de 100644--- a/react/features/base/conference/actions.js+++ b/react/features/base/conference/actions.js@@ -47,70 +47,70 @@ function _addConferenceListeners(conference, dispatch) {// Dispatches into features/base/conference follow:conference.on(- JitsiConferenceEvents.CONFERENCE_FAILED,- (...args) => dispatch(conferenceFailed(conference, ...args)));+ JitsiConferenceEvents.CONFERENCE_FAILED,+ (...args) => dispatch(conferenceFailed(conference, ...args)));conference.on(- JitsiConferenceEvents.CONFERENCE_JOINED,- (...args) => dispatch(conferenceJoined(conference, ...args)));+ JitsiConferenceEvents.CONFERENCE_JOINED,+ (...args) => dispatch(conferenceJoined(conference, ...args)));conference.on(- JitsiConferenceEvents.CONFERENCE_LEFT,- (...args) => dispatch(conferenceLeft(conference, ...args)));+ JitsiConferenceEvents.CONFERENCE_LEFT,+ (...args) => dispatch(conferenceLeft(conference, ...args)));conference.on(- JitsiConferenceEvents.LOCK_STATE_CHANGED,- (...args) => dispatch(lockStateChanged(conference, ...args)));+ JitsiConferenceEvents.LOCK_STATE_CHANGED,+ (...args) => dispatch(lockStateChanged(conference, ...args)));// Dispatches into features/base/tracks follow:conference.on(- JitsiConferenceEvents.TRACK_ADDED,- t => t && !t.isLocal() && dispatch(trackAdded(t)));+ JitsiConferenceEvents.TRACK_ADDED,+ t => t && !t.isLocal() && dispatch(trackAdded(t)));conference.on(- JitsiConferenceEvents.TRACK_REMOVED,- t => t && !t.isLocal() && dispatch(trackRemoved(t)));+ JitsiConferenceEvents.TRACK_REMOVED,+ t => t && !t.isLocal() && dispatch(trackRemoved(t)));// Dispatches into features/base/participants follow:conference.on(- JitsiConferenceEvents.DOMINANT_SPEAKER_CHANGED,- (...args) => dispatch(dominantSpeakerChanged(...args)));+ JitsiConferenceEvents.DOMINANT_SPEAKER_CHANGED,+ (...args) => dispatch(dominantSpeakerChanged(...args)));conference.on(- JitsiConferenceEvents.PARTICIPANT_CONN_STATUS_CHANGED,- (...args) => dispatch(participantConnectionStatusChanged(...args)));+ JitsiConferenceEvents.PARTICIPANT_CONN_STATUS_CHANGED,+ (...args) => dispatch(participantConnectionStatusChanged(...args)));conference.on(- JitsiConferenceEvents.USER_JOINED,- (id, user) => dispatch(participantJoined({- id,- name: user.getDisplayName(),- role: user.getRole()- })));+ JitsiConferenceEvents.USER_JOINED,+ (id, user) => dispatch(participantJoined({+ id,+ name: user.getDisplayName(),+ role: user.getRole()+ })));conference.on(- JitsiConferenceEvents.USER_LEFT,- (...args) => dispatch(participantLeft(...args)));+ JitsiConferenceEvents.USER_LEFT,+ (...args) => dispatch(participantLeft(...args)));conference.on(- JitsiConferenceEvents.USER_ROLE_CHANGED,- (...args) => dispatch(participantRoleChanged(...args)));+ JitsiConferenceEvents.USER_ROLE_CHANGED,+ (...args) => dispatch(participantRoleChanged(...args)));conference.addCommandListener(- AVATAR_ID_COMMAND,- (data, id) => dispatch(participantUpdated({- id,- avatarID: data.value- })));+ AVATAR_ID_COMMAND,+ (data, id) => dispatch(participantUpdated({+ id,+ avatarID: data.value+ })));conference.addCommandListener(- AVATAR_URL_COMMAND,- (data, id) => dispatch(participantUpdated({- id,- avatarURL: data.value- })));+ AVATAR_URL_COMMAND,+ (data, id) => dispatch(participantUpdated({+ id,+ avatarURL: data.value+ })));conference.addCommandListener(- EMAIL_COMMAND,- (data, id) => dispatch(participantUpdated({- id,- email: data.value- })));+ EMAIL_COMMAND,+ (data, id) => dispatch(participantUpdated({+ id,+ email: data.value+ })));}/**diff --git a/react/features/base/connection/actions.native.js b/react/features/base/connection/actions.native.jsindex 285b9f7eea..efa36dbcd5 100644--- a/react/features/base/connection/actions.native.js+++ b/react/features/base/connection/actions.native.js@@ -40,14 +40,14 @@ export function connect() {});connection.addEventListener(- JitsiConnectionEvents.CONNECTION_DISCONNECTED,- _onConnectionDisconnected);+ JitsiConnectionEvents.CONNECTION_DISCONNECTED,+ _onConnectionDisconnected);connection.addEventListener(- JitsiConnectionEvents.CONNECTION_ESTABLISHED,- _onConnectionEstablished);+ JitsiConnectionEvents.CONNECTION_ESTABLISHED,+ _onConnectionEstablished);connection.addEventListener(- JitsiConnectionEvents.CONNECTION_FAILED,- _onConnectionFailed);+ JitsiConnectionEvents.CONNECTION_FAILED,+ _onConnectionFailed);connection.connect();@@ -61,8 +61,8 @@ export function connect() {*/function _onConnectionDisconnected(message: string) {connection.removeEventListener(- JitsiConnectionEvents.CONNECTION_DISCONNECTED,- _onConnectionDisconnected);+ JitsiConnectionEvents.CONNECTION_DISCONNECTED,+ _onConnectionDisconnected);dispatch(_connectionDisconnected(connection, message));}@@ -99,11 +99,11 @@ export function connect() {*/function unsubscribe() {connection.removeEventListener(- JitsiConnectionEvents.CONNECTION_ESTABLISHED,- _onConnectionEstablished);+ JitsiConnectionEvents.CONNECTION_ESTABLISHED,+ _onConnectionEstablished);connection.removeEventListener(- JitsiConnectionEvents.CONNECTION_FAILED,- _onConnectionFailed);+ JitsiConnectionEvents.CONNECTION_FAILED,+ _onConnectionFailed);}};}diff --git a/react/features/base/connection/actions.web.js b/react/features/base/connection/actions.web.jsindex 422d9b5734..2d4f953f0e 100644--- a/react/features/base/connection/actions.web.js+++ b/react/features/base/connection/actions.web.js@@ -67,8 +67,8 @@ export function connect() {APP.UI.initConference();APP.UI.addListener(- UIEvents.LANG_CHANGED,- language => APP.translation.setLanguage(language));+ UIEvents.LANG_CHANGED,+ language => APP.translation.setLanguage(language));APP.keyboardshortcut.init();diff --git a/react/features/base/i18n/functions.js b/react/features/base/i18n/functions.jsindex 8f9765b847..c69b0d7804 100644--- a/react/features/base/i18n/functions.js+++ b/react/features/base/i18n/functions.js@@ -12,7 +12,7 @@ export function translate(component) {// Use the default list of namespaces.return (reactI18nextTranslate([ 'main', 'languages' ], { wait: true })(- component));+ component));}/**diff --git a/react/features/base/i18n/i18next.js b/react/features/base/i18n/i18next.jsindex f1e571eb74..7809494461 100644--- a/react/features/base/i18n/i18next.js+++ b/react/features/base/i18n/i18next.js@@ -48,16 +48,16 @@ i18next// Add default language which is preloaded from the source code.i18next.addResourceBundle(- DEFAULT_LANGUAGE,- 'main',- MAIN_RESOURCES,- /* deep */ true,- /* overwrite */ true);+ DEFAULT_LANGUAGE,+ 'main',+ MAIN_RESOURCES,+ /* deep */ true,+ /* overwrite */ true);i18next.addResourceBundle(- DEFAULT_LANGUAGE,- 'languages',- LANGUAGES_RESOURCES,- /* deep */ true,- /* overwrite */ true);+ DEFAULT_LANGUAGE,+ 'languages',+ LANGUAGES_RESOURCES,+ /* deep */ true,+ /* overwrite */ true);export default i18next;diff --git a/react/features/base/i18n/middleware.js b/react/features/base/i18n/middleware.jsindex 349e900364..adf5257258 100644--- a/react/features/base/i18n/middleware.js+++ b/react/features/base/i18n/middleware.js@@ -35,7 +35,7 @@ MiddlewareRegistry.register(store => next => action => {* @returns {Object} The new state that is the result of the reduction of the* specified action.*/-function _setConfig({ dispatch, getState }, next, action) {+function _setConfig({ getState }, next, action) {const oldValue = getState()['features/base/config'];const result = next(action);const newValue = getState()['features/base/config'];diff --git a/react/features/base/lib-jitsi-meet/native/polyfills-browser.js b/react/features/base/lib-jitsi-meet/native/polyfills-browser.jsindex a2a80d567f..9bde778e19 100644--- a/react/features/base/lib-jitsi-meet/native/polyfills-browser.js+++ b/react/features/base/lib-jitsi-meet/native/polyfills-browser.js@@ -120,8 +120,8 @@ function _visitNode(node, callback) {if (typeof global.document === 'undefined') {const document= new DOMParser().parseFromString(- '<html><head></head><body></body></html>',- 'text/xml');+ '<html><head></head><body></body></html>',+ 'text/xml');// document.addEventListener//@@ -181,8 +181,8 @@ function _visitNode(node, callback) {// Parse the content string.const d= new DOMParser().parseFromString(- `<div>${innerHTML}</div>`,- 'text/xml');+ `<div>${innerHTML}</div>`,+ 'text/xml');// Assign the resulting nodes as children of the// element.@@ -353,8 +353,8 @@ function _visitNode(node, callback) {if (responseText) {responseXML= new DOMParser().parseFromString(- responseText,- 'text/xml');+ responseText,+ 'text/xml');}return responseXML;diff --git a/react/features/base/react/RouteRegistry.js b/react/features/base/react/RouteRegistry.jsindex 58d9b0c3ac..b768027a44 100644--- a/react/features/base/react/RouteRegistry.js+++ b/react/features/base/react/RouteRegistry.js@@ -76,7 +76,7 @@ class RouteRegistry {});}-/* eslint-disable no-undef */+ /* eslint-disable no-undef *//*** Returns registered route by name if any.@@ -87,7 +87,7 @@ class RouteRegistry {*/getRouteByComponent(component: Class<Component<*>>) {-/* eslint-enable no-undef */+ /* eslint-enable no-undef */const route = this._elements.find(r => r.component === component);@@ -106,7 +106,7 @@ class RouteRegistry {register(route: Route) {if (this._elements.includes(route)) {throw new Error(- `Route ${String(route.component)} is registered already!`);+ `Route ${String(route.component)} is registered already!`);}this._elements.push(route);diff --git a/react/features/conference/components/Conference.native.js b/react/features/conference/components/Conference.native.jsindex 0ac9c4e3eb..6f2ff2f158 100644--- a/react/features/conference/components/Conference.native.js+++ b/react/features/conference/components/Conference.native.js@@ -277,4 +277,4 @@ function _mapStateToProps(state) {}export default reactReduxConnect(_mapStateToProps, _mapDispatchToProps)(- Conference);+ Conference);diff --git a/react/features/device-selection/components/DeviceSelectionDialog.js b/react/features/device-selection/components/DeviceSelectionDialog.jsindex c2e8ef30de..c393a2ceae 100644--- a/react/features/device-selection/components/DeviceSelectionDialog.js+++ b/react/features/device-selection/components/DeviceSelectionDialog.js@@ -22,7 +22,7 @@ class DeviceSelectionDialog extends Component {* @static*/static propTypes = {- /**+ /*** All known audio and video devices split by type. This prop comes from* the app state.*/diff --git a/react/features/device-selection/components/DeviceSelectionDialogBase.js b/react/features/device-selection/components/DeviceSelectionDialogBase.jsindex 9994b58bfa..91d6c6afa8 100644--- a/react/features/device-selection/components/DeviceSelectionDialogBase.js+++ b/react/features/device-selection/components/DeviceSelectionDialogBase.js@@ -21,7 +21,7 @@ class DeviceSelectionDialogBase extends Component {* @static*/static propTypes = {- /**+ /*** All known audio and video devices split by type. This prop comes from* the app state.*/diff --git a/react/features/invite/middleware.js b/react/features/invite/middleware.jsindex 531f61efc9..e6a29a3486 100644--- a/react/features/invite/middleware.js+++ b/react/features/invite/middleware.js@@ -16,8 +16,9 @@ MiddlewareRegistry.register(store => next => action => {switch (action.type) {case UPDATE_DIAL_IN_NUMBERS_FAILED:- logger.error('Error encountered while fetching dial-in numbers:',- action.error);+ logger.error(+ 'Error encountered while fetching dial-in numbers:',+ action.error);break;}diff --git a/react/features/jwt/middleware.js b/react/features/jwt/middleware.jsindex c838227512..e719fdf864 100644--- a/react/features/jwt/middleware.js+++ b/react/features/jwt/middleware.js@@ -100,9 +100,9 @@ function _maybeSetCallOverlayVisible({ dispatch, getState }, next, action) {callOverlayVisible= Boolean(- participants- && participants.length === 1- && participants[0].local);+ participants+ && participants.length === 1+ && participants[0].local);// However, the CallDialog is not to be displayed/visible again// after all remote participants leave.diff --git a/react/features/large-video/actions.js b/react/features/large-video/actions.jsindex 22403f436f..7301e5e84c 100644--- a/react/features/large-video/actions.js+++ b/react/features/large-video/actions.js@@ -24,15 +24,15 @@ export function selectParticipant() {const id = largeVideo.participantId;const videoTrack= getTrackByMediaTypeAndParticipant(- tracks,- MEDIA_TYPE.VIDEO,- id);+ tracks,+ MEDIA_TYPE.VIDEO,+ id);try {conference.selectParticipant(- videoTrack && videoTrack.videoType === VIDEO_TYPE.CAMERA- ? id- : null);+ videoTrack && videoTrack.videoType === VIDEO_TYPE.CAMERA+ ? id+ : null);} catch (err) {_handleParticipantError(err);}diff --git a/react/features/mobile/audio-mode/middleware.js b/react/features/mobile/audio-mode/middleware.jsindex 25a262fd71..ec9b59cf0d 100644--- a/react/features/mobile/audio-mode/middleware.js+++ b/react/features/mobile/audio-mode/middleware.js@@ -55,8 +55,7 @@ MiddlewareRegistry.register(store => next => action => {AudioMode.setMode(mode).catch(err =>console.error(- `Failed to set audio mode ${String(mode)}: `- + `${err}`));+ `Failed to set audio mode ${String(mode)}: ${err}`));}}diff --git a/react/features/mobile/background/middleware.js b/react/features/mobile/background/middleware.jsindex 19c40a128b..79cf0c0e21 100644--- a/react/features/mobile/background/middleware.js+++ b/react/features/mobile/background/middleware.js@@ -52,8 +52,8 @@ MiddlewareRegistry.register(store => next => action => {case APP_WILL_MOUNT:store.dispatch(- _setAppStateListener(- _onAppStateChange.bind(undefined, store.dispatch)));+ _setAppStateListener(+ _onAppStateChange.bind(undefined, store.dispatch)));break;case APP_WILL_UNMOUNT:diff --git a/react/features/overlay/components/AbstractPageReloadOverlay.js b/react/features/overlay/components/AbstractPageReloadOverlay.jsindex 9e00fa1333..1e713c1de2 100644--- a/react/features/overlay/components/AbstractPageReloadOverlay.js+++ b/react/features/overlay/components/AbstractPageReloadOverlay.js@@ -133,34 +133,34 @@ export default class AbstractPageReloadOverlay extends Component {// sent to the backed.// FIXME: We should dispatch action for this.APP.conference.logEvent(- 'page.reload',- /* value */ undefined,- /* label */ this.props.reason);+ 'page.reload',+ /* value */ undefined,+ /* label */ this.props.reason);logger.info(- `The conference will be reloaded after ${- this.state.timeoutSeconds} seconds.`);+ `The conference will be reloaded after ${+ this.state.timeoutSeconds} seconds.`);AJS.progressBars.update('#reloadProgressBar', 0);this._interval= setInterval(- () => {- if (this.state.timeLeft === 0) {- if (this._interval) {- clearInterval(this._interval);- this._interval = undefined;- }-- this.props.dispatch(_reloadNow());- } else {- this.setState(prevState => {- return {- timeLeft: prevState.timeLeft - 1- };- });+ () => {+ if (this.state.timeLeft === 0) {+ if (this._interval) {+ clearInterval(this._interval);+ this._interval = undefined;}- },- 1000);++ this.props.dispatch(_reloadNow());+ } else {+ this.setState(prevState => {+ return {+ timeLeft: prevState.timeLeft - 1+ };+ });+ }+ },+ 1000);}/**diff --git a/react/features/overlay/components/ReloadTimer.js b/react/features/overlay/components/ReloadTimer.jsindex 8b92408832..f8ca6b1ef9 100644--- a/react/features/overlay/components/ReloadTimer.js+++ b/react/features/overlay/components/ReloadTimer.js@@ -105,19 +105,19 @@ class ReloadTimer extends Component {const intervalId= setInterval(- () => {- if (this.state.current === this.props.end) {- clearInterval(intervalId);- this.props.onFinish();- } else {- this.setState((prevState, props) => {- return {- current: prevState.current + props.step- };- });- }- },- Math.abs(this.props.interval) * 1000);+ () => {+ if (this.state.current === this.props.end) {+ clearInterval(intervalId);+ this.props.onFinish();+ } else {+ this.setState((prevState, props) => {+ return {+ current: prevState.current + props.step+ };+ });+ }+ },+ Math.abs(this.props.interval) * 1000);}/**@@ -129,9 +129,8 @@ class ReloadTimer extends Component {*/componentDidUpdate() {AJS.progressBars.update(- '#reloadProgressBar',- Math.abs(this.state.current - this.props.start)- / this.state.time);+ '#reloadProgressBar',+ Math.abs(this.state.current - this.props.start) / this.state.time);}/**diff --git a/react/features/remote-control/components/RemoteControlAuthorizationDialog.js b/react/features/remote-control/components/RemoteControlAuthorizationDialog.jsindex add7031303..796f7390c0 100644--- a/react/features/remote-control/components/RemoteControlAuthorizationDialog.js+++ b/react/features/remote-control/components/RemoteControlAuthorizationDialog.js@@ -74,8 +74,9 @@ class RemoteControlAuthorizationDialog extends Component {titleKey = 'dialog.remoteControlTitle'width = 'small'>{- this.props.t('dialog.remoteControlRequestMessage',- { user: this.props._displayName })+ this.props.t(+ 'dialog.remoteControlRequestMessage',+ { user: this.props._displayName })}{this._getAdditionalMessage()@@ -153,8 +154,10 @@ class RemoteControlAuthorizationDialog extends Component {*/function _mapStateToProps(state, ownProps) {const { _displayName, participantId } = ownProps;- const participant = getParticipantById(- state['features/base/participants'], participantId);+ const participant+ = getParticipantById(+ state['features/base/participants'],+ participantId);return {_displayName: participant ? participant.name : _displayNamediff --git a/react/features/speaker-stats/components/SpeakerStats.js b/react/features/speaker-stats/components/SpeakerStats.jsindex 414347d8d9..c83d790182 100644--- a/react/features/speaker-stats/components/SpeakerStats.js+++ b/react/features/speaker-stats/components/SpeakerStats.js@@ -91,7 +91,7 @@ class SpeakerStats extends Component {);}- /**+ /*** Update the internal state with the latest speaker stats.** @returns {void}diff --git a/react/features/welcome/components/AbstractWelcomePage.js b/react/features/welcome/components/AbstractWelcomePage.jsindex 78209ca7c7..79df2ed841 100644--- a/react/features/welcome/components/AbstractWelcomePage.js+++ b/react/features/welcome/components/AbstractWelcomePage.js@@ -97,11 +97,11 @@ export class AbstractWelcomePage extends Component {if (word.length > 1) {animateTimeoutId= setTimeout(- () => {- this._animateRoomnameChanging(- word.substring(1, word.length));- },- 70);+ () => {+ this._animateRoomnameChanging(+ word.substring(1, word.length));+ },+ 70);}this.setState({