Migrate to stylistic

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski
2024-10-16 16:43:07 +01:00
parent d8052e6a73
commit 6c6bf811a6
124 changed files with 239 additions and 196 deletions

View File

@@ -8,6 +8,8 @@ Please see LICENSE files in the repository root for full details.
import React from "react";
import WarningSvg from "../../../../res/img/warning.svg";
interface IProps {
errorMsg?: string;
}
@@ -16,7 +18,7 @@ const AppWarning: React.FC<IProps> = (props) => {
return (
<div className="mx_AppWarning">
<div>
<img src={require("../../../../res/img/warning.svg").default} alt="" />
<img src={WarningSvg} alt="" />
</div>
<div>
<span>{props.errorMsg || "Error"}</span>

View File

@@ -140,7 +140,7 @@ export default class ReplyChain extends React.Component<IProps, IState> {
const inReplyToEventId = getParentEventId(ev);
if (!inReplyToEventId) return null;
return await this.getEvent(inReplyToEventId);
} catch (e) {
} catch {
return null;
}
}
@@ -154,7 +154,7 @@ export default class ReplyChain extends React.Component<IProps, IState> {
// ask the client to fetch the event we want using the context API, only interface to do so is to ask
// for a timeline with that event, but once it is loaded we can use findEventById to look up the ev map
await this.matrixClient.getEventTimeline(this.room.getUnfilteredTimelineSet(), eventId);
} catch (e) {
} catch {
// if it fails catch the error and return early, there's no point trying to find the event in this case.
// Return null as it is falsy and thus should be treated as an error (as the event cannot be resolved).
return null;

View File

@@ -33,6 +33,7 @@ interface ISSOButtonProps extends IProps {
const getIcon = (brand: IdentityProviderBrand | string): string | null => {
switch (brand) {
/* eslint-disable @typescript-eslint/no-require-imports */
case IdentityProviderBrand.Apple:
return require(`../../../../res/img/element-icons/brands/apple.svg`).default;
case IdentityProviderBrand.Facebook:
@@ -47,6 +48,7 @@ const getIcon = (brand: IdentityProviderBrand | string): string | null => {
return require(`../../../../res/img/element-icons/brands/twitter.svg`).default;
default:
return null;
/* eslint-enable @typescript-eslint/no-require-imports */
}
};