Migrate util, types, state, sticker-creator to ESLint

This commit is contained in:
Sidney Keese 2020-09-14 14:56:35 -07:00 committed by Josh Perez
parent 372aa44e49
commit 2ade4acd52
115 changed files with 647 additions and 448 deletions

View file

@ -31,7 +31,13 @@ export type Props = Partial<
readonly image?: string;
readonly mode?: Mode;
readonly showGuide?: boolean;
onPickEmoji?({ id: string, emoji: EmojiPickData }): unknown;
onPickEmoji?({
id,
emoji,
}: {
id: string;
emoji: EmojiPickDataType;
}): unknown;
onRemove?(id: string): unknown;
};
@ -180,7 +186,8 @@ export const StickerFrame = React.memo(
onMouseLeave={handleMouseLeave}
ref={rootRef}
>
{mode !== 'add' ? (
{// eslint-disable-next-line no-nested-ternary
mode !== 'add' ? (
image ? (
<ImageHandle src={image} />
) : (
@ -191,14 +198,11 @@ export const StickerFrame = React.memo(
<div className={styles.guide} />
) : null}
{mode === 'add' && onDrop ? (
<DropZone
onDrop={onDrop}
inner={true}
onDragActive={setDragActive}
/>
<DropZone onDrop={onDrop} inner onDragActive={setDragActive} />
) : null}
{mode === 'removable' ? (
<button
type="button"
className={styles.closeButton}
onClick={handleRemove}
// Reverse the mouseenter/leave logic for the remove button so
@ -214,6 +218,7 @@ export const StickerFrame = React.memo(
<PopperReference>
{({ ref }) => (
<button
type="button"
ref={ref}
className={styles.emojiButton}
onClick={handleToggleEmojiPicker}