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,6 +1,6 @@
'use client'
"use client"
import { type SyntheticEvent, useMemo, useState } from 'react'
import { type SyntheticEvent, useMemo, useState } from "react"
import {
Button,
ComboBox,
@@ -10,33 +10,33 @@ import {
ListBoxItem,
Popover,
useFilter,
} from 'react-aria-components'
import { useController } from 'react-hook-form'
} from "react-aria-components"
import { useController } from "react-hook-form"
import { MaterialIcon } from '../../Icons/MaterialIcon'
import { Typography } from '../../Typography'
import { ErrorMessage } from '../ErrorMessage'
import { MaterialIcon } from "../../Icons/MaterialIcon"
import { Typography } from "../../Typography"
import { ErrorMessage } from "../ErrorMessage"
import styles from './country.module.css'
import styles from "./country.module.css"
import type { CountryProps } from './country'
import type { CountryProps } from "./country"
const prioCountryCode = ['DE', 'DK', 'FI', 'NO', 'SE']
const prioCountryCode = ["DE", "DK", "FI", "NO", "SE"]
export default function CountryCombobox({
// hack used since chrome does not respect autocomplete="off"
autoComplete = 'nope',
className = '',
autoComplete = "nope",
className = "",
errorMessage,
label,
lang = 'en',
lang = "en",
countries,
name = 'country',
name = "country",
disabled = false,
registerOptions = {},
}: CountryProps) {
const { startsWith } = useFilter({ sensitivity: 'base' })
const [filterValue, setFilterValue] = useState('')
const { startsWith } = useFilter({ sensitivity: "base" })
const [filterValue, setFilterValue] = useState("")
const { field, formState, fieldState } = useController({
name,
rules: registerOptions,
@@ -68,7 +68,7 @@ export default function CountryCombobox({
function handleOnInput(evt: SyntheticEvent<HTMLInputElement>) {
setFilterValue(evt.currentTarget.value)
const isAutoCompleteEvent = !('inputType' in evt.nativeEvent)
const isAutoCompleteEvent = !("inputType" in evt.nativeEvent)
if (isAutoCompleteEvent) {
const { value } = evt.currentTarget
const cc = countries.find((c) => c.name === value || c.code === value)
@@ -89,7 +89,7 @@ export default function CountryCombobox({
isInvalid={fieldState.invalid}
name={name}
onBlur={field.onBlur}
onSelectionChange={(c) => field.onChange(c ?? '')}
onSelectionChange={(c) => field.onChange(c ?? "")}
selectedKey={field.value}
menuTrigger="focus"
>
@@ -142,8 +142,8 @@ export default function CountryCombobox({
<Typography
variant={
isSelected
? 'Body/Paragraph/mdBold'
: 'Body/Paragraph/mdRegular'
? "Body/Paragraph/mdBold"
: "Body/Paragraph/mdRegular"
}
>
<span>{item.label}</span>