Change ESLint rules, lint
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
@@ -5,7 +5,7 @@ import { useAppSelector } from 'soapbox/hooks';
|
||||
import { makeGetAccount } from 'soapbox/selectors';
|
||||
|
||||
interface IAutosuggestAccount {
|
||||
id: string,
|
||||
id: string
|
||||
}
|
||||
|
||||
const AutosuggestAccount: React.FC<IAutosuggestAccount> = ({ id }) => {
|
||||
|
||||
@@ -4,11 +4,11 @@ import React from 'react';
|
||||
import { IconButton } from 'soapbox/components/ui';
|
||||
|
||||
interface IComposeFormButton {
|
||||
icon: string,
|
||||
title?: string,
|
||||
active?: boolean,
|
||||
disabled?: boolean,
|
||||
onClick: () => void,
|
||||
icon: string
|
||||
title?: string
|
||||
active?: boolean
|
||||
disabled?: boolean
|
||||
onClick: () => void
|
||||
}
|
||||
|
||||
const ComposeFormButton: React.FC<IComposeFormButton> = ({
|
||||
|
||||
@@ -57,12 +57,12 @@ const messages = defineMessages({
|
||||
});
|
||||
|
||||
interface IComposeForm<ID extends string> {
|
||||
id: ID extends 'default' ? never : ID,
|
||||
shouldCondense?: boolean,
|
||||
autoFocus?: boolean,
|
||||
clickableAreaRef?: React.RefObject<HTMLDivElement>,
|
||||
event?: string,
|
||||
group?: string,
|
||||
id: ID extends 'default' ? never : ID
|
||||
shouldCondense?: boolean
|
||||
autoFocus?: boolean
|
||||
clickableAreaRef?: React.RefObject<HTMLDivElement>
|
||||
event?: string
|
||||
group?: string
|
||||
}
|
||||
|
||||
const ComposeForm = <ID extends string>({ id, shouldCondense, autoFocus, clickableAreaRef, event, group }: IComposeForm<ID>) => {
|
||||
|
||||
@@ -92,8 +92,8 @@ const messages = defineMessages({
|
||||
});
|
||||
|
||||
interface IEmojiPickerDropdown {
|
||||
onPickEmoji: (data: EmojiType) => void,
|
||||
button?: JSX.Element,
|
||||
onPickEmoji: (data: EmojiType) => void
|
||||
button?: JSX.Element
|
||||
}
|
||||
|
||||
const EmojiPickerDropdown: React.FC<IEmojiPickerDropdown> = ({ onPickEmoji, button }) => {
|
||||
|
||||
@@ -32,14 +32,14 @@ const messages = defineMessages({
|
||||
});
|
||||
|
||||
interface IEmojiPickerMenu {
|
||||
customEmojis: ImmutableList<ImmutableMap<string, string>>,
|
||||
loading?: boolean,
|
||||
onClose: () => void,
|
||||
onPick: (emoji: Emoji) => void,
|
||||
onSkinTone: (skinTone: number) => void,
|
||||
skinTone?: number,
|
||||
frequentlyUsedEmojis?: Array<string>,
|
||||
style?: React.CSSProperties,
|
||||
customEmojis: ImmutableList<ImmutableMap<string, string>>
|
||||
loading?: boolean
|
||||
onClose: () => void
|
||||
onPick: (emoji: Emoji) => void
|
||||
onSkinTone: (skinTone: number) => void
|
||||
skinTone?: number
|
||||
frequentlyUsedEmojis?: Array<string>
|
||||
style?: React.CSSProperties
|
||||
}
|
||||
|
||||
const EmojiPickerMenu: React.FC<IEmojiPickerMenu> = ({
|
||||
|
||||
@@ -7,9 +7,9 @@ const listenerOptions = supportsPassiveEvents ? { passive: true } : false;
|
||||
const backgroundImageFn = () => require('emoji-datasource/img/twitter/sheets/32.png');
|
||||
|
||||
interface IModifierPickerMenu {
|
||||
active: boolean,
|
||||
onSelect: (modifier: number) => void,
|
||||
onClose: () => void,
|
||||
active: boolean
|
||||
onSelect: (modifier: number) => void
|
||||
onClose: () => void
|
||||
}
|
||||
|
||||
const ModifierPickerMenu: React.FC<IModifierPickerMenu> = ({ active, onSelect, onClose }) => {
|
||||
|
||||
@@ -6,11 +6,11 @@ import ModifierPickerMenu from './modifier-picker-menu';
|
||||
const backgroundImageFn = () => require('emoji-datasource/img/twitter/sheets/32.png');
|
||||
|
||||
interface IModifierPicker {
|
||||
active: boolean,
|
||||
modifier?: number,
|
||||
onOpen: () => void,
|
||||
onClose: () => void,
|
||||
onChange: (skinTone: number) => void,
|
||||
active: boolean
|
||||
modifier?: number
|
||||
onOpen: () => void
|
||||
onClose: () => void
|
||||
onChange: (skinTone: number) => void
|
||||
}
|
||||
|
||||
const ModifierPicker: React.FC<IModifierPicker> = ({ active, modifier, onOpen, onClose, onChange }) => {
|
||||
|
||||
@@ -12,7 +12,7 @@ const messages = defineMessages({
|
||||
});
|
||||
|
||||
interface IMarkdownButton {
|
||||
composeId: string,
|
||||
composeId: string
|
||||
}
|
||||
|
||||
const MarkdownButton: React.FC<IMarkdownButton> = ({ composeId }) => {
|
||||
|
||||
@@ -13,7 +13,7 @@ const messages = defineMessages({
|
||||
|
||||
interface IPollButton {
|
||||
composeId: string
|
||||
disabled?: boolean,
|
||||
disabled?: boolean
|
||||
}
|
||||
|
||||
const PollButton: React.FC<IPollButton> = ({ composeId, disabled }) => {
|
||||
|
||||
@@ -105,7 +105,7 @@ const Option: React.FC<IOption> = ({
|
||||
};
|
||||
|
||||
interface IPollForm {
|
||||
composeId: string,
|
||||
composeId: string
|
||||
}
|
||||
|
||||
const PollForm: React.FC<IPollForm> = ({ composeId }) => {
|
||||
|
||||
@@ -30,13 +30,13 @@ const messages = defineMessages({
|
||||
const listenerOptions = supportsPassiveEvents ? { passive: true } : false;
|
||||
|
||||
interface IPrivacyDropdownMenu {
|
||||
style?: React.CSSProperties,
|
||||
items: any[],
|
||||
value: string,
|
||||
placement: string,
|
||||
onClose: () => void,
|
||||
onChange: (value: string | null) => void,
|
||||
unavailable?: boolean,
|
||||
style?: React.CSSProperties
|
||||
items: any[]
|
||||
value: string
|
||||
placement: string
|
||||
onClose: () => void
|
||||
onChange: (value: string | null) => void
|
||||
unavailable?: boolean
|
||||
}
|
||||
|
||||
const PrivacyDropdownMenu: React.FC<IPrivacyDropdownMenu> = ({ style, items, placement, value, onClose, onChange }) => {
|
||||
@@ -140,7 +140,7 @@ const PrivacyDropdownMenu: React.FC<IPrivacyDropdownMenu> = ({ style, items, pla
|
||||
};
|
||||
|
||||
interface IPrivacyDropdown {
|
||||
composeId: string,
|
||||
composeId: string
|
||||
}
|
||||
|
||||
const PrivacyDropdown: React.FC<IPrivacyDropdown> = ({
|
||||
|
||||
@@ -9,10 +9,10 @@ import { isRtl } from 'soapbox/rtl';
|
||||
import type { Status } from 'soapbox/types/entities';
|
||||
|
||||
interface IReplyIndicator {
|
||||
className?: string,
|
||||
status?: Status,
|
||||
onCancel?: () => void,
|
||||
hideActions: boolean,
|
||||
className?: string
|
||||
status?: Status
|
||||
onCancel?: () => void
|
||||
hideActions: boolean
|
||||
}
|
||||
|
||||
const ReplyIndicator: React.FC<IReplyIndicator> = ({ className, status, hideActions, onCancel }) => {
|
||||
|
||||
@@ -10,7 +10,7 @@ import { makeGetStatus } from 'soapbox/selectors';
|
||||
import type { Status as StatusEntity } from 'soapbox/types/entities';
|
||||
|
||||
interface IReplyMentions {
|
||||
composeId: string,
|
||||
composeId: string
|
||||
}
|
||||
|
||||
const ReplyMentions: React.FC<IReplyMentions> = ({ composeId }) => {
|
||||
|
||||
@@ -12,8 +12,8 @@ const messages = defineMessages({
|
||||
});
|
||||
|
||||
interface IScheduleButton {
|
||||
composeId: string,
|
||||
disabled?: boolean,
|
||||
composeId: string
|
||||
disabled?: boolean
|
||||
}
|
||||
|
||||
const ScheduleButton: React.FC<IScheduleButton> = ({ composeId, disabled }) => {
|
||||
|
||||
@@ -28,7 +28,7 @@ const messages = defineMessages({
|
||||
});
|
||||
|
||||
export interface IScheduleForm {
|
||||
composeId: string,
|
||||
composeId: string
|
||||
}
|
||||
|
||||
const ScheduleForm: React.FC<IScheduleForm> = ({ composeId }) => {
|
||||
@@ -74,7 +74,7 @@ const ScheduleForm: React.FC<IScheduleForm> = ({ composeId }) => {
|
||||
/>)}
|
||||
</BundleContainer>
|
||||
<IconButton
|
||||
iconClassName='w-4 h-4'
|
||||
iconClassName='h-4 w-4'
|
||||
className='bg-transparent text-gray-400 hover:text-gray-600'
|
||||
src={require('@tabler/icons/x.svg')}
|
||||
onClick={handleRemove}
|
||||
|
||||
@@ -34,9 +34,9 @@ function redirectToAccount(accountId: string, routerHistory: any) {
|
||||
}
|
||||
|
||||
interface ISearch {
|
||||
autoFocus?: boolean,
|
||||
autoSubmit?: boolean,
|
||||
autosuggest?: boolean,
|
||||
autoFocus?: boolean
|
||||
autoSubmit?: boolean
|
||||
autosuggest?: boolean
|
||||
openInRoute?: boolean
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ const messages = defineMessages({
|
||||
});
|
||||
|
||||
interface ISpoilerButton {
|
||||
composeId: string,
|
||||
composeId: string
|
||||
}
|
||||
|
||||
const SpoilerButton: React.FC<ISpoilerButton> = ({ composeId }) => {
|
||||
|
||||
@@ -14,7 +14,7 @@ const messages = defineMessages({
|
||||
});
|
||||
|
||||
interface ISpoilerInput extends Pick<IAutosuggestInput, 'onSuggestionsFetchRequested' | 'onSuggestionsClearRequested' | 'onSuggestionSelected'> {
|
||||
composeId: string extends 'default' ? never : string,
|
||||
composeId: string extends 'default' ? never : string
|
||||
}
|
||||
|
||||
/** Text input for content warning in composer. */
|
||||
|
||||
@@ -3,8 +3,8 @@ import React from 'react';
|
||||
import { length } from 'stringz';
|
||||
|
||||
interface ITextCharacterCounter {
|
||||
max: number,
|
||||
text: string,
|
||||
max: number
|
||||
text: string
|
||||
}
|
||||
|
||||
const TextCharacterCounter: React.FC<ITextCharacterCounter> = ({ text, max }) => {
|
||||
|
||||
@@ -15,14 +15,14 @@ const onlyImages = (types: ImmutableList<string>) => {
|
||||
};
|
||||
|
||||
export interface IUploadButton {
|
||||
disabled?: boolean,
|
||||
unavailable?: boolean,
|
||||
onSelectFile: (files: FileList, intl: IntlShape) => void,
|
||||
style?: React.CSSProperties,
|
||||
resetFileKey: number | null,
|
||||
className?: string,
|
||||
iconClassName?: string,
|
||||
icon?: string,
|
||||
disabled?: boolean
|
||||
unavailable?: boolean
|
||||
onSelectFile: (files: FileList, intl: IntlShape) => void
|
||||
style?: React.CSSProperties
|
||||
resetFileKey: number | null
|
||||
className?: string
|
||||
iconClassName?: string
|
||||
icon?: string
|
||||
}
|
||||
|
||||
const UploadButton: React.FC<IUploadButton> = ({
|
||||
|
||||
@@ -9,7 +9,7 @@ import UploadProgress from './upload-progress';
|
||||
import type { Attachment as AttachmentEntity } from 'soapbox/types/entities';
|
||||
|
||||
interface IUploadForm {
|
||||
composeId: string,
|
||||
composeId: string
|
||||
}
|
||||
|
||||
const UploadForm: React.FC<IUploadForm> = ({ composeId }) => {
|
||||
|
||||
@@ -4,7 +4,7 @@ import UploadProgress from 'soapbox/components/upload-progress';
|
||||
import { useCompose } from 'soapbox/hooks';
|
||||
|
||||
interface IComposeUploadProgress {
|
||||
composeId: string,
|
||||
composeId: string
|
||||
}
|
||||
|
||||
/** File upload progress bar for post composer. */
|
||||
|
||||
@@ -6,8 +6,8 @@ import Upload from 'soapbox/components/upload';
|
||||
import { useAppDispatch, useCompose, useInstance } from 'soapbox/hooks';
|
||||
|
||||
interface IUploadCompose {
|
||||
id: string,
|
||||
composeId: string,
|
||||
id: string
|
||||
composeId: string
|
||||
}
|
||||
|
||||
const UploadCompose: React.FC<IUploadCompose> = ({ composeId, id }) => {
|
||||
|
||||
@@ -10,9 +10,9 @@ const messages = defineMessages({
|
||||
|
||||
interface IVisualCharacterCounter {
|
||||
/** max text allowed */
|
||||
max: number,
|
||||
max: number
|
||||
/** text to use to measure */
|
||||
text: string,
|
||||
text: string
|
||||
}
|
||||
|
||||
/** Renders a character counter */
|
||||
|
||||
@@ -4,7 +4,7 @@ import { spring } from 'react-motion';
|
||||
import Motion from '../../ui/util/optional-motion';
|
||||
|
||||
interface IWarning {
|
||||
message: React.ReactNode,
|
||||
message: React.ReactNode
|
||||
}
|
||||
|
||||
/** Warning message displayed in ComposeForm. */
|
||||
|
||||
Reference in New Issue
Block a user