Merged in chore/apply-lint-fix (pull request #3312)

chore: Apply lint:fix on booking-flow

* run lint:fix


Approved-by: Bianca Widstam
This commit is contained in:
Anton Gunnarsson
2025-12-08 13:50:41 +00:00
parent ca6cc5ab6c
commit 914da2b094
24 changed files with 68 additions and 68 deletions

View File

@@ -57,7 +57,7 @@ export function Header({
return ( return (
<header className={styles.header}> <header className={styles.header}>
<hgroup className={styles.hgroup}> <hgroup className={styles.hgroup}>
<Typography variant={"Title/md"}> <Typography variant="Title/md">
<h2 className={styles.confirmTitle}> <h2 className={styles.confirmTitle}>
{intl.formatMessage({ {intl.formatMessage({
id: "bookingConfirmation.title", id: "bookingConfirmation.title",
@@ -65,7 +65,7 @@ export function Header({
})} })}
</h2> </h2>
</Typography> </Typography>
<Typography variant={"Title/md"}> <Typography variant="Title/md">
<h2 className={styles.hotelTitle}>{hotel.name}</h2> <h2 className={styles.hotelTitle}>{hotel.name}</h2>
</Typography> </Typography>
</hgroup> </hgroup>

View File

@@ -18,7 +18,7 @@ export function HotelDetails({
return ( return (
<div className={styles.container}> <div className={styles.container}>
<div className={styles.details}> <div className={styles.details}>
<Typography variant={"Title/Subtitle/md"}> <Typography variant="Title/Subtitle/md">
<h3> <h3>
{intl.formatMessage({ {intl.formatMessage({
id: "bookingConfirmation.hotelDetails", id: "bookingConfirmation.hotelDetails",
@@ -26,7 +26,7 @@ export function HotelDetails({
})} })}
</h3> </h3>
</Typography> </Typography>
<Typography variant={"Body/Paragraph/mdRegular"}> <Typography variant="Body/Paragraph/mdRegular">
<div className={styles.hotel}> <div className={styles.hotel}>
<p>{hotel.name}</p> <p>{hotel.name}</p>
<p> <p>
@@ -58,7 +58,7 @@ export function HotelDetails({
className={styles.link} className={styles.link}
color="Text/Interactive/Secondary" color="Text/Interactive/Secondary"
href={`mailto:${hotel.contactInformation.email}`} href={`mailto:${hotel.contactInformation.email}`}
textDecoration={"underline"} textDecoration="underline"
> >
{hotel.contactInformation.email} {hotel.contactInformation.email}
</Link> </Link>
@@ -66,7 +66,7 @@ export function HotelDetails({
className={styles.link} className={styles.link}
color="Text/Interactive/Secondary" color="Text/Interactive/Secondary"
href={hotel.contactInformation.websiteUrl} href={hotel.contactInformation.websiteUrl}
textDecoration={"underline"} textDecoration="underline"
> >
{hotel.contactInformation.websiteUrl} {hotel.contactInformation.websiteUrl}
</Link> </Link>

View File

@@ -22,7 +22,7 @@ export function PaymentDetails() {
const hasAllRoomsLoaded = rooms.every((room) => room) const hasAllRoomsLoaded = rooms.every((room) => room)
return ( return (
<div className={styles.details}> <div className={styles.details}>
<Typography variant={"Title/Subtitle/md"}> <Typography variant="Title/Subtitle/md">
<h2> <h2>
{intl.formatMessage({ {intl.formatMessage({
id: "bookingConfirmation.paymentDetails", id: "bookingConfirmation.paymentDetails",
@@ -32,7 +32,7 @@ export function PaymentDetails() {
</Typography> </Typography>
<div className={styles.payment}> <div className={styles.payment}>
{hasAllRoomsLoaded ? ( {hasAllRoomsLoaded ? (
<Typography variant={"Body/Paragraph/mdRegular"}> <Typography variant="Body/Paragraph/mdRegular">
<p> <p>
{intl.formatMessage( {intl.formatMessage(
{ {
@@ -46,7 +46,7 @@ export function PaymentDetails() {
</p> </p>
</Typography> </Typography>
) : ( ) : (
<SkeletonShimmer width={"100%"} /> <SkeletonShimmer width="100%" />
)} )}
</div> </div>
</div> </div>

View File

@@ -20,13 +20,13 @@ export function Promo({ buttonText, href, text, title }: PromoProps) {
return ( return (
<Link className={styles.link} color="none" href={href}> <Link className={styles.link} color="none" href={href}>
<article className={styles.promo}> <article className={styles.promo}>
<Typography variant={"Title/smLowCase"}> <Typography variant="Title/smLowCase">
<h4>{title}</h4> <h4>{title}</h4>
</Typography> </Typography>
<Typography variant={"Body/Paragraph/mdRegular"}> <Typography variant="Body/Paragraph/mdRegular">
<p className={styles.text}>{text}</p> <p className={styles.text}>{text}</p>
</Typography> </Typography>
<Button size="Small" variant={"Secondary"} color={"Inverted"} wrapping> <Button size="Small" variant="Secondary" color="Inverted" wrapping>
<div>{buttonText}</div> <div>{buttonText}</div>
</Button> </Button>
</article> </article>

View File

@@ -6,9 +6,9 @@ export default function RoomSkeletonLoader() {
return ( return (
<div className={styles.room}> <div className={styles.room}>
<SkeletonShimmer /> <SkeletonShimmer />
<SkeletonShimmer width={"15%"} /> <SkeletonShimmer width="15%" />
<SkeletonShimmer width={"30%"} /> <SkeletonShimmer width="30%" />
<SkeletonShimmer width={"40%"} /> <SkeletonShimmer width="40%" />
<SkeletonShimmer /> <SkeletonShimmer />
<SkeletonShimmer /> <SkeletonShimmer />
<SkeletonShimmer /> <SkeletonShimmer />

View File

@@ -62,7 +62,7 @@ export default function TotalPrice() {
</span> </span>
</Typography> </Typography>
) : ( ) : (
<SkeletonShimmer width={"25%"} /> <SkeletonShimmer width="25%" />
)} )}
</div> </div>
</div> </div>
@@ -71,7 +71,7 @@ export default function TotalPrice() {
{hasAllRoomsLoaded ? ( {hasAllRoomsLoaded ? (
<PriceDetails /> <PriceDetails />
) : ( ) : (
<SkeletonShimmer width={"100%"} /> <SkeletonShimmer width="100%" />
)} )}
</div> </div>
</> </>

View File

@@ -7,24 +7,24 @@ export function LinkedReservationCardSkeleton() {
<div className={styles.card}> <div className={styles.card}>
<div className={styles.content}> <div className={styles.content}>
<div className={styles.img}> <div className={styles.img}>
<SkeletonShimmer height={"204px"} width={"100%"} /> <SkeletonShimmer height="204px" width="100%" />
</div> </div>
<div className={styles.roomDetails}> <div className={styles.roomDetails}>
<div className={styles.roomName}> <div className={styles.roomName}>
<SkeletonShimmer height={"24px"} width={"130px"} /> <SkeletonShimmer height="24px" width="130px" />
<SkeletonShimmer height={"20px"} width={"140px"} /> <SkeletonShimmer height="20px" width="140px" />
</div> </div>
<div className={styles.details}> <div className={styles.details}>
<SkeletonShimmer height={"20px"} width={"300px"} /> <SkeletonShimmer height="20px" width="300px" />
<SkeletonShimmer height={"20px"} width={"300px"} /> <SkeletonShimmer height="20px" width="300px" />
<SkeletonShimmer height={"20px"} width={"300px"} /> <SkeletonShimmer height="20px" width="300px" />
<SkeletonShimmer height={"20px"} width={"300px"} /> <SkeletonShimmer height="20px" width="300px" />
</div> </div>
<div className={styles.guest}> <div className={styles.guest}>
<SkeletonShimmer height={"20px"} width={"100px"} /> <SkeletonShimmer height="20px" width="100px" />
<SkeletonShimmer height={"20px"} width={"200px"} /> <SkeletonShimmer height="20px" width="200px" />
<SkeletonShimmer height={"20px"} width={"150px"} /> <SkeletonShimmer height="20px" width="150px" />
<SkeletonShimmer height={"20px"} width={"300px"} /> <SkeletonShimmer height="20px" width="300px" />
</div> </div>
</div> </div>
</div> </div>

View File

@@ -15,7 +15,7 @@ export default function Retry({ handleRefetch }: RetryProps) {
const intl = useIntl() const intl = useIntl()
return ( return (
<div className={styles.retry}> <div className={styles.retry}>
<Typography variant={"Body/Paragraph/mdRegular"}> <Typography variant="Body/Paragraph/mdRegular">
<p> <p>
{intl.formatMessage({ {intl.formatMessage({
id: "errorMessage.somethingWentWrong", id: "errorMessage.somethingWentWrong",
@@ -24,7 +24,7 @@ export default function Retry({ handleRefetch }: RetryProps) {
</p> </p>
</Typography> </Typography>
<Button size={"Small"} onPress={handleRefetch}> <Button size="Small" onPress={handleRefetch}>
{intl.formatMessage({ {intl.formatMessage({
id: "bookingConfirmation.linkedReservation.tryAgain", id: "bookingConfirmation.linkedReservation.tryAgain",
defaultMessage: "Try again", defaultMessage: "Try again",

View File

@@ -194,7 +194,7 @@ export default function BookingCode() {
> >
<Switch name="bookingCode.remember" className="mobile-switch"> <Switch name="bookingCode.remember" className="mobile-switch">
<Typography <Typography
variant={"Body/Supporting text (caption)/smRegular"} variant="Body/Supporting text (caption)/smRegular"
> >
<span> <span>
{intl.formatMessage({ {intl.formatMessage({
@@ -232,7 +232,7 @@ function CodeRulesModal() {
return ( return (
<Modal <Modal
trigger={ trigger={
<IconButton theme={"Black"} wrapping> <IconButton theme="Black" wrapping>
<MaterialIcon <MaterialIcon
icon="info" icon="info"
color="Icon/Interactive/Placeholder" color="Icon/Interactive/Placeholder"
@@ -242,7 +242,7 @@ function CodeRulesModal() {
} }
title={codeVoucher} title={codeVoucher}
> >
<Typography variant={"Body/Paragraph/mdRegular"}> <Typography variant="Body/Paragraph/mdRegular">
<p className={styles.bookingCodeTooltip}>{bookingCodeTooltipText}</p> <p className={styles.bookingCodeTooltip}>{bookingCodeTooltipText}</p>
</Typography> </Typography>
</Modal> </Modal>
@@ -255,7 +255,7 @@ function CodeRemember({ bookingCodeValue, onApplyClick }: CodeRememberProps) {
return ( return (
<> <>
<Checkbox name="bookingCode.remember"> <Checkbox name="bookingCode.remember">
<Typography variant={"Body/Supporting text (caption)/smRegular"}> <Typography variant="Body/Supporting text (caption)/smRegular">
<span> <span>
{intl.formatMessage({ {intl.formatMessage({
id: "bookingWidget.bookingCode.remember", id: "bookingWidget.bookingCode.remember",
@@ -362,7 +362,7 @@ function TabletBookingCode({
return ( return (
<div className={styles.container}> <div className={styles.container}>
<DialogTrigger isOpen={isOpen} onOpenChange={toggleModal}> <DialogTrigger isOpen={isOpen} onOpenChange={toggleModal}>
<Button type="button" variant={"Text"}> <Button type="button" variant="Text">
{/* For some reason Checkbox click triggers twice modal state change, which returns the modal back to old state. So we are using overlay as trigger for modal */} {/* For some reason Checkbox click triggers twice modal state change, which returns the modal back to old state. So we are using overlay as trigger for modal */}
<div className={styles.overlayTrigger}></div> <div className={styles.overlayTrigger}></div>
<Checkbox <Checkbox
@@ -375,7 +375,7 @@ function TabletBookingCode({
}, },
})} })}
> >
<Typography variant={"Body/Supporting text (caption)/smBold"}> <Typography variant="Body/Supporting text (caption)/smBold">
<span className={styles.colorSecondary}>{codeVoucher}</span> <span className={styles.colorSecondary}>{codeVoucher}</span>
</Typography> </Typography>
</Checkbox> </Checkbox>

View File

@@ -25,7 +25,7 @@ export function RemoveExtraRooms({ ...props }: ButtonProps) {
type="button" type="button"
onClick={removeExtraRooms} onClick={removeExtraRooms}
size="Small" size="Small"
variant={"Secondary"} variant="Secondary"
{...props} {...props}
> >
{intl.formatMessage({ {intl.formatMessage({

View File

@@ -94,14 +94,14 @@ export default function RewardNight() {
> >
<div className={styles.rewardNightLabel}> <div className={styles.rewardNightLabel}>
<Typography <Typography
variant={"Body/Supporting text (caption)/smRegular"} variant="Body/Supporting text (caption)/smRegular"
className={styles.label} className={styles.label}
> >
<span>{reward}</span> <span>{reward}</span>
</Typography> </Typography>
<Modal <Modal
trigger={ trigger={
<IconButton theme={"Black"} wrapping> <IconButton theme="Black" wrapping>
<MaterialIcon <MaterialIcon
icon="info" icon="info"
size={20} size={20}

View File

@@ -49,11 +49,11 @@ export function ListItemSkeleton() {
return ( return (
<li className={classNames}> <li className={classNames}>
<div style={{ marginBottom: "0.25rem" }}> <div style={{ marginBottom: "0.25rem" }}>
<SkeletonShimmer width={"200px"} height="18px" display="block" /> <SkeletonShimmer width="200px" height="18px" display="block" />
</div> </div>
<div> <div>
<SkeletonShimmer width={"70px"} height="18px" display="block" /> <SkeletonShimmer width="70px" height="18px" display="block" />
</div> </div>
</li> </li>
) )

View File

@@ -259,7 +259,7 @@ export function SearchSkeleton() {
</Typography> </Typography>
</div> </div>
<div> <div>
<SkeletonShimmer width={"100%"} display="block" height="16px" /> <SkeletonShimmer width="100%" display="block" height="16px" />
</div> </div>
</div> </div>
) )

View File

@@ -141,8 +141,8 @@ export default function FormContent({
<Button <Button
className={styles.button} className={styles.button}
form={formId} form={formId}
variant={"Primary"} variant="Primary"
size={"Medium"} size="Medium"
type="submit" type="submit"
isDisabled={isSearching} isDisabled={isSearching}
> >
@@ -226,8 +226,8 @@ export function BookingWidgetFormContentSkeleton() {
<div className={cx(styles.buttonContainer, styles.hideOnTablet)}> <div className={cx(styles.buttonContainer, styles.hideOnTablet)}>
<Button <Button
className={styles.button} className={styles.button}
variant={"Primary"} variant="Primary"
size={"Medium"} size="Medium"
type="submit" type="submit"
isDisabled isDisabled
> >

View File

@@ -56,7 +56,7 @@ export function FloatingBookingWidgetClient(props: Props) {
ref={containerRef} ref={containerRef}
> >
<div className={styles.floatingBackground}> <div className={styles.floatingBackground}>
<BookingWidgetClient {...props} type={"compact"} /> <BookingWidgetClient {...props} type="compact" />
</div> </div>
</div> </div>
) )

View File

@@ -106,7 +106,7 @@ export default function MobileToggleButton({
{!locationAndDateIsSet && ( {!locationAndDateIsSet && (
<> <>
<span className={styles.block}> <span className={styles.block}>
<Typography variant={"Body/Supporting text (caption)/smBold"}> <Typography variant="Body/Supporting text (caption)/smBold">
<span className={styles.blockLabel}> <span className={styles.blockLabel}>
{intl.formatMessage({ {intl.formatMessage({
id: "bookingWidget.label.whereTo", id: "bookingWidget.label.whereTo",
@@ -114,7 +114,7 @@ export default function MobileToggleButton({
})} })}
</span> </span>
</Typography> </Typography>
<Typography variant={"Body/Paragraph/mdRegular"}> <Typography variant="Body/Paragraph/mdRegular">
<span className={styles.placeholder}> <span className={styles.placeholder}>
{searchTerm {searchTerm
? searchTerm ? searchTerm
@@ -128,10 +128,10 @@ export default function MobileToggleButton({
{/* Button can't contain HR elements */} {/* Button can't contain HR elements */}
<Divider color="Border/Divider/Subtle" variant="vertical" /> <Divider color="Border/Divider/Subtle" variant="vertical" />
<span className={styles.block}> <span className={styles.block}>
<Typography variant={"Body/Supporting text (caption)/smBold"}> <Typography variant="Body/Supporting text (caption)/smBold">
<span className={styles.blockLabel}>{totalNightsMsg}</span> <span className={styles.blockLabel}>{totalNightsMsg}</span>
</Typography> </Typography>
<Typography variant={"Body/Paragraph/mdRegular"}> <Typography variant="Body/Paragraph/mdRegular">
<span className={styles.placeholder}> <span className={styles.placeholder}>
{intl.formatMessage( {intl.formatMessage(
{ {
@@ -155,10 +155,10 @@ export default function MobileToggleButton({
{locationAndDateIsSet && ( {locationAndDateIsSet && (
<> <>
<span className={styles.block}> <span className={styles.block}>
<Typography variant={"Body/Supporting text (caption)/smBold"}> <Typography variant="Body/Supporting text (caption)/smBold">
<span className={styles.blockLabel}>{selectedSearchTerm}</span> <span className={styles.blockLabel}>{selectedSearchTerm}</span>
</Typography> </Typography>
<Typography variant={"Body/Supporting text (caption)/smRegular"}> <Typography variant="Body/Supporting text (caption)/smRegular">
<span className={styles.locationAndDate}> <span className={styles.locationAndDate}>
{intl.formatMessage( {intl.formatMessage(
{ {
@@ -191,7 +191,7 @@ export function MobileToggleButtonSkeleton() {
return ( return (
<div className={cx(styles.mobileToggleButton, styles.partial)}> <div className={cx(styles.mobileToggleButton, styles.partial)}>
<span className={styles.block}> <span className={styles.block}>
<Typography variant={"Body/Supporting text (caption)/smBold"}> <Typography variant="Body/Supporting text (caption)/smBold">
<span className={styles.blockLabel}> <span className={styles.blockLabel}>
{intl.formatMessage({ {intl.formatMessage({
id: "bookingWidget.label.whereTo", id: "bookingWidget.label.whereTo",
@@ -199,7 +199,7 @@ export function MobileToggleButtonSkeleton() {
})} })}
</span> </span>
</Typography> </Typography>
<SkeletonShimmer display={"block"} height="20px" width="11ch" /> <SkeletonShimmer display="block" height="20px" width="11ch" />
</span> </span>
<Divider color="Border/Divider/Subtle" variant="vertical" /> <Divider color="Border/Divider/Subtle" variant="vertical" />
<span className={styles.block}> <span className={styles.block}>
@@ -215,7 +215,7 @@ export function MobileToggleButtonSkeleton() {
)} )}
</span> </span>
</Typography> </Typography>
<SkeletonShimmer display={"block"} height="20px" width="13ch" /> <SkeletonShimmer display="block" height="20px" width="13ch" />
</span> </span>
<span className={styles.icon}> <span className={styles.icon}>
<MaterialIcon icon="search" color="Icon/Inverted" /> <MaterialIcon icon="search" color="Icon/Inverted" />

View File

@@ -56,7 +56,7 @@ export default function MemberPriceModal() {
<div className={styles.modalContent}> <div className={styles.modalContent}>
<div className={styles.innerModalContent}> <div className={styles.innerModalContent}>
<MagicWandIcon width="265px" /> <MagicWandIcon width="265px" />
<Typography variant={"Title/smLowCase"}> <Typography variant="Title/smLowCase">
<h3 className={styles.title}> <h3 className={styles.title}>
{intl.formatMessage({ {intl.formatMessage({
id: "enterDetails.memberPriceModal.title", id: "enterDetails.memberPriceModal.title",

View File

@@ -66,7 +66,7 @@ export default function HotelHeader({
id: "destination.seeHotelDetails", id: "destination.seeHotelDetails",
defaultMessage: "See hotel details", defaultMessage: "See hotel details",
})} })}
buttonVariant={"secondary"} buttonVariant="secondary"
/> />
</div> </div>
</div> </div>

View File

@@ -248,7 +248,7 @@ export default function SummaryUI({
{showSignupPromo && roomOneMemberPrice && !isUserLoggedIn ? ( {showSignupPromo && roomOneMemberPrice && !isUserLoggedIn ? (
<SignupPromoDesktop <SignupPromoDesktop
memberPrice={roomOneMemberPrice} memberPrice={roomOneMemberPrice}
badgeContent={"✌️"} badgeContent="✌️"
isEnterDetailsPage isEnterDetailsPage
/> />
) : null} ) : null}

View File

@@ -7,13 +7,13 @@ export function RoomCardSkeleton() {
<article className={styles.card}> <article className={styles.card}>
{/* image container */} {/* image container */}
<div className={styles.imageContainer}> <div className={styles.imageContainer}>
<SkeletonShimmer width={"100%"} height="100%" /> <SkeletonShimmer width="100%" height="100%" />
</div> </div>
<div className={styles.priceVariants}> <div className={styles.priceVariants}>
{/* price variants */} {/* price variants */}
{Array.from({ length: 3 }).map((_, index) => ( {Array.from({ length: 3 }).map((_, index) => (
<SkeletonShimmer key={index} height={"100px"} /> <SkeletonShimmer key={index} height="100px" />
))} ))}
</div> </div>
</article> </article>

View File

@@ -21,7 +21,7 @@ export function SelectHotelMapSkeleton({ count = 2 }: Props) {
</div> </div>
</div> </div>
<div className={styles.mapContainer}> <div className={styles.mapContainer}>
<SkeletonShimmer width={"100%"} height="100%" /> <SkeletonShimmer width="100%" height="100%" />
</div> </div>
</div> </div>
) )

View File

@@ -14,10 +14,10 @@ export function SelectHotelSkeleton({ count = 4 }: Props) {
<div className={styles.headerContent}> <div className={styles.headerContent}>
<div className={styles.title}> <div className={styles.title}>
<div className={styles.cityInformation}> <div className={styles.cityInformation}>
<SkeletonShimmer height={"25px"} width={"200px"} /> <SkeletonShimmer height="25px" width="200px" />
</div> </div>
<div className={styles.sorter}> <div className={styles.sorter}>
<SkeletonShimmer height={"60px"} width={"100%"} /> <SkeletonShimmer height="60px" width="100%" />
</div> </div>
</div> </div>
</div> </div>
@@ -25,10 +25,10 @@ export function SelectHotelSkeleton({ count = 4 }: Props) {
<main className={styles.main}> <main className={styles.main}>
<div className={styles.sideBar}> <div className={styles.sideBar}>
<div className={styles.sideBarItem}> <div className={styles.sideBarItem}>
<SkeletonShimmer height={"280px"} width={"340px"} /> <SkeletonShimmer height="280px" width="340px" />
</div> </div>
<div className={styles.sideBarItem}> <div className={styles.sideBarItem}>
<SkeletonShimmer height={"400px"} width={"340px"} /> <SkeletonShimmer height="400px" width="340px" />
</div> </div>
</div> </div>
<div className={styles.hotelList}> <div className={styles.hotelList}>

View File

@@ -348,7 +348,7 @@ export default function SummaryContent({
amount: memberPrice.localPrice.pricePerStay, amount: memberPrice.localPrice.pricePerStay,
currency: memberPrice.localPrice.currency, currency: memberPrice.localPrice.currency,
}} }}
badgeContent={"✌️"} badgeContent="✌️"
/> />
) : null} ) : null}
</section> </section>

View File

@@ -71,7 +71,7 @@ export function BreakfastMessage({
<div className={styles.message}> <div className={styles.message}>
<Divider className={styles.divider} color="Border/Divider/Subtle" /> <Divider className={styles.divider} color="Border/Divider/Subtle" />
<Typography <Typography
variant={"Body/Supporting text (caption)/smRegular"} variant="Body/Supporting text (caption)/smRegular"
className={styles.breakfastMessage} className={styles.breakfastMessage}
> >
<p>{breakfastMessage}</p> <p>{breakfastMessage}</p>