Merged in fix/3697-prettier-configs (pull request #3396)

fix(SW-3691): Setup one prettier config for whole repo

* Setup prettierrc in root and remove other configs


Approved-by: Joakim Jäderberg
Approved-by: Linus Flood
This commit is contained in:
Rasmus Langvad
2026-01-07 12:45:50 +00:00
parent 932413412b
commit d0546926a9
500 changed files with 18367 additions and 18419 deletions

View File

@@ -1,24 +1,25 @@
'use client'
"use client"
import { useIntl } from 'react-intl'
import { useIntl } from "react-intl"
import { Typography } from '../../Typography'
import { Typography } from "../../Typography"
import { formatPrice } from '@scandic-hotels/common/utils/numberFormatting'
import { formatPrice } from "@scandic-hotels/common/utils/numberFormatting"
import { type Parking, ParkingPricePeriods } from '../parkingInformationTypes'
import { getPeriod } from './utils'
import { type Parking, ParkingPricePeriods } from "../parkingInformationTypes"
import { getPeriod } from "./utils"
import styles from './parkingPrices.module.css'
import styles from "./parkingPrices.module.css"
interface ParkingPricesProps
extends Pick<Parking['pricing'], 'freeParking'>,
Pick<NonNullable<Parking['pricing']['localCurrency']>, 'currency'> {
pricing: NonNullable<Parking['pricing']['localCurrency']>['ordinary']
extends
Pick<Parking["pricing"], "freeParking">,
Pick<NonNullable<Parking["pricing"]["localCurrency"]>, "currency"> {
pricing: NonNullable<Parking["pricing"]["localCurrency"]>["ordinary"]
}
export default function ParkingPrices({
currency = '',
currency = "",
freeParking,
pricing,
}: ParkingPricesProps) {
@@ -29,8 +30,8 @@ export default function ParkingPrices({
<Typography variant="Body/Paragraph/mdBold">
<p className={styles.wrapper}>
{intl.formatMessage({
id: 'parkingInformation.freeParking',
defaultMessage: 'Free parking',
id: "parkingInformation.freeParking",
defaultMessage: "Free parking",
})}
</p>
</Typography>
@@ -45,13 +46,13 @@ export default function ParkingPrices({
<div className={styles.period}>
<div className={styles.information}>
<Typography variant="Body/Paragraph/mdBold">
<dt>{getPeriod(intl, 'Hour')}</dt>
<dt>{getPeriod(intl, "Hour")}</dt>
</Typography>
<Typography variant="Body/Paragraph/mdRegular">
<dd>
{intl.formatMessage({
id: 'parkingInformation.atACost',
defaultMessage: 'At a cost',
id: "parkingInformation.atACost",
defaultMessage: "At a cost",
})}
</dd>
</Typography>
@@ -78,8 +79,8 @@ export default function ParkingPrices({
<div className={styles.information}>
<dt>
{intl.formatMessage({
id: 'common.from',
defaultMessage: 'From',
id: "common.from",
defaultMessage: "From",
})}
</dt>
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}

View File

@@ -1,28 +1,28 @@
import { ParkingPricePeriods } from '../parkingInformationTypes'
import { ParkingPricePeriods } from "../parkingInformationTypes"
import type { IntlShape } from 'react-intl'
import type { IntlShape } from "react-intl"
export function getPeriod(intl: IntlShape, period?: string) {
switch (period) {
case ParkingPricePeriods.hour:
return intl.formatMessage({
id: 'parkingInformation.pricePerHour',
defaultMessage: 'Price per hour',
id: "parkingInformation.pricePerHour",
defaultMessage: "Price per hour",
})
case ParkingPricePeriods.day:
return intl.formatMessage({
id: 'parkingInformation.pricePerDay',
defaultMessage: 'Price per day',
id: "parkingInformation.pricePerDay",
defaultMessage: "Price per day",
})
case ParkingPricePeriods.night:
return intl.formatMessage({
id: 'parkingInformation.pricePerNight',
defaultMessage: 'Price per night',
id: "parkingInformation.pricePerNight",
defaultMessage: "Price per night",
})
case ParkingPricePeriods.allDay:
return intl.formatMessage({
id: 'parkingInformation.pricePer24Hours',
defaultMessage: 'Price per 24 hours',
id: "parkingInformation.pricePer24Hours",
defaultMessage: "Price per 24 hours",
})
default:
return period