Lint whitespaces and semis
This commit is contained in:
parent
8458572032
commit
bc4167180c
9 changed files with 43 additions and 44 deletions
|
@ -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)}
|
||||
|
|
|
@ -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> {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -22,7 +22,7 @@ interface IProps {
|
|||
const PulsedAvatar: React.FC<IProps> = (props) => {
|
||||
return <div className="mx_PulsedAvatar">
|
||||
{props.children}
|
||||
</div>
|
||||
}
|
||||
</div>;
|
||||
};
|
||||
|
||||
export default PulsedAvatar;
|
|
@ -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 }]*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue