Fix a bunch of linting errors

eslint --fix and a few manual ones
This commit is contained in:
David Baker 2017-01-20 14:22:27 +00:00
parent 4ba224aac3
commit 18d4d3392a
107 changed files with 290 additions and 290 deletions

View file

@ -49,7 +49,7 @@ module.exports = React.createClass({
return {
avatarUrl: this.props.initialAvatarUrl,
phase: this.Phases.Display,
}
};
},
componentWillReceiveProps: function(newProps) {
@ -120,7 +120,7 @@ module.exports = React.createClass({
var BaseAvatar = sdk.getComponent("avatars.BaseAvatar");
// XXX: FIXME: once we track in the JS what our own displayname is(!) then use it here rather than ?
avatarImg = <BaseAvatar width={this.props.width} height={this.props.height} resizeMethod='crop'
name='?' idName={ MatrixClientPeg.get().getUserIdLocalpart() } url={this.state.avatarUrl} />
name='?' idName={ MatrixClientPeg.get().getUserIdLocalpart() } url={this.state.avatarUrl} />;
}
var uploadSection;
@ -130,7 +130,7 @@ module.exports = React.createClass({
Upload new:
<input type="file" onChange={this.onFileSelected}/>
{this.state.errorText}
</div>
</div>
);
}

View file

@ -59,7 +59,7 @@ module.exports = React.createClass({
getInitialState: function() {
return {
phase: this.Phases.Edit
}
};
},
changePassword: function(old_password, new_password) {
@ -105,7 +105,7 @@ module.exports = React.createClass({
render: function() {
var rowClassName = this.props.rowClassName;
var rowLabelClassName = this.props.rowLabelClassName;
var rowInputClassName = this.props.rowInputClassName
var rowInputClassName = this.props.rowInputClassName;
var buttonClassName = this.props.buttonClassName;
switch (this.state.phase) {

View file

@ -88,7 +88,7 @@ export default class DevicesPanel extends React.Component {
const removed_id = device.device_id;
this.setState((state, props) => {
const newDevices = state.devices.filter(
d => { return d.device_id != removed_id }
d => { return d.device_id != removed_id; }
);
return { devices: newDevices };
});
@ -98,7 +98,7 @@ export default class DevicesPanel extends React.Component {
var DevicesPanelEntry = sdk.getComponent('settings.DevicesPanelEntry');
return (
<DevicesPanelEntry key={device.device_id} device={device}
onDeleted={()=>{this._onDeviceDeleted(device)}} />
onDeleted={()=>{this._onDeviceDeleted(device);}} />
);
}

View file

@ -15,12 +15,9 @@ limitations under the License.
*/
import React from 'react';
import classNames from 'classnames';
import q from 'q';
import sdk from '../../../index';
import MatrixClientPeg from '../../../MatrixClientPeg';
import DateUtils from '../../../DateUtils';
import Modal from '../../../Modal';
export default class DevicesPanelEntry extends React.Component {
@ -61,7 +58,7 @@ export default class DevicesPanelEntry extends React.Component {
if (this._unmounted) { return; }
if (error.httpStatus !== 401 || !error.data || !error.data.flows) {
// doesn't look like an interactive-auth failure
throw e;
throw error;
}
// pop up an interactive auth dialog
@ -121,7 +118,7 @@ export default class DevicesPanelEntry extends React.Component {
let deleteButton;
if (this.state.deleteError) {
deleteButton = <div className="error">{this.state.deleteError}</div>
deleteButton = <div className="error">{this.state.deleteError}</div>;
} else {
deleteButton = (
<div className="mx_textButton"

View file

@ -17,7 +17,6 @@ limitations under the License.
'use strict';
var React = require("react");
var Notifier = require("../../../Notifier");
var sdk = require('../../../index');
var dis = require("../../../dispatcher");
module.exports = React.createClass({