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,9 +1,9 @@
/* eslint-disable formatjs/no-literal-string-in-jsx */
import copy from 'copy-to-clipboard'
import copy from "copy-to-clipboard"
import { kebabify } from '../../generate/utils'
import { kebabify } from "../../generate/utils"
import tableStyles from './tokens.module.css'
import tableStyles from "./tokens.module.css"
type ThemeValue = {
resolved: string | number
@@ -24,15 +24,15 @@ export function Shadow({ theme }: ShadowProps) {
// Filter shadow tokens
const shadowTokens: Theme = {}
for (const [k, v] of Object.entries(theme)) {
if (k.startsWith('BoxShadow-')) {
if (k.startsWith("BoxShadow-")) {
shadowTokens[k] = v as ThemeValue
}
}
// Sort by level
const sortedTokens = Object.entries(shadowTokens).sort((a, b) => {
const aLevel = parseInt(a[0].match(/\d+/)?.[0] || '0')
const bLevel = parseInt(b[0].match(/\d+/)?.[0] || '0')
const aLevel = parseInt(a[0].match(/\d+/)?.[0] || "0")
const bLevel = parseInt(b[0].match(/\d+/)?.[0] || "0")
return aLevel - bLevel
})
@@ -53,8 +53,8 @@ export function Shadow({ theme }: ShadowProps) {
<tbody>
{sortedTokens.map(([k, v]) => {
const shadowValue =
typeof v.resolved === 'string' ? v.resolved : ''
const level = k.match(/\d+/)?.[0] || '0'
typeof v.resolved === "string" ? v.resolved : ""
const level = k.match(/\d+/)?.[0] || "0"
return (
<tr key={k} className={tableStyles.tableRow}>
@@ -80,8 +80,8 @@ export function Shadow({ theme }: ShadowProps) {
}}
title="Click to copy"
style={{
fontSize: '0.75rem',
wordBreak: 'break-all',
fontSize: "0.75rem",
wordBreak: "break-all",
}}
>
{shadowValue}