Skip to content

Commit 9b900f8

Browse files
author
Kubit
committed
Fix eslint and typescript errors
1 parent 1b70488 commit 9b900f8

File tree

10 files changed

+12
-17
lines changed

10 files changed

+12
-17
lines changed

src/components/carousel/__tests__/carousel.test.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -482,17 +482,15 @@ describe('Carousel component', () => {
482482

483483
it('Should have aria-label in the document when prop is set', async () => {
484484
const { getByLabelText } = renderProvider(
485-
<CarouselUnControlled {...mockProps} aria-label='Mock aria-label'/>
485+
<CarouselUnControlled {...mockProps} aria-label="Mock aria-label" />
486486
);
487487

488488
const label = getByLabelText('Mock aria-label');
489489
expect(label).toBeInTheDocument();
490490
});
491491

492492
it('Should not have aria-label in the document when prop is not set', async () => {
493-
const { queryByLabelText } = renderProvider(
494-
<CarouselUnControlled {...mockProps} />
495-
);
493+
const { queryByLabelText } = renderProvider(<CarouselUnControlled {...mockProps} />);
496494

497495
const label = queryByLabelText('');
498496
expect(label).not.toBeInTheDocument();

src/components/inputCurrency/__tests__/inputCurrency.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import * as React from 'react';
33

44
import { axe } from 'jest-axe';
55

6-
import { FormatNumber, InputContentPosition, InputState } from '@/components/input/types';
6+
import { InputContentPosition, InputState } from '@/components/input/types';
77
import { renderProvider } from '@/tests/renderProvider/renderProvider.utility';
88
import { POSITIONS } from '@/types/positions';
99

@@ -28,7 +28,7 @@ const format = {
2828
style: 'decimal',
2929
maximumFractionDigits: 3,
3030
minimumFractionDigits: 1,
31-
} as FormatNumber;
31+
};
3232

3333
describe('New Input Currency Component', () => {
3434
test('Should render InputCurrency component', async () => {

src/components/navigationRow/__tests__/navigationRow.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ describe('NavigationRow component', () => {
7474
});
7575
it('Should show component with decorativeElement', () => {
7676
const decorativeElement = (
77-
<ElementOrIcon icon={'ICON_PLACEHOLDER'} altText="decorativeElement" />
77+
<ElementOrIcon altText="decorativeElement" icon={'ICON_PLACEHOLDER'} />
7878
);
7979
renderProvider(
8080
<NavigationRow

src/components/navigationRow/stories/navigationRow.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const commonArgs: INavigationRow = {
2828
text: { content: 'Text' },
2929
description: { content: 'Lorem ipsum dolor sit amet lorem' },
3030
arrowIcon: { icon: ICONS.ICON_PLACEHOLDER },
31-
decorativeElement: <ElementOrIcon icon={ICONS.ICON_PLACEHOLDER} altText="decorativeElement" />,
31+
decorativeElement: <ElementOrIcon altText="decorativeElement" icon={ICONS.ICON_PLACEHOLDER} />,
3232
};
3333

3434
export const NavigationRow: Story = {

src/components/snackbar/snackbarStandAlone.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ const SnackbarStandAloneComponent = (
9797
variant={props.styles?.popoverVariants?.[align]}
9898
>
9999
<SnackbarStyled
100-
data-testid={props.dataTestId}
101100
ref={ref}
101+
data-testid={props.dataTestId}
102102
styles={props.styles}
103103
onBlur={props.onBlur}
104104
onFocus={props.onFocus}

src/components/summaryDetails/summaryDetailsControlled.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ const SummaryDetailsControlledComponent = React.forwardRef(
3131
);
3232

3333
const handleBodyClick: React.MouseEventHandler<HTMLDivElement> = event => {
34-
event.preventDefault();
3534
event.stopPropagation();
3635
};
3736

src/components/table/stories/mockCustomizable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export const mockCustomizableTable = {
4141
<div>{value.surname}</div>
4242
</div>
4343
) : (
44-
value.name.value ?? value.name
44+
(value.name.value ?? value.name)
4545
),
4646
},
4747
{

src/components/tooltip/stories/tooltip.stories.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import type { Meta, StoryObj } from '@storybook/react';
2-
import React from 'react';
32

43
import { ICONS } from '@/assets';
54
import { STYLES_NAME } from '@/constants';

src/constants/keyboardKeys.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ const ARROW_DOWN = {
6767

6868
const DELETE = {
6969
key: 'Delete',
70-
which: 8,
71-
keyCode: 8,
70+
which: 8 || 46,
71+
keyCode: 8 || 46,
7272
code: 'ArrowDecimal',
7373
};
7474

src/hooks/useInput/__tests__/useInput.test.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
import { act, renderHook } from '@testing-library/react-hooks';
22
import React, { ChangeEvent } from 'react';
33

4-
import { FormatNumber } from '@/components';
54
import * as validationsProvider from '@/provider/validations/validationsProvider';
65

76
import { useInput } from '../useInput';
87

98
describe('useInput Hook', () => {
109
it('useInput - on internal change should call parent onChange', () => {
1110
const onChange = jest.fn();
12-
const formatNumber = { style: 'decimal' } as FormatNumber;
11+
const formatNumber = { style: 'decimal' };
1312
const ref = React.createRef<HTMLInputElement | undefined>();
1413
const currentValue = '123234';
1514
const regex = new RegExp('^[0-9]*$');
@@ -44,7 +43,7 @@ describe('useInput Hook', () => {
4443
});
4544
it('useInput - on internal blur should call parent onBlur', () => {
4645
const onBlur = jest.fn();
47-
const formatNumber = { style: 'decimal' } as FormatNumber;
46+
const formatNumber = { style: 'decimal' };
4847
const { result } = renderHook(() => useInput({ onBlur, formatNumber }));
4948

5049
act(() => {

0 commit comments

Comments
 (0)