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,27 +1,27 @@
import type { Meta, StoryObj } from '@storybook/nextjs-vite'
import type { Meta, StoryObj } from "@storybook/nextjs-vite"
import PointsRateCard from '.'
import PointsRateCard from "."
const meta: Meta<typeof PointsRateCard> = {
title: 'Product Components/RateCard/Points',
title: "Product Components/RateCard/Points",
component: PointsRateCard,
decorators: [
(Story) => (
<div style={{ maxWidth: '400px' }}>
<div style={{ maxWidth: "400px" }}>
<Story />
</div>
),
],
argTypes: {
rateTitle: { control: 'text' },
paymentTerm: { control: 'text' },
bannerText: { control: 'text' },
rates: { control: 'object' },
selectedRate: { control: 'text' },
onRateSelect: { action: 'onRateSelect' },
isNotEnoughPoints: { control: 'boolean' },
notEnoughPointsText: { control: 'text' },
rateTermDetails: { control: 'object' },
rateTitle: { control: "text" },
paymentTerm: { control: "text" },
bannerText: { control: "text" },
rates: { control: "object" },
selectedRate: { control: "text" },
onRateSelect: { action: "onRateSelect" },
isNotEnoughPoints: { control: "boolean" },
notEnoughPointsText: { control: "text" },
rateTermDetails: { control: "object" },
},
}
@@ -31,40 +31,40 @@ type Story = StoryObj<typeof PointsRateCard>
export const Default: Story = {
args: {
rateTitle: 'FREE CANCELLATION',
paymentTerm: 'PAY LATER',
bannerText: 'Reward night ∙ Breakfast included',
rateTitle: "FREE CANCELLATION",
paymentTerm: "PAY LATER",
bannerText: "Reward night ∙ Breakfast included",
rates: [
{
points: '20000',
currency: 'PTS',
rateCode: 'REDNIGHT7',
points: "20000",
currency: "PTS",
rateCode: "REDNIGHT7",
},
{
points: '15000',
currency: 'PTS',
points: "15000",
currency: "PTS",
additionalPrice: {
price: '250',
currency: 'EUR',
price: "250",
currency: "EUR",
},
rateCode: 'REDNIGHT7A',
rateCode: "REDNIGHT7A",
},
{
points: '10000',
currency: 'PTS',
points: "10000",
currency: "PTS",
additionalPrice: {
price: '500',
currency: 'EUR',
price: "500",
currency: "EUR",
},
rateCode: 'REDNIGHT7B',
rateCode: "REDNIGHT7B",
},
],
selectedRate: undefined,
onRateSelect: (value) => console.log(value),
rateTermDetails: [
{
title: 'Rate definition 1',
terms: ['term 1', 'term 2', 'term 3'],
title: "Rate definition 1",
terms: ["term 1", "term 2", "term 3"],
},
],
},
@@ -72,42 +72,42 @@ export const Default: Story = {
export const WithDisabledRates: Story = {
args: {
rateTitle: 'FREE CANCELLATION',
paymentTerm: 'PAY LATER',
bannerText: 'Reward night ∙ Breakfast included',
rateTitle: "FREE CANCELLATION",
paymentTerm: "PAY LATER",
bannerText: "Reward night ∙ Breakfast included",
rates: [
{
points: '20000',
currency: 'PTS',
points: "20000",
currency: "PTS",
isDisabled: true,
rateCode: 'REDNIGHT7',
rateCode: "REDNIGHT7",
},
{
points: '15000',
currency: 'PTS',
points: "15000",
currency: "PTS",
isDisabled: true,
additionalPrice: {
price: '250',
currency: 'EUR',
price: "250",
currency: "EUR",
},
rateCode: 'REDNIGHT7A',
rateCode: "REDNIGHT7A",
},
{
points: '10000',
currency: 'PTS',
points: "10000",
currency: "PTS",
additionalPrice: {
price: '500',
currency: 'EUR',
price: "500",
currency: "EUR",
},
rateCode: 'REDNIGHT7B',
rateCode: "REDNIGHT7B",
},
],
selectedRate: '2',
selectedRate: "2",
onRateSelect: (value) => console.log(value),
rateTermDetails: [
{
title: 'Rate definition 1',
terms: ['term 1', 'term 2', 'term 3'],
title: "Rate definition 1",
terms: ["term 1", "term 2", "term 3"],
},
],
},
@@ -115,42 +115,42 @@ export const WithDisabledRates: Story = {
export const NotEnoughPoints: Story = {
args: {
rateTitle: 'FREE CANCELLATION',
paymentTerm: 'PAY LATER',
bannerText: 'Reward night ∙ Breakfast included',
rateTitle: "FREE CANCELLATION",
paymentTerm: "PAY LATER",
bannerText: "Reward night ∙ Breakfast included",
rates: [
{
points: '20000',
currency: 'PTS',
rateCode: 'REDNIGHT7',
points: "20000",
currency: "PTS",
rateCode: "REDNIGHT7",
},
{
points: '15000',
currency: 'PTS',
points: "15000",
currency: "PTS",
additionalPrice: {
price: '250',
currency: 'EUR',
price: "250",
currency: "EUR",
},
rateCode: 'REDNIGHT7A',
rateCode: "REDNIGHT7A",
},
{
points: '10000',
currency: 'PTS',
points: "10000",
currency: "PTS",
additionalPrice: {
price: '500',
currency: 'EUR',
price: "500",
currency: "EUR",
},
rateCode: 'REDNIGHT7B',
rateCode: "REDNIGHT7B",
},
],
selectedRate: undefined,
isNotEnoughPoints: true,
notEnoughPointsText: 'Not enough points',
notEnoughPointsText: "Not enough points",
onRateSelect: (value) => console.log(value),
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 { Typography } from '../../Typography'
import { RatePointsOption, RateTermDetails } from '../types'
import { Typography } from "../../Typography"
import { RatePointsOption, RateTermDetails } from "../types"
import { RadioGroup } from 'react-aria-components'
import { useIntl } from 'react-intl'
import { IconButton } from '../../IconButton'
import { MaterialIcon } from '../../Icons/MaterialIcon'
import { Radio } from '../../Radio'
import Modal from '../Modal'
import styles from '../rate-card.module.css'
import { variants } from '../variants'
import { RadioGroup } from "react-aria-components"
import { useIntl } from "react-intl"
import { IconButton } from "../../IconButton"
import { MaterialIcon } from "../../Icons/MaterialIcon"
import { Radio } from "../../Radio"
import Modal from "../Modal"
import styles from "../rate-card.module.css"
import { variants } from "../variants"
interface PointsRateCardProps {
rateTitle: string
@@ -38,7 +38,7 @@ export default function PointsRateCard({
rateTermDetails,
}: PointsRateCardProps) {
const classNames = variants({
variant: 'Points',
variant: "Points",
})
const intl = useIntl()
@@ -60,8 +60,8 @@ export default function PointsRateCard({
emphasis
size="sm"
aria-label={intl.formatMessage({
id: 'selectRate.rateCard.openReservationPolicy',
defaultMessage: 'Open reservation policy',
id: "selectRate.rateCard.openReservationPolicy",
defaultMessage: "Open reservation policy",
})}
iconName="info"
/>
@@ -119,7 +119,7 @@ export default function PointsRateCard({
<Typography variant="Body/Supporting text (caption)/smBold">
<span>
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
{`${rate.currency} ${rate.additionalPrice ? ' + ' : ''}`}
{`${rate.currency} ${rate.additionalPrice ? " + " : ""}`}
</span>
</Typography>
</p>