From 8488858c4682edbe9adfbab05c47e688fe5fc524 Mon Sep 17 00:00:00 2001 From: Shahrad Elahi Date: Tue, 19 Dec 2023 13:21:11 +0330 Subject: [PATCH] fix(chore): prettier format --- web/.prettierrc | 10 ++---- web/components.json | 2 +- web/package.json | 6 ++-- web/postcss.config.cjs | 6 ++-- web/src/app.css | 4 +-- web/src/app.html | 20 +++++------ web/src/lib/components/editable-text/index.ts | 4 +-- .../components/empty/empty-simple-img.svelte | 2 +- web/src/lib/components/page/BasePage.svelte | 4 +-- web/src/lib/components/page/PageHeader.svelte | 17 +++++++-- web/src/lib/components/ui/badge/badge.svelte | 7 +++- web/src/lib/components/ui/badge/index.ts | 3 +- .../lib/components/ui/button/button.svelte | 4 +-- web/src/lib/components/ui/button/index.ts | 12 +++---- .../lib/components/ui/card/card-title.svelte | 6 +++- web/src/lib/components/ui/card/card.svelte | 5 ++- .../components/ui/checkbox/checkbox.svelte | 24 ++++++------- .../ui/collapsible/collapsible-content.svelte | 16 ++++----- .../lib/components/ui/collapsible/index.ts | 18 +++++----- .../ui/dialog/dialog-description.svelte | 5 ++- .../components/ui/dialog/dialog-footer.svelte | 5 ++- .../components/ui/dialog/dialog-title.svelte | 5 ++- .../lib/components/ui/form/form-button.svelte | 4 +-- .../components/ui/form/form-checkbox.svelte | 10 +++--- .../ui/form/form-description.svelte | 9 ++--- .../lib/components/ui/form/form-input.svelte | 2 +- .../lib/components/ui/form/form-item.svelte | 6 ++-- .../lib/components/ui/form/form-label.svelte | 10 ++---- .../ui/form/form-native-select.svelte | 12 +++---- .../ui/form/form-radio-group.svelte | 12 +++---- .../ui/form/form-select-trigger.svelte | 6 ++-- .../lib/components/ui/form/form-select.svelte | 12 +++---- .../lib/components/ui/form/form-switch.svelte | 10 +++--- .../components/ui/form/form-textarea.svelte | 7 ++-- .../components/ui/form/form-validation.svelte | 4 +-- web/src/lib/components/ui/form/index.ts | 5 +-- web/src/lib/components/ui/input/input.svelte | 8 ++--- web/src/lib/components/ui/label/label.svelte | 10 +++--- .../ui/radio-group/radio-group-item.svelte | 18 +++++----- .../ui/radio-group/radio-group.svelte | 10 ++---- .../ui/select/select-content.svelte | 14 ++++---- .../components/ui/select/select-item.svelte | 20 +++++------ .../components/ui/select/select-label.svelte | 6 ++-- .../ui/select/select-separator.svelte | 7 ++-- .../ui/select/select-trigger.svelte | 16 ++++----- .../lib/components/ui/select/select.svelte | 4 +-- web/src/lib/components/ui/skeleton/index.ts | 8 ++--- .../components/ui/skeleton/skeleton.svelte | 15 ++++---- .../lib/components/ui/switch/switch.svelte | 14 ++++---- .../components/ui/textarea/textarea.svelte | 8 ++--- web/src/lib/network.ts | 5 ++- web/src/lib/shell.ts | 6 +++- web/src/lib/typings.ts | 7 ++-- web/src/lib/wireguard/index.ts | 14 ++++++-- web/src/lib/wireguard/schema.ts | 4 +-- web/src/routes/+layout.svelte | 2 +- web/src/routes/+page.server.ts | 9 ++++- web/src/routes/CreateServerDialog.svelte | 17 ++++++--- web/src/routes/Server.svelte | 13 +++++-- .../routes/[serverId]/CreatePeerDialog.svelte | 12 +++++-- web/src/routes/[serverId]/Peer.svelte | 10 ++++-- web/src/routes/api/qrcode/+server.ts | 5 ++- web/src/routes/login/+page.svelte | 10 +++++- web/src/routes/schema.ts | 9 ++++- web/tailwind.config.js | 36 +++++++++---------- web/vite.config.ts | 6 ++-- 66 files changed, 340 insertions(+), 277 deletions(-) diff --git a/web/.prettierrc b/web/.prettierrc index f80822f..7d7ebef 100644 --- a/web/.prettierrc +++ b/web/.prettierrc @@ -4,20 +4,14 @@ "singleQuote": true, "jsxSingleQuote": true, "trailingComma": "all", - "printWidth": 120, - "jsxBracketSameLine": true, + "printWidth": 100, "overrides": [ { "files": "*.svelte", "options": { "parser": "svelte", - "plugins": [ - "prettier-plugin-svelte" - ] + "plugins": ["prettier-plugin-svelte"] } } - ], - "pluginSearchDirs": [ - "." ] } diff --git a/web/components.json b/web/components.json index 0516b9c..1a1dab0 100644 --- a/web/components.json +++ b/web/components.json @@ -10,4 +10,4 @@ "components": "$lib/components", "utils": "$lib/utils" } -} \ No newline at end of file +} diff --git a/web/package.json b/web/package.json index c99992a..43fe0c6 100644 --- a/web/package.json +++ b/web/package.json @@ -9,8 +9,8 @@ "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", "test": "mocha", - "lint": "prettier --plugin-search-dir . --check .", - "format": "prettier --plugin-search-dir . --write .", + "lint": "prettier --check .", + "format": "prettier --write .", "start": "node ./build/index.js" }, "devDependencies": { @@ -55,4 +55,4 @@ "tailwind-merge": "^2.1.0", "tailwind-variants": "^0.1.18" } -} \ No newline at end of file +} diff --git a/web/postcss.config.cjs b/web/postcss.config.cjs index 42c343c..bc22153 100644 --- a/web/postcss.config.cjs +++ b/web/postcss.config.cjs @@ -6,8 +6,8 @@ const config = { //Some plugins, like tailwindcss/nesting, need to run before Tailwind, tailwindcss(), //But others, like autoprefixer, need to run after, - autoprefixer - ] + autoprefixer, + ], }; -module.exports = config; \ No newline at end of file +module.exports = config; diff --git a/web/src/app.css b/web/src/app.css index e5a4b47..9e78d4d 100644 --- a/web/src/app.css +++ b/web/src/app.css @@ -79,7 +79,6 @@ } @layer base { - h1 { @apply text-4xl font-bold; } @@ -108,5 +107,4 @@ text-decoration: none; transition: color 0.2s ease-in-out; } - -} \ No newline at end of file +} diff --git a/web/src/app.html b/web/src/app.html index 6ef75c5..b9491ee 100644 --- a/web/src/app.html +++ b/web/src/app.html @@ -1,12 +1,12 @@ - + - - - - - %sveltekit.head% - - -
%sveltekit.body%
- + + + + + %sveltekit.head% + + +
%sveltekit.body%
+ diff --git a/web/src/lib/components/editable-text/index.ts b/web/src/lib/components/editable-text/index.ts index b3449d8..a9ca1cf 100644 --- a/web/src/lib/components/editable-text/index.ts +++ b/web/src/lib/components/editable-text/index.ts @@ -3,5 +3,5 @@ import Root from './EditableText.svelte'; export { Root, // - Root as EditableText -} \ No newline at end of file + Root as EditableText, +}; diff --git a/web/src/lib/components/empty/empty-simple-img.svelte b/web/src/lib/components/empty/empty-simple-img.svelte index 8911c37..822ed07 100644 --- a/web/src/lib/components/empty/empty-simple-img.svelte +++ b/web/src/lib/components/empty/empty-simple-img.svelte @@ -21,7 +21,7 @@ viewBox="0 0 64 41" xmlns="http://www.w3.org/2000/svg" {...$$restProps} - class={cn('max-w-full h-full m-auto',className)} + class={cn('max-w-full h-full m-auto', className)} > diff --git a/web/src/lib/components/page/BasePage.svelte b/web/src/lib/components/page/BasePage.svelte index 075b498..639debc 100644 --- a/web/src/lib/components/page/BasePage.svelte +++ b/web/src/lib/components/page/BasePage.svelte @@ -10,9 +10,9 @@
-
+
-
+
diff --git a/web/src/lib/components/page/PageHeader.svelte b/web/src/lib/components/page/PageHeader.svelte index 4954da3..bc0b1e4 100644 --- a/web/src/lib/components/page/PageHeader.svelte +++ b/web/src/lib/components/page/PageHeader.svelte @@ -13,7 +13,11 @@
- - + + Logout {/if} diff --git a/web/src/lib/components/ui/badge/badge.svelte b/web/src/lib/components/ui/badge/badge.svelte index 151a58a..ab01c40 100644 --- a/web/src/lib/components/ui/badge/badge.svelte +++ b/web/src/lib/components/ui/badge/badge.svelte @@ -8,6 +8,11 @@ export { className as class }; - + diff --git a/web/src/lib/components/ui/badge/index.ts b/web/src/lib/components/ui/badge/index.ts index 9605747..46e3f1f 100644 --- a/web/src/lib/components/ui/badge/index.ts +++ b/web/src/lib/components/ui/badge/index.ts @@ -8,7 +8,8 @@ export const badgeVariants = tv({ default: 'bg-primary hover:bg-primary/80 border-transparent text-primary-foreground', secondary: 'bg-secondary hover:bg-secondary/80 border-transparent text-secondary-foreground', success: 'bg-green-500 hover:bg-green-500/80 border-transparent text-white', - destructive: 'bg-destructive hover:bg-destructive/80 border-transparent text-destructive-foreground', + destructive: + 'bg-destructive hover:bg-destructive/80 border-transparent text-destructive-foreground', outline: 'text-foreground', }, }, diff --git a/web/src/lib/components/ui/button/button.svelte b/web/src/lib/components/ui/button/button.svelte index f5def68..7080dcd 100644 --- a/web/src/lib/components/ui/button/button.svelte +++ b/web/src/lib/components/ui/button/button.svelte @@ -1,5 +1,5 @@ - + diff --git a/web/src/lib/components/ui/card/card.svelte b/web/src/lib/components/ui/card/card.svelte index c3330c4..6622fe7 100644 --- a/web/src/lib/components/ui/card/card.svelte +++ b/web/src/lib/components/ui/card/card.svelte @@ -8,6 +8,9 @@ export { className as class }; -
+
diff --git a/web/src/lib/components/ui/checkbox/checkbox.svelte b/web/src/lib/components/ui/checkbox/checkbox.svelte index 9ec0eb1..a343413 100644 --- a/web/src/lib/components/ui/checkbox/checkbox.svelte +++ b/web/src/lib/components/ui/checkbox/checkbox.svelte @@ -1,5 +1,5 @@ - + diff --git a/web/src/lib/components/ui/collapsible/index.ts b/web/src/lib/components/ui/collapsible/index.ts index 04c3c2a..0e20b5d 100644 --- a/web/src/lib/components/ui/collapsible/index.ts +++ b/web/src/lib/components/ui/collapsible/index.ts @@ -1,15 +1,15 @@ -import { Collapsible as CollapsiblePrimitive } from "bits-ui"; -import Content from "./collapsible-content.svelte"; +import { Collapsible as CollapsiblePrimitive } from 'bits-ui'; +import Content from './collapsible-content.svelte'; const Root = CollapsiblePrimitive.Root; const Trigger = CollapsiblePrimitive.Trigger; export { - Root, - Content, - Trigger, - // - Root as Collapsible, - Content as CollapsibleContent, - Trigger as CollapsibleTrigger + Root, + Content, + Trigger, + // + Root as Collapsible, + Content as CollapsibleContent, + Trigger as CollapsibleTrigger, }; diff --git a/web/src/lib/components/ui/dialog/dialog-description.svelte b/web/src/lib/components/ui/dialog/dialog-description.svelte index e3f562a..5bc238c 100644 --- a/web/src/lib/components/ui/dialog/dialog-description.svelte +++ b/web/src/lib/components/ui/dialog/dialog-description.svelte @@ -8,6 +8,9 @@ export { className as class }; - + diff --git a/web/src/lib/components/ui/dialog/dialog-footer.svelte b/web/src/lib/components/ui/dialog/dialog-footer.svelte index 1af8d3d..96e4239 100644 --- a/web/src/lib/components/ui/dialog/dialog-footer.svelte +++ b/web/src/lib/components/ui/dialog/dialog-footer.svelte @@ -8,6 +8,9 @@ export { className as class }; -
+
diff --git a/web/src/lib/components/ui/dialog/dialog-title.svelte b/web/src/lib/components/ui/dialog/dialog-title.svelte index 0f5ce0f..1b80685 100644 --- a/web/src/lib/components/ui/dialog/dialog-title.svelte +++ b/web/src/lib/components/ui/dialog/dialog-title.svelte @@ -8,6 +8,9 @@ export { className as class }; - + diff --git a/web/src/lib/components/ui/form/form-button.svelte b/web/src/lib/components/ui/form/form-button.svelte index f72c768..55c2bc9 100644 --- a/web/src/lib/components/ui/form/form-button.svelte +++ b/web/src/lib/components/ui/form/form-button.svelte @@ -1,10 +1,10 @@ - + diff --git a/web/src/lib/components/ui/form/form-checkbox.svelte b/web/src/lib/components/ui/form/form-checkbox.svelte index 9d57bf1..b9b06f3 100644 --- a/web/src/lib/components/ui/form/form-checkbox.svelte +++ b/web/src/lib/components/ui/form/form-checkbox.svelte @@ -1,5 +1,5 @@ - - + + diff --git a/web/src/lib/components/ui/form/form-input.svelte b/web/src/lib/components/ui/form/form-input.svelte index b7edb33..79b4e81 100644 --- a/web/src/lib/components/ui/form/form-input.svelte +++ b/web/src/lib/components/ui/form/form-input.svelte @@ -1,5 +1,5 @@ -
- +
+
diff --git a/web/src/lib/components/ui/form/form-label.svelte b/web/src/lib/components/ui/form/form-label.svelte index 55b281d..046eb14 100644 --- a/web/src/lib/components/ui/form/form-label.svelte +++ b/web/src/lib/components/ui/form/form-label.svelte @@ -1,5 +1,5 @@ -