eslint: use semicolon TypeScript delimeter
This commit is contained in:
@@ -33,22 +33,22 @@ const initialSuggestionState = {
|
||||
};
|
||||
|
||||
interface Suggestion {
|
||||
list: Emoji[]
|
||||
tokenStart: number
|
||||
token: string
|
||||
list: Emoji[];
|
||||
tokenStart: number;
|
||||
token: string;
|
||||
}
|
||||
|
||||
interface IChatComposer extends Pick<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'onKeyDown' | 'onChange' | 'onPaste' | 'disabled'> {
|
||||
value: string
|
||||
onSubmit: () => void
|
||||
errorMessage: string | undefined
|
||||
onSelectFile: (files: FileList, intl: IntlShape) => void
|
||||
resetFileKey: number | null
|
||||
resetContentKey: number | null
|
||||
attachments?: Attachment[]
|
||||
onDeleteAttachment?: (i: number) => void
|
||||
uploadCount?: number
|
||||
uploadProgress?: number
|
||||
value: string;
|
||||
onSubmit: () => void;
|
||||
errorMessage: string | undefined;
|
||||
onSelectFile: (files: FileList, intl: IntlShape) => void;
|
||||
resetFileKey: number | null;
|
||||
resetContentKey: number | null;
|
||||
attachments?: Attachment[];
|
||||
onDeleteAttachment?: (i: number) => void;
|
||||
uploadCount?: number;
|
||||
uploadProgress?: number;
|
||||
}
|
||||
|
||||
/** Textarea input for chats. */
|
||||
|
||||
@@ -23,8 +23,8 @@ const messages = defineMessages({
|
||||
});
|
||||
|
||||
interface IChatListItemInterface {
|
||||
chat: IChat
|
||||
onClick: (chat: any) => void
|
||||
chat: IChat;
|
||||
onClick: (chat: any) => void;
|
||||
}
|
||||
|
||||
const ChatListItem: React.FC<IChatListItemInterface> = ({ chat, onClick }) => {
|
||||
|
||||
@@ -12,9 +12,9 @@ import { useChats } from 'soapbox/queries/chats';
|
||||
import ChatListItem from './chat-list-item';
|
||||
|
||||
interface IChatList {
|
||||
onClickChat: (chat: any) => void
|
||||
useWindowScroll?: boolean
|
||||
searchValue?: string
|
||||
onClickChat: (chat: any) => void;
|
||||
useWindowScroll?: boolean;
|
||||
searchValue?: string;
|
||||
}
|
||||
|
||||
const ChatList: React.FC<IChatList> = ({ onClickChat, useWindowScroll = false, searchValue }) => {
|
||||
|
||||
@@ -63,7 +63,7 @@ const Scroller: Components['Scroller'] = React.forwardRef((props, ref) => {
|
||||
|
||||
interface IChatMessageList {
|
||||
/** Chat the messages are being rendered from. */
|
||||
chat: IChat
|
||||
chat: IChat;
|
||||
}
|
||||
|
||||
/** Scrollable list of chat messages. */
|
||||
|
||||
@@ -4,9 +4,9 @@ import { Portal } from 'soapbox/components/ui';
|
||||
import EmojiSelector from 'soapbox/components/ui/emoji-selector/emoji-selector';
|
||||
|
||||
interface IChatMessageReactionWrapper {
|
||||
onOpen(isOpen: boolean): void
|
||||
onSelect(emoji: string): void
|
||||
children: JSX.Element
|
||||
onOpen(isOpen: boolean): void;
|
||||
onSelect(emoji: string): void;
|
||||
children: JSX.Element;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -6,9 +6,9 @@ import emojify from 'soapbox/features/emoji';
|
||||
import { EmojiReaction } from 'soapbox/types/entities';
|
||||
|
||||
interface IChatMessageReaction {
|
||||
emojiReaction: EmojiReaction
|
||||
onRemoveReaction(emoji: string): void
|
||||
onAddReaction(emoji: string): void
|
||||
emojiReaction: EmojiReaction;
|
||||
onRemoveReaction(emoji: string): void;
|
||||
onAddReaction(emoji: string): void;
|
||||
}
|
||||
|
||||
const ChatMessageReaction = (props: IChatMessageReaction) => {
|
||||
|
||||
@@ -53,8 +53,8 @@ const parseContent = (chatMessage: ChatMessageEntity) => {
|
||||
};
|
||||
|
||||
interface IChatMessage {
|
||||
chat: IChat
|
||||
chatMessage: ChatMessageEntity
|
||||
chat: IChat;
|
||||
chatMessage: ChatMessageEntity;
|
||||
}
|
||||
|
||||
const ChatMessage = (props: IChatMessage) => {
|
||||
|
||||
@@ -12,7 +12,7 @@ import ChatPageSidebar from './components/chat-page-sidebar';
|
||||
import Welcome from './components/welcome';
|
||||
|
||||
interface IChatPage {
|
||||
chatId?: string
|
||||
chatId?: string;
|
||||
}
|
||||
|
||||
const ChatPage: React.FC<IChatPage> = ({ chatId }) => {
|
||||
|
||||
@@ -10,8 +10,8 @@ import { useAppDispatch, useOwnAccount, useSettings } from 'soapbox/hooks';
|
||||
import { useUpdateCredentials } from 'soapbox/queries/accounts';
|
||||
|
||||
type FormData = {
|
||||
accepts_chat_messages?: boolean
|
||||
chats_onboarded: boolean
|
||||
accepts_chat_messages?: boolean;
|
||||
chats_onboarded: boolean;
|
||||
}
|
||||
|
||||
const messages = defineMessages({
|
||||
|
||||
@@ -7,8 +7,8 @@ import { useOwnAccount } from 'soapbox/hooks';
|
||||
import { useUpdateCredentials } from 'soapbox/queries/accounts';
|
||||
|
||||
type FormData = {
|
||||
accepts_chat_messages?: boolean
|
||||
chats_onboarded: boolean
|
||||
accepts_chat_messages?: boolean;
|
||||
chats_onboarded: boolean;
|
||||
}
|
||||
|
||||
const messages = defineMessages({
|
||||
|
||||
@@ -10,7 +10,7 @@ const messages = defineMessages({
|
||||
});
|
||||
|
||||
interface IBlankslate {
|
||||
onSearch(): void
|
||||
onSearch(): void;
|
||||
}
|
||||
|
||||
const Blankslate = ({ onSearch }: IBlankslate) => {
|
||||
|
||||
@@ -3,7 +3,7 @@ import React from 'react';
|
||||
import { ProgressBar } from 'soapbox/components/ui';
|
||||
|
||||
interface IChatPendingUpload {
|
||||
progress: number
|
||||
progress: number;
|
||||
}
|
||||
|
||||
/** Displays a loading thumbnail for an upload in the chat composer. */
|
||||
|
||||
@@ -9,11 +9,11 @@ const messages = defineMessages({
|
||||
|
||||
interface IChatSearchInput {
|
||||
/** Search term. */
|
||||
value: string
|
||||
value: string;
|
||||
/** Callback when the search value changes. */
|
||||
onChange: React.ChangeEventHandler<HTMLInputElement>
|
||||
onChange: React.ChangeEventHandler<HTMLInputElement>;
|
||||
/** Callback when the input is cleared. */
|
||||
onClear: React.MouseEventHandler<HTMLButtonElement>
|
||||
onClear: React.MouseEventHandler<HTMLButtonElement>;
|
||||
}
|
||||
|
||||
/** Search input for filtering chats. */
|
||||
|
||||
@@ -21,7 +21,7 @@ const messages = defineMessages({
|
||||
});
|
||||
|
||||
interface IChatSearch {
|
||||
isMainPage?: boolean
|
||||
isMainPage?: boolean;
|
||||
}
|
||||
|
||||
const ChatSearch = (props: IChatSearch) => {
|
||||
|
||||
@@ -9,8 +9,8 @@ import useAccountSearch from 'soapbox/queries/search';
|
||||
import type { Account } from 'soapbox/types/entities';
|
||||
|
||||
interface IResults {
|
||||
accountSearchResult: ReturnType<typeof useAccountSearch>
|
||||
onSelect(id: string): void
|
||||
accountSearchResult: ReturnType<typeof useAccountSearch>;
|
||||
onSelect(id: string): void;
|
||||
}
|
||||
|
||||
const Results = ({ accountSearchResult, onSelect }: IResults) => {
|
||||
|
||||
@@ -7,10 +7,10 @@ import ChatPendingUpload from './chat-pending-upload';
|
||||
import ChatUpload from './chat-upload';
|
||||
|
||||
interface IChatTextarea extends React.ComponentProps<typeof Textarea> {
|
||||
attachments?: Attachment[]
|
||||
onDeleteAttachment?: (i: number) => void
|
||||
uploadCount?: number
|
||||
uploadProgress?: number
|
||||
attachments?: Attachment[];
|
||||
onDeleteAttachment?: (i: number) => void;
|
||||
uploadCount?: number;
|
||||
uploadProgress?: number;
|
||||
}
|
||||
|
||||
/** Custom textarea for chats. */
|
||||
|
||||
@@ -8,8 +8,8 @@ import type { Attachment } from 'soapbox/types/entities';
|
||||
const defaultIcon = require('@tabler/icons/paperclip.svg');
|
||||
|
||||
interface IChatUploadPreview {
|
||||
className?: string
|
||||
attachment: Attachment
|
||||
className?: string;
|
||||
attachment: Attachment;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -12,8 +12,8 @@ import ChatUploadPreview from './chat-upload-preview';
|
||||
import type { Attachment } from 'soapbox/types/entities';
|
||||
|
||||
interface IChatUpload {
|
||||
attachment: Attachment
|
||||
onDelete?(): void
|
||||
attachment: Attachment;
|
||||
onDelete?(): void;
|
||||
}
|
||||
|
||||
/** An attachment uploaded to the chat composer, before sending. */
|
||||
@@ -44,7 +44,7 @@ const ChatUpload: React.FC<IChatUpload> = ({ attachment, onDelete }) => {
|
||||
};
|
||||
|
||||
interface IRemoveButton {
|
||||
onClick?: React.MouseEventHandler<HTMLButtonElement>
|
||||
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
||||
}
|
||||
|
||||
/** Floating button to remove an attachment. */
|
||||
|
||||
@@ -3,13 +3,13 @@ import React, { HTMLAttributes } from 'react';
|
||||
import { HStack, IconButton, Text } from 'soapbox/components/ui';
|
||||
|
||||
interface IChatPaneHeader {
|
||||
isOpen: boolean
|
||||
isToggleable?: boolean
|
||||
onToggle(): void
|
||||
title: string | React.ReactNode
|
||||
unreadCount?: number
|
||||
secondaryAction?(): void
|
||||
secondaryActionIcon?: string
|
||||
isOpen: boolean;
|
||||
isToggleable?: boolean;
|
||||
onToggle(): void;
|
||||
title: string | React.ReactNode;
|
||||
unreadCount?: number;
|
||||
secondaryAction?(): void;
|
||||
secondaryActionIcon?: string;
|
||||
}
|
||||
|
||||
const ChatPaneHeader = (props: IChatPaneHeader) => {
|
||||
|
||||
@@ -17,7 +17,7 @@ const messages = defineMessages({
|
||||
autoDeleteMessageTooltip: { id: 'chat_window.auto_delete_tooltip', defaultMessage: 'Chat messages are set to auto-delete after {day, plural, one {# day} other {# days}} upon sending.' },
|
||||
});
|
||||
|
||||
const LinkWrapper = ({ enabled, to, children }: { enabled: boolean, to: string, children: React.ReactNode }): JSX.Element => {
|
||||
const LinkWrapper = ({ enabled, to, children }: { enabled: boolean; to: string; children: React.ReactNode }): JSX.Element => {
|
||||
if (!enabled) {
|
||||
return <>{children}</>;
|
||||
}
|
||||
|
||||
@@ -23,9 +23,9 @@ const messages = defineMessages({
|
||||
});
|
||||
|
||||
interface ChatInterface {
|
||||
chat: IChat
|
||||
inputRef?: MutableRefObject<HTMLTextAreaElement | null>
|
||||
className?: string
|
||||
chat: IChat;
|
||||
inputRef?: MutableRefObject<HTMLTextAreaElement | null>;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,13 +3,13 @@ import React from 'react';
|
||||
|
||||
interface IPane {
|
||||
/** Whether the pane is open or minimized. */
|
||||
isOpen: boolean
|
||||
isOpen: boolean;
|
||||
/** Positions the pane on the screen, with 0 at the right. */
|
||||
index: number
|
||||
index: number;
|
||||
/** Children to display in the pane. */
|
||||
children: React.ReactNode
|
||||
children: React.ReactNode;
|
||||
/** Whether this is the main chat pane. */
|
||||
main?: boolean
|
||||
main?: boolean;
|
||||
}
|
||||
|
||||
/** Chat pane UI component for desktop. */
|
||||
|
||||
@@ -6,8 +6,8 @@ import ChatPage from './components/chat-page/chat-page';
|
||||
|
||||
interface IChatIndex {
|
||||
params?: {
|
||||
chatId?: string
|
||||
}
|
||||
chatId?: string;
|
||||
};
|
||||
}
|
||||
|
||||
const ChatIndex: React.FC<IChatIndex> = ({ params }) => (
|
||||
|
||||
Reference in New Issue
Block a user