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
@@ -1,12 +1,12 @@
import type { Meta, StoryObj } from '@storybook/nextjs-vite'
import type { Meta, StoryObj } from "@storybook/nextjs-vite"
import { expect, fn } from 'storybook/test'
import { expect, fn } from "storybook/test"
import { BackToTopButton } from '.'
import { config as backToTopButtonConfig } from './variants'
import { BackToTopButton } from "."
import { config as backToTopButtonConfig } from "./variants"
const meta: Meta<typeof BackToTopButton> = {
title: 'Patterns/BackToTopButton',
title: "Patterns/BackToTopButton",
component: BackToTopButton,
argTypes: {
onPress: {
@@ -15,13 +15,13 @@ const meta: Meta<typeof BackToTopButton> = {
},
},
position: {
control: 'select',
control: "select",
options: Object.keys(backToTopButtonConfig.variants.position),
table: {
type: {
summary: 'string',
summary: "string",
detail: Object.keys(backToTopButtonConfig.variants.position).join(
' | '
" | "
),
},
defaultValue: {
@@ -30,7 +30,7 @@ const meta: Meta<typeof BackToTopButton> = {
},
},
label: {
control: 'text',
control: "text",
},
},
}
@@ -40,16 +40,16 @@ export default meta
type Story = StoryObj<typeof BackToTopButton>
const globalStoryPropsInverted = {
backgrounds: { value: 'scandicPrimaryDark' },
backgrounds: { value: "scandicPrimaryDark" },
}
export const Default: Story = {
args: {
onPress: fn(),
label: 'Back to top',
label: "Back to top",
},
play: async ({ canvas, userEvent, args }) => {
await userEvent.click(await canvas.findByRole('button'))
await userEvent.click(await canvas.findByRole("button"))
expect(args.onPress).toHaveBeenCalledTimes(1)
},
}
@@ -57,10 +57,10 @@ export const Default: Story = {
export const PositionLeft: Story = {
args: {
...Default.args,
position: 'left',
position: "left",
},
play: async ({ canvas, userEvent, args }) => {
await userEvent.click(await canvas.findByRole('button'))
await userEvent.click(await canvas.findByRole("button"))
expect(args.onPress).toHaveBeenCalledTimes(1)
},
}
@@ -68,10 +68,10 @@ export const PositionLeft: Story = {
export const PositionCenter: Story = {
args: {
...Default.args,
position: 'center',
position: "center",
},
play: async ({ canvas, userEvent, args }) => {
await userEvent.click(await canvas.findByRole('button'))
await userEvent.click(await canvas.findByRole("button"))
expect(args.onPress).toHaveBeenCalledTimes(1)
},
}
@@ -79,10 +79,10 @@ export const PositionCenter: Story = {
export const PositionRight: Story = {
args: {
...Default.args,
position: 'right',
position: "right",
},
play: async ({ canvas, userEvent, args }) => {
await userEvent.click(await canvas.findByRole('button'))
await userEvent.click(await canvas.findByRole("button"))
expect(args.onPress).toHaveBeenCalledTimes(1)
},
}
@@ -91,10 +91,10 @@ export const OnDarkBackground: Story = {
globals: globalStoryPropsInverted,
args: {
onPress: fn(),
label: 'Back to top',
label: "Back to top",
},
play: async ({ canvas, userEvent, args }) => {
await userEvent.click(await canvas.findByRole('button'))
await userEvent.click(await canvas.findByRole("button"))
expect(args.onPress).toHaveBeenCalledTimes(1)
},
}
@@ -31,7 +31,7 @@
/* This button is able to be on top of dark background colors,
so we need to create an illusion that it also has an inverted border on focus */
&::before {
content: '';
content: "";
position: absolute;
inset: -4px;
border: 2px solid var(--Border-Inverted);
@@ -1,20 +1,19 @@
'use client'
"use client"
import { Button as ButtonRAC } from 'react-aria-components'
import { Button as ButtonRAC } from "react-aria-components"
import { MaterialIcon } from '../Icons/MaterialIcon'
import { Typography } from '../Typography'
import { MaterialIcon } from "../Icons/MaterialIcon"
import { Typography } from "../Typography"
import { variants } from './variants'
import { variants } from "./variants"
import styles from './backToTopButton.module.css'
import styles from "./backToTopButton.module.css"
import type { VariantProps } from 'class-variance-authority'
import type { ComponentProps } from 'react'
import type { VariantProps } from "class-variance-authority"
import type { ComponentProps } from "react"
interface BackToTopButtonProps
extends ComponentProps<typeof ButtonRAC>,
VariantProps<typeof variants> {
extends ComponentProps<typeof ButtonRAC>, VariantProps<typeof variants> {
label: string
}
@@ -1,6 +1,6 @@
import { cva } from 'class-variance-authority'
import { cva } from "class-variance-authority"
import styles from './backToTopButton.module.css'
import styles from "./backToTopButton.module.css"
export const config = {
variants: {
@@ -11,7 +11,7 @@ export const config = {
},
},
defaultVariants: {
position: 'right',
position: "right",
},
} as const