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,11 +1,11 @@
import type { Meta, StoryObj } from '@storybook/nextjs-vite'
import { fn } from 'storybook/test'
import type { Meta, StoryObj } from "@storybook/nextjs-vite"
import { fn } from "storybook/test"
import { themes } from '../../../../.storybook/preview'
import { themes } from "../../../../.storybook/preview"
import { Card } from '../'
import { Button } from '../../Button'
import { Typography } from '../../Typography'
import { Card } from "../"
import { Button } from "../../Button"
import { Typography } from "../../Typography"
type CompositionProps = React.ComponentPropsWithoutRef<typeof Card> & {
_onPrimaryPress?: () => void
@@ -18,18 +18,18 @@ type CompositionProps = React.ComponentPropsWithoutRef<typeof Card> & {
}
const meta: Meta<CompositionProps> = {
title: 'Compositions/Card',
title: "Compositions/Card",
component: Card,
decorators: [
(Story, context) => {
if (context.name.toLowerCase().indexOf('all themes') >= 0) {
if (context.name.toLowerCase().indexOf("all themes") >= 0) {
return (
<>
<h1>{context.name}</h1>
{Object.entries(themes.themes).map(([key, value], ix) => {
return (
<div key={ix} className={value} style={{ padding: '1em 0' }}>
<h2 style={{ paddingBottom: '0.5em' }}>{key}</h2>
<div key={ix} className={value} style={{ padding: "1em 0" }}>
<h2 style={{ paddingBottom: "0.5em" }}>{key}</h2>
<Story />
</div>
)
@@ -39,7 +39,7 @@ const meta: Meta<CompositionProps> = {
}
return (
<div style={{ display: 'flex' }}>
<div style={{ display: "flex" }}>
<Story />
</div>
)
@@ -47,19 +47,19 @@ const meta: Meta<CompositionProps> = {
],
argTypes: {
inMainArea: {
name: 'Is in main area',
name: "Is in main area",
},
showTitle: {
name: 'Composition: Show title',
name: "Composition: Show title",
},
showPreamble: {
name: 'Composition: Show preamble',
name: "Composition: Show preamble",
},
showPrimaryButton: {
name: 'Composition: Show primary button',
name: "Composition: Show primary button",
},
showSecondaryButton: {
name: 'Composition: Show secondary button',
name: "Composition: Show secondary button",
},
_onPrimaryPress: {
table: {
@@ -110,7 +110,7 @@ const meta: Meta<CompositionProps> = {
{showSecondaryButton && (
<Button
size={inMainArea ? 'lg' : 'sm'}
size={inMainArea ? "lg" : "sm"}
variant="Secondary"
onPress={args._onSecondaryPress}
>
@@ -127,7 +127,7 @@ type Story = StoryObj<CompositionProps>
export const ContentCardMainArea: Story = {
args: {
as: 'Default',
as: "Default",
inMainArea: true,
showTitle: true,
showPreamble: true,
@@ -140,7 +140,7 @@ export const ContentCardMainArea: Story = {
export const ContentCardNonMainArea: Story = {
args: {
as: 'Default',
as: "Default",
inMainArea: false,
showTitle: true,
showPreamble: true,