Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 7ec1d5a

Browse files
committed
Fix a bunch of silly lint errors
At some point the script to generate .eslintignore.errorfiles had been run and added all these files to the ignore list, often because they lacked a space before a brace or something equally mundane. These are the easiest bunch.
1 parent f38a8dc commit 7ec1d5a

File tree

16 files changed

+79
-58
lines changed

16 files changed

+79
-58
lines changed

.eslintignore.errorfiles

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,10 @@ src/Rooms.js
55
src/Unread.js
66
src/Velociraptor.js
77
src/components/structures/RoomDirectory.js
8-
src/components/structures/ScrollPanel.js
9-
src/components/structures/UploadBar.js
10-
src/components/views/elements/AddressSelector.js
11-
src/components/views/elements/DirectorySearchBox.js
12-
src/components/views/messages/MFileBody.js
13-
src/components/views/messages/TextualBody.js
14-
src/components/views/rooms/LinkPreviewWidget.js
158
src/components/views/rooms/MemberList.js
16-
src/components/views/rooms/RoomPreviewBar.js
17-
src/components/views/settings/ChangeAvatar.js
18-
src/components/views/settings/DevicesPanel.js
19-
src/components/views/settings/Notifications.js
20-
src/rageshake/rageshake.js
219
src/ratelimitedfunc.js
2210
src/utils/DMRoomMap.js
23-
src/utils/DecryptFile.js
24-
src/utils/DirectoryUtils.js
2511
src/utils/MultiInviter.js
26-
src/utils/Receipt.js
2712
test/components/structures/MessagePanel-test.js
2813
test/components/views/dialogs/InteractiveAuthDialog-test.js
2914
test/mock-clock.js

src/components/structures/ScrollPanel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,7 @@ export default class ScrollPanel extends React.Component {
704704
if (itemlist.style.height !== newHeight) {
705705
itemlist.style.height = newHeight;
706706
}
707-
if (sn.scrollTop !== sn.scrollHeight){
707+
if (sn.scrollTop !== sn.scrollHeight) {
708708
sn.scrollTop = sn.scrollHeight;
709709
}
710710
debuglog("updateHeight to", newHeight);

src/components/structures/UploadBar.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ export default class UploadBar extends React.Component {
8686
}
8787

8888
// MUST use var name 'count' for pluralization to kick in
89-
const uploadText = _t("Uploading %(filename)s and %(count)s others", {filename: upload.fileName, count: (uploads.length - 1)});
89+
const uploadText = _t(
90+
"Uploading %(filename)s and %(count)s others", {filename: upload.fileName, count: (uploads.length - 1)},
91+
);
9092

9193
return (
9294
<div className="mx_UploadBar">

src/components/views/elements/AddressSelector.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export default class AddressSelector extends React.Component {
4646
}
4747

4848
// TODO: [REACT-WARNING] Replace with appropriate lifecycle event
49-
UNSAFE_componentWillReceiveProps(props) {
49+
UNSAFE_componentWillReceiveProps(props) { // eslint-disable-line camelcase
5050
// Make sure the selected item isn't outside the list bounds
5151
const selected = this.state.selected;
5252
const maxSelected = this._maxSelected(props.addressList);

src/components/views/elements/DirectorySearchBox.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ limitations under the License.
1616

1717
import React from 'react';
1818
import PropTypes from 'prop-types';
19-
import classnames from 'classnames';
2019
import * as sdk from '../../../index';
2120
import { _t } from '../../../languageHandler';
2221

@@ -78,14 +77,14 @@ export default class DirectorySearchBox extends React.Component {
7877
render() {
7978
const AccessibleButton = sdk.getComponent('elements.AccessibleButton');
8079

81-
const searchbox_classes = {
80+
const searchboxClasses = {
8281
mx_DirectorySearchBox: true,
8382
};
84-
searchbox_classes[this.props.className] = true;
83+
searchboxClasses[this.props.className] = true;
8584

86-
let join_button;
85+
let joinButton;
8786
if (this.props.showJoinButton) {
88-
join_button = <AccessibleButton className="mx_DirectorySearchBox_joinButton"
87+
joinButton = <AccessibleButton className="mx_DirectorySearchBox_joinButton"
8988
onClick={this._onJoinButtonClick}
9089
>{_t("Join")}</AccessibleButton>;
9190
}
@@ -97,7 +96,7 @@ export default class DirectorySearchBox extends React.Component {
9796
onChange={this._onChange} onKeyUp={this._onKeyUp}
9897
placeholder={this.props.placeholder} autoFocus
9998
/>
100-
{ join_button }
99+
{ joinButton }
101100
<AccessibleButton className="mx_DirectorySearchBox_clear" onClick={this._onClearClick}></AccessibleButton>
102101
</div>;
103102
}

src/components/views/messages/MFileBody.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ export default class MFileBody extends React.Component {
144144
* Extracts a human readable label for the file attachment to use as
145145
* link text.
146146
*
147-
* @params {Object} content The "content" key of the matrix event.
147+
* @param {Object} content The "content" key of the matrix event.
148148
* @return {string} the human readable link text for the attachment.
149149
*/
150150
presentableTextForFile(content) {

src/components/views/messages/TextualBody.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,9 @@ export default class TextualBody extends React.Component {
416416
if (this.props.highlightLink) {
417417
body = <a href={this.props.highlightLink}>{ body }</a>;
418418
} else if (content.data && typeof content.data["org.matrix.neb.starter_link"] === "string") {
419-
body = <a href="#" onClick={this.onStarterLinkClick.bind(this, content.data["org.matrix.neb.starter_link"])}>{ body }</a>;
419+
body = <a href="#"
420+
onClick={this.onStarterLinkClick.bind(this, content.data["org.matrix.neb.starter_link"])}
421+
>{ body }</a>;
420422
}
421423

422424
let widgets;

src/components/views/rooms/LinkPreviewWidget.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,10 @@ export default class LinkPreviewWidget extends React.Component {
114114

115115
let thumbHeight = imageMaxHeight;
116116
if (p["og:image:width"] && p["og:image:height"]) {
117-
thumbHeight = ImageUtils.thumbHeight(p["og:image:width"], p["og:image:height"], imageMaxWidth, imageMaxHeight);
117+
thumbHeight = ImageUtils.thumbHeight(
118+
p["og:image:width"], p["og:image:height"],
119+
imageMaxWidth, imageMaxHeight,
120+
);
118121
}
119122

120123
let img;

src/components/views/rooms/RoomPreviewBar.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ export default class RoomPreviewBar extends React.Component {
284284
room_name: this.props.oobData ? this.props.oobData.room_name : null,
285285
room_avatar_url: this.props.oobData ? this.props.oobData.avatarUrl : null,
286286
inviter_name: this.props.oobData ? this.props.oobData.inviterName : null,
287-
}
287+
},
288288
};
289289
}
290290

@@ -337,7 +337,7 @@ export default class RoomPreviewBar extends React.Component {
337337
if (this.props.previewLoading) {
338338
footer = (
339339
<div>
340-
<Spinner w={20} h={20}/>
340+
<Spinner w={20} h={20} />
341341
{_t("Loading room preview")}
342342
</div>
343343
);

src/components/views/settings/ChangeAvatar.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import PropTypes from 'prop-types';
1919
import {MatrixClientPeg} from "../../../MatrixClientPeg";
2020
import * as sdk from '../../../index';
2121
import { _t } from '../../../languageHandler';
22+
import Spinner from '../elements/Spinner';
2223

2324
export default class ChangeAvatar extends React.Component {
2425
static propTypes = {
@@ -58,7 +59,7 @@ export default class ChangeAvatar extends React.Component {
5859
}
5960

6061
// TODO: [REACT-WARNING] Replace with appropriate lifecycle event
61-
UNSAFE_componentWillReceiveProps(newProps) {
62+
UNSAFE_componentWillReceiveProps(newProps) { // eslint-disable-line camelcase
6263
if (this.avatarSet) {
6364
// don't clobber what the user has just set
6465
return;
@@ -143,7 +144,9 @@ export default class ChangeAvatar extends React.Component {
143144
// time to propagate through to the RoomAvatar.
144145
if (this.props.room && !this.avatarSet) {
145146
const RoomAvatar = sdk.getComponent('avatars.RoomAvatar');
146-
avatarImg = <RoomAvatar room={this.props.room} width={this.props.width} height={this.props.height} resizeMethod='crop' />;
147+
avatarImg = <RoomAvatar
148+
room={this.props.room} width={this.props.width} height={this.props.height} resizeMethod='crop'
149+
/>;
147150
} else {
148151
const BaseAvatar = sdk.getComponent("avatars.BaseAvatar");
149152
// XXX: FIXME: once we track in the JS what our own displayname is(!) then use it here rather than ?
@@ -174,9 +177,8 @@ export default class ChangeAvatar extends React.Component {
174177
</div>
175178
);
176179
case ChangeAvatar.Phases.Uploading:
177-
var Loader = sdk.getComponent("elements.Spinner");
178180
return (
179-
<Loader />
181+
<Spinner />
180182
);
181183
}
182184
}

0 commit comments

Comments
 (0)