Upgrade to typescript-eslint
v6 (#25904)
This commit is contained in:
parent
3ed9b55cb3
commit
a7253075d1
23 changed files with 133 additions and 107 deletions
|
@ -6,11 +6,11 @@ interface Props {
|
|||
tag: {
|
||||
name: string;
|
||||
url?: string;
|
||||
history?: Array<{
|
||||
history?: {
|
||||
uses: number;
|
||||
accounts: string;
|
||||
day: string;
|
||||
}>;
|
||||
}[];
|
||||
following?: boolean;
|
||||
type: 'hashtag';
|
||||
};
|
||||
|
|
|
@ -5,7 +5,7 @@ import type { Account } from '../../types/resources';
|
|||
import { autoPlayGif } from '../initial_state';
|
||||
|
||||
interface Props {
|
||||
account: Account;
|
||||
account: Account | undefined; // FIXME: remove `undefined` once we know for sure its always there
|
||||
size: number;
|
||||
style?: React.CSSProperties;
|
||||
inline?: boolean;
|
||||
|
|
|
@ -3,8 +3,8 @@ import type { Account } from '../../types/resources';
|
|||
import { autoPlayGif } from '../initial_state';
|
||||
|
||||
interface Props {
|
||||
account: Account;
|
||||
friend: Account;
|
||||
account: Account | undefined; // FIXME: remove `undefined` once we know for sure its always there
|
||||
friend: Account | undefined; // FIXME: remove `undefined` once we know for sure its always there
|
||||
size?: number;
|
||||
baseSize?: number;
|
||||
overlaySize?: number;
|
||||
|
|
|
@ -78,7 +78,7 @@ export class DisplayName extends React.PureComponent<Props> {
|
|||
} else if (account) {
|
||||
let acct = account.get('acct');
|
||||
|
||||
if (acct.indexOf('@') === -1 && localDomain) {
|
||||
if (!acct.includes('@') && localDomain) {
|
||||
acct = `${acct}@${localDomain}`;
|
||||
}
|
||||
|
||||
|
|
|
@ -29,12 +29,12 @@ export const ShortNumberRenderer: React.FC<ShortNumberProps> = ({
|
|||
);
|
||||
}
|
||||
|
||||
const customRenderer = children || renderer || null;
|
||||
const customRenderer = children ?? renderer ?? null;
|
||||
|
||||
const displayNumber = <ShortNumberCounter value={shortNumber} />;
|
||||
|
||||
return (
|
||||
customRenderer?.(displayNumber, pluralReady(value, division)) ||
|
||||
customRenderer?.(displayNumber, pluralReady(value, division)) ??
|
||||
displayNumber
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue