Skip to content

Commit 73138ca

Browse files
committed
remove unused variables
1 parent 593bccc commit 73138ca

File tree

40 files changed

+29
-107
lines changed

40 files changed

+29
-107
lines changed

.eslintrc.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,6 @@ module.exports = {
358358
files: ['redisinsight/ui/**/*.ts*'],
359359
rules: {
360360
'sonarjs/cognitive-complexity': 'off',
361-
'@typescript-eslint/no-unused-vars': 'off',
362361
'import/extensions': 'off',
363362
'react/prop-types': 'off',
364363
'import/order': 'off',

redisinsight/ui/src/components/base/external-link/ExternalLink.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,7 @@ export type Props = RiLinkProps & {
1313
}
1414

1515
const ExternalLink = (props: Props) => {
16-
const {
17-
iconPosition = 'right',
18-
iconSize = 'S',
19-
size = 'S',
20-
children,
21-
...rest
22-
} = props
16+
const { iconPosition = 'right', iconSize = 'S', children, ...rest } = props
2317

2418
const ArrowIcon = () => (
2519
<RiIcon type="ArrowDiagonalIcon" size={iconSize} color="informative400" />

redisinsight/ui/src/components/bulk-actions-config/BulkActionsConfig.tsx

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,9 @@ import {
77
bulkActionsSelector,
88
disconnectBulkDeleteAction,
99
setBulkActionConnected,
10-
setBulkActionsInitialState,
1110
setBulkDeleteLoading,
1211
setDeleteOverview,
1312
setDeleteOverviewStatus,
14-
setLoading,
1513
} from 'uiSrc/slices/browser/bulkActions'
1614
import { getSocketApiUrl, Nullable } from 'uiSrc/utils'
1715
import { sessionStorageService } from 'uiSrc/services'
@@ -106,15 +104,6 @@ const BulkActionsConfig = () => {
106104
)
107105
}
108106

109-
const getBulkAction = (id: string) => {
110-
dispatch(setLoading(true))
111-
socketRef.current?.emit(
112-
BulkActionsServerEvent.Get,
113-
{ id: `${id}` },
114-
fetchBulkAction,
115-
)
116-
}
117-
118107
const abortBulkDelete = (id: string) => {
119108
dispatch(setBulkDeleteLoading(true))
120109
socketRef.current?.emit(
@@ -124,13 +113,6 @@ const BulkActionsConfig = () => {
124113
)
125114
}
126115

127-
const fetchBulkAction = (data: any) => {
128-
if (data.status === BulkActionsServerEvent.Error) {
129-
sessionStorageService.set(BrowserStorageItem.bulkActionDeleteId, '')
130-
dispatch(setBulkActionsInitialState())
131-
}
132-
}
133-
134116
const onBulkDeleting = (data: any) => {
135117
if (data.status === BulkActionsServerEvent.Error) {
136118
dispatch(disconnectBulkDeleteAction())

redisinsight/ui/src/components/charts/bar-chart/BarChart.spec.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { isEmpty, last, min as minBy, reject } from 'lodash'
1+
import { last, min as minBy, reject } from 'lodash'
22
import React from 'react'
33
import { render, screen, fireEvent, waitFor } from 'uiSrc/utils/test-utils'
44

@@ -43,7 +43,7 @@ describe('BarChart', () => {
4343
const minBarHeight = 5
4444
const smallestBar = minBy(
4545
reject([...mockData], ({ y }) => !y),
46-
({ y }, i) => y,
46+
({ y }) => y,
4747
) ?? { x: 0, y: 0 }
4848

4949
render(<BarChart data={mockData} minBarHeight={minBarHeight} />)

redisinsight/ui/src/components/command-helper/components/command-helper-info/CHCommandInfo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { IconButton } from 'uiSrc/components/base/forms/buttons'
77
import { ArrowLeftIcon } from 'uiSrc/components/base/icons'
88
import { Text } from 'uiSrc/components/base/text'
99
import { RiBadge } from 'uiSrc/components/base/display/badge/RiBadge'
10-
import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
10+
import { Row } from 'uiSrc/components/base/layout/flex'
1111

1212
import styles from './styles.module.scss'
1313
import { HorizontalSpacer } from 'uiSrc/components/base/layout'

redisinsight/ui/src/components/config/Config.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { useContext, useEffect } from 'react'
22
import { useDispatch, useSelector } from 'react-redux'
33
import { useLocation } from 'react-router-dom'
44
import { isNumber } from 'lodash'
5-
import { BrowserStorageItem, FeatureFlags, Theme } from 'uiSrc/constants'
5+
import { BrowserStorageItem, FeatureFlags } from 'uiSrc/constants'
66
import { BuildType } from 'uiSrc/constants/env'
77
import { BUILD_FEATURES } from 'uiSrc/constants/featuresHighlighting'
88
import { localStorageService, setObjectStorage } from 'uiSrc/services'

redisinsight/ui/src/components/monitor/MonitorLog/MonitorLog.spec.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import { sendCliCommand } from 'uiSrc/slices/cli/cli-output'
1717
import MonitorLog from './MonitorLog'
1818

1919
let store: typeof mockedStore
20-
let URLMock: jest.SpyInstance<object>
2120
const mockURLrevokeObjectURL = 123123
2221

2322
jest.mock('file-saver', () => ({
@@ -47,7 +46,7 @@ beforeEach(() => {
4746

4847
describe('MonitorLog', () => {
4948
beforeAll(() => {
50-
URLMock = jest
49+
jest
5150
.spyOn(URL, 'revokeObjectURL')
5251
.mockImplementation(() => mockURLrevokeObjectURL)
5352
})

redisinsight/ui/src/components/notifications/components/default-error-content/DefaultErrorContent.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import React from 'react'
22

33
import { ColorText } from 'uiSrc/components/base/text'
4-
import { Spacer } from 'uiSrc/components/base/layout/spacer'
5-
import { SecondaryButton } from 'uiSrc/components/base/forms/buttons'
64

75
export interface Props {
86
text: string | JSX.Element | JSX.Element[]

redisinsight/ui/src/components/oauth/shared/oauth-social-buttons/OAuthSocialButtons.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { oauthCloudPAgreementSelector } from 'uiSrc/slices/oauth/cloud'
55
import { OAuthStrategy } from 'uiSrc/slices/interfaces'
66

77
import { EmptyButton } from 'uiSrc/components/base/forms/buttons'
8-
import { FlexGroup, FlexItem } from 'uiSrc/components/base/layout/flex'
8+
import { FlexGroup } from 'uiSrc/components/base/layout/flex'
99
import { Text } from 'uiSrc/components/base/text'
1010
import { RiTooltip } from 'uiSrc/components'
1111
import { AllIconsType, RiIcon } from 'uiSrc/components/base/icons/RiIcon'

redisinsight/ui/src/components/recommendation/recommendation-voting/components/vote-option/VoteOption.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { Nullable } from 'uiSrc/utils'
1414

1515
import { Col, FlexItem, Row } from 'uiSrc/components/base/layout/flex'
1616
import { Text } from 'uiSrc/components/base/text'
17-
import { CancelSlimIcon, Icon } from 'uiSrc/components/base/icons'
17+
import { CancelSlimIcon } from 'uiSrc/components/base/icons'
1818
import { IconButton } from 'uiSrc/components/base/forms/buttons'
1919
import { Link } from 'uiSrc/components/base/link/Link'
2020
import { RiPopover, RiTooltip } from 'uiSrc/components/base'

0 commit comments

Comments
 (0)