From 86c47dde4a74dec439bcd16901e6ca267aab11bd Mon Sep 17 00:00:00 2001 From: Utku <74243531+utkubakir@users.noreply.github.com> Date: Tue, 4 Apr 2023 08:39:07 +0300 Subject: [PATCH] Prettier & Format (#668) * format * fix lint issues --- .prettierrc.js | 2 +- .vscode/launch.json | 140 ++-- .vscode/tasks.json | 55 +- apps/landing/src/components/AppEmbed.tsx | 4 +- apps/landing/src/components/DocsLayout.tsx | 2 +- apps/landing/src/components/DocsSidebar.tsx | 4 +- apps/landing/src/components/Footer.tsx | 4 +- apps/landing/src/components/HomeCTA.tsx | 4 +- apps/landing/src/components/NavBar.tsx | 4 +- apps/landing/src/components/NewBanner.tsx | 6 +- apps/landing/src/components/TeamMember.tsx | 2 +- apps/landing/src/pages/blog/index.page.tsx | 1 - apps/landing/src/pages/careers.page.tsx | 16 +- apps/landing/src/pages/docs/doc.page.tsx | 4 +- apps/landing/src/pages/docs/index.page.tsx | 2 +- apps/landing/src/pages/index.page.tsx | 6 +- apps/landing/src/pages/roadmap.page.tsx | 6 +- apps/landing/src/style.scss | 4 +- apps/storybook/.storybook/preview-head.html | 4 +- apps/storybook/index.html | 20 +- interface/ErrorFallback.tsx | 12 +- interface/app/$libraryId/404.tsx | 6 +- .../Explorer/File/DecryptDialog.tsx | 4 +- interface/app/$libraryId/Explorer/TopBar.tsx | 3 +- interface/app/$libraryId/KeyManager/Key.tsx | 18 +- .../app/$libraryId/KeyManager/Mounter.tsx | 4 +- interface/app/$libraryId/KeyManager/index.tsx | 6 +- .../Layout/Sidebar/DebugPopover.tsx | 2 +- .../$libraryId/Layout/Sidebar/JobManager.tsx | 9 +- .../Layout/Sidebar/LibrariesDropdown.tsx | 6 +- .../app/$libraryId/Layout/Sidebar/index.tsx | 10 +- interface/app/$libraryId/Layout/Toasts.tsx | 8 +- interface/app/$libraryId/index.tsx | 2 +- interface/app/$libraryId/location/$id.tsx | 2 +- interface/app/$libraryId/overview.tsx | 4 +- interface/app/$libraryId/settings/Layout.tsx | 2 +- .../app/$libraryId/settings/ModalLayout.tsx | 2 +- interface/app/$libraryId/settings/Sidebar.tsx | 2 +- .../$libraryId/settings/client/general.tsx | 6 +- .../settings/library/keys/index.tsx | 8 +- .../settings/library/locations/ListItem.tsx | 6 +- .../settings/node/libraries/ListItem.tsx | 2 +- .../app/$libraryId/settings/node/p2p.tsx | 2 +- .../$libraryId/settings/resources/about.tsx | 4 +- interface/app/$libraryId/spacedrop.tsx | 4 +- interface/app/onboarding/Layout.tsx | 4 +- interface/app/onboarding/Progress.tsx | 2 +- interface/app/onboarding/new-library.tsx | 4 +- interface/app/onboarding/privacy.tsx | 2 +- interface/app/onboarding/start.tsx | 2 +- interface/app/style.scss | 6 +- interface/components/PasswordMeter.tsx | 2 +- interface/hooks/useScrolled.tsx | 2 +- package.json | 4 +- packages/config/eslint/base.js | 10 +- packages/config/eslint/reactNative.js | 10 +- packages/config/package.json | 12 +- packages/ui/src/CheckBox.tsx | 4 +- packages/ui/src/ContextMenu.tsx | 2 +- packages/ui/src/Dialog.tsx | 8 +- packages/ui/src/Dropdown.tsx | 4 +- packages/ui/src/DropdownMenu.tsx | 9 +- packages/ui/src/Input.tsx | 2 +- packages/ui/src/Popover.tsx | 4 +- packages/ui/src/ProgressBar.tsx | 2 +- packages/ui/src/RadioGroup.tsx | 4 +- packages/ui/src/Select.tsx | 12 +- packages/ui/src/Slider.tsx | 6 +- pnpm-lock.yaml | 746 +++++++++++++++--- 69 files changed, 884 insertions(+), 403 deletions(-) diff --git a/.prettierrc.js b/.prettierrc.js index 0b0725ac0..b55c3845a 100644 --- a/.prettierrc.js +++ b/.prettierrc.js @@ -23,5 +23,5 @@ module.exports = { importOrderParserPlugins: ['importAssertions', 'typescript', 'jsx'], pluginSearchDirs: false, plugins: ['@trivago/prettier-plugin-sort-imports', 'prettier-plugin-tailwindcss'], - tailwindConfig: 'packages/ui/tailwind.config.js' + tailwindConfig: './packages/ui/tailwind.config.js' }; diff --git a/.vscode/launch.json b/.vscode/launch.json index 3900ea085..8c91f9cc7 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,80 +1,62 @@ { - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "type": "lldb", - "request": "launch", - "name": "Tauri Development Debug", - "cargo": { - "args": [ - "build", - "--manifest-path=./apps/desktop/src-tauri/Cargo.toml", - "--no-default-features" - ], - "problemMatcher": "$rustc", - }, - "sourceLanguages": [ - "rust" - ], - "preLaunchTask": "ui:dev" - }, - { - "type": "lldb", - "request": "launch", - "name": "Tauri Production Debug", - "cargo": { - "args": [ - "build", - "--release", - "--manifest-path=./apps/desktop/src-tauri/Cargo.toml" - ], - "problemMatcher": "$rustc", - }, - "sourceLanguages": [ - "rust" - ], - "preLaunchTask": "ui:build" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug unit tests in library 'sd-core'", - "cargo": { - "args": [ - "test", - "--no-run", - "--lib", - "--package=sd-core" - ], - "filter": { - "name": "sd-core", - "kind": "lib" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug unit tests in library 'sd-crypto'", - "cargo": { - "args": [ - "test", - "--no-run", - "--lib", - "--package=sd-crypto" - ], - "filter": { - "name": "sd-crypto", - "kind": "lib" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - ] -} \ No newline at end of file + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "lldb", + "request": "launch", + "name": "Tauri Development Debug", + "cargo": { + "args": [ + "build", + "--manifest-path=./apps/desktop/src-tauri/Cargo.toml", + "--no-default-features" + ], + "problemMatcher": "$rustc" + }, + "sourceLanguages": ["rust"], + "preLaunchTask": "ui:dev" + }, + { + "type": "lldb", + "request": "launch", + "name": "Tauri Production Debug", + "cargo": { + "args": ["build", "--release", "--manifest-path=./apps/desktop/src-tauri/Cargo.toml"], + "problemMatcher": "$rustc" + }, + "sourceLanguages": ["rust"], + "preLaunchTask": "ui:build" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug unit tests in library 'sd-core'", + "cargo": { + "args": ["test", "--no-run", "--lib", "--package=sd-core"], + "filter": { + "name": "sd-core", + "kind": "lib" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug unit tests in library 'sd-crypto'", + "cargo": { + "args": ["test", "--no-run", "--lib", "--package=sd-crypto"], + "filter": { + "name": "sd-crypto", + "kind": "lib" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + } + ] +} diff --git a/.vscode/tasks.json b/.vscode/tasks.json index a573f2387..86d4e9920 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -4,28 +4,20 @@ { "type": "cargo", "command": "clippy", - "problemMatcher": [ - "$rustc" - ], + "problemMatcher": ["$rustc"], "group": { "kind": "build", "isDefault": true }, "label": "rust: cargo clippy", - "args": [ - "--all-targets", - "--all-features", - "--all" - ] + "args": ["--all-targets", "--all-features", "--all"] }, { "type": "npm", "script": "prep", "label": "pnpm: prep", "group": "none", - "problemMatcher": [ - "$rustc" - ] + "problemMatcher": ["$rustc"] }, { "type": "shell", @@ -40,12 +32,7 @@ }, "isBackground": true, "command": "pnpm", - "args": [ - "desktop", - "vite", - "--clearScreen=false", - "--mode=development" - ], + "args": ["desktop", "vite", "--clearScreen=false", "--mode=development"], "runOptions": { "instanceLimit": 1 } @@ -55,49 +42,31 @@ "label": "ui:build", "problemMatcher": "$tsc", "command": "pnpm", - "args": [ - "desktop", - "vite", - "build" - ] + "args": ["desktop", "vite", "build"] }, { "type": "cargo", "command": "run", - "args": [ - "--manifest-path=./apps/desktop/src-tauri/Cargo.toml", - "--no-default-features" - ], + "args": ["--manifest-path=./apps/desktop/src-tauri/Cargo.toml", "--no-default-features"], "env": { "RUST_BACKTRACE": "short" }, - "problemMatcher": [ - "$rustc" - ], + "problemMatcher": ["$rustc"], "group": "build", "label": "rust: run spacedrive", - "dependsOn": [ - "ui:dev" - ] + "dependsOn": ["ui:dev"] }, { "type": "cargo", "command": "run", - "args": [ - "--manifest-path=./apps/desktop/src-tauri/Cargo.toml", - "--release" - ], + "args": ["--manifest-path=./apps/desktop/src-tauri/Cargo.toml", "--release"], "env": { "RUST_BACKTRACE": "short" }, - "problemMatcher": [ - "$rustc" - ], + "problemMatcher": ["$rustc"], "group": "build", "label": "rust: run spacedrive release", - "dependsOn": [ - "ui:build" - ] + "dependsOn": ["ui:build"] } ] -} \ No newline at end of file +} diff --git a/apps/landing/src/components/AppEmbed.tsx b/apps/landing/src/components/AppEmbed.tsx index fd2bb0fac..991c3a103 100644 --- a/apps/landing/src/components/AppEmbed.tsx +++ b/apps/landing/src/components/AppEmbed.tsx @@ -68,7 +68,7 @@ const AppEmbed = () => {