Update prettier to 3.3.3
This commit is contained in:
parent
1773ad1e11
commit
24a22bf191
109 changed files with 452 additions and 392 deletions
|
@ -92,7 +92,7 @@ const createActiveDirectCallProp = (
|
|||
hasRemoteVideo: boolean;
|
||||
presenting: boolean;
|
||||
title: string;
|
||||
}
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
|
|
|
@ -174,8 +174,8 @@ export function CallingLobby({
|
|||
const videoButtonType = hasLocalVideo
|
||||
? CallingButtonType.VIDEO_ON
|
||||
: availableCameras.length === 0
|
||||
? CallingButtonType.VIDEO_DISABLED
|
||||
: CallingButtonType.VIDEO_OFF;
|
||||
? CallingButtonType.VIDEO_DISABLED
|
||||
: CallingButtonType.VIDEO_OFF;
|
||||
|
||||
const audioButtonType = hasLocalAudio
|
||||
? CallingButtonType.AUDIO_ON
|
||||
|
|
|
@ -397,9 +397,8 @@ function CustomColorBubble({
|
|||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
|
||||
const conversations = await getConversationsWithCustomColor(
|
||||
colorId
|
||||
);
|
||||
const conversations =
|
||||
await getConversationsWithCustomColor(colorId);
|
||||
if (!conversations.length) {
|
||||
onDelete();
|
||||
} else {
|
||||
|
|
|
@ -506,7 +506,12 @@ export const CompositionArea = memo(function CompositionArea({
|
|||
) {
|
||||
inputApiRef.current.reset();
|
||||
}
|
||||
}, [messageCompositionId, sendCounter, previousMessageCompositionId, previousSendCounter]);
|
||||
}, [
|
||||
messageCompositionId,
|
||||
sendCounter,
|
||||
previousMessageCompositionId,
|
||||
previousSendCounter,
|
||||
]);
|
||||
|
||||
const insertEmoji = useCallback(
|
||||
(e: EmojiPickDataType) => {
|
||||
|
|
|
@ -129,7 +129,7 @@ export const ConfirmationDialog = React.memo(function ConfirmationDialogInner({
|
|||
<Button
|
||||
key={
|
||||
typeof action.text === 'string'
|
||||
? action.id ?? action.text
|
||||
? (action.id ?? action.text)
|
||||
: action.id
|
||||
}
|
||||
disabled={action.disabled || isSpinning}
|
||||
|
|
|
@ -23,7 +23,7 @@ export type PropsType = Readonly<{
|
|||
|
||||
const UNITS = ['seconds', 'minutes', 'hours', 'days', 'weeks'] as const;
|
||||
|
||||
export type Unit = typeof UNITS[number];
|
||||
export type Unit = (typeof UNITS)[number];
|
||||
|
||||
const UNIT_TO_SEC = new Map<Unit, number>([
|
||||
['seconds', 1],
|
||||
|
|
|
@ -26,7 +26,7 @@ const createAttachment = (
|
|||
contentType: stringToMIMEType(props.contentType ?? ''),
|
||||
fileName: props.fileName ?? '',
|
||||
screenshotPath: props.pending === false ? props.screenshotPath : undefined,
|
||||
url: props.pending === false ? props.url ?? '' : '',
|
||||
url: props.pending === false ? (props.url ?? '') : '',
|
||||
size: 3433,
|
||||
});
|
||||
|
||||
|
|
|
@ -637,7 +637,7 @@ function stableParticipantComparator(
|
|||
}
|
||||
|
||||
type ParticipantsInPageType<
|
||||
T extends { videoAspectRatio: number } = ParticipantTileType
|
||||
T extends { videoAspectRatio: number } = ParticipantTileType,
|
||||
> = {
|
||||
rows: Array<Array<T>>;
|
||||
numParticipants: number;
|
||||
|
|
|
@ -320,7 +320,7 @@ export function MediaEditor({
|
|||
const objectShortcuts: Array<
|
||||
[
|
||||
(ev: KeyboardEvent) => boolean,
|
||||
(obj: fabric.Object, ev: KeyboardEvent) => unknown
|
||||
(obj: fabric.Object, ev: KeyboardEvent) => unknown,
|
||||
]
|
||||
> = [
|
||||
[
|
||||
|
@ -1353,9 +1353,8 @@ export function MediaEditor({
|
|||
let data: Uint8Array;
|
||||
let blurHash: string;
|
||||
try {
|
||||
const renderFabricCanvas = await cloneFabricCanvas(
|
||||
fabricCanvas
|
||||
);
|
||||
const renderFabricCanvas =
|
||||
await cloneFabricCanvas(fabricCanvas);
|
||||
|
||||
renderFabricCanvas.remove(
|
||||
...renderFabricCanvas
|
||||
|
|
|
@ -6,7 +6,7 @@ import React from 'react';
|
|||
|
||||
export abstract class PureComponentProfiler<
|
||||
Props extends Record<string, unknown>,
|
||||
State extends Record<string, unknown>
|
||||
State extends Record<string, unknown>,
|
||||
> extends React.Component<Props, State> {
|
||||
public override shouldComponentUpdate(
|
||||
nextProps: Props,
|
||||
|
|
|
@ -70,7 +70,7 @@ const createProps = (overrideProps: Partial<PropsType> = {}): PropsType => ({
|
|||
i18n,
|
||||
safetyNumber:
|
||||
'safetyNumber' in overrideProps
|
||||
? overrideProps.safetyNumber ?? null
|
||||
? (overrideProps.safetyNumber ?? null)
|
||||
: {
|
||||
numberBlocks: generateNumberBlocks(),
|
||||
qrData: generateQRData(),
|
||||
|
|
|
@ -7,7 +7,7 @@ import classNames from 'classnames';
|
|||
import { getClassNamesFor } from '../util/getClassNamesFor';
|
||||
|
||||
export const SpinnerSvgSizes = ['small', 'normal'] as const;
|
||||
export type SpinnerSvgSize = typeof SpinnerSvgSizes[number];
|
||||
export type SpinnerSvgSize = (typeof SpinnerSvgSizes)[number];
|
||||
|
||||
export const SpinnerDirections = [
|
||||
'outgoing',
|
||||
|
@ -17,7 +17,7 @@ export const SpinnerDirections = [
|
|||
'on-progress-dialog',
|
||||
'on-avatar',
|
||||
] as const;
|
||||
export type SpinnerDirection = typeof SpinnerDirections[number];
|
||||
export type SpinnerDirection = (typeof SpinnerDirections)[number];
|
||||
|
||||
export type Props = {
|
||||
ariaLabel?: string;
|
||||
|
|
|
@ -5,7 +5,7 @@ import React from 'react';
|
|||
import classNames from 'classnames';
|
||||
|
||||
export const SpinnerSvgSizes = ['small', 'normal'] as const;
|
||||
export type SpinnerSvgSize = typeof SpinnerSvgSizes[number];
|
||||
export type SpinnerSvgSize = (typeof SpinnerSvgSizes)[number];
|
||||
|
||||
export type Props = {
|
||||
className?: string;
|
||||
|
|
|
@ -93,7 +93,8 @@ const BackgroundStyle = {
|
|||
},
|
||||
};
|
||||
|
||||
type BackgroundStyleType = typeof BackgroundStyle[keyof typeof BackgroundStyle];
|
||||
type BackgroundStyleType =
|
||||
(typeof BackgroundStyle)[keyof typeof BackgroundStyle];
|
||||
|
||||
function getBackground(
|
||||
bgStyle: BackgroundStyleType
|
||||
|
|
|
@ -269,7 +269,7 @@ function createCanvasAndContext({
|
|||
height,
|
||||
}: CreateCanvasAndContextOptionsType): [
|
||||
OffscreenCanvas,
|
||||
OffscreenCanvasRenderingContext2D
|
||||
OffscreenCanvasRenderingContext2D,
|
||||
] {
|
||||
const canvas = new OffscreenCanvas(
|
||||
PRINT_PIXEL_RATIO * width,
|
||||
|
|
|
@ -456,7 +456,7 @@ function HeaderContent({
|
|||
sharedGroupNames={sharedGroupNames}
|
||||
size={AvatarSize.THIRTY_TWO}
|
||||
// user may have stories, but we don't show that on Note to Self conversation
|
||||
storyRing={conversation.isMe ? undefined : hasStories ?? undefined}
|
||||
storyRing={conversation.isMe ? undefined : (hasStories ?? undefined)}
|
||||
theme={theme}
|
||||
title={conversation.title}
|
||||
unblurredAvatarUrl={conversation.unblurredAvatarUrl ?? undefined}
|
||||
|
|
|
@ -162,10 +162,10 @@ export const MessageStatuses = [
|
|||
'sent',
|
||||
'viewed',
|
||||
] as const;
|
||||
export type MessageStatusType = typeof MessageStatuses[number];
|
||||
export type MessageStatusType = (typeof MessageStatuses)[number];
|
||||
|
||||
export const Directions = ['incoming', 'outgoing'] as const;
|
||||
export type DirectionType = typeof Directions[number];
|
||||
export type DirectionType = (typeof Directions)[number];
|
||||
|
||||
export type AudioAttachmentProps = {
|
||||
renderingContext: string;
|
||||
|
|
|
@ -34,7 +34,7 @@ export const MessageStatuses = [
|
|||
'partial-sent',
|
||||
] as const;
|
||||
|
||||
export type MessageStatusType = typeof MessageStatuses[number];
|
||||
export type MessageStatusType = (typeof MessageStatuses)[number];
|
||||
|
||||
export type PropsData = Pick<
|
||||
ConversationType,
|
||||
|
|
|
@ -8,7 +8,7 @@ import { emojiToImage, getImagePath } from './lib';
|
|||
|
||||
export const EmojiSizes = [16, 18, 20, 24, 28, 32, 48, 64, 66] as const;
|
||||
|
||||
export type EmojiSizeType = typeof EmojiSizes[number];
|
||||
export type EmojiSizeType = (typeof EmojiSizes)[number];
|
||||
|
||||
export type OwnProps = {
|
||||
emoji?: string;
|
||||
|
|
|
@ -76,7 +76,7 @@ const categories = [
|
|||
'flag',
|
||||
] as const;
|
||||
|
||||
type Category = typeof categories[number];
|
||||
type Category = (typeof categories)[number];
|
||||
|
||||
export const EmojiPicker = React.memo(
|
||||
React.forwardRef<HTMLDivElement, Props>(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue