Lint whitespaces and semis

This commit is contained in:
Jorik Schellekens 2020-07-07 15:40:05 +01:00
parent 8458572032
commit bc4167180c
9 changed files with 43 additions and 44 deletions

View file

@ -93,10 +93,10 @@ const BaseAvatar = (props: IProps) => {
title,
url,
urls,
width=40,
height=40,
resizeMethod="crop", // eslint-disable-line no-unused-vars
defaultToInitialLetter=true,
width = 40,
height = 40,
resizeMethod = "crop", // eslint-disable-line no-unused-vars
defaultToInitialLetter = true,
onClick,
inputRef,
...otherProps
@ -133,7 +133,7 @@ const BaseAvatar = (props: IProps) => {
aria-hidden="true" />
);
if (onClick != null) {
if (onClick !== null) {
return (
<AccessibleButton
{...otherProps}
@ -161,7 +161,7 @@ const BaseAvatar = (props: IProps) => {
}
}
if (onClick != null) {
if (onClick !== null) {
return (
<AccessibleButton
className={classNames("mx_BaseAvatar mx_BaseAvatar_image", props.className)}

View file

@ -19,13 +19,13 @@ import {MatrixClientPeg} from '../../../MatrixClientPeg';
import BaseAvatar from './BaseAvatar';
export interface IProps {
groupId?: string,
groupName?: string,
groupAvatarUrl?: string,
width?: number,
height?: number,
resizeMethod?: string,
onClick?: React.MouseEventHandler,
groupId?: string;
groupName?: string;
groupAvatarUrl?: string;
width?: number;
height?: number;
resizeMethod?: string;
onClick?: React.MouseEventHandler;
}
export default class GroupAvatar extends React.Component<IProps> {

View file

@ -52,7 +52,7 @@ export default class MemberAvatar extends React.Component<IProps, IState> {
constructor(props: IProps) {
super(props);
this.state = MemberAvatar.getState(props)
this.state = MemberAvatar.getState(props);
}
public static getDerivedStateFromProps(nextProps: IProps): IState {

View file

@ -22,7 +22,7 @@ interface IProps {
const PulsedAvatar: React.FC<IProps> = (props) => {
return <div className="mx_PulsedAvatar">
{props.children}
</div>
}
</div>;
};
export default PulsedAvatar;

View file

@ -53,7 +53,7 @@ export default class RoomAvatar extends React.Component<IProps, IState> {
this.state = {
urls: RoomAvatar.getImageUrls(this.props),
}
};
}
public componentDidMount() {
@ -83,7 +83,7 @@ export default class RoomAvatar extends React.Component<IProps, IState> {
this.setState({
urls: RoomAvatar.getImageUrls(this.props),
});
}
};
private static getImageUrls(props: IProps): string[] {
return [
@ -98,7 +98,7 @@ export default class RoomAvatar extends React.Component<IProps, IState> {
), // highest priority
RoomAvatar.getRoomAvatarUrl(props),
].filter(function(url) {
return (url != null && url != "");
return (url !== null && url !== "");
});
}
@ -123,7 +123,7 @@ export default class RoomAvatar extends React.Component<IProps, IState> {
};
Modal.createDialog(ImageView, params, "mx_Dialog_lightbox");
}
};
public render() {
/*eslint no-unused-vars: ["error", { "ignoreRestSiblings": true }]*/