Merge remote-tracking branch 'origin/main' into arbitrary-value-classname

This commit is contained in:
danidfra 2024-10-23 11:41:52 -03:00
commit f04ee96058
75 changed files with 146 additions and 68 deletions

View File

@ -317,7 +317,7 @@
"formatjs/enforce-default-message": "error", "formatjs/enforce-default-message": "error",
"formatjs/enforce-id": "error", "formatjs/enforce-id": "error",
"formatjs/no-literal-string-in-jsx": "warn" "formatjs/no-literal-string-in-jsx": "error"
}, },
"overrides": [ "overrides": [
{ {

View File

@ -239,7 +239,7 @@ const Account = ({
<Stack space={withAccountNote || note ? 1 : 0}> <Stack space={withAccountNote || note ? 1 : 0}>
<HStack alignItems='center' space={1}> <HStack alignItems='center' space={1}>
<Text theme='muted' size='sm' direction='ltr' truncate>@{acct ?? username}</Text> <Text theme='muted' size='sm' direction='ltr' truncate>@{acct ?? username}</Text> {/* eslint-disable-line formatjs/no-literal-string-in-jsx */}
{account.pleroma?.favicon && ( {account.pleroma?.favicon && (
<InstanceFavicon account={account} disabled={!withLinkToProfile} /> <InstanceFavicon account={account} disabled={!withLinkToProfile} />
@ -247,7 +247,7 @@ const Account = ({
{(timestamp) ? ( {(timestamp) ? (
<> <>
<Text tag='span' theme='muted' size='sm'>&middot;</Text> <Text tag='span' theme='muted' size='sm'>&middot;</Text> {/* eslint-disable-line formatjs/no-literal-string-in-jsx */}
{timestampUrl ? ( {timestampUrl ? (
<Link to={timestampUrl} className='hover:underline' onClick={(event) => event.stopPropagation()}> <Link to={timestampUrl} className='hover:underline' onClick={(event) => event.stopPropagation()}>
@ -261,7 +261,7 @@ const Account = ({
{approvalStatus && ['pending', 'rejected'].includes(approvalStatus) && ( {approvalStatus && ['pending', 'rejected'].includes(approvalStatus) && (
<> <>
<Text tag='span' theme='muted' size='sm'>&middot;</Text> <Text tag='span' theme='muted' size='sm'>&middot;</Text> {/* eslint-disable-line formatjs/no-literal-string-in-jsx */}
<Text tag='span' theme='muted' size='sm'> <Text tag='span' theme='muted' size='sm'>
{approvalStatus === 'pending' {approvalStatus === 'pending'
@ -273,7 +273,7 @@ const Account = ({
{showEdit ? ( {showEdit ? (
<> <>
<Text tag='span' theme='muted' size='sm'>&middot;</Text> <Text tag='span' theme='muted' size='sm'>&middot;</Text> {/* eslint-disable-line formatjs/no-literal-string-in-jsx */}
<Icon className='size-5 text-gray-700 dark:text-gray-600' src={require('@tabler/icons/outline/pencil.svg')} /> <Icon className='size-5 text-gray-700 dark:text-gray-600' src={require('@tabler/icons/outline/pencil.svg')} />
</> </>
@ -281,7 +281,7 @@ const Account = ({
{actionType === 'muting' && account.mute_expires_at ? ( {actionType === 'muting' && account.mute_expires_at ? (
<> <>
<Text tag='span' theme='muted' size='sm'>&middot;</Text> <Text tag='span' theme='muted' size='sm'>&middot;</Text> {/* eslint-disable-line formatjs/no-literal-string-in-jsx */}
<Text theme='muted' size='sm'><RelativeTimestamp timestamp={account.mute_expires_at} futureDate /></Text> <Text theme='muted' size='sm'><RelativeTimestamp timestamp={account.mute_expires_at} futureDate /></Text>
</> </>

View File

@ -41,9 +41,11 @@ const Announcement: React.FC<IAnnouncement> = ({ announcement, emojiMap }) => {
hour={skipTime ? undefined : 'numeric'} hour={skipTime ? undefined : 'numeric'}
minute={skipTime ? undefined : '2-digit'} minute={skipTime ? undefined : '2-digit'}
/> />
{/* eslint-disable formatjs/no-literal-string-in-jsx */}
{' '} {' '}
- -
{' '} {' '}
{/* eslint-enable formatjs/no-literal-string-in-jsx */}
<FormattedDate <FormattedDate
value={endsAt} value={endsAt}
hour12 hour12

View File

@ -51,7 +51,7 @@ const Reaction: React.FC<IReaction> = ({ announcementId, reaction, emojiMap, sty
onClick={handleClick} onClick={handleClick}
onMouseEnter={handleMouseEnter} onMouseEnter={handleMouseEnter}
onMouseLeave={handleMouseLeave} onMouseLeave={handleMouseLeave}
title={`:${shortCode}:`} title={`:${shortCode}:`} // eslint-disable-line formatjs/no-literal-string-in-jsx
style={style} style={style}
> >
<span className='block size-4'> <span className='block size-4'>

View File

@ -31,12 +31,13 @@ const DisplayNameInline: React.FC<IDisplayName> = ({ account, withSuffix = true
</HStack> </HStack>
); );
// eslint-disable-next-line formatjs/no-literal-string-in-jsx
const suffix = (<span className='display-name'>@{getAcct(account, displayFqn)}</span>); const suffix = (<span className='display-name'>@{getAcct(account, displayFqn)}</span>);
return ( return (
<div className='flex max-w-80 flex-col items-center justify-center text-center sm:flex-row sm:gap-2'> <div className='flex max-w-80 flex-col items-center justify-center text-center sm:flex-row sm:gap-2'>
{displayName} {displayName}
<span className='hidden text-xl font-bold sm:block'>-</span> <span className='hidden text-xl font-bold sm:block'>-</span> {/* eslint-disable-line formatjs/no-literal-string-in-jsx */}
{withSuffix && suffix} {withSuffix && suffix}
</div> </div>
); );

View File

@ -33,7 +33,7 @@ const DisplayName: React.FC<IDisplayName> = ({ account, children, withSuffix = t
</HStack> </HStack>
); );
const suffix = (<span className='display-name__account'>@{getAcct(account, displayFqn)}</span>); const suffix = (<span className='display-name__account'>@{getAcct(account, displayFqn)}</span>); // eslint-disable-line formatjs/no-literal-string-in-jsx
return ( return (
<span className='display-name' data-testid='display-name'> <span className='display-name' data-testid='display-name'>

View File

@ -20,7 +20,7 @@ const Hashtag: React.FC<IHashtag> = ({ hashtag }) => {
<HStack alignItems='center' justifyContent='between' data-testid='hashtag'> <HStack alignItems='center' justifyContent='between' data-testid='hashtag'>
<Stack> <Stack>
<Link to={`/tags/${hashtag.name}`} className='hover:underline'> <Link to={`/tags/${hashtag.name}`} className='hover:underline'>
<Text tag='span' size='sm' weight='semibold'>#{hashtag.name}</Text> <Text tag='span' size='sm' weight='semibold'>#{hashtag.name}</Text> {/* eslint-disable-line formatjs/no-literal-string-in-jsx */}
</Link> </Link>
{Boolean(count) && ( {Boolean(count) && (

View File

@ -228,7 +228,7 @@ const Item: React.FC<IItem> = ({
{...conditionalAttributes} {...conditionalAttributes}
/> />
<span className='media-gallery__gifv__label'>GIF</span> <span className='media-gallery__gifv__label'>GIF</span> {/* eslint-disable-line formatjs/no-literal-string-in-jsx */}
</div> </div>
); );
} else if (attachment.type === 'audio') { } else if (attachment.type === 'audio') {
@ -276,7 +276,7 @@ const Item: React.FC<IItem> = ({
style={{ position, float, left, top, right, bottom, height, width: `${width}%` }} style={{ position, float, left, top, right, bottom, height, width: `${width}%` }}
> >
{last && total > ATTACHMENT_LIMIT && ( {last && total > ATTACHMENT_LIMIT && (
<div className='media-gallery__item-overflow'> <div className='media-gallery__item-overflow'> {/* eslint-disable-line formatjs/no-literal-string-in-jsx */}
+{total - ATTACHMENT_LIMIT + 1} +{total - ATTACHMENT_LIMIT + 1}
</div> </div>
)} )}

View File

@ -63,7 +63,7 @@ const PollFooter: React.FC<IPollFooter> = ({ poll, showResults, selected }): JSX
</Text> </Text>
</Tooltip> </Tooltip>
<Text theme='muted'>&middot;</Text> <Text theme='muted'>&middot;</Text> {/* eslint-disable-line formatjs/no-literal-string-in-jsx */}
</> </>
)} )}
@ -75,7 +75,7 @@ const PollFooter: React.FC<IPollFooter> = ({ poll, showResults, selected }): JSX
</Text> </Text>
</button> </button>
<Text theme='muted'>&middot;</Text> <Text theme='muted'>&middot;</Text> {/* eslint-disable-line formatjs/no-literal-string-in-jsx */}
</> </>
)} )}
@ -85,7 +85,7 @@ const PollFooter: React.FC<IPollFooter> = ({ poll, showResults, selected }): JSX
{poll.expires_at !== null && ( {poll.expires_at !== null && (
<> <>
<Text theme='muted'>&middot;</Text> <Text theme='muted'>&middot;</Text> {/* eslint-disable-line formatjs/no-literal-string-in-jsx */}
<Text weight='medium' theme='muted' data-testid='poll-expiration'>{timeRemaining}</Text> <Text weight='medium' theme='muted' data-testid='poll-expiration'>{timeRemaining}</Text>
</> </>
)} )}

View File

@ -152,7 +152,7 @@ const PollOption: React.FC<IPollOption> = (props): JSX.Element | null => {
)} )}
<div className='text-primary-600 dark:text-white'> <div className='text-primary-600 dark:text-white'>
<Text weight='medium' theme='inherit'>{Math.round(percent)}%</Text> <Text weight='medium' theme='inherit'>{Math.round(percent)}%</Text> {/* eslint-disable-line formatjs/no-literal-string-in-jsx */}
</div> </div>
</HStack> </HStack>
</HStack> </HStack>

View File

@ -105,16 +105,20 @@ const SiteErrorBoundary: React.FC<ISiteErrorBoundary> = ({ children }) => {
</p> </p>
<Text theme='muted'> <Text theme='muted'>
{/* eslint-disable formatjs/no-literal-string-in-jsx */}
<Text weight='medium' tag='span' theme='muted'>{sourceCode.displayName}:</Text> <Text weight='medium' tag='span' theme='muted'>{sourceCode.displayName}:</Text>
{' '}{sourceCode.version} {' '}{sourceCode.version}
{/* eslint-enable formatjs/no-literal-string-in-jsx */}
</Text> </Text>
<div className='mt-10'> <div className='mt-10'>
<a href='/' className='text-base font-medium text-primary-600 hover:underline dark:text-accent-blue'> <a href='/' className='text-base font-medium text-primary-600 hover:underline dark:text-accent-blue'>
{/* eslint-disable formatjs/no-literal-string-in-jsx */}
<FormattedMessage id='alert.unexpected.return_home' defaultMessage='Return Home' /> <FormattedMessage id='alert.unexpected.return_home' defaultMessage='Return Home' />
{' '} {' '}
<span className='inline-block rtl:rotate-180' aria-hidden='true'>&rarr;</span> <span className='inline-block rtl:rotate-180' aria-hidden='true'>&rarr;</span>
{/* eslint-enable formatjs/no-literal-string-in-jsx */}
</a> </a>
</div> </div>
</div> </div>

View File

@ -321,7 +321,7 @@ const StatusActionBar: React.FC<IStatusActionBar> = ({
dispatch(openModal('CONFIRM', { dispatch(openModal('CONFIRM', {
icon: require('@tabler/icons/outline/ban.svg'), icon: require('@tabler/icons/outline/ban.svg'),
heading: <FormattedMessage id='confirmations.block.heading' defaultMessage='Block @{name}' values={{ name: account.acct }} />, heading: <FormattedMessage id='confirmations.block.heading' defaultMessage='Block @{name}' values={{ name: account.acct }} />,
message: <FormattedMessage id='confirmations.block.message' defaultMessage='Are you sure you want to block {name}?' values={{ name: <strong className='break-words'>@{account.acct}</strong> }} />, message: <FormattedMessage id='confirmations.block.message' defaultMessage='Are you sure you want to block {name}?' values={{ name: <strong className='break-words'>@{account.acct}</strong> }} />, // eslint-disable-line formatjs/no-literal-string-in-jsx
confirm: intl.formatMessage(messages.blockConfirm), confirm: intl.formatMessage(messages.blockConfirm),
onConfirm: () => dispatch(blockAccount(account.id)), onConfirm: () => dispatch(blockAccount(account.id)),
secondary: intl.formatMessage(messages.blockAndReport), secondary: intl.formatMessage(messages.blockAndReport),

View File

@ -56,7 +56,7 @@ const StatusReplyMentions: React.FC<IStatusReplyMentions> = ({ status, hoverable
to={`/@${account.acct}`} to={`/@${account.acct}`}
className='reply-mentions__account max-w-[200px] truncate align-bottom' className='reply-mentions__account max-w-[200px] truncate align-bottom'
onClick={(e) => e.stopPropagation()} onClick={(e) => e.stopPropagation()}
> > {/* eslint-disable-line formatjs/no-literal-string-in-jsx */}
@{shortenNostr(account.username)} @{shortenNostr(account.username)}
</Link> </Link>
); );

View File

@ -334,6 +334,7 @@ const Status: React.FC<IStatus> = (props) => {
return ( return (
<HotKeys handlers={minHandlers}> <HotKeys handlers={minHandlers}>
<div className={clsx('status__wrapper text-center', { focusable })} tabIndex={focusable ? 0 : undefined} ref={node}> <div className={clsx('status__wrapper text-center', { focusable })} tabIndex={focusable ? 0 : undefined} ref={node}>
{/* eslint-disable formatjs/no-literal-string-in-jsx */}
<Text theme='muted'> <Text theme='muted'>
<FormattedMessage id='status.filtered' defaultMessage='Filtered' />: {status.filtered.join(', ')}. <FormattedMessage id='status.filtered' defaultMessage='Filtered' />: {status.filtered.join(', ')}.
{' '} {' '}
@ -341,6 +342,7 @@ const Status: React.FC<IStatus> = (props) => {
<FormattedMessage id='status.show_filter_reason' defaultMessage='Show anyway' /> <FormattedMessage id='status.show_filter_reason' defaultMessage='Show anyway' />
</button> </button>
</Text> </Text>
{/* eslint-enable formatjs/no-literal-string-in-jsx */}
</div> </div>
</HotKeys> </HotKeys>
); );

View File

@ -118,9 +118,11 @@ const SensitiveContentOverlay = React.forwardRef<HTMLDivElement, ISensitiveConte
{status.spoiler_text && ( {status.spoiler_text && (
<div className='py-4 italic'> <div className='py-4 italic'>
{/* eslint-disable formatjs/no-literal-string-in-jsx */}
<Text className='line-clamp-6' theme='white' size='md' weight='medium'> <Text className='line-clamp-6' theme='white' size='md' weight='medium'>
&ldquo;<span dangerouslySetInnerHTML={{ __html: status.spoilerHtml }} />&rdquo; &ldquo;<span dangerouslySetInnerHTML={{ __html: status.spoilerHtml }} />&rdquo;
</Text> </Text>
{/* eslint-enable formatjs/no-literal-string-in-jsx */}
</div> </div>
)} )}
</div> </div>

View File

@ -13,14 +13,14 @@ describe('<Button />', () => {
}); });
it('renders the children', () => { it('renders the children', () => {
render(<Button><p>children</p></Button>); render(<Button><p>children</p></Button>); // eslint-disable-line formatjs/no-literal-string-in-jsx
expect(screen.getByRole('button')).toHaveTextContent('children'); expect(screen.getByRole('button')).toHaveTextContent('children');
}); });
it('renders the props.text instead of children', () => { it('renders the props.text instead of children', () => {
const text = 'foo'; const text = 'foo';
const children = <p>children</p>; const children = <p>children</p>; // eslint-disable-line formatjs/no-literal-string-in-jsx
render(<Button text={text}>{children}</Button>); render(<Button text={text}>{children}</Button>);
expect(screen.getByRole('button')).toHaveTextContent('foo'); expect(screen.getByRole('button')).toHaveTextContent('foo');
@ -63,13 +63,13 @@ describe('<Button />', () => {
describe('to prop', () => { describe('to prop', () => {
it('renders a link', () => { it('renders a link', () => {
render(<Button to='/'>link</Button>); render(<Button to='/'>link</Button>); // eslint-disable-line formatjs/no-literal-string-in-jsx
expect(screen.getByRole('link')).toBeInTheDocument(); expect(screen.getByRole('link')).toBeInTheDocument();
}); });
it('does not render a link', () => { it('does not render a link', () => {
render(<Button>link</Button>); render(<Button>link</Button>); //eslint-disable-line formatjs/no-literal-string-in-jsx
expect(screen.queryAllByRole('link')).toHaveLength(0); expect(screen.queryAllByRole('link')).toHaveLength(0);
}); });
@ -77,13 +77,13 @@ describe('<Button />', () => {
describe('icon prop', () => { describe('icon prop', () => {
it('renders an icon', () => { it('renders an icon', () => {
render(<Button icon='icon.png'>button</Button>); render(<Button icon='icon.png'>button</Button>); // eslint-disable-line formatjs/no-literal-string-in-jsx
expect(screen.getByTestId('icon')).toBeInTheDocument(); expect(screen.getByTestId('icon')).toBeInTheDocument();
}); });
it('does not render an icon', () => { it('does not render an icon', () => {
render(<Button>button</Button>); render(<Button>button</Button>); // eslint-disable-line formatjs/no-literal-string-in-jsx
expect(screen.queryAllByTestId('icon')).toHaveLength(0); expect(screen.queryAllByTestId('icon')).toHaveLength(0);
}); });

View File

@ -12,7 +12,7 @@ describe('<Card />', () => {
<CardTitle title='Card Title' /> <CardTitle title='Card Title' />
</CardHeader> </CardHeader>
<CardBody> <CardBody> {/* eslint-disable-line formatjs/no-literal-string-in-jsx */}
Card Body Card Body
</CardBody> </CardBody>
</Card>, </Card>,

View File

@ -6,7 +6,7 @@ import FormActions from './form-actions';
describe('<FormActions />', () => { describe('<FormActions />', () => {
it('renders successfully', () => { it('renders successfully', () => {
render(<FormActions><div data-testid='child'>child</div></FormActions>); render(<FormActions><div data-testid='child'>child</div></FormActions>); {/* eslint-disable-line formatjs/no-literal-string-in-jsx */}
expect(screen.getByTestId('child')).toBeInTheDocument(); expect(screen.getByTestId('child')).toBeInTheDocument();
}); });

View File

@ -8,7 +8,7 @@ describe('<Form />', () => {
it('renders children', () => { it('renders children', () => {
const onSubmitMock = vi.fn(); const onSubmitMock = vi.fn();
render( render(
<Form onSubmit={onSubmitMock}>children</Form>, <Form onSubmit={onSubmitMock}>children</Form>, // eslint-disable-line formatjs/no-literal-string-in-jsx
); );
expect(screen.getByTestId('form')).toHaveTextContent('children'); expect(screen.getByTestId('form')).toHaveTextContent('children');
@ -17,7 +17,7 @@ describe('<Form />', () => {
it('handles onSubmit prop', () => { it('handles onSubmit prop', () => {
const onSubmitMock = vi.fn(); const onSubmitMock = vi.fn();
render( render(
<Form onSubmit={onSubmitMock}>children</Form>, <Form onSubmit={onSubmitMock}>children</Form>, // eslint-disable-line formatjs/no-literal-string-in-jsx
); );
fireEvent.submit( fireEvent.submit(

View File

@ -39,7 +39,7 @@ const AboutPage: React.FC = () => {
const alsoAvailable = (defaultLocale) && ( const alsoAvailable = (defaultLocale) && (
<div> <div>
<FormattedMessage id='about.also_available' defaultMessage='Available in:' /> <FormattedMessage id='about.also_available' defaultMessage='Available in:' />
{' '} {' '} {/* eslint-disable-line formatjs/no-literal-string-in-jsx */}
<ul className='inline list-none p-0'> <ul className='inline list-none p-0'>
<li className="inline after:content-['_·_']"> <li className="inline after:content-['_·_']">
<a href='#' onClick={() => setLocale(defaultLocale)}> <a href='#' onClick={() => setLocale(defaultLocale)}>

View File

@ -94,7 +94,7 @@ const MediaItem: React.FC<IMediaItem> = ({ attachment, onOpenMedia }) => {
{...conditionalAttributes} {...conditionalAttributes}
/> />
<span className='media-gallery__gifv__label'>GIF</span> <span className='media-gallery__gifv__label'>GIF</span> {/* eslint-disable-line formatjs/no-literal-string-in-jsx */}
</div> </div>
); );
} else if (attachment.type === 'audio') { } else if (attachment.type === 'audio') {

View File

@ -137,7 +137,7 @@ const Header: React.FC<IHeader> = ({ account }) => {
dispatch(openModal('CONFIRM', { dispatch(openModal('CONFIRM', {
icon: require('@tabler/icons/outline/ban.svg'), icon: require('@tabler/icons/outline/ban.svg'),
heading: <FormattedMessage id='confirmations.block.heading' defaultMessage='Block @{name}' values={{ name: account.acct }} />, heading: <FormattedMessage id='confirmations.block.heading' defaultMessage='Block @{name}' values={{ name: account.acct }} />,
message: <FormattedMessage id='confirmations.block.message' defaultMessage='Are you sure you want to block {name}?' values={{ name: <strong className='break-words'>@{account.acct}</strong> }} />, message: <FormattedMessage id='confirmations.block.message' defaultMessage='Are you sure you want to block {name}?' values={{ name: <strong className='break-words'>@{account.acct}</strong> }} />, // eslint-disable-line formatjs/no-literal-string-in-jsx
confirm: intl.formatMessage(messages.blockConfirm), confirm: intl.formatMessage(messages.blockConfirm),
onConfirm: () => dispatch(blockAccount(account.id)), onConfirm: () => dispatch(blockAccount(account.id)),
secondary: intl.formatMessage(messages.blockAndReport), secondary: intl.formatMessage(messages.blockAndReport),
@ -222,7 +222,7 @@ const Header: React.FC<IHeader> = ({ account }) => {
const unfollowModal = getSettings(getState()).get('unfollowModal'); const unfollowModal = getSettings(getState()).get('unfollowModal');
if (unfollowModal) { if (unfollowModal) {
dispatch(openModal('CONFIRM', { dispatch(openModal('CONFIRM', {
message: <FormattedMessage id='confirmations.remove_from_followers.message' defaultMessage='Are you sure you want to remove {name} from your followers?' values={{ name: <strong className='break-words'>@{account.acct}</strong> }} />, message: <FormattedMessage id='confirmations.remove_from_followers.message' defaultMessage='Are you sure you want to remove {name} from your followers?' values={{ name: <strong className='break-words'>@{account.acct}</strong> }} />, // eslint-disable-line formatjs/no-literal-string-in-jsx
confirm: intl.formatMessage(messages.removeFromFollowersConfirm), confirm: intl.formatMessage(messages.removeFromFollowersConfirm),
onConfirm: () => dispatch(removeFromFollowers(account.id)), onConfirm: () => dispatch(removeFromFollowers(account.id)),
})); }));

View File

@ -52,7 +52,7 @@ const Announcement: React.FC<IAnnouncement> = ({ announcement }) => {
<Text tag='span' size='sm' weight='medium'> <Text tag='span' size='sm' weight='medium'>
<FormattedMessage id='admin.announcements.starts_at' defaultMessage='Starts at:' /> <FormattedMessage id='admin.announcements.starts_at' defaultMessage='Starts at:' />
</Text> </Text>
{' '} {' '} {/* eslint-disable-line formatjs/no-literal-string-in-jsx */}
<FormattedDate value={announcement.starts_at} year='2-digit' month='short' day='2-digit' weekday='short' /> <FormattedDate value={announcement.starts_at} year='2-digit' month='short' day='2-digit' weekday='short' />
</Text> </Text>
)} )}
@ -61,7 +61,7 @@ const Announcement: React.FC<IAnnouncement> = ({ announcement }) => {
<Text tag='span' size='sm' weight='medium'> <Text tag='span' size='sm' weight='medium'>
<FormattedMessage id='admin.announcements.ends_at' defaultMessage='Ends at:' /> <FormattedMessage id='admin.announcements.ends_at' defaultMessage='Ends at:' />
</Text> </Text>
{' '} {' '} {/* eslint-disable-line formatjs/no-literal-string-in-jsx */}
<FormattedDate value={announcement.ends_at} year='2-digit' month='short' day='2-digit' weekday='short' /> <FormattedDate value={announcement.ends_at} year='2-digit' month='short' day='2-digit' weekday='short' />
</Text> </Text>
)} )}

View File

@ -96,7 +96,7 @@ const Report: React.FC<IReport> = ({ id }) => {
defaultMessage='Report on {acct}' defaultMessage='Report on {acct}'
values={{ acct: ( values={{ acct: (
<HoverRefWrapper accountId={targetAccount.id} inline> <HoverRefWrapper accountId={targetAccount.id} inline>
<Link to={`/@${acct}`} title={acct}>@{acct}</Link> <Link to={`/@${acct}`} title={acct}>@{acct}</Link> {/* eslint-disable-line formatjs/no-literal-string-in-jsx */}
</HoverRefWrapper> </HoverRefWrapper>
) }} ) }}
/> />
@ -129,14 +129,14 @@ const Report: React.FC<IReport> = ({ id }) => {
)} )}
<HStack space={1}> <HStack space={1}>
<Text theme='muted' tag='span'>&mdash;</Text> <Text theme='muted' tag='span'>&mdash;</Text> {/* eslint-disable-line formatjs/no-literal-string-in-jsx */}
<HoverRefWrapper accountId={account.id} inline> <HoverRefWrapper accountId={account.id} inline>
<Link <Link
to={`/@${reporterAcct}`} to={`/@${reporterAcct}`}
title={reporterAcct} title={reporterAcct}
className='text-primary-600 hover:underline dark:text-accent-blue' className='text-primary-600 hover:underline dark:text-accent-blue'
> > {/* eslint-disable-line formatjs/no-literal-string-in-jsx */}
@{reporterAcct} @{reporterAcct}
</Link> </Link>
</HoverRefWrapper> </HoverRefWrapper>

View File

@ -71,7 +71,7 @@ const Domain: React.FC<IDomain> = ({ domain }) => {
<Text tag='span' size='sm' weight='medium'> <Text tag='span' size='sm' weight='medium'>
<FormattedMessage id='admin.domains.name' defaultMessage='Domain:' /> <FormattedMessage id='admin.domains.name' defaultMessage='Domain:' />
</Text> </Text>
{' '} {' '} {/* eslint-disable-line formatjs/no-literal-string-in-jsx */}
{domain.domain} {domain.domain}
</Text> </Text>
<Text tag='span' size='sm' weight='medium'> <Text tag='span' size='sm' weight='medium'>

View File

@ -40,7 +40,7 @@ const Relay: React.FC<IRelay> = ({ relay }) => {
<Text tag='span' size='sm' weight='medium'> <Text tag='span' size='sm' weight='medium'>
<FormattedMessage id='admin.relays.url' defaultMessage='Instance URL:' /> <FormattedMessage id='admin.relays.url' defaultMessage='Instance URL:' />
</Text> </Text>
{' '} {' '} {/* eslint-disable-line formatjs/no-literal-string-in-jsx */}
{relay.actor} {relay.actor}
</Text> </Text>
{relay.followed_back && ( {relay.followed_back && (

View File

@ -51,7 +51,7 @@ const Rule: React.FC<IRule> = ({ rule }) => {
<Text tag='span' size='sm' weight='medium'> <Text tag='span' size='sm' weight='medium'>
<FormattedMessage id='admin.rule.priority' defaultMessage='Priority:' /> <FormattedMessage id='admin.rule.priority' defaultMessage='Priority:' />
</Text> </Text>
{' '} {' '} {/* eslint-disable-line formatjs/no-literal-string-in-jsx */}
{rule.priority} {rule.priority}
</Text> </Text>
)} )}

View File

@ -159,7 +159,7 @@ const Dashboard: React.FC = () => {
</ListItem> </ListItem>
<ListItem label={<FormattedMessage id='admin.software.backend' defaultMessage='Backend' />}> <ListItem label={<FormattedMessage id='admin.software.backend' defaultMessage='Backend' />}>
<span>{v.software + (v.build ? `+${v.build}` : '')} {v.version}</span> <span>{v.software + (v.build ? `+${v.build}` : '')} {v.version}</span> {/* eslint-disable-line formatjs/no-literal-string-in-jsx */}
</ListItem> </ListItem>
</List> </List>

View File

@ -75,7 +75,7 @@ const Aliases = () => {
<HStack alignItems='center' justifyContent='between' space={1} key={i} className='p-2'> <HStack alignItems='center' justifyContent='between' space={1} key={i} className='p-2'>
<div> <div>
<Text tag='span' theme='muted'><FormattedMessage id='aliases.account_label' defaultMessage='Old account:' /></Text> <Text tag='span' theme='muted'><FormattedMessage id='aliases.account_label' defaultMessage='Old account:' /></Text>
{' '} {' '} {/* eslint-disable-line formatjs/no-literal-string-in-jsx */}
<Text tag='span'>{alias}</Text> <Text tag='span'>{alias}</Text>
</div> </div>
<div className='flex items-center' role='button' tabIndex={0} onClick={handleFilterDelete} data-value={alias} aria-label={intl.formatMessage(messages.delete)}> <div className='flex items-center' role='button' tabIndex={0} onClick={handleFilterDelete} data-value={alias} aria-label={intl.formatMessage(messages.delete)}>

View File

@ -554,7 +554,7 @@ const Audio: React.FC<IAudio> = (props) => {
<span className='video-player__time'> <span className='video-player__time'>
<span className='video-player__time-current'>{formatTime(Math.floor(currentTime))}</span> <span className='video-player__time-current'>{formatTime(Math.floor(currentTime))}</span>
{getDuration() && (<> {getDuration() && (<>
<span className='video-player__time-sep'>/</span> <span className='video-player__time-sep'>/</span> {/* eslint-disable-line formatjs/no-literal-string-in-jsx */}
<span className='video-player__time-total'>{formatTime(Math.floor(getDuration()))}</span> <span className='video-player__time-total'>{formatTime(Math.floor(getDuration()))}</span>
</>)} </>)}
</span> </span>

View File

@ -9,7 +9,7 @@ import PasswordResetConfirm from './password-reset-confirm';
const TestableComponent = () => ( const TestableComponent = () => (
<Switch> <Switch>
<Route path='/edit' exact><PasswordResetConfirm /></Route> <Route path='/edit' exact><PasswordResetConfirm /></Route>
<Route path='/' exact><span data-testid='home'>Homepage</span></Route> <Route path='/' exact><span data-testid='home'>Homepage</span></Route> {/* eslint-disable-line formatjs/no-literal-string-in-jsx */}
</Switch> </Switch>
); );

View File

@ -84,7 +84,7 @@ const ChatListItem: React.FC<IChatListItemInterface> = ({ chat, onClick }) => {
<Stack alignItems='start' className='overflow-hidden'> <Stack alignItems='start' className='overflow-hidden'>
<div className='flex w-full grow items-center space-x-1'> <div className='flex w-full grow items-center space-x-1'>
<Text weight='bold' size='sm' align='left' truncate>{chat.account?.display_name || `@${chat.account.username}`}</Text> <Text weight='bold' size='sm' align='left' truncate>{chat.account?.display_name || `@${chat.account.username}`}</Text> {/* eslint-disable-line formatjs/no-literal-string-in-jsx */}
{chat.account?.verified && <VerificationBadge />} {chat.account?.verified && <VerificationBadge />}
</div> </div>

View File

@ -74,13 +74,13 @@ const ChatMessageListIntro = () => {
<Text size='lg' align='center'> <Text size='lg' align='center'>
{needsAcceptance ? ( {needsAcceptance ? (
<> <>
<Text tag='span' weight='semibold'>@{chat.account.acct}</Text> <Text tag='span' weight='semibold'>@{chat.account.acct}</Text> {/* eslint-disable-line formatjs/no-literal-string-in-jsx */}
{' '} {' '}
<Text tag='span'>{intl.formatMessage(messages.intro)}</Text> <Text tag='span'>{intl.formatMessage(messages.intro)}</Text>
</> </>
) : ( ) : (
<Link to={`/@${chat.account.acct}`}> <Link to={`/@${chat.account.acct}`}>
<Text tag='span' theme='inherit' weight='semibold'>@{chat.account.acct}</Text> <Text tag='span' theme='inherit' weight='semibold'>@{chat.account.acct}</Text> {/* eslint-disable-line formatjs/no-literal-string-in-jsx */}
</Link> </Link>
)} )}
</Text> </Text>

View File

@ -195,7 +195,7 @@ const ChatMessageList: React.FC<IChatMessageList> = ({ chat }) => {
<> <>
<Text tag='span'>{intl.formatMessage(messages.blockedBy)}</Text> <Text tag='span'>{intl.formatMessage(messages.blockedBy)}</Text>
{' '} {' '}
<Text tag='span' theme='primary'>@{chat.account.acct}</Text> <Text tag='span' theme='primary'>@{chat.account.acct}</Text> {/* eslint-disable-line formatjs/no-literal-string-in-jsx */}
</> </>
</Text> </Text>
</Stack> </Stack>

View File

@ -134,7 +134,7 @@ const ChatPageMain = () => {
<div className='flex w-full grow items-center space-x-1'> <div className='flex w-full grow items-center space-x-1'>
<Link to={`/@${chat.account.acct}`}> <Link to={`/@${chat.account.acct}`}>
<Text weight='bold' size='sm' align='left' truncate> <Text weight='bold' size='sm' align='left' truncate>
{chat.account.display_name || `@${chat.account.username}`} {chat.account.display_name || `@${chat.account.username}`} {/* eslint-disable-line formatjs/no-literal-string-in-jsx */}
</Text> </Text>
</Link> </Link>
{chat.account.verified && <VerificationBadge />} {chat.account.verified && <VerificationBadge />}
@ -173,7 +173,7 @@ const ChatPageMain = () => {
<Avatar src={chat.account.avatar_static} size={50} /> <Avatar src={chat.account.avatar_static} size={50} />
<Stack> <Stack>
<Text weight='semibold'>{chat.account.display_name}</Text> <Text weight='semibold'>{chat.account.display_name}</Text>
<Text size='sm' theme='primary'>@{chat.account.acct}</Text> <Text size='sm' theme='primary'>@{chat.account.acct}</Text> {/* eslint-disable-line formatjs/no-literal-string-in-jsx */}
</Stack> </Stack>
</HStack> </HStack>

View File

@ -27,7 +27,7 @@ describe('<ChatPaneHeader />', () => {
describe('when it is a node', () => { describe('when it is a node', () => {
it('renders the title', () => { it('renders the title', () => {
const title = ( const title = (
<div><p>hello world</p></div> <div><p>hello world</p></div> // eslint-disable-line formatjs/no-literal-string-in-jsx
); );
render(<ChatPaneHeader title={title} onToggle={vi.fn()} isOpen />); render(<ChatPaneHeader title={title} onToggle={vi.fn()} isOpen />);

View File

@ -12,7 +12,7 @@ const renderComponent = () => render(
<VirtuosoMockContext.Provider value={{ viewportHeight: 300, itemHeight: 100 }}> <VirtuosoMockContext.Provider value={{ viewportHeight: 300, itemHeight: 100 }}>
<ChatProvider> <ChatProvider>
<ChatSearch /> <ChatSearch />
</ChatProvider>, </ChatProvider>, {/* eslint-disable-line formatjs/no-literal-string-in-jsx */}
</VirtuosoMockContext.Provider>, </VirtuosoMockContext.Provider>,
); );

View File

@ -41,7 +41,7 @@ const Results = ({ accountSearchResult, onSelect }: IResults) => {
<Text weight='bold' size='sm' truncate>{account.display_name}</Text> <Text weight='bold' size='sm' truncate>{account.display_name}</Text>
{account.verified && <VerificationBadge />} {account.verified && <VerificationBadge />}
</div> </div>
<Text size='sm' weight='medium' theme='muted' direction='ltr' truncate>@{account.acct}</Text> <Text size='sm' weight='medium' theme='muted' direction='ltr' truncate>@{account.acct}</Text> {/* eslint-disable-line formatjs/no-literal-string-in-jsx */}
</Stack> </Stack>
</HStack> </HStack>
</button> </button>

View File

@ -35,8 +35,10 @@ describe('<ChatWidget />', () => {
it('hides the widget', async () => { it('hides the widget', async () => {
const App = () => ( const App = () => (
<Switch> <Switch>
{/* eslint-disable formatjs/no-literal-string-in-jsx */}
<Route path='/chats' exact><span>Chats page <ChatWidget /></span></Route> <Route path='/chats' exact><span>Chats page <ChatWidget /></span></Route>
<Route path='/' exact><span data-testid='home'>Homepage <ChatWidget /></span></Route> <Route path='/' exact><span data-testid='home'>Homepage <ChatWidget /></span></Route>
{/* eslint-enable formatjs/no-literal-string-in-jsx */}
</Switch> </Switch>
); );
@ -85,8 +87,10 @@ describe('<ChatWidget />', () => {
it('shows the widget', async () => { it('shows the widget', async () => {
const App = () => ( const App = () => (
<Switch> <Switch>
{/* eslint-disable formatjs/no-literal-string-in-jsx */}
<Route path='/chats' exact><span>Chats page <ChatWidget /></span></Route> <Route path='/chats' exact><span>Chats page <ChatWidget /></span></Route>
<Route path='/' exact><span data-testid='home'>Homepage <ChatWidget /></span></Route> <Route path='/' exact><span data-testid='home'>Homepage <ChatWidget /></span></Route>
{/* eslint-enable formatjs/no-literal-string-in-jsx */}
</Switch> </Switch>
); );

View File

@ -43,9 +43,11 @@ const ChatPaneHeader = (props: IChatPaneHeader) => {
{(typeof unreadCount !== 'undefined' && unreadCount > 0) && ( {(typeof unreadCount !== 'undefined' && unreadCount > 0) && (
<HStack alignItems='center' space={2}> <HStack alignItems='center' space={2}>
{/* eslint-disable formatjs/no-literal-string-in-jsx */}
<Text weight='semibold' data-testid='unread-count'> <Text weight='semibold' data-testid='unread-count'>
({unreadCount}) ({unreadCount})
</Text> </Text>
{/* eslint-enable formatjs/no-literal-string-in-jsx */}
<div className='size-2.5 rounded-full bg-accent-300' /> <div className='size-2.5 rounded-full bg-accent-300' />
</HStack> </HStack>

View File

@ -112,7 +112,7 @@ const ChatSettings = () => {
<Avatar src={chat.account.avatar_static} size={50} /> <Avatar src={chat.account.avatar_static} size={50} />
<Stack> <Stack>
<Text weight='semibold'>{chat.account.display_name}</Text> <Text weight='semibold'>{chat.account.display_name}</Text>
<Text size='sm' theme='primary'>@{chat.account.acct}</Text> <Text size='sm' theme='primary'>@{chat.account.acct}</Text> {/* eslint-disable-line formatjs/no-literal-string-in-jsx */}
</Stack> </Stack>
</HStack> </HStack>

View File

@ -88,7 +88,7 @@ const ChatWindow = () => {
<Stack alignItems='start'> <Stack alignItems='start'>
<LinkWrapper enabled={isOpen} to={`/@${chat.account.acct}`}> <LinkWrapper enabled={isOpen} to={`/@${chat.account.acct}`}>
<div className='flex grow items-center space-x-1'> <div className='flex grow items-center space-x-1'>
<Text size='sm' weight='bold' truncate>{chat.account.display_name || `@${chat.account.acct}`}</Text> <Text size='sm' weight='bold' truncate>{chat.account.display_name || `@${chat.account.acct}`}</Text> {/* eslint-disable-line formatjs/no-literal-string-in-jsx */}
{chat.account.verified && <VerificationBadge />} {chat.account.verified && <VerificationBadge />}
</div> </div>
</LinkWrapper> </LinkWrapper>

View File

@ -74,7 +74,7 @@ const Option: React.FC<IOption> = ({
<HStack alignItems='center' justifyContent='between' space={4}> <HStack alignItems='center' justifyContent='between' space={4}>
<HStack alignItems='center' space={2} grow> <HStack alignItems='center' space={2} grow>
<div className='w-6'> <div className='w-6'>
<Text weight='bold'>{index + 1}.</Text> <Text weight='bold'>{index + 1}.</Text> {/* eslint-disable-line formatjs/no-literal-string-in-jsx */}
</div> </div>
<AutosuggestInput <AutosuggestInput

View File

@ -55,7 +55,7 @@ const ReplyMentions: React.FC<IReplyMentions> = ({ composeId }) => {
const accounts = to.slice(0, 2).map((acct: string) => { const accounts = to.slice(0, 2).map((acct: string) => {
const username = acct.split('@')[0]; const username = acct.split('@')[0];
return ( return (
<span className='reply-mentions__account'> <span className='reply-mentions__account'> {/* eslint-disable-line formatjs/no-literal-string-in-jsx */}
@{shortenNostr(username)} @{shortenNostr(username)}
</span> </span>
); );

View File

@ -41,11 +41,13 @@ const DevelopersChallenge = () => {
<Column label={intl.formatMessage(messages.heading)}> <Column label={intl.formatMessage(messages.heading)}>
<Form onSubmit={handleSubmit}> <Form onSubmit={handleSubmit}>
<Text> <Text>
{/* eslint-disable formatjs/no-literal-string-in-jsx */}
<FormattedMessage <FormattedMessage
id='developers.challenge.message' id='developers.challenge.message'
defaultMessage='What is the result of calling {function}?' defaultMessage='What is the result of calling {function}?'
values={{ function: <span className='font-mono'>soapbox()</span> }} values={{ function: <span className='font-mono'>soapbox()</span> }}
/> />
{/* eslint-enable formatjs/no-literal-string-in-jsx */}
</Text> </Text>
<Text tag='pre' family='mono' theme='muted'> <Text tag='pre' family='mono' theme='muted'>

View File

@ -164,7 +164,7 @@ const EventHeader: React.FC<IEventHeader> = ({ status }) => {
dispatch(openModal('CONFIRM', { dispatch(openModal('CONFIRM', {
icon: require('@tabler/icons/outline/ban.svg'), icon: require('@tabler/icons/outline/ban.svg'),
heading: <FormattedMessage id='confirmations.block.heading' defaultMessage='Block @{name}' values={{ name: account.acct }} />, heading: <FormattedMessage id='confirmations.block.heading' defaultMessage='Block @{name}' values={{ name: account.acct }} />,
message: <FormattedMessage id='confirmations.block.message' defaultMessage='Are you sure you want to block {name}?' values={{ name: <strong>@{account.acct}</strong> }} />, message: <FormattedMessage id='confirmations.block.message' defaultMessage='Are you sure you want to block {name}?' values={{ name: <strong>{/* eslint-disable-line formatjs/no-literal-string-in-jsx */}@{account.acct}</strong> }} />,
confirm: intl.formatMessage(messages.blockConfirm), confirm: intl.formatMessage(messages.blockConfirm),
onConfirm: () => dispatch(blockAccount(account.id)), onConfirm: () => dispatch(blockAccount(account.id)),
secondary: intl.formatMessage(messages.blockAndReport), secondary: intl.formatMessage(messages.blockAndReport),

View File

@ -50,7 +50,7 @@ const SuggestionItem: React.FC<ISuggestionItem> = ({ accountId }) => {
{account.verified && <VerificationBadge />} {account.verified && <VerificationBadge />}
</HStack> </HStack>
<Text theme='muted' align='center' size='sm' truncate>@{account.acct}</Text> <Text theme='muted' align='center' size='sm' truncate>@{account.acct}</Text> {/* eslint-disable-line formatjs/no-literal-string-in-jsx */}
</Stack> </Stack>
</Stack> </Stack>
</Link> </Link>

View File

@ -86,12 +86,12 @@ const Filters = () => {
<Stack className='grow' space={1}> <Stack className='grow' space={1}>
<Text weight='medium'> <Text weight='medium'>
<FormattedMessage id='filters.filters_list_phrases_label' defaultMessage='Keywords or phrases:' /> <FormattedMessage id='filters.filters_list_phrases_label' defaultMessage='Keywords or phrases:' />
{' '} {' '} {/* eslint-disable-line formatjs/no-literal-string-in-jsx */}
<Text theme='muted' tag='span'>{filter.keywords.map(keyword => keyword.keyword).join(', ')}</Text> <Text theme='muted' tag='span'>{filter.keywords.map(keyword => keyword.keyword).join(', ')}</Text>
</Text> </Text>
<Text weight='medium'> <Text weight='medium'>
<FormattedMessage id='filters.filters_list_context_label' defaultMessage='Filter contexts:' /> <FormattedMessage id='filters.filters_list_context_label' defaultMessage='Filter contexts:' />
{' '} {' '} {/* eslint-disable-line formatjs/no-literal-string-in-jsx */}
<Text theme='muted' tag='span'>{filter.context.map(context => contexts[context] ? intl.formatMessage(contexts[context]) : context).join(', ')}</Text> <Text theme='muted' tag='span'>{filter.context.map(context => contexts[context] ? intl.formatMessage(contexts[context]) : context).join(', ')}</Text>
</Text> </Text>
<HStack space={4} wrap> <HStack space={4} wrap>

View File

@ -15,7 +15,7 @@ const GroupMemberCount = ({ group }: IGroupMemberCount) => {
<Link to={`/group/${group.slug}/members`} className='hover:underline'> <Link to={`/group/${group.slug}/members`} className='hover:underline'>
<Text theme='inherit' tag='span' size='sm' weight='medium' data-testid='group-member-count'> <Text theme='inherit' tag='span' size='sm' weight='medium' data-testid='group-member-count'>
{shortNumberFormat(group.members_count)} {shortNumberFormat(group.members_count)}
{' '} {' '} {/* eslint-disable-line formatjs/no-literal-string-in-jsx */}
<FormattedMessage <FormattedMessage
id='groups.discover.search.results.member_count' id='groups.discover.search.results.member_count'
defaultMessage='{members, plural, one {member} other {members}}' defaultMessage='{members, plural, one {member} other {members}}'

View File

@ -145,6 +145,7 @@ const GroupTagListItem = (props: IGroupMemberListItem) => {
> >
<Link to={`/group/${group.slug}/tag/${tag.id}`} className='group grow'> <Link to={`/group/${group.slug}/tag/${tag.id}`} className='group grow'>
<Stack> <Stack>
{/* eslint-disable formatjs/no-literal-string-in-jsx */}
<Text <Text
weight='bold' weight='bold'
theme={(tag.visible || !isOwner) ? 'default' : 'subtle'} theme={(tag.visible || !isOwner) ? 'default' : 'subtle'}
@ -153,9 +154,12 @@ const GroupTagListItem = (props: IGroupMemberListItem) => {
> >
#{tag.name} #{tag.name}
</Text> </Text>
{/* eslint-enable formatjs/no-literal-string-in-jsx */}
<Text size='sm' theme={(tag.visible || !isOwner) ? 'muted' : 'subtle'}> <Text size='sm' theme={(tag.visible || !isOwner) ? 'muted' : 'subtle'}>
{/* eslint-disable formatjs/no-literal-string-in-jsx */}
{intl.formatMessage(messages.total)}: {intl.formatMessage(messages.total)}:
{' '} {' '}
{/* eslint-enable formatjs/no-literal-string-in-jsx */}
<Text size='sm' theme='inherit' weight='semibold' tag='span'> <Text size='sm' theme='inherit' weight='semibold' tag='span'>
{shortNumberFormat(tag.uses)} {shortNumberFormat(tag.uses)}
</Text> </Text>

View File

@ -58,7 +58,7 @@ const GroupGridItem = forwardRef((props: IGroup, ref: React.ForwardedRef<HTMLDiv
<HStack alignItems='center' space={1}> <HStack alignItems='center' space={1}>
<GroupPrivacy group={group} /> <GroupPrivacy group={group} />
<span>&bull;</span> <span>&bull;</span> {/* eslint-disable-line formatjs/no-literal-string-in-jsx */}
<GroupMemberCount group={group} /> <GroupMemberCount group={group} />
</HStack> </HStack>
</Stack> </Stack>

View File

@ -52,10 +52,10 @@ const GroupListItem = (props: IGroupListItem) => {
{typeof group.members_count !== 'undefined' && ( {typeof group.members_count !== 'undefined' && (
<> <>
<span>&bull;</span> <span>&bull;</span> {/* eslint-disable-line formatjs/no-literal-string-in-jsx */}
<Text theme='inherit' tag='span' size='sm' weight='medium'> <Text theme='inherit' tag='span' size='sm' weight='medium'>
{shortNumberFormat(group.members_count)} {shortNumberFormat(group.members_count)}
{' '} {' '} {/* eslint-disable-line formatjs/no-literal-string-in-jsx */}
<FormattedMessage <FormattedMessage
id='groups.discover.search.results.member_count' id='groups.discover.search.results.member_count'
defaultMessage='{members, plural, one {member} other {members}}' defaultMessage='{members, plural, one {member} other {members}}'

View File

@ -19,8 +19,8 @@ describe('<Blankslate />', () => {
it('should render correctly', () => { it('should render correctly', () => {
render( render(
<Blankslate <Blankslate
title={<span>Title</span>} title={<span>Title</span>} /* eslint-disable-line formatjs/no-literal-string-in-jsx */
subtitle={<span>Subtitle</span>} subtitle={<span>Subtitle</span>} /* eslint-disable-line formatjs/no-literal-string-in-jsx */
/>); />);
expect(screen.getByTestId('no-results')).toHaveTextContent('Title'); expect(screen.getByTestId('no-results')).toHaveTextContent('Title');

View File

@ -23,17 +23,19 @@ const TagListItem = (props: ITagListItem) => {
<Text <Text
weight='bold' weight='bold'
className='group-hover:text-primary-600 group-hover:underline dark:group-hover:text-accent-blue' className='group-hover:text-primary-600 group-hover:underline dark:group-hover:text-accent-blue'
> > {/* eslint-disable-line formatjs/no-literal-string-in-jsx */}
#{tag.name} #{tag.name}
</Text> </Text>
<Text size='sm' theme='muted' weight='medium'> <Text size='sm' theme='muted' weight='medium'>
{/* eslint-disable formatjs/no-literal-string-in-jsx */}
<FormattedMessage <FormattedMessage
id='groups.discovery.tags.no_of_groups' id='groups.discovery.tags.no_of_groups'
defaultMessage='Number of groups' defaultMessage='Number of groups'
/> />
:{' '} :{' '}
{tag.groups} {tag.groups}
{/* eslint-enable formatjs/no-literal-string-in-jsx */}
</Text> </Text>
</Stack> </Stack>
</Link> </Link>

View File

@ -27,6 +27,7 @@ export default ({ withJoinAction = true }: { withJoinAction?: boolean }) => {
{generateText(6)} {generateText(6)}
</Text> </Text>
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
<span>&bull;</span> <span>&bull;</span>
<Text theme='inherit' tag='span' size='sm' weight='medium'> <Text theme='inherit' tag='span' size='sm' weight='medium'>

View File

@ -66,6 +66,7 @@ const OtpConfirmForm: React.FC = () => {
<Stack space={4}> <Stack space={4}>
<Form onSubmit={handleSubmit}> <Form onSubmit={handleSubmit}>
<Stack> <Stack>
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
<Text weight='semibold' size='lg'> <Text weight='semibold' size='lg'>
1. <FormattedMessage id='mfa.mfa_setup_scan_title' defaultMessage='Scan' /> 1. <FormattedMessage id='mfa.mfa_setup_scan_title' defaultMessage='Scan' />
</Text> </Text>
@ -78,6 +79,7 @@ const OtpConfirmForm: React.FC = () => {
<QRCode className='rounded-lg' value={state.qrCodeURI} includeMargin /> <QRCode className='rounded-lg' value={state.qrCodeURI} includeMargin />
{state.confirmKey} {state.confirmKey}
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
<Text weight='semibold' size='lg'> <Text weight='semibold' size='lg'>
2. <FormattedMessage id='mfa.mfa_setup_verify_title' defaultMessage='Verify' /> 2. <FormattedMessage id='mfa.mfa_setup_verify_title' defaultMessage='Verify' />
</Text> </Text>

View File

@ -36,6 +36,7 @@ const SitePreview: React.FC<ISitePreview> = ({ soapbox }) => {
return ( return (
<div className={bodyClass}> <div className={bodyClass}>
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
<style>{`.site-preview {${generateThemeCss(soapboxConfig)}}`}</style> <style>{`.site-preview {${generateThemeCss(soapboxConfig)}}`}</style>
<BackgroundShapes position='absolute' /> <BackgroundShapes position='absolute' />

View File

@ -42,8 +42,10 @@ const FundingPanel: React.FC = () => {
let ratioText; let ratioText;
if (goalReached) { if (goalReached) {
// eslint-disable-next-line formatjs/no-literal-string-in-jsx
ratioText = <><strong>{moneyFormat(goal)}</strong> per month <span>&mdash; reached!</span></>; ratioText = <><strong>{moneyFormat(goal)}</strong> per month <span>&mdash; reached!</span></>;
} else { } else {
// eslint-disable-next-line formatjs/no-literal-string-in-jsx
ratioText = <><strong>{moneyFormat(amount)} out of {moneyFormat(goal)}</strong> per month</>; ratioText = <><strong>{moneyFormat(amount)} out of {moneyFormat(goal)}</strong> per month</>;
} }

View File

@ -38,6 +38,7 @@ const BoostModal: React.FC<IBoostModal> = ({ status, onReblog, onClose }) => {
<ReplyIndicator status={status} hideActions /> <ReplyIndicator status={status} hideActions />
<Text> <Text>
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
<FormattedMessage id='boost_modal.combo' defaultMessage='You can press {combo} to skip this next time' values={{ combo: <span>Shift + <Icon className='inline-block align-middle' src={require('@tabler/icons/outline/repeat.svg')} /></span> }} /> <FormattedMessage id='boost_modal.combo' defaultMessage='You can press {combo} to skip this next time' values={{ combo: <span>Shift + <Icon className='inline-block align-middle' src={require('@tabler/icons/outline/repeat.svg')} /></span> }} />
</Text> </Text>
</Stack> </Stack>

View File

@ -38,36 +38,44 @@ const HotkeysModal: React.FC<IHotkeysModal> = ({ onClose }) => {
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
<TableCell><Hotkey>r</Hotkey></TableCell> <TableCell><Hotkey>r</Hotkey></TableCell>
<TableCell><FormattedMessage id='keyboard_shortcuts.reply' defaultMessage='to reply' /></TableCell> <TableCell><FormattedMessage id='keyboard_shortcuts.reply' defaultMessage='to reply' /></TableCell>
</tr> </tr>
<tr> <tr>
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
<TableCell><Hotkey>m</Hotkey></TableCell> <TableCell><Hotkey>m</Hotkey></TableCell>
<TableCell><FormattedMessage id='keyboard_shortcuts.mention' defaultMessage='to mention author' /></TableCell> <TableCell><FormattedMessage id='keyboard_shortcuts.mention' defaultMessage='to mention author' /></TableCell>
</tr> </tr>
<tr> <tr>
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
<TableCell><Hotkey>p</Hotkey></TableCell> <TableCell><Hotkey>p</Hotkey></TableCell>
<TableCell><FormattedMessage id='keyboard_shortcuts.profile' defaultMessage="to open author's profile" /></TableCell> <TableCell><FormattedMessage id='keyboard_shortcuts.profile' defaultMessage="to open author's profile" /></TableCell>
</tr> </tr>
<tr> <tr>
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
<TableCell><Hotkey>f</Hotkey></TableCell> <TableCell><Hotkey>f</Hotkey></TableCell>
<TableCell><FormattedMessage id='keyboard_shortcuts.favourite' defaultMessage='to like' /></TableCell> <TableCell><FormattedMessage id='keyboard_shortcuts.favourite' defaultMessage='to like' /></TableCell>
</tr> </tr>
{features.emojiReacts && ( {features.emojiReacts && (
<tr> <tr>
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
<TableCell><Hotkey>e</Hotkey></TableCell> <TableCell><Hotkey>e</Hotkey></TableCell>
<TableCell><FormattedMessage id='keyboard_shortcuts.react' defaultMessage='to react' /></TableCell> <TableCell><FormattedMessage id='keyboard_shortcuts.react' defaultMessage='to react' /></TableCell>
</tr> </tr>
)} )}
<tr> <tr>
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
<TableCell><Hotkey>b</Hotkey></TableCell> <TableCell><Hotkey>b</Hotkey></TableCell>
<TableCell><FormattedMessage id='keyboard_shortcuts.boost' defaultMessage='to repost' /></TableCell> <TableCell><FormattedMessage id='keyboard_shortcuts.boost' defaultMessage='to repost' /></TableCell>
</tr> </tr>
<tr> <tr>
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
<TableCell><Hotkey>enter</Hotkey>, <Hotkey>o</Hotkey></TableCell> <TableCell><Hotkey>enter</Hotkey>, <Hotkey>o</Hotkey></TableCell>
<TableCell><FormattedMessage id='keyboard_shortcuts.enter' defaultMessage='to open post' /></TableCell> <TableCell><FormattedMessage id='keyboard_shortcuts.enter' defaultMessage='to open post' /></TableCell>
</tr> </tr>
<tr> <tr>
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
<TableCell><Hotkey>a</Hotkey></TableCell> <TableCell><Hotkey>a</Hotkey></TableCell>
<TableCell><FormattedMessage id='keyboard_shortcuts.open_media' defaultMessage='to open media' /></TableCell> <TableCell><FormattedMessage id='keyboard_shortcuts.open_media' defaultMessage='to open media' /></TableCell>
</tr> </tr>
@ -82,41 +90,50 @@ const HotkeysModal: React.FC<IHotkeysModal> = ({ onClose }) => {
<tbody> <tbody>
{features.spoilers && ( {features.spoilers && (
<tr> <tr>
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
<TableCell><Hotkey>x</Hotkey></TableCell> <TableCell><Hotkey>x</Hotkey></TableCell>
<TableCell><FormattedMessage id='keyboard_shortcuts.toggle_hidden' defaultMessage='to show/hide text behind CW' /></TableCell> <TableCell><FormattedMessage id='keyboard_shortcuts.toggle_hidden' defaultMessage='to show/hide text behind CW' /></TableCell>
</tr> </tr>
)} )}
{features.spoilers && ( {features.spoilers && (
<tr> <tr>
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
<TableCell><Hotkey>h</Hotkey></TableCell> <TableCell><Hotkey>h</Hotkey></TableCell>
<TableCell><FormattedMessage id='keyboard_shortcuts.toggle_sensitivity' defaultMessage='to show/hide media' /></TableCell> <TableCell><FormattedMessage id='keyboard_shortcuts.toggle_sensitivity' defaultMessage='to show/hide media' /></TableCell>
</tr> </tr>
)} )}
<tr> <tr>
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
<TableCell><Hotkey>up</Hotkey>, <Hotkey>k</Hotkey></TableCell> <TableCell><Hotkey>up</Hotkey>, <Hotkey>k</Hotkey></TableCell>
<TableCell><FormattedMessage id='keyboard_shortcuts.up' defaultMessage='to move up in the list' /></TableCell> <TableCell><FormattedMessage id='keyboard_shortcuts.up' defaultMessage='to move up in the list' /></TableCell>
</tr> </tr>
<tr> <tr>
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
<TableCell><Hotkey>down</Hotkey>, <Hotkey>j</Hotkey></TableCell> <TableCell><Hotkey>down</Hotkey>, <Hotkey>j</Hotkey></TableCell>
<TableCell><FormattedMessage id='keyboard_shortcuts.down' defaultMessage='to move down in the list' /></TableCell> <TableCell><FormattedMessage id='keyboard_shortcuts.down' defaultMessage='to move down in the list' /></TableCell>
</tr> </tr>
<tr> <tr>
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
<TableCell><Hotkey>n</Hotkey></TableCell> <TableCell><Hotkey>n</Hotkey></TableCell>
<TableCell><FormattedMessage id='keyboard_shortcuts.compose' defaultMessage='to open the compose textarea' /></TableCell> <TableCell><FormattedMessage id='keyboard_shortcuts.compose' defaultMessage='to open the compose textarea' /></TableCell>
</tr> </tr>
<tr> <tr>
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
<TableCell><Hotkey>alt</Hotkey> + <Hotkey>n</Hotkey></TableCell> <TableCell><Hotkey>alt</Hotkey> + <Hotkey>n</Hotkey></TableCell>
<TableCell><FormattedMessage id='keyboard_shortcuts.toot' defaultMessage='to start a new post' /></TableCell> <TableCell><FormattedMessage id='keyboard_shortcuts.toot' defaultMessage='to start a new post' /></TableCell>
</tr> </tr>
<tr> <tr>
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
<TableCell><Hotkey>backspace</Hotkey></TableCell> <TableCell><Hotkey>backspace</Hotkey></TableCell>
<TableCell><FormattedMessage id='keyboard_shortcuts.back' defaultMessage='to navigate back' /></TableCell> <TableCell><FormattedMessage id='keyboard_shortcuts.back' defaultMessage='to navigate back' /></TableCell>
</tr> </tr>
<tr> <tr>
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
<TableCell><Hotkey>s</Hotkey>, <Hotkey>/</Hotkey></TableCell> <TableCell><Hotkey>s</Hotkey>, <Hotkey>/</Hotkey></TableCell>
<TableCell><FormattedMessage id='keyboard_shortcuts.search' defaultMessage='to focus search' /></TableCell> <TableCell><FormattedMessage id='keyboard_shortcuts.search' defaultMessage='to focus search' /></TableCell>
</tr> </tr>
<tr> <tr>
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
<TableCell><Hotkey>esc</Hotkey></TableCell> <TableCell><Hotkey>esc</Hotkey></TableCell>
<TableCell><FormattedMessage id='keyboard_shortcuts.unfocus' defaultMessage='to un-focus compose textarea/search' /></TableCell> <TableCell><FormattedMessage id='keyboard_shortcuts.unfocus' defaultMessage='to un-focus compose textarea/search' /></TableCell>
</tr> </tr>
@ -130,40 +147,49 @@ const HotkeysModal: React.FC<IHotkeysModal> = ({ onClose }) => {
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
<TableCell><Hotkey>g</Hotkey> + <Hotkey>h</Hotkey></TableCell> <TableCell><Hotkey>g</Hotkey> + <Hotkey>h</Hotkey></TableCell>
<TableCell><FormattedMessage id='keyboard_shortcuts.home' defaultMessage='to open home timeline' /></TableCell> <TableCell><FormattedMessage id='keyboard_shortcuts.home' defaultMessage='to open home timeline' /></TableCell>
</tr> </tr>
<tr> <tr>
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
<TableCell><Hotkey>g</Hotkey> + <Hotkey>n</Hotkey></TableCell> <TableCell><Hotkey>g</Hotkey> + <Hotkey>n</Hotkey></TableCell>
<TableCell><FormattedMessage id='keyboard_shortcuts.notifications' defaultMessage='to open notifications column' /></TableCell> <TableCell><FormattedMessage id='keyboard_shortcuts.notifications' defaultMessage='to open notifications column' /></TableCell>
</tr> </tr>
<tr> <tr>
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
<TableCell><Hotkey>g</Hotkey> + <Hotkey>f</Hotkey></TableCell> <TableCell><Hotkey>g</Hotkey> + <Hotkey>f</Hotkey></TableCell>
<TableCell><FormattedMessage id='keyboard_shortcuts.favourites' defaultMessage='to open likes list' /></TableCell> <TableCell><FormattedMessage id='keyboard_shortcuts.favourites' defaultMessage='to open likes list' /></TableCell>
</tr> </tr>
<tr> <tr>
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
<TableCell><Hotkey>g</Hotkey> + <Hotkey>p</Hotkey></TableCell> <TableCell><Hotkey>g</Hotkey> + <Hotkey>p</Hotkey></TableCell>
<TableCell><FormattedMessage id='keyboard_shortcuts.pinned' defaultMessage='to open pinned posts list' /></TableCell> <TableCell><FormattedMessage id='keyboard_shortcuts.pinned' defaultMessage='to open pinned posts list' /></TableCell>
</tr> </tr>
<tr> <tr>
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
<TableCell><Hotkey>g</Hotkey> + <Hotkey>u</Hotkey></TableCell> <TableCell><Hotkey>g</Hotkey> + <Hotkey>u</Hotkey></TableCell>
<TableCell><FormattedMessage id='keyboard_shortcuts.my_profile' defaultMessage='to open your profile' /></TableCell> <TableCell><FormattedMessage id='keyboard_shortcuts.my_profile' defaultMessage='to open your profile' /></TableCell>
</tr> </tr>
<tr> <tr>
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
<TableCell><Hotkey>g</Hotkey> + <Hotkey>b</Hotkey></TableCell> <TableCell><Hotkey>g</Hotkey> + <Hotkey>b</Hotkey></TableCell>
<TableCell><FormattedMessage id='keyboard_shortcuts.blocked' defaultMessage='to open blocked users list' /></TableCell> <TableCell><FormattedMessage id='keyboard_shortcuts.blocked' defaultMessage='to open blocked users list' /></TableCell>
</tr> </tr>
<tr> <tr>
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
<TableCell><Hotkey>g</Hotkey> + <Hotkey>m</Hotkey></TableCell> <TableCell><Hotkey>g</Hotkey> + <Hotkey>m</Hotkey></TableCell>
<TableCell><FormattedMessage id='keyboard_shortcuts.muted' defaultMessage='to open muted users list' /></TableCell> <TableCell><FormattedMessage id='keyboard_shortcuts.muted' defaultMessage='to open muted users list' /></TableCell>
</tr> </tr>
{features.followRequests && ( {features.followRequests && (
<tr> <tr>
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
<TableCell><Hotkey>g</Hotkey> + <Hotkey>r</Hotkey></TableCell> <TableCell><Hotkey>g</Hotkey> + <Hotkey>r</Hotkey></TableCell>
<TableCell><FormattedMessage id='keyboard_shortcuts.requests' defaultMessage='to open follow requests list' /></TableCell> <TableCell><FormattedMessage id='keyboard_shortcuts.requests' defaultMessage='to open follow requests list' /></TableCell>
</tr> </tr>
)} )}
<tr> <tr>
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
<TableCell><Hotkey>?</Hotkey></TableCell> <TableCell><Hotkey>?</Hotkey></TableCell>
<TableCell><FormattedMessage id='keyboard_shortcuts.legend' defaultMessage='to display this legend' /></TableCell> <TableCell><FormattedMessage id='keyboard_shortcuts.legend' defaultMessage='to display this legend' /></TableCell>
</tr> </tr>

View File

@ -59,6 +59,7 @@ const MuteModal = () => {
<FormattedMessage <FormattedMessage
id='confirmations.mute.message' id='confirmations.mute.message'
defaultMessage='Are you sure you want to mute {name}?' defaultMessage='Are you sure you want to mute {name}?'
// eslint-disable-next-line formatjs/no-literal-string-in-jsx
values={{ name: <strong className='break-words'>@{account.acct}</strong> }} values={{ name: <strong className='break-words'>@{account.acct}</strong> }}
/> />
</Text> </Text>
@ -93,6 +94,7 @@ const MuteModal = () => {
{duration !== 0 && ( {duration !== 0 && (
<Stack space={2}> <Stack space={2}>
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
<Text weight='medium'><FormattedMessage id='mute_modal.duration' defaultMessage='Duration' />: </Text> <Text weight='medium'><FormattedMessage id='mute_modal.duration' defaultMessage='Duration' />: </Text>
<DurationSelector onDurationChange={handleChangeMuteDuration} /> <DurationSelector onDurationChange={handleChangeMuteDuration} />

View File

@ -135,6 +135,7 @@ const CoverPhotoSelectionModal: React.FC<ICoverPhotoSelectionModal> = ({ onClose
)} )}
<Text weight='bold' size='sm'>{account?.display_name}</Text> <Text weight='bold' size='sm'>{account?.display_name}</Text>
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
<Text theme='muted' size='sm'>@{account?.username}</Text> <Text theme='muted' size='sm'>@{account?.username}</Text>
</div> </div>
</div> </div>

View File

@ -266,6 +266,7 @@ const ReportModal = ({ onClose }: IReportModal) => {
case ReportableEntities.GROUP: case ReportableEntities.GROUP:
return intl.formatMessage(messages.reportGroup); return intl.formatMessage(messages.reportGroup);
default: default:
// eslint-disable-next-line formatjs/no-literal-string-in-jsx
return <FormattedMessage id='report.target' defaultMessage='Reporting {target}' values={{ target: <strong>@{account?.acct}</strong> }} />; return <FormattedMessage id='report.target' defaultMessage='Reporting {target}' values={{ target: <strong>@{account?.acct}</strong> }} />;
} }
}; };

View File

@ -37,11 +37,13 @@ const DisplayNameRow: React.FC<IDisplayName> = ({ account, withSuffix = true })
</HStack> </HStack>
); );
// eslint-disable-next-line formatjs/no-literal-string-in-jsx
const suffix = (<span className='display-name'>@{getAcct(account, displayFqn)}</span>); const suffix = (<span className='display-name'>@{getAcct(account, displayFqn)}</span>);
return ( return (
<div className='flex max-w-80 flex-col items-center justify-center text-center sm:flex-row sm:gap-2'> <div className='flex max-w-80 flex-col items-center justify-center text-center sm:flex-row sm:gap-2'>
{displayName} {displayName}
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
<span className='hidden text-2xl font-bold sm:block'>-</span> <span className='hidden text-2xl font-bold sm:block'>-</span>
{withSuffix && suffix} {withSuffix && suffix}
</div> </div>

View File

@ -98,6 +98,7 @@ const ZapSplitModal: React.FC<IZapSplitModal> = ({ zapSplitAccounts, onClose, sp
)} )}
<p className='absolute -bottom-4 -right-2'> <p className='absolute -bottom-4 -right-2'>
<span className='font-bold'> <span className='font-bold'>
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
{currentStep + 1}/{zapSplitAccounts.length} {currentStep + 1}/{zapSplitAccounts.length}
</span> </span>
</p> </p>

View File

@ -48,6 +48,7 @@ const ZapSplit = ({ zapData, zapAmount, invoice, onNext, isLastStep, onFinish }:
<div className='bg-grey-500 dark:border-grey-800 -mx-4 w-full border-b border-solid sm:-mx-10' /> <div className='bg-grey-500 dark:border-grey-800 -mx-4 w-full border-b border-solid sm:-mx-10' />
<Stack justifyContent='center' alignItems='center' className='min-w-72 text-center' space={4}> <Stack justifyContent='center' alignItems='center' className='min-w-72 text-center' space={4}>
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
<h3 className='text-xl font-bold'> <h3 className='text-xl font-bold'>
Help this community grow! Help this community grow!
</h3> </h3>
@ -65,6 +66,7 @@ const ZapSplit = ({ zapData, zapAmount, invoice, onNext, isLastStep, onFinish }:
<div className='flex justify-center'> <div className='flex justify-center'>
<div className='box-shadow:none rounded-none border-0 border-b-2 p-0.5 text-center !ring-0 dark:bg-transparent'> <div className='box-shadow:none rounded-none border-0 border-b-2 p-0.5 text-center !ring-0 dark:bg-transparent'>
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
<span className='!text-5xl font-bold'>{zapAmount}</span> sats <span className='!text-5xl font-bold'>{zapAmount}</span> sats
</div> </div>
</div> </div>

View File

@ -75,6 +75,7 @@ const AddNewAccount: React.FC<AddNewAccountProps> = ({
<HStack space={2} className='w-full md:justify-end'> <HStack space={2} className='w-full md:justify-end'>
<div className='flex w-[96%] flex-col md:w-40'> <div className='flex w-[96%] flex-col md:w-40'>
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
{formattedWeight(newWeight)}% {formattedWeight(newWeight)}%
<Slider value={newWeight} onChange={(e) => handleChange(e)} /> <Slider value={newWeight} onChange={(e) => handleChange(e)} />
</div> </div>

View File

@ -122,6 +122,7 @@ const ProfileInfoPanel: React.FC<IProfileInfoPanel> = ({ account, username }) =>
<Stack space={2}> <Stack space={2}>
<Stack> <Stack>
<HStack space={1} alignItems='center'> <HStack space={1} alignItems='center'>
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
<Text size='sm' theme='muted' direction='ltr' truncate> <Text size='sm' theme='muted' direction='ltr' truncate>
@{username} @{username}
</Text> </Text>
@ -154,6 +155,7 @@ const ProfileInfoPanel: React.FC<IProfileInfoPanel> = ({ account, username }) =>
</HStack> </HStack>
<HStack alignItems='center' space={0.5}> <HStack alignItems='center' space={0.5}>
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
<Text size='sm' theme='muted' direction='ltr' truncate> <Text size='sm' theme='muted' direction='ltr' truncate>
@{displayFqn ? account.fqn : account.acct} @{displayFqn ? account.fqn : account.acct}
</Text> </Text>

View File

@ -70,6 +70,7 @@ const UserPanel: React.FC<IUserPanel> = ({ accountId, action, badges, domain })
</Link> </Link>
<HStack> <HStack>
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
<Text size='sm' theme='muted' direction='ltr' truncate> <Text size='sm' theme='muted' direction='ltr' truncate>
@{getAcct(account, fqn)} @{getAcct(account, fqn)}
</Text> </Text>

View File

@ -544,6 +544,7 @@ const Video: React.FC<IVideo> = ({
{(detailed || fullscreen) && ( {(detailed || fullscreen) && (
<span> <span>
<span className='video-player__time-current'>{formatTime(currentTime)}</span> <span className='video-player__time-current'>{formatTime(currentTime)}</span>
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
<span className='video-player__time-sep'>/</span> <span className='video-player__time-sep'>/</span>
<span className='video-player__time-total'>{formatTime(duration)}</span> <span className='video-player__time-total'>{formatTime(duration)}</span>
</span> </span>

View File

@ -130,6 +130,7 @@ const ZapPayRequestForm = ({ account, status, onClose }: IZapPayRequestForm) =>
type='text' onChange={handleCustomAmount} value={zapAmount} type='text' onChange={handleCustomAmount} value={zapAmount}
className='box-shadow:none max-w-20 rounded-none border-0 border-b-4 p-0 text-center !text-2xl font-bold !ring-0 dark:bg-transparent sm:max-w-28 sm:p-0.5 sm:!text-4xl' className='box-shadow:none max-w-20 rounded-none border-0 border-b-4 p-0 text-center !text-2xl font-bold !ring-0 dark:bg-transparent sm:max-w-28 sm:p-0.5 sm:!text-4xl'
/> />
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
{hasZapSplit && <p className='absolute right-0 font-bold sm:-right-6 sm:text-xl'>sats</p>} {hasZapSplit && <p className='absolute right-0 font-bold sm:-right-6 sm:text-xl'>sats</p>}
</div> </div>

View File

@ -23,6 +23,7 @@ export const ZapSplitSlider: React.FC<IZapSplitSlider> = ({ initialWeight, onWei
return ( return (
<div className={clsx('flex flex-col', width)}> <div className={clsx('flex flex-col', width)}>
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
{formattedWeight(value)}% {formattedWeight(value)}%
<Slider <Slider
value={value} value={value}

View File

@ -44,7 +44,9 @@ const SoapboxHead: React.FC<ISoapboxHead> = ({ children }) => {
<Helmet> <Helmet>
<html lang={locale} className={clsx('h-full', { 'dark': theme === 'dark', 'dark black': theme === 'black' })} /> <html lang={locale} className={clsx('h-full', { 'dark': theme === 'dark', 'dark black': theme === 'black' })} />
<body className={bodyClass} dir={direction} /> <body className={bodyClass} dir={direction} />
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
{themeCss && <style id='theme' type='text/css'>{`:root{${themeCss}}`}</style>} {themeCss && <style id='theme' type='text/css'>{`:root{${themeCss}}`}</style>}
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
{['dark', 'black'].includes(theme) && <style type='text/css'>{':root { color-scheme: dark; }'}</style>} {['dark', 'black'].includes(theme) && <style type='text/css'>{':root { color-scheme: dark; }'}</style>}
<meta name='theme-color' content={soapboxConfig.brandColor} /> <meta name='theme-color' content={soapboxConfig.brandColor} />
</Helmet> </Helmet>

View File

@ -13,6 +13,7 @@ function renderApp() {
toast, toast,
...render( ...render(
<IntlProvider locale='en'> <IntlProvider locale='en'>
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
<Toaster />, <Toaster />,
</IntlProvider>, </IntlProvider>,
), ),

View File

@ -34,6 +34,7 @@ export const shortNumberFormat = (number: any, max?: number): React.ReactNode =>
} }
if (max && value > max) { if (max && value > max) {
// eslint-disable-next-line formatjs/no-literal-string-in-jsx
return <span>{max}+</span>; return <span>{max}+</span>;
} }