diff --git a/src/assets/icons/outliner/index.ts b/src/assets/icons/outliner/index.ts index 47d1f935a2..ac66b3762c 100644 --- a/src/assets/icons/outliner/index.ts +++ b/src/assets/icons/outliner/index.ts @@ -3,4 +3,4 @@ export { ReactComponent as IconOutlinerExpand } from './expand.svg'; export { ReactComponent as IconOutlinerDrag } from './drag.svg'; export { ReactComponent as IconInfo } from './info.svg'; export { ReactComponent as IconOutlinerEyeOpened } from './eye_opened.svg'; -export { ReactComponent as IconOutlinerEyeClosed } from './eye_closed.svg'; \ No newline at end of file +export { ReactComponent as IconOutlinerEyeClosed } from './eye_closed.svg'; diff --git a/src/common/Dropdown/DropdownTrigger.tsx b/src/common/Dropdown/DropdownTrigger.tsx index addf09e883..f245ed44e6 100644 --- a/src/common/Dropdown/DropdownTrigger.tsx +++ b/src/common/Dropdown/DropdownTrigger.tsx @@ -10,7 +10,7 @@ const getMinIndex = (element?: HTMLElement) => { if (element) { let parent = element.parentElement; - while(parent) { + while (parent) { const parentIndex = parseInt(getComputedStyle(parent).zIndex); if (!isNaN(parentIndex)) { @@ -43,7 +43,7 @@ export const DropdownTrigger = forwardRef(({ closeOnClickOutside = true, disabled = false, ...props -}, ref ) => { +}, ref) => { const dropdownRef = (ref ?? useRef()) as RefObject; const triggerEL = Children.only(children); const childset = useRef(new Set()); diff --git a/src/common/Range/Range.tsx b/src/common/Range/Range.tsx index 35dd34337f..a7454ca9b8 100644 --- a/src/common/Range/Range.tsx +++ b/src/common/Range/Range.tsx @@ -27,21 +27,21 @@ export interface RangeProps { onMaxIconClick?: (value: RangeValueType) => void; } -const arrayReverse = (array: T, reverse=false) => { +const arrayReverse = (array: T, reverse = false) => { return reverse ? [...array].reverse() : array; }; export const Range: FC = ({ value, defaultValue, - multi=false, - reverse=false, - continuous=false, - min=0, - max=100, - step=1, - size=120, - align='horizontal', + multi = false, + reverse = false, + continuous = false, + min = 0, + max = 100, + step = 1, + size = 120, + align = 'horizontal', resetValue, minIcon, maxIcon, diff --git a/src/common/Select/Select.tsx b/src/common/Select/Select.tsx index 118ea13395..868ee14adb 100644 --- a/src/common/Select/Select.tsx +++ b/src/common/Select/Select.tsx @@ -124,7 +124,7 @@ export const Select: SelectComponent = ({ const selected = useMemo(() => { if (isFF(FF_DEV_2669) && multiple && renderMultipleSelected) { - return renderMultipleSelected(Array.isArray(currentValue) ? currentValue : [currentValue||'']); + return renderMultipleSelected(Array.isArray(currentValue) ? currentValue : [currentValue || '']); } if (multiple && Array.isArray(currentValue) && currentValue?.length > 1) { return <>Multiple values selected; diff --git a/src/common/TextArea/TextArea.tsx b/src/common/TextArea/TextArea.tsx index aa3343a2f3..759c937305 100644 --- a/src/common/TextArea/TextArea.tsx +++ b/src/common/TextArea/TextArea.tsx @@ -72,7 +72,7 @@ export const TextArea: FC = ({ let newHeight: number; - if(textarea.scrollHeight > autoGrowRef.current.maxHeight){ + if (textarea.scrollHeight > autoGrowRef.current.maxHeight) { textarea.style.overflowY = 'scroll'; newHeight = autoGrowRef.current.maxHeight; } else { diff --git a/src/common/TimeAgo/TimeAgo.tsx b/src/common/TimeAgo/TimeAgo.tsx index df03ab50e3..6eb577b222 100644 --- a/src/common/TimeAgo/TimeAgo.tsx +++ b/src/common/TimeAgo/TimeAgo.tsx @@ -65,4 +65,4 @@ export const TimeAgo = ({ date, ...rest }: TimeAgoProps) => { {text} ); -}; \ No newline at end of file +}; diff --git a/src/common/Userpic/Userpic.tsx b/src/common/Userpic/Userpic.tsx index 89bc6b68fa..fbaf2da957 100644 --- a/src/common/Userpic/Userpic.tsx +++ b/src/common/Userpic/Userpic.tsx @@ -43,7 +43,7 @@ export const Userpic = forwardRef(({ const [nameVisible, setNameVisible] = useState(true); if (isFF(FF_DEV_1507)) { - useEffect(()=>{ + useEffect(() => { if (propsSrc !== finalSrc) { setFinalSrc(propsSrc); setImgVisible(false); diff --git a/src/components/AnnotationsCarousel/AnnotationButton.tsx b/src/components/AnnotationsCarousel/AnnotationButton.tsx index c2a13ded8e..a66290b6ab 100644 --- a/src/components/AnnotationsCarousel/AnnotationButton.tsx +++ b/src/components/AnnotationsCarousel/AnnotationButton.tsx @@ -2,7 +2,7 @@ import { Block, Elem } from '../../utils/bem'; import { Userpic } from '../../common/Userpic/Userpic'; import { IconAnnotationGroundTruth, IconAnnotationSkipped2, IconDraftCreated2, IconDuplicate, IconEllipsis, IconTrashRect, LsCommentResolved, LsCommentUnresolved, LsSparks, LsStar, LsStarOutline } from '../../assets/icons'; import { userDisplayName } from '../../utils/utilities'; -import { TimeAgo } from '../../common/TimeAgo/TimeAgo'; +import { TimeAgo } from '../../common/TimeAgo/TimeAgo'; import './AnnotationButton.styl'; import { useCallback, useEffect, useState } from 'react'; import { Dropdown } from '../../common/Dropdown/Dropdown'; @@ -214,7 +214,7 @@ export const AnnotationButton = observer(({ entity, capabilities, annotationStor } - onToggle={(isVisible)=> setIsContextMenuOpen(isVisible)} + onToggle={(isVisible) => setIsContextMenuOpen(isVisible)} > diff --git a/src/components/AnnotationsCarousel/AnnotationsCarousel.tsx b/src/components/AnnotationsCarousel/AnnotationsCarousel.tsx index f7d7a870c3..2783edd528 100644 --- a/src/components/AnnotationsCarousel/AnnotationsCarousel.tsx +++ b/src/components/AnnotationsCarousel/AnnotationsCarousel.tsx @@ -81,5 +81,5 @@ export const AnnotationsCarousel = observer(({ store, annotationStore }: Annotat )} - ): null; + ) : null; }); diff --git a/src/components/AnnotationsCarousel/__tests__/sampleData.js b/src/components/AnnotationsCarousel/__tests__/sampleData.js index fc696e1b8f..1ee62fa510 100644 --- a/src/components/AnnotationsCarousel/__tests__/sampleData.js +++ b/src/components/AnnotationsCarousel/__tests__/sampleData.js @@ -2800,7 +2800,7 @@ const annotationStore = { 'validation': null, 'sharedStores': {}, }; -const commentStore = { 'loading':'list','comments':[] }; +const commentStore = { 'loading': 'list','comments': [] }; const store = { 'config': '\\n ', 'task': { @@ -6031,4 +6031,4 @@ const store = { 'hasInterface': () => true, }; -export { annotationStore, commentStore, store }; \ No newline at end of file +export { annotationStore, commentStore, store }; diff --git a/src/components/App/Annotation.js b/src/components/App/Annotation.js index 057769d072..2226f6ad2c 100644 --- a/src/components/App/Annotation.js +++ b/src/components/App/Annotation.js @@ -11,4 +11,4 @@ export function Annotation({ annotation, root }) { }; }, [annotation.pk, annotation.id]); return root ? Tree.renderItem(root, annotation) : null; -} \ No newline at end of file +} diff --git a/src/components/App/Grid.js b/src/components/App/Grid.js index af4c8d094e..1fea7bbef9 100644 --- a/src/components/App/Grid.js +++ b/src/components/App/Grid.js @@ -24,12 +24,12 @@ class Item extends Component { return o.isReady ? Promise.resolve(o.isReady) : new Promise(resolve => { - const dispose = observe(o, 'isReady', ()=>{ + const dispose = observe(o, 'isReady', () => { dispose(); resolve(); }); }); - })).then(()=>{ + })).then(() => { // ~2 ticks for canvas to be rendered and resized completely setTimeout(this.props.onFinish, 32); }); diff --git a/src/components/BottomBar/Controls.js b/src/components/BottomBar/Controls.js index 323683f0b9..0104de6d04 100644 --- a/src/components/BottomBar/Controls.js +++ b/src/components/BottomBar/Controls.js @@ -51,10 +51,10 @@ export const Controls = controlsInjector(observer(({ store, history, annotation const selected = store.annotationStore?.selected; - if(addedCommentThisSession){ + if (addedCommentThisSession) { selected?.submissionInProgress(); callback(); - } else if((currentComment ?? '').trim()) { + } else if ((currentComment ?? '').trim()) { e.preventDefault(); selected?.submissionInProgress(); await commentFormSubmit(); @@ -75,8 +75,8 @@ export const Controls = controlsInjector(observer(({ store, history, annotation const RejectButton = useMemo(() => { return ( -