Prepare for eslint 4

This commit is contained in:
Lyubo Marinov 2017-06-14 19:40:51 -05:00
parent c8c44d62ed
commit 25ec8ac6a7
23 changed files with 148 additions and 146 deletions

View File

@ -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(

View File

@ -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'];

View File

@ -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);

View File

@ -16,7 +16,8 @@ MiddlewareRegistry.register(store => next => action => {
switch (action.type) {
case UPDATE_DIAL_IN_NUMBERS_FAILED:
logger.error('Error encountered while fetching dial-in numbers:',
logger.error(
'Error encountered while fetching dial-in numbers:',
action.error);
break;
}

View File

@ -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}`));
}
}

View File

@ -130,8 +130,7 @@ class ReloadTimer extends Component {
componentDidUpdate() {
AJS.progressBars.update(
'#reloadProgressBar',
Math.abs(this.state.current - this.props.start)
/ this.state.time);
Math.abs(this.state.current - this.props.start) / this.state.time);
}
/**

View File

@ -74,7 +74,8 @@ class RemoteControlAuthorizationDialog extends Component {
titleKey = 'dialog.remoteControlTitle'
width = 'small'>
{
this.props.t('dialog.remoteControlRequestMessage',
this.props.t(
'dialog.remoteControlRequestMessage',
{ user: this.props._displayName })
}
{
@ -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 : _displayName