Skip to content

Commit 1ddd0de

Browse files
author
Kubit
committed
Fix typescript and eslint errors
1 parent 9f51f44 commit 1ddd0de

File tree

21 files changed

+24
-68
lines changed

21 files changed

+24
-68
lines changed

src/components/actionBottomSheet/actionBottomSheetControlled.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ const ActionBottomSheetControlledComponent = React.forwardRef(
8585
ref: React.ForwardedRef<HTMLDivElement> | undefined | null
8686
): JSX.Element => {
8787
const uniqueTitleId = useId('actionSheet-title');
88-
const titleId = title?.id ?? title?.content ? uniqueTitleId : undefined;
88+
const titleId = (title?.id ?? title?.content) ? uniqueTitleId : undefined;
8989
const styles = useStyles<ActionBottomSheetVariantStylesType>(
9090
STYLES_NAME.ACTION_BOTTOM_SHEET,
9191
props.variant,

src/components/drawer/drawerStandAlone.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable @typescript-eslint/no-explicit-any */
12
import * as React from 'react';
23

34
import { ElementOrIcon } from '@/components/elementOrIcon';
@@ -53,7 +54,7 @@ const DrawerStandAloneComponent = (
5354
<DrawerTitleContentFooterContainerStyled blocked={blocked} styles={props.styles}>
5455
<DrawerTitleStyled
5556
data-drawer-title
56-
as={Text}
57+
as={Text as any}
5758
component={titleComponent as unknown as TextComponentType}
5859
customTypography={props.styles.title}
5960
id={titleIdFinal}
@@ -78,7 +79,7 @@ const DrawerStandAloneComponent = (
7879
{props.footer?.content && (props.styles.footer?.variant || props.footer.variant) && (
7980
<DrawerFooterStyled
8081
data-drawer-footer
81-
as={Footer}
82+
as={Footer as any}
8283
customFooterStyles={props.styles}
8384
variant={props.styles.footer?.variant}
8485
{...props.footer}

src/components/index.ts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,6 @@ export * from './tableV2';
8585
export * from './dataTable';
8686
export * from './video';
8787
export * from './progressBar';
88-
export * from './inputDigitPassword';
89-
export * from './statusCard';
90-
export * from './selectorBox';
91-
export * from './banner';
92-
export * from './navBar';
9388
export * from './virtualKeyboard';
9489

9590
/**
@@ -115,15 +110,6 @@ export * from './headerStructure';
115110
export * from './footer';
116111
export * from './portal';
117112
export * from './textCount';
118-
export * from './accordionSideMenu';
119-
export * from './secondaryTabs';
120-
export * from './wizardFooter';
121-
export * from './quickCardHighlights';
122-
export * from './wizard';
123-
export * from './crossellModule';
124-
export * from './commercialCard';
125113
export * from './operativeLayout';
126114
export * from './emptyState';
127115
export * from './loadingState';
128-
export * from './cardSelector';
129-
export * from './cardInformative';

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 { InputContentPosition, InputState } from '@/components/input/types';
6+
import { FormatNumber, 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-
};
31+
} as FormatNumber;
3232

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

src/components/mediaButton/stories/mediaButton.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,4 +88,4 @@ export const MediabuttonWithCtv: Story = {
8888
},
8989
},
9090
},
91-
};
91+
};

src/components/navigationCard/navigationCardStandAlone.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ const NavigationCardStandaloneComponent = (
3636
return (
3737
// Can not be spread -> styled component breaks
3838
<NavigationCardStyled
39-
ref={ref as React.ForwardedRef<HTMLButtonElement>}
39+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
40+
ref={ref as any}
4041
aria-disabled={props['aria-disabled']}
4142
as={props.url ? props.component : 'button'}
4243
className={props.className}

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/pillV2/pill.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { getPillState } from './utils';
99

1010
const PillComponent = (
1111
{ variant, size, ctv, selected = false, disabled = false, ...props }: IPill,
12-
ref: React.ForwardedRef<HTMLDivElement>
12+
ref: React.ForwardedRef<HTMLButtonElement>
1313
) => {
1414
const variantStyles = useStylesV2<PillVariantPropsStylesType>({
1515
styleName: STYLES_NAME.PILL_V2,

src/components/pillV2/pillStandAlone.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import { IPillStandAlone, PillType } from './types';
1818

1919
const PillStandAloneComponent = (
2020
{ dataTestId = 'pill', type = PillType.BUTTON, ...props }: IPillStandAlone,
21-
ref: React.ForwardedRef<HTMLDivElement> | undefined | null
21+
ref: React.ForwardedRef<HTMLButtonElement> | undefined | null
2222
): JSX.Element => {
2323
const id = useId('pill');
2424
const pillContentId = `${id}-content`;

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
{

0 commit comments

Comments
 (0)