diff --git a/apps/scandic-web/.eslintrc.json b/apps/scandic-web/.eslintrc.json index 70c092dc1..e4444adab 100644 --- a/apps/scandic-web/.eslintrc.json +++ b/apps/scandic-web/.eslintrc.json @@ -74,14 +74,14 @@ } ], // "formatjs/enforce-description": ["warn", "anything"], - // "formatjs/enforce-default-message": ["error", "literal"], + "formatjs/enforce-default-message": ["error", "literal"], "formatjs/enforce-placeholders": ["error"], "formatjs/enforce-plural-rules": ["error"], "formatjs/no-literal-string-in-jsx": ["error"], "formatjs/no-multiple-whitespaces": ["error"], "formatjs/no-multiple-plurals": ["error"], "formatjs/no-invalid-icu": ["error"], - // "formatjs/no-id": ["error"], + "formatjs/no-id": ["error"], "formatjs/no-complex-selectors": ["error"], "formatjs/no-useless-message": ["error"], "formatjs/prefer-pound-in-plural": ["error"] diff --git a/apps/scandic-web/components/Forms/BookingWidget/FormContent/BookingCode/index.tsx b/apps/scandic-web/components/Forms/BookingWidget/FormContent/BookingCode/index.tsx index 7c5e2656a..2ddbd7503 100644 --- a/apps/scandic-web/components/Forms/BookingWidget/FormContent/BookingCode/index.tsx +++ b/apps/scandic-web/components/Forms/BookingWidget/FormContent/BookingCode/index.tsx @@ -287,6 +287,7 @@ function BookingCodeError({ codeError }: { codeError: FieldError }) { className={styles.errorIcon} /> {intl.formatMessage({ + // eslint-disable-next-line formatjs/enforce-default-message defaultMessage: codeError.message, })} diff --git a/apps/scandic-web/components/Forms/BookingWidget/FormContent/RewardNight/index.tsx b/apps/scandic-web/components/Forms/BookingWidget/FormContent/RewardNight/index.tsx index 76a339c29..30f0fc55c 100644 --- a/apps/scandic-web/components/Forms/BookingWidget/FormContent/RewardNight/index.tsx +++ b/apps/scandic-web/components/Forms/BookingWidget/FormContent/RewardNight/index.tsx @@ -126,6 +126,7 @@ export default function RewardNight() { className={styles.errorIcon} /> {intl.formatMessage({ + // eslint-disable-next-line formatjs/enforce-default-message defaultMessage: redemptionErr.message, })} diff --git a/apps/scandic-web/components/HotelReservation/FindMyBooking/schema.ts b/apps/scandic-web/components/HotelReservation/FindMyBooking/schema.ts index 2877a8c3d..0711ca1b8 100644 --- a/apps/scandic-web/components/HotelReservation/FindMyBooking/schema.ts +++ b/apps/scandic-web/components/HotelReservation/FindMyBooking/schema.ts @@ -9,19 +9,19 @@ export { } defineMessage({ - id: "Invalid booking number", + defaultMessage: "Invalid booking number", }) defineMessage({ - id: "Booking number is required", + defaultMessage: "Booking number is required", }) defineMessage({ - id: "First name is required", + defaultMessage: "First name is required", }) defineMessage({ - id: "Last name is required", + defaultMessage: "Last name is required", }) defineMessage({ - id: "Email address is required", + defaultMessage: "Email address is required", }) const additionalInfoFormSchema = z.object({ diff --git a/apps/scandic-web/components/HotelReservation/SelectRate/RoomsContainer/Rooms/RoomsList/RoomListItem/Rates/Campaign.tsx b/apps/scandic-web/components/HotelReservation/SelectRate/RoomsContainer/Rooms/RoomsList/RoomListItem/Rates/Campaign.tsx index 571c8f5b3..c38c49684 100644 --- a/apps/scandic-web/components/HotelReservation/SelectRate/RoomsContainer/Rooms/RoomsList/RoomListItem/Rates/Campaign.tsx +++ b/apps/scandic-web/components/HotelReservation/SelectRate/RoomsContainer/Rooms/RoomsList/RoomListItem/Rates/Campaign.tsx @@ -178,7 +178,9 @@ export default function Campaign({ product.public.localPrice.omnibusPricePerNight ? { label: intl - .formatMessage({ id: "Lowest price (last 30 days)" }) + .formatMessage({ + defaultMessage: "Lowest price (last 30 days)", + }) .toUpperCase(), price: product.public.localPrice.omnibusPricePerNight.toString(), diff --git a/apps/scandic-web/components/TempDesignSystem/Form/Input/index.tsx b/apps/scandic-web/components/TempDesignSystem/Form/Input/index.tsx index cc7d1bad9..d3f88b66b 100644 --- a/apps/scandic-web/components/TempDesignSystem/Form/Input/index.tsx +++ b/apps/scandic-web/components/TempDesignSystem/Form/Input/index.tsx @@ -82,6 +82,7 @@ const Input = forwardRef(function Input( {intl.formatMessage({ + // eslint-disable-next-line formatjs/enforce-default-message defaultMessage: fieldState.error.message, })} diff --git a/apps/scandic-web/components/TempDesignSystem/Form/PasswordInput/index.tsx b/apps/scandic-web/components/TempDesignSystem/Form/PasswordInput/index.tsx index 19b0999f4..125557a97 100644 --- a/apps/scandic-web/components/TempDesignSystem/Form/PasswordInput/index.tsx +++ b/apps/scandic-web/components/TempDesignSystem/Form/PasswordInput/index.tsx @@ -125,6 +125,7 @@ export default function PasswordInput({ {fieldState.error && intl.formatMessage({ + // eslint-disable-next-line formatjs/enforce-default-message defaultMessage: fieldState.error.message, })}