From ad643ad862eed68566681b62ef0dee61c175fdb8 Mon Sep 17 00:00:00 2001 From: Samuel Date: Sat, 14 Dec 2024 12:49:34 +0100 Subject: [PATCH] chore: fix formatting and linting for json and tailwind --- .vscode/settings.json | 5 ++++- biome.json | 4 ++-- src/components/ui/badge.tsx | 2 +- src/components/ui/button.tsx | 2 +- src/components/ui/text-field.tsx | 4 ++-- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 153cc7a..048de8e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -8,5 +8,8 @@ "[typescriptreact]": { "editor.defaultFormatter": "biomejs.biome" }, + "[json]": { + "editor.defaultFormatter": "biomejs.biome" + }, "typescript.inlayHints.parameterNames.enabled": "all" -} \ No newline at end of file +} diff --git a/biome.json b/biome.json index f1def8a..9c9928b 100644 --- a/biome.json +++ b/biome.json @@ -101,8 +101,8 @@ "level": "error", "fix": "safe", "options": { - "attributes": ["className"], - "functions": ["cn"] + "attributes": ["class"], + "functions": ["cn", "cva"] } } } diff --git a/src/components/ui/badge.tsx b/src/components/ui/badge.tsx index 0c39688..a80e48a 100644 --- a/src/components/ui/badge.tsx +++ b/src/components/ui/badge.tsx @@ -7,7 +7,7 @@ import { cva } from "class-variance-authority"; import { cn } from "~/lib/utils"; const badgeVariants = cva( - "inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", + "inline-flex items-center rounded-md border px-2.5 py-0.5 font-semibold text-xs transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", { variants: { variant: { diff --git a/src/components/ui/button.tsx b/src/components/ui/button.tsx index 4f55a28..c041556 100644 --- a/src/components/ui/button.tsx +++ b/src/components/ui/button.tsx @@ -9,7 +9,7 @@ import { cva } from "class-variance-authority"; import { cn } from "~/lib/utils"; const buttonVariants = cva( - "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", + "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md font-medium text-sm ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", { variants: { variant: { diff --git a/src/components/ui/text-field.tsx b/src/components/ui/text-field.tsx index 79833df..f353e32 100644 --- a/src/components/ui/text-field.tsx +++ b/src/components/ui/text-field.tsx @@ -78,13 +78,13 @@ const TextFieldTextArea = ( }; const labelVariants = cva( - "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", + "font-medium text-sm leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", { variants: { variant: { label: "data-[invalid]:text-destructive", description: "font-normal text-muted-foreground", - error: "text-xs text-destructive", + error: "text-destructive text-xs", }, }, defaultVariants: {