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,22 +1,22 @@
import type { Meta, StoryObj } from '@storybook/nextjs-vite'
import CodeRateCard from '.'
import type { Meta, StoryObj } from "@storybook/nextjs-vite"
import CodeRateCard from "."
const meta: Meta<typeof CodeRateCard> = {
title: 'Product Components/RateCard/Code',
title: "Product Components/RateCard/Code",
component: CodeRateCard,
decorators: [
(Story) => (
<div style={{ maxWidth: '400px' }}>
<div style={{ maxWidth: "400px" }}>
<Story />
</div>
),
],
argTypes: {
rateTitle: { control: 'text' },
paymentTerm: { control: 'text' },
rate: { control: 'object' },
approximateRate: { control: 'object' },
rateTermDetails: { contorlr: 'object' },
rateTitle: { control: "text" },
paymentTerm: { control: "text" },
rate: { control: "object" },
approximateRate: { control: "object" },
rateTermDetails: { contorlr: "object" },
},
}
@@ -26,23 +26,23 @@ type Story = StoryObj<typeof CodeRateCard>
export const Default: Story = {
args: {
rateTitle: 'FREE CANCELLATION',
paymentTerm: 'PAY LATER',
bannerText: 'Campaign ∙ Breakfast excluded',
rateTitle: "FREE CANCELLATION",
paymentTerm: "PAY LATER",
bannerText: "Campaign ∙ Breakfast excluded",
rate: {
label: "Valentine's Special",
price: '1989',
unit: 'EUR/night',
price: "1989",
unit: "EUR/night",
},
approximateRate: {
price: '1989',
label: 'Approx.',
unit: 'EUR',
price: "1989",
label: "Approx.",
unit: "EUR",
},
rateTermDetails: [
{
title: 'Rate definition 1',
terms: ['term 1', 'term 2', 'term 3'],
title: "Rate definition 1",
terms: ["term 1", "term 2", "term 3"],
},
],
},
@@ -50,18 +50,18 @@ export const Default: Story = {
export const Voucher: Story = {
args: {
rateTitle: 'FREE CANCELLATION',
paymentTerm: 'PAY LATER',
bannerText: 'VOG ∙ Breakfast included',
rateTitle: "FREE CANCELLATION",
paymentTerm: "PAY LATER",
bannerText: "VOG ∙ Breakfast included",
rate: {
label: 'Promotional name here',
price: '1',
unit: 'VOUCHER',
label: "Promotional name here",
price: "1",
unit: "VOUCHER",
},
rateTermDetails: [
{
title: 'Rate definition 1',
terms: ['term 1', 'term 2', 'term 3'],
title: "Rate definition 1",
terms: ["term 1", "term 2", "term 3"],
},
],
},
@@ -69,23 +69,23 @@ export const Voucher: Story = {
export const CorporateCheck: Story = {
args: {
rateTitle: 'FREE CANCELLATION',
paymentTerm: 'PAY LATER',
bannerText: 'VOG ∙ Breakfast included',
rateTitle: "FREE CANCELLATION",
paymentTerm: "PAY LATER",
bannerText: "VOG ∙ Breakfast included",
rate: {
label: 'Promotional name here',
price: '2cc + 800',
unit: 'SEK',
label: "Promotional name here",
price: "2cc + 800",
unit: "SEK",
},
approximateRate: {
price: '76',
label: 'Approx.',
unit: 'EUR',
price: "76",
label: "Approx.",
unit: "EUR",
},
rateTermDetails: [
{
title: 'Rate definition 1',
terms: ['term 1', 'term 2', 'term 3'],
title: "Rate definition 1",
terms: ["term 1", "term 2", "term 3"],
},
],
},
@@ -93,23 +93,23 @@ export const CorporateCheck: Story = {
export const DNumberDefault: Story = {
args: {
rateTitle: 'FREE CANCELLATION',
paymentTerm: 'PAY LATER',
bannerText: 'D0043148 ∙ Breakfast included',
rateTitle: "FREE CANCELLATION",
paymentTerm: "PAY LATER",
bannerText: "D0043148 ∙ Breakfast included",
rate: {
label: 'Helsinki Partners Oy',
price: '1989',
unit: 'EUR/NIGHT',
label: "Helsinki Partners Oy",
price: "1989",
unit: "EUR/NIGHT",
},
approximateRate: {
price: '76',
label: 'Approx.',
unit: 'EUR',
price: "76",
label: "Approx.",
unit: "EUR",
},
rateTermDetails: [
{
title: 'Rate definition 1',
terms: ['term 1', 'term 2', 'term 3'],
title: "Rate definition 1",
terms: ["term 1", "term 2", "term 3"],
},
],
},
@@ -117,24 +117,24 @@ export const DNumberDefault: Story = {
export const DNumberHighlightedRate: Story = {
args: {
rateTitle: 'FREE CANCELLATION',
paymentTerm: 'PAY LATER',
bannerText: 'D0043148 ∙ Breakfast included',
rateTitle: "FREE CANCELLATION",
paymentTerm: "PAY LATER",
bannerText: "D0043148 ∙ Breakfast included",
rate: {
label: 'Helsinki Partners Oy',
price: '198',
unit: 'EUR/NIGHT',
label: "Helsinki Partners Oy",
price: "198",
unit: "EUR/NIGHT",
},
approximateRate: {
price: '76',
label: 'Approx.',
unit: 'EUR',
price: "76",
label: "Approx.",
unit: "EUR",
},
isHighlightedRate: true,
rateTermDetails: [
{
title: 'Rate definition 1',
terms: ['term 1', 'term 2', 'term 3'],
title: "Rate definition 1",
terms: ["term 1", "term 2", "term 3"],
},
],
},
@@ -142,23 +142,23 @@ export const DNumberHighlightedRate: Story = {
export const LNumberDefault: Story = {
args: {
rateTitle: 'NON-REFUNDABLE',
paymentTerm: 'PAY NOW',
bannerText: 'L0043148 ∙ Breakfast included',
rateTitle: "NON-REFUNDABLE",
paymentTerm: "PAY NOW",
bannerText: "L0043148 ∙ Breakfast included",
rate: {
label: 'Nordic Team Travel',
price: '198',
unit: 'EUR/NIGHT',
label: "Nordic Team Travel",
price: "198",
unit: "EUR/NIGHT",
},
approximateRate: {
price: '76',
label: 'Approx.',
unit: 'EUR',
price: "76",
label: "Approx.",
unit: "EUR",
},
rateTermDetails: [
{
title: 'Rate definition 1',
terms: ['term 1', 'term 2', 'term 3'],
title: "Rate definition 1",
terms: ["term 1", "term 2", "term 3"],
},
],
},
@@ -166,27 +166,27 @@ export const LNumberDefault: Story = {
export const LNumberStrikethrough: Story = {
args: {
rateTitle: 'NON-REFUNDABLE',
paymentTerm: 'PAY NOW',
bannerText: 'L0043148 ∙ Breakfast included',
rateTitle: "NON-REFUNDABLE",
paymentTerm: "PAY NOW",
bannerText: "L0043148 ∙ Breakfast included",
rate: {
label: 'Nordic Team Travel',
price: '198',
unit: 'EUR/NIGHT',
label: "Nordic Team Travel",
price: "198",
unit: "EUR/NIGHT",
},
comparisonRate: {
price: '249',
unit: 'EUR/NIGHT',
price: "249",
unit: "EUR/NIGHT",
},
approximateRate: {
price: '230/218',
label: 'Approx.',
unit: 'EUR',
price: "230/218",
label: "Approx.",
unit: "EUR",
},
rateTermDetails: [
{
title: 'Rate definition 1',
terms: ['term 1', 'term 2', 'term 3'],
title: "Rate definition 1",
terms: ["term 1", "term 2", "term 3"],
},
],
},

View File

@@ -1,14 +1,14 @@
import { Rate, RateTermDetails } from '../types'
import { Rate, RateTermDetails } from "../types"
import { cx } from 'class-variance-authority'
import { Button as ButtonRAC } from 'react-aria-components'
import { useIntl } from 'react-intl'
import { IconButton } from '../../IconButton'
import { MaterialIcon } from '../../Icons/MaterialIcon'
import { Typography } from '../../Typography'
import Modal from '../Modal'
import styles from '../rate-card.module.css'
import { variants } from '../variants'
import { cx } from "class-variance-authority"
import { Button as ButtonRAC } from "react-aria-components"
import { useIntl } from "react-intl"
import { IconButton } from "../../IconButton"
import { MaterialIcon } from "../../Icons/MaterialIcon"
import { Typography } from "../../Typography"
import Modal from "../Modal"
import styles from "../rate-card.module.css"
import { variants } from "../variants"
interface CodeRateCardProps {
id: string
@@ -17,7 +17,7 @@ interface CodeRateCardProps {
paymentTerm: string
rate: Rate
bannerText: string
comparisonRate?: Omit<Rate, 'label'>
comparisonRate?: Omit<Rate, "label">
approximateRate?: Rate
roomTypeCode: string
isHighlightedRate?: boolean
@@ -41,7 +41,7 @@ export default function CodeRateCard({
rateTermDetails,
}: CodeRateCardProps) {
const classNames = variants({
variant: 'Code',
variant: "Code",
})
const intl = useIntl()
@@ -74,8 +74,8 @@ export default function CodeRateCard({
size="sm"
className={styles.triggerButton}
aria-label={intl.formatMessage({
id: 'selectRate.rateCard.openReservationPolicy',
defaultMessage: 'Open reservation policy',
id: "selectRate.rateCard.openReservationPolicy",
defaultMessage: "Open reservation policy",
})}
iconName="info"
/>
@@ -113,7 +113,7 @@ export default function CodeRateCard({
</Typography>
<div className={styles.content} id={`${id}-details`}>
<div
className={`${styles.rateRow} ${isHighlightedRate ? styles.highlightedRate : ''}`}
className={`${styles.rateRow} ${isHighlightedRate ? styles.highlightedRate : ""}`}
>
<Typography variant="Body/Supporting text (caption)/smBold">
<p>{rate.label}</p>
@@ -135,7 +135,7 @@ export default function CodeRateCard({
<span className={styles.strikethrough}>
{comparisonRate.price}
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
</span>{' '}
</span>{" "}
<Typography variant="Body/Supporting text (caption)/smBold">
<span className={styles.strikethrough}>
{comparisonRate.unit}