Skip to content

Commit

Permalink
chore: cleanup & eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukas742 committed Jan 14, 2025
1 parent e70f794 commit 7e73163
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion packages/main/src/components/ObjectPageAnchorBar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ const ObjectPageAnchorBar = forwardRef<HTMLElement, ObjectPageAnchorBarPropTypes
useEffect(() => {
const tagName = getUi5TagWithSuffix('ui5-button');
const showHideHeaderBtn = showHideHeaderBtnRef.current;
customElements.whenDefined(tagName).then(() => {
void customElements.whenDefined(tagName).then(() => {
if (showHideHeaderBtn) {
//@ts-expect-error: for some reason these optional attributes are mandatory which is not expected
showHideHeaderBtn.accessibilityAttributes = { expanded: !!headerContentVisible };
Expand Down
8 changes: 4 additions & 4 deletions packages/main/src/components/ThemeProvider/I18n.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe('I18nProvider', () => {
setFetchDefaultLanguage(false);
});
afterEach(() => {
setLanguage('en');
void setLanguage('en');
});

it('translate components', () => {
Expand All @@ -43,7 +43,7 @@ describe('I18nProvider', () => {
<TestComponent3 />
<button
onClick={() => {
setLanguage('de');
void setLanguage('de');
}}
>
Switch to German
Expand Down Expand Up @@ -80,13 +80,13 @@ describe('I18nProvider', () => {
cy.findByTestId('counter').should('have.text', 1);
cy.findByText('Please wait')
.then(() => {
setLanguage('de');
void setLanguage('de');
})
.then(() => {
cy.findByTestId('counter').should('have.text', 2);
cy.findByText('Bitte warten')
.then(() => {
setLanguage('de');
void setLanguage('de');
})
.then(() => {
// should not rerender again
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ describe('ThemeProvider', () => {
return (
<button
onClick={() => {
setTheme('sap_horizon_dark');
void setTheme('sap_horizon_dark');
}}
>
Change Theme
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ export const ManageViewsDialog = (props: ManageViewsDialogPropTypes) => {
deletedRows: deletedTableRows.current
});
} else {
Object.values(invalidVariants)[0].focus();
void Object.values(invalidVariants)[0].focus();
}
};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Meta, StoryObj } from '@storybook/react';
import { useEffect, useRef, useState } from 'react';
import { useEffect, useState } from 'react';
import { Button } from '../Button/index.js';
import { BarcodeScannerDialog } from './index.js';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const Default: Story = {
render(args) {
const btnRef = useRef(null);
const [open, setOpen] = useState(args.open);
const onButtonClick = (e) => {
const onButtonClick = () => {
setOpen((prev) => !prev);
};
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import type { Meta, StoryObj } from '@storybook/react';
import AvatarSize from '@ui5/webcomponents/dist/types/AvatarSize.js';
import BarDesign from '@ui5/webcomponents/dist/types/BarDesign.js';
import ButtonDesign from '@ui5/webcomponents/dist/types/ButtonDesign.js';
import TitleLevel from '@ui5/webcomponents/dist/types/TitleLevel.js';
import FCLLayout from '@ui5/webcomponents-fiori/dist/types/FCLLayout.js';
import { useState } from 'react';
import { FlexBox } from '../../components/FlexBox/index.js';
Expand Down
4 changes: 2 additions & 2 deletions packages/main/src/webComponents/Menu/Menu.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const Default: Story = {
<>
<Button
ref={btnRef}
onClick={(e) => {
onClick={() => {
setOpen((prev) => !prev);
}}
>
Expand Down Expand Up @@ -78,7 +78,7 @@ export const WithSubMenu: Story = {
<>
<Button
ref={btnRef}
onClick={(e) => {
onClick={() => {
setOpen((prev) => !prev);
}}
>
Expand Down

0 comments on commit 7e73163

Please sign in to comment.