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,45 +1,45 @@
'use client'
"use client"
import { forwardRef, type HTMLAttributes, type WheelEvent } from 'react'
import { Text, TextField } from 'react-aria-components'
import { Controller, useFormContext } from 'react-hook-form'
import { useIntl, type IntlShape } from 'react-intl'
import { cx } from 'class-variance-authority'
import { forwardRef, type HTMLAttributes, type WheelEvent } from "react"
import { Text, TextField } from "react-aria-components"
import { Controller, useFormContext } from "react-hook-form"
import { useIntl, type IntlShape } from "react-intl"
import { cx } from "class-variance-authority"
import { Error } from '../ErrorMessage/Error'
import { mergeRefs } from '../utils/mergeRefs'
import { MaterialIcon, MaterialIconProps } from '../../Icons/MaterialIcon'
import { Input } from '../../Input'
import { Error } from "../ErrorMessage/Error"
import { mergeRefs } from "../utils/mergeRefs"
import { MaterialIcon, MaterialIconProps } from "../../Icons/MaterialIcon"
import { Input } from "../../Input"
import styles from './input.module.css'
import styles from "./input.module.css"
import type { FormInputProps } from './input'
import type { FormInputProps } from "./input"
const defaultErrorFormatter = (
_intl: IntlShape,
errorMessage?: string
): string => errorMessage ?? ''
): string => errorMessage ?? ""
export const FormInput = forwardRef<HTMLInputElement, FormInputProps>(
function FormInput(
{
autoComplete,
className = '',
description = '',
descriptionIcon = 'info' as MaterialIconProps['icon'],
className = "",
description = "",
descriptionIcon = "info" as MaterialIconProps["icon"],
disabled = false,
errorFormatter,
hideError,
inputMode,
label,
labelPosition = 'floating',
labelPosition = "floating",
maxLength,
name,
id,
placeholder,
readOnly = false,
registerOptions = {},
type = 'text',
type = "text",
validationState,
...props
},
@@ -52,7 +52,7 @@ export const FormInput = forwardRef<HTMLInputElement, FormInputProps>(
// Number input: prevent scroll from changing value
const numberAttributes: HTMLAttributes<HTMLInputElement> =
type === 'number'
type === "number"
? {
onWheel: (evt: WheelEvent<HTMLInputElement>) => {
evt.currentTarget.blur()
@@ -87,7 +87,7 @@ export const FormInput = forwardRef<HTMLInputElement, FormInputProps>(
name={field.name}
onBlur={field.onBlur}
onChange={field.onChange}
value={field.value ?? ''}
value={field.value ?? ""}
autoComplete={autoComplete}
id={id ?? field.name}
label={label}
@@ -123,4 +123,4 @@ export const FormInput = forwardRef<HTMLInputElement, FormInputProps>(
}
)
FormInput.displayName = 'FormInput'
FormInput.displayName = "FormInput"

View File

@@ -8,7 +8,7 @@
gap: var(--Space-x05);
margin-top: var(--Space-x1);
font-size: var(--Body-Supporting-text-Size);
font-family: var(--Body-Supporting-text-Font-family, 'Fira Sans');
font-family: var(--Body-Supporting-text-Font-family, "Fira Sans");
font-style: normal;
font-weight: var(--Body-Supporting-text-Font-weight);
letter-spacing: var(--Body-Supporting-text-Letter-spacing);

View File

@@ -1,14 +1,14 @@
import type { RegisterOptions } from 'react-hook-form'
import type { IntlShape } from 'react-intl'
import type { RegisterOptions } from "react-hook-form"
import type { IntlShape } from "react-intl"
import type { MaterialIconProps } from '../../Icons/MaterialIcon'
import type { InputProps } from '../../Input/types'
import type { MaterialIconProps } from "../../Icons/MaterialIcon"
import type { InputProps } from "../../Input/types"
export interface FormInputProps extends InputProps {
/** Helper text displayed below the input (hidden when there's an error) */
description?: string
/** Icon to display with the description text. Defaults to 'info' */
descriptionIcon?: MaterialIconProps['icon']
descriptionIcon?: MaterialIconProps["icon"]
/** Field id for react-hook-form registration */
id?: string
/** Field name for react-hook-form registration */
@@ -24,5 +24,5 @@ export interface FormInputProps extends InputProps {
* - 'warning': Shows warning styling (yellow background, focus ring)
* - Note: Error state is automatically derived from form validation
*/
validationState?: 'warning'
validationState?: "warning"
}