[build] upgrade eslint to 9.37.0 (#88)

Co-authored-by: tobi <tobi.smethurst@protonmail.com>
Reviewed-on: https://codeberg.org/superseriousbusiness/masto-fe-standalone/pulls/88
Co-authored-by: Zoë Bijl <moiety@noreply.codeberg.org>
Co-committed-by: Zoë Bijl <moiety@noreply.codeberg.org>
This commit is contained in:
Zoë Bijl
2025-10-12 13:42:02 +02:00
committed by tobi
parent 75d7a62693
commit 1ff70886a1
975 changed files with 22196 additions and 21964 deletions
@@ -1,20 +1,20 @@
import React from 'react';
import React from "react";
import classNames from 'classnames';
import classNames from "classnames";
import type { List } from 'immutable';
import { type List } from "immutable";
import type { Account } from 'flavours/glitch/types/resources';
import { type Account } from "flavours/glitch/types/resources";
import { autoPlayGif } from '../initial_state';
import { autoPlayGif } from "../initial_state";
import { Skeleton } from './skeleton';
import { Skeleton } from "./skeleton";
interface Props {
account?: Account;
others?: List<Account>;
localDomain?: string;
inline?: boolean;
account?: Account,
others?: List<Account>,
localDomain?: string,
inline?: boolean,
}
export class DisplayName extends React.PureComponent<Props> {
@@ -26,11 +26,13 @@ export class DisplayName extends React.PureComponent<Props> {
}
const emojis =
currentTarget.querySelectorAll<HTMLImageElement>('img.custom-emoji');
currentTarget.querySelectorAll<HTMLImageElement>("img.custom-emoji");
emojis.forEach((emoji) => {
const originalSrc = emoji.getAttribute('data-original');
if (originalSrc != null) emoji.src = originalSrc;
const originalSrc = emoji.getAttribute("data-original");
if (originalSrc != null) {
emoji.src = originalSrc;
}
});
};
@@ -42,11 +44,13 @@ export class DisplayName extends React.PureComponent<Props> {
}
const emojis =
currentTarget.querySelectorAll<HTMLImageElement>('img.custom-emoji');
currentTarget.querySelectorAll<HTMLImageElement>("img.custom-emoji");
emojis.forEach((emoji) => {
const staticSrc = emoji.getAttribute('data-static');
if (staticSrc != null) emoji.src = staticSrc;
const staticSrc = emoji.getAttribute("data-static");
if (staticSrc != null) {
emoji.src = staticSrc;
}
});
};
@@ -67,22 +71,22 @@ export class DisplayName extends React.PureComponent<Props> {
displayName = others
.take(2)
.map((a) => (
<bdi key={a.get('id')}>
<bdi key={a.get("id")}>
<strong
className='display-name__html'
dangerouslySetInnerHTML={{ __html: a.get('display_name_html') }}
dangerouslySetInnerHTML={{ __html: a.get("display_name_html") }}
/>
</bdi>
))
.reduce((prev, cur) => [prev, ', ', cur]);
.reduce((prev, cur) => [prev, ", ", cur]);
if (others.size - 2 > 0) {
suffix = `+${others.size - 2}`;
}
} else if (account) {
let acct = account.get('acct');
let acct = account.get("acct");
if (!acct.includes('@') && localDomain) {
if (!acct.includes("@") && localDomain) {
acct = `${acct}@${localDomain}`;
}
@@ -91,7 +95,7 @@ export class DisplayName extends React.PureComponent<Props> {
<strong
className='display-name__html'
dangerouslySetInnerHTML={{
__html: account.get('display_name_html'),
__html: account.get("display_name_html"),
}}
/>
</bdi>
@@ -114,12 +118,12 @@ export class DisplayName extends React.PureComponent<Props> {
return (
<span
className={classNames('display-name', { inline })}
className={classNames("display-name", { inline })}
onMouseEnter={this.handleMouseEnter}
onMouseLeave={this.handleMouseLeave}
>
{displayName}
{inline ? ' ' : null}
{inline ? " " : null}
{suffix}
</span>
);