diff --git a/.eslintrc.js b/.eslintrc.js index d0903916f59..f55b74b0a17 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -56,7 +56,12 @@ module.exports = { allowExpressions: true, }, ], - '@typescript-eslint/explicit-module-boundary-types': ['error'], + '@typescript-eslint/explicit-module-boundary-types': [ + 'error', + { + allowArgumentsExplicitlyTypedAsAny: true, + }, + ], }, }, { diff --git a/frontend/src/lib/components/Annotations/AnnotationMarker.js b/frontend/src/lib/components/Annotations/AnnotationMarker.js index 375d8b6c633..b801784d252 100644 --- a/frontend/src/lib/components/Annotations/AnnotationMarker.js +++ b/frontend/src/lib/components/Annotations/AnnotationMarker.js @@ -4,7 +4,6 @@ import { userLogic } from 'scenes/userLogic' import { Button, Popover, Row, Input, Checkbox, Tooltip } from 'antd' import { humanFriendlyDetailedTime } from '~/lib/utils' import { DeleteOutlined, PlusOutlined, GlobalOutlined, CloseOutlined } from '@ant-design/icons' -import _ from 'lodash' import { annotationsLogic } from './annotationsLogic' import moment from 'moment' import { useEscapeKey } from 'lib/hooks/useEscapeKey' @@ -138,37 +137,41 @@ export function AnnotationMarker({ ) : (
- {_.orderBy(annotations, ['created_at'], ['asc']).map((data) => ( -
- -
- - {data.created_by === 'local' - ? name || email - : data.created_by && - (data.created_by.first_name || data.created_by.email)} - - - {humanFriendlyDetailedTime(data.created_at)} - - {data.scope !== 'dashboard_item' && ( - - - + {[...annotations] + .sort((annotationA, annotationB) => annotationA.created_at - annotationB.created_at) + .map((data) => ( +
+ +
+ + {data.created_by === 'local' + ? name || email + : data.created_by && + (data.created_by.first_name || data.created_by.email)} + + + {humanFriendlyDetailedTime(data.created_at)} + + {data.scope !== 'dashboard_item' && ( + + + + )} +
+ {(!data.created_by || + data.created_by.id === id || + data.created_by === 'local') && ( + { + onDelete(data) + }} + > )} -
- {(!data.created_by || data.created_by.id === id || data.created_by === 'local') && ( - { - onDelete(data) - }} - > - )} - - {data.content} -
- ))} +
+ {data.content} +
+ ))} {textAreaVisible && (