feat(SW-706): make eslint rule 'formatjs/no-literal-string-in-jsx' pass

This commit is contained in:
Michael Zetterberg
2025-02-07 06:51:36 +01:00
parent e22fc1f3c8
commit 440e1f92df
393 changed files with 4839 additions and 1554 deletions

View File

@@ -88,7 +88,9 @@ function HotelCard({
const hasInsufficientPoints = !price?.redemptions?.some(
(r) => r.hasEnoughPoints
)
const notEnoughPointsLabel = intl.formatMessage({ id: "Not enough points" })
const notEnoughPointsLabel = intl.formatMessage({
defaultMessage: "Not enough points",
})
return (
<article
@@ -129,7 +131,7 @@ function HotelCard({
href={selectHotelMap(lang)}
keepSearchParams
aria-label={intl.formatMessage({
id: "See on map",
defaultMessage: "See on map",
})}
>
<Typography variant="Body/Supporting text (caption)/smRegular">
@@ -144,7 +146,9 @@ function HotelCard({
</div>
<Caption color="uiTextPlaceholder">
{intl.formatMessage(
{ id: "{number} km to city center" },
{
defaultMessage: "{number} km to city center",
},
{
number: getSingleDecimal(
hotel.location.distanceToCentre / 1000
@@ -173,7 +177,9 @@ function HotelCard({
})}
</div>
<ReadMore
label={intl.formatMessage({ id: "See hotel details" })}
label={intl.formatMessage({
defaultMessage: "See hotel details",
})}
hotelId={hotel.operaId}
hotel={hotel}
showCTA={true}
@@ -192,7 +198,10 @@ function HotelCard({
icon={<DiscountIcon color="Icon/Feedback/Information" />}
>
{intl.formatMessage(
{ id: "<strong>Booking code</strong>: {value}" },
{
defaultMessage:
"<strong>Booking code</strong>: {value}",
},
{
value: bookingCode,
strong: (text) => (
@@ -227,7 +236,9 @@ function HotelCard({
{price?.redemptions?.length ? (
<div className={styles.pointsCard}>
<Caption>
{intl.formatMessage({ id: "Available rates" })}
{intl.formatMessage({
defaultMessage: "Available rates",
})}
</Caption>
{price.redemptions.map((redemption) => (
<HotelPointsRow
@@ -272,7 +283,9 @@ function HotelCard({
color="none"
keepSearchParams
>
{intl.formatMessage({ id: "See rooms" })}
{intl.formatMessage({
defaultMessage: "See rooms",
})}
</Link>
</Button>
)}