lint fixes

This commit is contained in:
ewwwwwwww 2022-07-09 10:02:21 -07:00
parent 2f579839d8
commit 9770209f00
4 changed files with 24 additions and 27 deletions

View file

@ -1,15 +1,11 @@
import React from 'react';
import { isCustomEmoji, isNativeEmoji } from 'soapbox/features/emoji';
import { isCustomEmoji } from 'soapbox/features/emoji';
import unicodeMapping from 'soapbox/features/emoji/mapping';
import { joinPublicPath } from 'soapbox/utils/static';
import type { Emoji } from 'soapbox/features/emoji';
interface UnicodeMapping {
filename: string,
}
interface IAutosuggestEmoji {
emoji: Emoji,
}

View file

@ -8,8 +8,8 @@ import Icon from 'soapbox/components/icon';
import AutosuggestAccount from 'soapbox/features/compose/components/autosuggest_account';
import { isRtl } from 'soapbox/rtl';
import type { Emoji } from 'soapbox/features/emoji';
import type { Menu, MenuItem } from 'soapbox/components/dropdown_menu';
import type { Emoji } from 'soapbox/features/emoji';
type CursorMatch = [
tokenStart: number | null,

View file

@ -12,9 +12,9 @@ import { buildCustomEmojis } from '../../emoji';
import { EmojiPicker as EmojiPickerAsync } from '../../ui/util/async-components';
// import { Picker as EmojiPicker } from '../../emoji/emoji_picker';
import type { EmojiPick } from 'emoji-mart';
import type { List } from 'immutable';
import type { Emoji, CustomEmoji, NativeEmoji } from 'soapbox/features/emoji';
import type { EmojiPick } from 'emoji-mart';
let EmojiPicker: any; // load asynchronously
@ -114,25 +114,25 @@ const EmojiPickerDropdown: React.FC<IEmojiPickerDropdown> = ({ custom_emojis, fr
}
};
const getI18n = () => {
return {
search: intl.formatMessage(messages.emoji_search),
notfound: intl.formatMessage(messages.emoji_not_found),
categories: {
search: intl.formatMessage(messages.search_results),
recent: intl.formatMessage(messages.recent),
people: intl.formatMessage(messages.people),
nature: intl.formatMessage(messages.nature),
foods: intl.formatMessage(messages.food),
activity: intl.formatMessage(messages.activity),
places: intl.formatMessage(messages.travel),
objects: intl.formatMessage(messages.objects),
symbols: intl.formatMessage(messages.symbols),
flags: intl.formatMessage(messages.flags),
custom: intl.formatMessage(messages.custom),
},
};
};
// const getI18n = () => {
// return {
// search: intl.formatMessage(messages.emoji_search),
// notfound: intl.formatMessage(messages.emoji_not_found),
// categories: {
// search: intl.formatMessage(messages.search_results),
// recent: intl.formatMessage(messages.recent),
// people: intl.formatMessage(messages.people),
// nature: intl.formatMessage(messages.nature),
// foods: intl.formatMessage(messages.food),
// activity: intl.formatMessage(messages.activity),
// places: intl.formatMessage(messages.travel),
// objects: intl.formatMessage(messages.objects),
// symbols: intl.formatMessage(messages.symbols),
// flags: intl.formatMessage(messages.flags),
// custom: intl.formatMessage(messages.custom),
// },
// };
// };
useEffect(() => {
document.addEventListener('click', handleDocClick, false);

View file

@ -1,7 +1,8 @@
import data from './data';
import { Picker as EmojiPicker, PickerProps } from 'emoji-mart';
import React, { useRef, useEffect } from 'react';
import data from './data';
// const categories = [
// 'recent',
// 'custom',