From 850a9a78d5cf8e302b7e5cdad16c8800e792def5 Mon Sep 17 00:00:00 2001 From: danidfra Date: Tue, 22 Oct 2024 11:53:26 -0300 Subject: [PATCH 1/4] Change warn to error --- .eslintrc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.eslintrc.json b/.eslintrc.json index 84f6bb0b5..14ad3b192 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -317,7 +317,7 @@ "formatjs/enforce-default-message": "error", "formatjs/enforce-id": "error", - "formatjs/no-literal-string-in-jsx": "warn" + "formatjs/no-literal-string-in-jsx": "error" }, "overrides": [ { From 5e97e6e0ef3abb22302aaa92f32921ed6d1225ad Mon Sep 17 00:00:00 2001 From: danidfra Date: Tue, 22 Oct 2024 16:48:35 -0300 Subject: [PATCH 2/4] Fix untranslated text warnings - Fix untranslated text - Adjust Tailwind class order - Adjust indentation --- src/components/account.tsx | 10 +++---- src/components/announcements/announcement.tsx | 2 ++ src/components/announcements/reaction.tsx | 2 +- src/components/big-card.tsx | 4 +-- src/components/display-name-inline.tsx | 4 +-- src/components/display-name.tsx | 2 +- src/components/hashtag.tsx | 2 +- src/components/media-gallery.tsx | 4 +-- src/components/polls/poll-footer.tsx | 6 ++--- src/components/polls/poll-option.tsx | 2 +- src/components/site-error-boundary.tsx | 6 ++++- src/components/status-action-bar.tsx | 2 +- src/components/status-reply-mentions.tsx | 2 +- src/components/status.tsx | 2 ++ .../statuses/sensitive-content-overlay.tsx | 2 ++ src/components/statuses/status-info.tsx | 2 +- src/components/ui/button/button.test.tsx | 12 ++++----- src/components/ui/card/card.test.tsx | 2 +- .../ui/form-actions/form-actions.test.tsx | 2 +- src/components/ui/form/form.test.tsx | 4 +-- .../language-dropdown/language-dropdown.tsx | 4 +-- src/components/ui/modal/modal.tsx | 4 +-- src/components/ui/select/select.tsx | 2 +- src/components/ui/tag-input/tag-input.tsx | 2 +- src/components/ui/textarea/textarea.tsx | 2 +- src/components/ui/widget/widget.tsx | 2 +- src/features/about/index.tsx | 2 +- .../account-gallery/components/media-item.tsx | 2 +- src/features/account/components/header.tsx | 8 +++--- src/features/admin/announcements.tsx | 4 +-- src/features/admin/components/report.tsx | 6 ++--- src/features/admin/domains.tsx | 2 +- src/features/admin/relays.tsx | 2 +- src/features/admin/rules.tsx | 2 +- src/features/admin/tabs/dashboard.tsx | 2 +- src/features/aliases/components/search.tsx | 2 +- src/features/aliases/index.tsx | 2 +- src/features/audio/index.tsx | 2 +- .../auth-login/components/consumers-list.tsx | 2 +- .../password-reset-confirm.test.tsx | 2 +- .../chats/components/chat-list-item.tsx | 2 +- .../components/chat-message-list-intro.tsx | 4 +-- .../chats/components/chat-message-list.tsx | 2 +- .../chats/components/chat-page/chat-page.tsx | 4 +-- .../chat-page/components/chat-page-main.tsx | 4 +-- .../components/chat-pane-header.test.tsx | 2 +- .../chat-search/chat-search.test.tsx | 2 +- .../chats/components/chat-search/results.tsx | 2 +- .../chats/components/chat-textarea.tsx | 6 ++--- .../chats/components/chat-widget.test.tsx | 4 +++ .../chat-widget/chat-pane-header.tsx | 2 ++ .../components/chat-widget/chat-settings.tsx | 4 +-- .../components/chat-widget/chat-window.tsx | 4 +-- .../headers/chat-search-header.tsx | 2 +- src/features/chats/components/ui/pane.tsx | 2 +- .../compose/components/polls/poll-form.tsx | 2 +- .../compose/components/reply-mentions.tsx | 2 +- .../developers/developers-challenge.tsx | 2 ++ .../edit-profile/components/header-picker.tsx | 2 +- .../event/components/event-header.tsx | 6 ++--- .../feed-suggestions/feed-suggestions.tsx | 4 +-- src/features/filters/index.tsx | 4 +-- .../group/components/group-header.tsx | 6 ++--- .../group/components/group-member-count.tsx | 2 +- .../group/components/group-tag-list-item.tsx | 4 +++ .../components/discover/group-grid-item.tsx | 2 +- .../components/discover/group-list-item.tsx | 4 +-- .../discover/search/blankslate.test.tsx | 4 +-- .../components/discover/tag-list-item.tsx | 4 ++- .../components/placeholder-group-search.tsx | 1 + .../components/placeholder-notification.tsx | 2 +- .../security/mfa/otp-confirm-form.tsx | 2 ++ .../components/site-preview.tsx | 1 + .../status/components/thread-status.tsx | 2 +- src/features/ui/components/funding-panel.tsx | 2 ++ .../ui/components/modals/boost-modal.tsx | 1 + .../compose-event-modal.tsx | 4 +-- .../ui/components/modals/hotkeys-modal.tsx | 26 +++++++++++++++++++ .../steps/confirmation-step.tsx | 2 +- .../ui/components/modals/mute-modal.tsx | 2 ++ .../steps/avatar-step.tsx | 4 +-- .../onboarding-flow-modal/steps/bio-step.tsx | 6 ++--- .../steps/completed-step.tsx | 4 +-- .../steps/cover-photo-selection-step.tsx | 7 ++--- .../steps/display-name-step.tsx | 6 ++--- .../steps/suggested-accounts-step.tsx | 6 ++--- .../modals/report-modal/report-modal.tsx | 1 + .../ui/components/modals/zap-invoice.tsx | 2 +- .../modals/zap-split/display-name-row.tsx | 2 ++ .../modals/zap-split/zap-split-modal.tsx | 1 + .../components/modals/zap-split/zap-split.tsx | 2 ++ .../ui/components/new-account-zap-split.tsx | 1 + .../ui/components/profile-dropdown.tsx | 2 +- .../ui/components/profile-info-panel.tsx | 2 ++ src/features/ui/components/user-panel.tsx | 1 + src/features/ui/index.tsx | 2 +- src/features/video/index.tsx | 1 + .../zap/components/zap-pay-request-form.tsx | 5 ++-- .../zap/components/zap-split-account-item.tsx | 1 + src/init/soapbox-head.tsx | 2 ++ src/pages/landing-page.tsx | 2 +- src/toast.test.tsx | 1 + src/utils/numbers.tsx | 1 + 103 files changed, 204 insertions(+), 127 deletions(-) diff --git a/src/components/account.tsx b/src/components/account.tsx index f61029250..a9eb9a546 100644 --- a/src/components/account.tsx +++ b/src/components/account.tsx @@ -239,7 +239,7 @@ const Account = ({ - @{acct ?? username} + @{acct ?? username} {/* eslint-disable-line formatjs/no-literal-string-in-jsx */} {account.pleroma?.favicon && ( @@ -247,7 +247,7 @@ const Account = ({ {(timestamp) ? ( <> - · + · {/* eslint-disable-line formatjs/no-literal-string-in-jsx */} {timestampUrl ? ( event.stopPropagation()}> @@ -261,7 +261,7 @@ const Account = ({ {approvalStatus && ['pending', 'rejected'].includes(approvalStatus) && ( <> - · + · {/* eslint-disable-line formatjs/no-literal-string-in-jsx */} {approvalStatus === 'pending' @@ -273,7 +273,7 @@ const Account = ({ {showEdit ? ( <> - · + · {/* eslint-disable-line formatjs/no-literal-string-in-jsx */} @@ -281,7 +281,7 @@ const Account = ({ {actionType === 'muting' && account.mute_expires_at ? ( <> - · + · {/* eslint-disable-line formatjs/no-literal-string-in-jsx */} diff --git a/src/components/announcements/announcement.tsx b/src/components/announcements/announcement.tsx index 3b07e8ece..0bacdd60c 100644 --- a/src/components/announcements/announcement.tsx +++ b/src/components/announcements/announcement.tsx @@ -41,9 +41,11 @@ const Announcement: React.FC = ({ announcement, emojiMap }) => { hour={skipTime ? undefined : 'numeric'} minute={skipTime ? undefined : '2-digit'} /> + {/* eslint-disable formatjs/no-literal-string-in-jsx */} {' '} - {' '} + {/* eslint-enable formatjs/no-literal-string-in-jsx */} = ({ announcementId, reaction, emojiMap, sty onClick={handleClick} onMouseEnter={handleMouseEnter} onMouseLeave={handleMouseLeave} - title={`:${shortCode}:`} + title={`:${shortCode}:`} // eslint-disable-line formatjs/no-literal-string-in-jsx style={style} > diff --git a/src/components/big-card.tsx b/src/components/big-card.tsx index f6b7ce614..8e822f719 100644 --- a/src/components/big-card.tsx +++ b/src/components/big-card.tsx @@ -16,9 +16,9 @@ const BigCard: React.FC = ({ title, subtitle, children, onClose }) => return ( -
+
- {onClose && ()} + {onClose && ()} {title} {subtitle && {subtitle}} diff --git a/src/components/display-name-inline.tsx b/src/components/display-name-inline.tsx index f130e20ee..972e7d211 100644 --- a/src/components/display-name-inline.tsx +++ b/src/components/display-name-inline.tsx @@ -31,12 +31,12 @@ const DisplayNameInline: React.FC = ({ account, withSuffix = true ); - const suffix = (@{getAcct(account, displayFqn)}); + const suffix = (@{getAcct(account, displayFqn)}); // eslint-disable-line formatjs/no-literal-string-in-jsx return (
{displayName} - - + - {/* eslint-disable-line formatjs/no-literal-string-in-jsx */} {withSuffix && suffix}
); diff --git a/src/components/display-name.tsx b/src/components/display-name.tsx index bb6c8816b..130e1f0df 100644 --- a/src/components/display-name.tsx +++ b/src/components/display-name.tsx @@ -33,7 +33,7 @@ const DisplayName: React.FC = ({ account, children, withSuffix = t ); - const suffix = (@{getAcct(account, displayFqn)}); + const suffix = (@{getAcct(account, displayFqn)}); // eslint-disable-line formatjs/no-literal-string-in-jsx return ( diff --git a/src/components/hashtag.tsx b/src/components/hashtag.tsx index 1963c4f04..690661515 100644 --- a/src/components/hashtag.tsx +++ b/src/components/hashtag.tsx @@ -20,7 +20,7 @@ const Hashtag: React.FC = ({ hashtag }) => { - #{hashtag.name} + #{hashtag.name} {/* eslint-disable-line formatjs/no-literal-string-in-jsx */} {Boolean(count) && ( diff --git a/src/components/media-gallery.tsx b/src/components/media-gallery.tsx index a4ee9dd1b..aae7d3ca3 100644 --- a/src/components/media-gallery.tsx +++ b/src/components/media-gallery.tsx @@ -228,7 +228,7 @@ const Item: React.FC = ({ {...conditionalAttributes} /> - GIF + GIF {/* eslint-disable-line formatjs/no-literal-string-in-jsx */}
); } else if (attachment.type === 'audio') { @@ -276,7 +276,7 @@ const Item: React.FC = ({ style={{ position, float, left, top, right, bottom, height, width: `${width}%` }} > {last && total > ATTACHMENT_LIMIT && ( -
+
{/* eslint-disable-line formatjs/no-literal-string-in-jsx */} +{total - ATTACHMENT_LIMIT + 1}
)} diff --git a/src/components/polls/poll-footer.tsx b/src/components/polls/poll-footer.tsx index 9fc40b073..09798f828 100644 --- a/src/components/polls/poll-footer.tsx +++ b/src/components/polls/poll-footer.tsx @@ -63,7 +63,7 @@ const PollFooter: React.FC = ({ poll, showResults, selected }): JSX - · + · {/* eslint-disable-line formatjs/no-literal-string-in-jsx */} )} @@ -75,7 +75,7 @@ const PollFooter: React.FC = ({ poll, showResults, selected }): JSX - · + · {/* eslint-disable-line formatjs/no-literal-string-in-jsx */} )} @@ -85,7 +85,7 @@ const PollFooter: React.FC = ({ poll, showResults, selected }): JSX {poll.expires_at !== null && ( <> - · + · {/* eslint-disable-line formatjs/no-literal-string-in-jsx */} {timeRemaining} )} diff --git a/src/components/polls/poll-option.tsx b/src/components/polls/poll-option.tsx index 020ede4b0..1c0760188 100644 --- a/src/components/polls/poll-option.tsx +++ b/src/components/polls/poll-option.tsx @@ -152,7 +152,7 @@ const PollOption: React.FC = (props): JSX.Element | null => { )}
- {Math.round(percent)}% + {Math.round(percent)}% {/* eslint-disable-line formatjs/no-literal-string-in-jsx */}
diff --git a/src/components/site-error-boundary.tsx b/src/components/site-error-boundary.tsx index 513906b2e..f06c13f2d 100644 --- a/src/components/site-error-boundary.tsx +++ b/src/components/site-error-boundary.tsx @@ -84,7 +84,7 @@ const SiteErrorBoundary: React.FC = ({ children }) => {
-

+

@@ -105,16 +105,20 @@ const SiteErrorBoundary: React.FC = ({ children }) => {

+ {/* eslint-disable formatjs/no-literal-string-in-jsx */} {sourceCode.displayName}: {' '}{sourceCode.version} + {/* eslint-enable formatjs/no-literal-string-in-jsx */}
diff --git a/src/components/status-action-bar.tsx b/src/components/status-action-bar.tsx index 5223214f7..93b03cd15 100644 --- a/src/components/status-action-bar.tsx +++ b/src/components/status-action-bar.tsx @@ -321,7 +321,7 @@ const StatusActionBar: React.FC = ({ dispatch(openModal('CONFIRM', { icon: require('@tabler/icons/outline/ban.svg'), heading: , - message: @{account.acct} }} />, + message: @{account.acct} }} />, // eslint-disable-line formatjs/no-literal-string-in-jsx confirm: intl.formatMessage(messages.blockConfirm), onConfirm: () => dispatch(blockAccount(account.id)), secondary: intl.formatMessage(messages.blockAndReport), diff --git a/src/components/status-reply-mentions.tsx b/src/components/status-reply-mentions.tsx index 995cb6904..75eb8eab4 100644 --- a/src/components/status-reply-mentions.tsx +++ b/src/components/status-reply-mentions.tsx @@ -56,7 +56,7 @@ const StatusReplyMentions: React.FC = ({ status, hoverable to={`/@${account.acct}`} className='reply-mentions__account max-w-[200px] truncate align-bottom' onClick={(e) => e.stopPropagation()} - > + > {/* eslint-disable-line formatjs/no-literal-string-in-jsx */} @{shortenNostr(account.username)} ); diff --git a/src/components/status.tsx b/src/components/status.tsx index 3d9349fd2..022eab385 100644 --- a/src/components/status.tsx +++ b/src/components/status.tsx @@ -334,6 +334,7 @@ const Status: React.FC = (props) => { return (
+ {/* eslint-disable formatjs/no-literal-string-in-jsx */} : {status.filtered.join(', ')}. {' '} @@ -341,6 +342,7 @@ const Status: React.FC = (props) => { + {/* eslint-enable formatjs/no-literal-string-in-jsx */}
); diff --git a/src/components/statuses/sensitive-content-overlay.tsx b/src/components/statuses/sensitive-content-overlay.tsx index 6812b9531..cb50c722b 100644 --- a/src/components/statuses/sensitive-content-overlay.tsx +++ b/src/components/statuses/sensitive-content-overlay.tsx @@ -118,9 +118,11 @@ const SensitiveContentOverlay = React.forwardRef + {/* eslint-disable formatjs/no-literal-string-in-jsx */} + {/* eslint-enable formatjs/no-literal-string-in-jsx */}
)}
diff --git a/src/components/statuses/status-info.tsx b/src/components/statuses/status-info.tsx index b97513177..57eb3199e 100644 --- a/src/components/statuses/status-info.tsx +++ b/src/components/statuses/status-info.tsx @@ -25,7 +25,7 @@ const StatusInfo = (props: IStatusInfo) => {
', () => { }); it('renders the children', () => { - render(); + render(); // eslint-disable-line formatjs/no-literal-string-in-jsx expect(screen.getByRole('button')).toHaveTextContent('children'); }); it('renders the props.text instead of children', () => { const text = 'foo'; - const children =

children

; + const children =

children

; // eslint-disable-line formatjs/no-literal-string-in-jsx render(); expect(screen.getByRole('button')).toHaveTextContent('foo'); @@ -63,13 +63,13 @@ describe('); + render(); // eslint-disable-line formatjs/no-literal-string-in-jsx expect(screen.getByRole('link')).toBeInTheDocument(); }); it('does not render a link', () => { - render(); + render(); //eslint-disable-line formatjs/no-literal-string-in-jsx expect(screen.queryAllByRole('link')).toHaveLength(0); }); @@ -77,13 +77,13 @@ describe('); + render(); // eslint-disable-line formatjs/no-literal-string-in-jsx expect(screen.getByTestId('icon')).toBeInTheDocument(); }); it('does not render an icon', () => { - render(); + render(); // eslint-disable-line formatjs/no-literal-string-in-jsx expect(screen.queryAllByTestId('icon')).toHaveLength(0); }); diff --git a/src/components/ui/card/card.test.tsx b/src/components/ui/card/card.test.tsx index aa540f6da..1971441ae 100644 --- a/src/components/ui/card/card.test.tsx +++ b/src/components/ui/card/card.test.tsx @@ -12,7 +12,7 @@ describe('', () => { - + {/* eslint-disable-line formatjs/no-literal-string-in-jsx */} Card Body , diff --git a/src/components/ui/form-actions/form-actions.test.tsx b/src/components/ui/form-actions/form-actions.test.tsx index 53738853d..32ff56638 100644 --- a/src/components/ui/form-actions/form-actions.test.tsx +++ b/src/components/ui/form-actions/form-actions.test.tsx @@ -6,7 +6,7 @@ import FormActions from './form-actions'; describe('', () => { it('renders successfully', () => { - render(
child
); + render(
child
); {/* eslint-disable-line formatjs/no-literal-string-in-jsx */} expect(screen.getByTestId('child')).toBeInTheDocument(); }); diff --git a/src/components/ui/form/form.test.tsx b/src/components/ui/form/form.test.tsx index 35fdddcf8..c25d590ed 100644 --- a/src/components/ui/form/form.test.tsx +++ b/src/components/ui/form/form.test.tsx @@ -8,7 +8,7 @@ describe('
', () => { it('renders children', () => { const onSubmitMock = vi.fn(); render( - children
, +
children
, // eslint-disable-line formatjs/no-literal-string-in-jsx ); expect(screen.getByTestId('form')).toHaveTextContent('children'); @@ -17,7 +17,7 @@ describe('
', () => { it('handles onSubmit prop', () => { const onSubmitMock = vi.fn(); render( - children
, +
children
, // eslint-disable-line formatjs/no-literal-string-in-jsx ); fireEvent.submit( diff --git a/src/components/ui/language-dropdown/language-dropdown.tsx b/src/components/ui/language-dropdown/language-dropdown.tsx index b6eac2f15..ba272675f 100644 --- a/src/components/ui/language-dropdown/language-dropdown.tsx +++ b/src/components/ui/language-dropdown/language-dropdown.tsx @@ -47,11 +47,11 @@ const LanguageDropdown: React.FC = ({ language, setLanguage } return ( {language ? ( - ) : ( - + )} ); diff --git a/src/components/ui/modal/modal.tsx b/src/components/ui/modal/modal.tsx index 82b9e6482..045909030 100644 --- a/src/components/ui/modal/modal.tsx +++ b/src/components/ui/modal/modal.tsx @@ -118,7 +118,7 @@ const Modal = React.forwardRef(({ src={require('@tabler/icons/outline/arrow-left.svg')} title={intl.formatMessage(messages.back)} onClick={onBack} - className='text-gray-500 hover:text-gray-700 dark:text-gray-300 dark:hover:text-gray-200 rtl:rotate-180' + className='text-gray-500 hover:text-gray-700 rtl:rotate-180 dark:text-gray-300 dark:hover:text-gray-200' /> )} @@ -131,7 +131,7 @@ const Modal = React.forwardRef(({ src={closeIcon} title={intl.formatMessage(messages.close)} onClick={onClose} - className='text-gray-500 hover:text-gray-700 dark:text-gray-300 dark:hover:text-gray-200 rtl:rotate-180' + className='text-gray-500 hover:text-gray-700 rtl:rotate-180 dark:text-gray-300 dark:hover:text-gray-200' /> )}
diff --git a/src/components/ui/select/select.tsx b/src/components/ui/select/select.tsx index 1c14fe9ae..b74f8195e 100644 --- a/src/components/ui/select/select.tsx +++ b/src/components/ui/select/select.tsx @@ -14,7 +14,7 @@ const Select = React.forwardRef((props, ref) => { {
- {' '} + {' '} {/* eslint-disable-line formatjs/no-literal-string-in-jsx */} {alias}
diff --git a/src/features/audio/index.tsx b/src/features/audio/index.tsx index 62903f125..366a6a076 100644 --- a/src/features/audio/index.tsx +++ b/src/features/audio/index.tsx @@ -554,7 +554,7 @@ const Audio: React.FC = (props) => { {formatTime(Math.floor(currentTime))} {getDuration() && (<> - / + / {/* eslint-disable-line formatjs/no-literal-string-in-jsx */} {formatTime(Math.floor(getDuration()))} )} diff --git a/src/features/auth-login/components/consumers-list.tsx b/src/features/auth-login/components/consumers-list.tsx index 52f898ad5..0b5dcdf5b 100644 --- a/src/features/auth-login/components/consumers-list.tsx +++ b/src/features/auth-login/components/consumers-list.tsx @@ -16,7 +16,7 @@ const ConsumersList: React.FC = () => { if (providers.length > 0) { return ( - + diff --git a/src/features/auth-login/components/password-reset-confirm.test.tsx b/src/features/auth-login/components/password-reset-confirm.test.tsx index ab2372d08..d4c8d1196 100644 --- a/src/features/auth-login/components/password-reset-confirm.test.tsx +++ b/src/features/auth-login/components/password-reset-confirm.test.tsx @@ -9,7 +9,7 @@ import PasswordResetConfirm from './password-reset-confirm'; const TestableComponent = () => ( - Homepage + Homepage {/* eslint-disable-line formatjs/no-literal-string-in-jsx */} ); diff --git a/src/features/chats/components/chat-list-item.tsx b/src/features/chats/components/chat-list-item.tsx index 3cdd41c0b..124ecb036 100644 --- a/src/features/chats/components/chat-list-item.tsx +++ b/src/features/chats/components/chat-list-item.tsx @@ -84,7 +84,7 @@ const ChatListItem: React.FC = ({ chat, onClick }) => {
- {chat.account?.display_name || `@${chat.account.username}`} + {chat.account?.display_name || `@${chat.account.username}`} {/* eslint-disable-line formatjs/no-literal-string-in-jsx */} {chat.account?.verified && }
diff --git a/src/features/chats/components/chat-message-list-intro.tsx b/src/features/chats/components/chat-message-list-intro.tsx index f5af0113b..dcb0439fb 100644 --- a/src/features/chats/components/chat-message-list-intro.tsx +++ b/src/features/chats/components/chat-message-list-intro.tsx @@ -74,13 +74,13 @@ const ChatMessageListIntro = () => { {needsAcceptance ? ( <> - @{chat.account.acct} + @{chat.account.acct} {/* eslint-disable-line formatjs/no-literal-string-in-jsx */} {' '} {intl.formatMessage(messages.intro)} ) : ( - @{chat.account.acct} + @{chat.account.acct} {/* eslint-disable-line formatjs/no-literal-string-in-jsx */} )} diff --git a/src/features/chats/components/chat-message-list.tsx b/src/features/chats/components/chat-message-list.tsx index cce1feff4..8d4e02f1d 100644 --- a/src/features/chats/components/chat-message-list.tsx +++ b/src/features/chats/components/chat-message-list.tsx @@ -195,7 +195,7 @@ const ChatMessageList: React.FC = ({ chat }) => { <> {intl.formatMessage(messages.blockedBy)} {' '} - @{chat.account.acct} + @{chat.account.acct} {/* eslint-disable-line formatjs/no-literal-string-in-jsx */}
diff --git a/src/features/chats/components/chat-page/chat-page.tsx b/src/features/chats/components/chat-page/chat-page.tsx index bb20afa80..8384c8744 100644 --- a/src/features/chats/components/chat-page/chat-page.tsx +++ b/src/features/chats/components/chat-page/chat-page.tsx @@ -60,7 +60,7 @@ const ChatPage: React.FC = ({ chatId }) => {
{isOnboarded ? (
= ({ chatId }) => { data-testid='chat-page' > diff --git a/src/features/chats/components/chat-page/components/chat-page-main.tsx b/src/features/chats/components/chat-page/components/chat-page-main.tsx index 578d2261c..71934fa9b 100644 --- a/src/features/chats/components/chat-page/components/chat-page-main.tsx +++ b/src/features/chats/components/chat-page/components/chat-page-main.tsx @@ -134,7 +134,7 @@ const ChatPageMain = () => {
- {chat.account.display_name || `@${chat.account.username}`} + {chat.account.display_name || `@${chat.account.username}`} {/* eslint-disable-line formatjs/no-literal-string-in-jsx */} {chat.account.verified && } @@ -173,7 +173,7 @@ const ChatPageMain = () => { {chat.account.display_name} - @{chat.account.acct} + @{chat.account.acct} {/* eslint-disable-line formatjs/no-literal-string-in-jsx */} diff --git a/src/features/chats/components/chat-pane-header.test.tsx b/src/features/chats/components/chat-pane-header.test.tsx index 6faac3fa8..a518c183a 100644 --- a/src/features/chats/components/chat-pane-header.test.tsx +++ b/src/features/chats/components/chat-pane-header.test.tsx @@ -27,7 +27,7 @@ describe('', () => { describe('when it is a node', () => { it('renders the title', () => { const title = ( -

hello world

+

hello world

// eslint-disable-line formatjs/no-literal-string-in-jsx ); render(); diff --git a/src/features/chats/components/chat-search/chat-search.test.tsx b/src/features/chats/components/chat-search/chat-search.test.tsx index c2f1c8534..3555a66ae 100644 --- a/src/features/chats/components/chat-search/chat-search.test.tsx +++ b/src/features/chats/components/chat-search/chat-search.test.tsx @@ -12,7 +12,7 @@ const renderComponent = () => render( - , + , {/* eslint-disable-line formatjs/no-literal-string-in-jsx */} , ); diff --git a/src/features/chats/components/chat-search/results.tsx b/src/features/chats/components/chat-search/results.tsx index 1edec0dde..91a6fdb95 100644 --- a/src/features/chats/components/chat-search/results.tsx +++ b/src/features/chats/components/chat-search/results.tsx @@ -41,7 +41,7 @@ const Results = ({ accountSearchResult, onSelect }: IResults) => { {account.display_name} {account.verified && }
- @{account.acct} + @{account.acct} {/* eslint-disable-line formatjs/no-literal-string-in-jsx */}
diff --git a/src/features/chats/components/chat-textarea.tsx b/src/features/chats/components/chat-textarea.tsx index a8269b0c0..f85d897d5 100644 --- a/src/features/chats/components/chat-textarea.tsx +++ b/src/features/chats/components/chat-textarea.tsx @@ -39,9 +39,9 @@ const ChatTextarea: React.FC = React.forwardRef(({ bg-white text-gray-900 shadow-sm placeholder:text-gray-600 focus-within:border-primary-500 - focus-within:ring-1 focus-within:ring-primary-500 dark:border-gray-800 dark:bg-gray-800 - dark:text-gray-100 dark:ring-1 dark:ring-gray-800 dark:placeholder:text-gray-600 dark:focus-within:border-primary-500 - dark:focus-within:ring-primary-500 sm:text-sm + focus-within:ring-1 focus-within:ring-primary-500 sm:text-sm dark:border-gray-800 + dark:bg-gray-800 dark:text-gray-100 dark:ring-1 dark:ring-gray-800 dark:placeholder:text-gray-600 + dark:focus-within:border-primary-500 dark:focus-within:ring-primary-500 `} > {(!!attachments?.length || isUploading) && ( diff --git a/src/features/chats/components/chat-widget.test.tsx b/src/features/chats/components/chat-widget.test.tsx index 933a2a570..55d2af647 100644 --- a/src/features/chats/components/chat-widget.test.tsx +++ b/src/features/chats/components/chat-widget.test.tsx @@ -35,8 +35,10 @@ describe('', () => { it('hides the widget', async () => { const App = () => ( + {/* eslint-disable formatjs/no-literal-string-in-jsx */} Chats page Homepage + {/* eslint-enable formatjs/no-literal-string-in-jsx */} ); @@ -85,8 +87,10 @@ describe('', () => { it('shows the widget', async () => { const App = () => ( + {/* eslint-disable formatjs/no-literal-string-in-jsx */} Chats page Homepage + {/* eslint-enable formatjs/no-literal-string-in-jsx */} ); diff --git a/src/features/chats/components/chat-widget/chat-pane-header.tsx b/src/features/chats/components/chat-widget/chat-pane-header.tsx index 1fad1602c..5cff70014 100644 --- a/src/features/chats/components/chat-widget/chat-pane-header.tsx +++ b/src/features/chats/components/chat-widget/chat-pane-header.tsx @@ -43,9 +43,11 @@ const ChatPaneHeader = (props: IChatPaneHeader) => { {(typeof unreadCount !== 'undefined' && unreadCount > 0) && ( + {/* eslint-disable formatjs/no-literal-string-in-jsx */} ({unreadCount}) + {/* eslint-enable formatjs/no-literal-string-in-jsx */}
diff --git a/src/features/chats/components/chat-widget/chat-settings.tsx b/src/features/chats/components/chat-widget/chat-settings.tsx index 30b3d88f4..a488eca39 100644 --- a/src/features/chats/components/chat-widget/chat-settings.tsx +++ b/src/features/chats/components/chat-widget/chat-settings.tsx @@ -96,7 +96,7 @@ const ChatSettings = () => { @@ -112,7 +112,7 @@ const ChatSettings = () => { {chat.account.display_name} - @{chat.account.acct} + @{chat.account.acct} {/* eslint-disable-line formatjs/no-literal-string-in-jsx */} diff --git a/src/features/chats/components/chat-widget/chat-window.tsx b/src/features/chats/components/chat-widget/chat-window.tsx index 4f183623a..bb4e2c1d4 100644 --- a/src/features/chats/components/chat-widget/chat-window.tsx +++ b/src/features/chats/components/chat-widget/chat-window.tsx @@ -73,7 +73,7 @@ const ChatWindow = () => { )} @@ -88,7 +88,7 @@ const ChatWindow = () => {
- {chat.account.display_name || `@${chat.account.acct}`} + {chat.account.display_name || `@${chat.account.acct}`} {/* eslint-disable-line formatjs/no-literal-string-in-jsx */} {chat.account.verified && }
diff --git a/src/features/chats/components/chat-widget/headers/chat-search-header.tsx b/src/features/chats/components/chat-widget/headers/chat-search-header.tsx index 81828f51f..41d7f1d3b 100644 --- a/src/features/chats/components/chat-widget/headers/chat-search-header.tsx +++ b/src/features/chats/components/chat-widget/headers/chat-search-header.tsx @@ -27,7 +27,7 @@ const ChatSearchHeader = () => { > diff --git a/src/features/chats/components/ui/pane.tsx b/src/features/chats/components/ui/pane.tsx index db9fc9666..40d58fad2 100644 --- a/src/features/chats/components/ui/pane.tsx +++ b/src/features/chats/components/ui/pane.tsx @@ -12,7 +12,7 @@ interface IPane { const Pane: React.FC = ({ isOpen = false, children }) => { return (
= ({
- {index + 1}. + {index + 1}. {/* eslint-disable-line formatjs/no-literal-string-in-jsx */}
= ({ composeId }) => { const accounts = to.slice(0, 2).map((acct: string) => { const username = acct.split('@')[0]; return ( - + {/* eslint-disable-line formatjs/no-literal-string-in-jsx */} @{shortenNostr(username)} ); diff --git a/src/features/developers/developers-challenge.tsx b/src/features/developers/developers-challenge.tsx index ee83ba809..cc379975e 100644 --- a/src/features/developers/developers-challenge.tsx +++ b/src/features/developers/developers-challenge.tsx @@ -41,11 +41,13 @@ const DevelopersChallenge = () => {
+ {/* eslint-disable formatjs/no-literal-string-in-jsx */} soapbox() }} /> + {/* eslint-enable formatjs/no-literal-string-in-jsx */} diff --git a/src/features/edit-profile/components/header-picker.tsx b/src/features/edit-profile/components/header-picker.tsx index bf27afc17..6636846d4 100644 --- a/src/features/edit-profile/components/header-picker.tsx +++ b/src/features/edit-profile/components/header-picker.tsx @@ -36,7 +36,7 @@ const HeaderPicker = React.forwardRef(({ src, onC