From eb3006289135722c83daed9c5f37f0c8066d19bb Mon Sep 17 00:00:00 2001 From: Robert Kossessa Date: Sat, 2 Mar 2024 18:25:31 +0100 Subject: [PATCH] UPD: Linting --- postcss.config.js | 4 +- src/renderer/src/components/ui/.eslintrc | 5 + src/renderer/src/components/ui/badge/index.ts | 13 +-- .../src/components/ui/button/Button.vue | 2 +- .../src/components/ui/button/index.ts | 18 ++- .../ui/collapsible/CollapsibleContent.vue | 5 +- .../src/components/ui/command/Command.vue | 9 +- .../components/ui/command/CommandDialog.vue | 4 +- .../components/ui/command/CommandGroup.vue | 17 ++- .../components/ui/command/CommandInput.vue | 19 +++- .../src/components/ui/command/CommandItem.vue | 7 +- .../src/components/ui/command/CommandList.vue | 5 +- .../ui/command/CommandSeparator.vue | 5 +- .../src/components/ui/dialog/Dialog.vue | 7 +- .../components/ui/dialog/DialogContent.vue | 11 +- .../ui/dialog/DialogScrollContent.vue | 27 +++-- .../src/components/ui/dialog/DialogTitle.vue | 7 +- .../ui/dropdown-menu/DropdownMenu.vue | 7 +- .../DropdownMenuCheckboxItem.vue | 16 +-- .../ui/dropdown-menu/DropdownMenuContent.vue | 13 ++- .../ui/dropdown-menu/DropdownMenuItem.vue | 16 ++- .../dropdown-menu/DropdownMenuRadioGroup.vue | 2 +- .../dropdown-menu/DropdownMenuRadioItem.vue | 4 +- .../dropdown-menu/DropdownMenuSeparator.vue | 18 +-- .../ui/dropdown-menu/DropdownMenuSub.vue | 2 +- .../dropdown-menu/DropdownMenuSubTrigger.vue | 14 ++- .../ui/menubar/MenubarCheckboxItem.vue | 4 +- .../ui/menubar/MenubarRadioGroup.vue | 2 +- .../ui/menubar/MenubarRadioItem.vue | 4 +- .../ui/menubar/MenubarSubTrigger.vue | 2 +- .../src/components/ui/slider/Slider.vue | 6 +- src/renderer/src/lib/utils.ts | 2 +- tailwind.config.js | 104 +++++++++--------- 33 files changed, 219 insertions(+), 162 deletions(-) create mode 100644 src/renderer/src/components/ui/.eslintrc diff --git a/postcss.config.js b/postcss.config.js index 33ad091..85f717c 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -1,6 +1,6 @@ module.exports = { plugins: { tailwindcss: {}, - autoprefixer: {}, - }, + autoprefixer: {} + } } diff --git a/src/renderer/src/components/ui/.eslintrc b/src/renderer/src/components/ui/.eslintrc new file mode 100644 index 0000000..2a8e38e --- /dev/null +++ b/src/renderer/src/components/ui/.eslintrc @@ -0,0 +1,5 @@ +{ + "rules": { + "@typescript-eslint/no-unused-vars": "off" + } +} diff --git a/src/renderer/src/components/ui/badge/index.ts b/src/renderer/src/components/ui/badge/index.ts index 20eda06..d574891 100644 --- a/src/renderer/src/components/ui/badge/index.ts +++ b/src/renderer/src/components/ui/badge/index.ts @@ -7,19 +7,18 @@ export const badgeVariants = cva( { variants: { variant: { - default: - 'border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80', + default: 'border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80', secondary: 'border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80', destructive: 'border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80', - outline: 'text-foreground', - }, + outline: 'text-foreground' + } }, defaultVariants: { - variant: 'default', - }, - }, + variant: 'default' + } + } ) export type BadgeVariants = VariantProps diff --git a/src/renderer/src/components/ui/button/Button.vue b/src/renderer/src/components/ui/button/Button.vue index e7ab516..56cd17d 100644 --- a/src/renderer/src/components/ui/button/Button.vue +++ b/src/renderer/src/components/ui/button/Button.vue @@ -12,7 +12,7 @@ interface Props extends PrimitiveProps { } const props = withDefaults(defineProps(), { - as: 'button', + as: 'button' }) diff --git a/src/renderer/src/components/ui/button/index.ts b/src/renderer/src/components/ui/button/index.ts index 4bb4bdb..90a7b2d 100644 --- a/src/renderer/src/components/ui/button/index.ts +++ b/src/renderer/src/components/ui/button/index.ts @@ -8,27 +8,25 @@ export const buttonVariants = cva( variants: { variant: { default: 'bg-primary text-primary-foreground shadow hover:bg-primary/90', - destructive: - 'bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90', + destructive: 'bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90', outline: 'border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground', - secondary: - 'bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80', + secondary: 'bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80', ghost: 'hover:bg-accent hover:text-accent-foreground', - link: 'text-primary underline-offset-4 hover:underline', + link: 'text-primary underline-offset-4 hover:underline' }, size: { default: 'h-9 px-4 py-2', sm: 'h-8 rounded-md px-3 text-xs', lg: 'h-10 rounded-md px-8', - icon: 'h-9 w-9', - }, + icon: 'size-9' + } }, defaultVariants: { variant: 'default', - size: 'default', - }, - }, + size: 'default' + } + } ) export type ButtonVariants = VariantProps diff --git a/src/renderer/src/components/ui/collapsible/CollapsibleContent.vue b/src/renderer/src/components/ui/collapsible/CollapsibleContent.vue index 9f30898..92acb77 100644 --- a/src/renderer/src/components/ui/collapsible/CollapsibleContent.vue +++ b/src/renderer/src/components/ui/collapsible/CollapsibleContent.vue @@ -5,7 +5,10 @@ const props = defineProps() diff --git a/src/renderer/src/components/ui/command/Command.vue b/src/renderer/src/components/ui/command/Command.vue index fd07554..7348d6f 100644 --- a/src/renderer/src/components/ui/command/Command.vue +++ b/src/renderer/src/components/ui/command/Command.vue @@ -6,7 +6,7 @@ import { cn } from '@renderer/lib/utils' const props = withDefaults(defineProps(), { open: true, - modelValue: '', + modelValue: '' }) const emits = defineEmits() @@ -23,7 +23,12 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits)