diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 6aff804..a6c0153 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,22 +1,22 @@ // For format details, see https://aka.ms/devcontainer.json. For config options, see the // README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node { - "name": "Node.js & TypeScript", - // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile - "image": "mcr.microsoft.com/devcontainers/typescript-node:1-20-bullseye", + "name": "Node.js & TypeScript", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/typescript-node:1-20-bullseye", - // Features to add to the dev container. More info: https://containers.dev/features. - // "features": {}, + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, - // Use 'forwardPorts' to make a list of ports inside the container available locally. - // "forwardPorts": [], + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], - // Use 'postCreateCommand' to run commands after the container is created. - // "postCreateCommand": "yarn install", + // Use 'postCreateCommand' to run commands after the container is created. + // "postCreateCommand": "yarn install", - // Configure tool-specific properties. - // "customizations": {}, + // Configure tool-specific properties. + // "customizations": {}, - // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. - "remoteUser": "root" + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + "remoteUser": "root" } diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..3742dae --- /dev/null +++ b/.prettierignore @@ -0,0 +1,11 @@ +node_modules +.next +public + +*.lock +*.log + +.github + +data +pgdata diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 0000000..d7fe5a6 --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1,4 @@ +{ + "trailingComma": "es5", + "tabWidth": 2 +} diff --git a/components/FilterSearchDropdown.tsx b/components/FilterSearchDropdown.tsx index 1fa2634..9ab2946 100644 --- a/components/FilterSearchDropdown.tsx +++ b/components/FilterSearchDropdown.tsx @@ -22,9 +22,7 @@ export default function FilterSearchDropdown({ role="button" className="btn btn-sm btn-square btn-ghost" > - +
Are you sure you want to delete this Link?
{shortendURL}
) : undefined} @@ -116,13 +116,13 @@ export default function EditLinkModal({ onClose, activeLink }: Props) { defaultValue={ link.collection.id ? { - value: link.collection.id, - label: link.collection.name, - } + value: link.collection.id, + label: link.collection.name, + } : { - value: null as unknown as number, - label: "Unorganized", - } + value: null as unknown as number, + label: "Unorganized", + } } /> ) : null} diff --git a/components/PreserverdFormatRow.tsx b/components/PreserverdFormatRow.tsx index d88ec90..1d3df85 100644 --- a/components/PreserverdFormatRow.tsx +++ b/components/PreserverdFormatRow.tsx @@ -102,9 +102,9 @@ export default function PreservedFormatRow({ ) : undefined} diff --git a/components/SearchBar.tsx b/components/SearchBar.tsx index 99d1497..e5f9f3c 100644 --- a/components/SearchBar.tsx +++ b/components/SearchBar.tsx @@ -47,11 +47,11 @@ export default function SearchBar({ placeholder }: Props) { "/public/collections/" + router.query.id + "?q=" + - encodeURIComponent(searchQuery || ""), + encodeURIComponent(searchQuery || "") ); } else { return router.push( - "/search?q=" + encodeURIComponent(searchQuery), + "/search?q=" + encodeURIComponent(searchQuery) ); } } diff --git a/hooks/useSort.tsx b/hooks/useSort.tsx index 3328d4d..b002888 100644 --- a/hooks/useSort.tsx +++ b/hooks/useSort.tsx @@ -8,7 +8,7 @@ import { SetStateAction, useEffect } from "react"; type Props< T extends | CollectionIncludingMembersAndLinkCount - | LinkIncludingShortenedCollectionAndTags + | LinkIncludingShortenedCollectionAndTags, > = { sortBy: Sort; @@ -19,7 +19,7 @@ type Props< export default function useSort< T extends | CollectionIncludingMembersAndLinkCount - | LinkIncludingShortenedCollectionAndTags + | LinkIncludingShortenedCollectionAndTags, >({ sortBy, data, setData }: Propsdiff --git a/playwright.config.ts b/playwright.config.ts index bfe3e83..a2811c0 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -1,4 +1,4 @@ -import { defineConfig, devices } from '@playwright/test'; +import { defineConfig, devices } from "@playwright/test"; /** * Read environment variables from file. @@ -10,7 +10,7 @@ import { defineConfig, devices } from '@playwright/test'; * See https://playwright.dev/docs/test-configuration. */ export default defineConfig({ - testDir: './e2e', + testDir: "./e2e", /* Run tests in files in parallel */ fullyParallel: true, /* Fail the build on CI if you accidentally left test.only in the source code. */ @@ -20,31 +20,31 @@ export default defineConfig({ /* Opt out of parallel tests on CI. */ workers: process.env.CI ? 1 : undefined, /* Reporter to use. See https://playwright.dev/docs/test-reporters */ - reporter: 'html', + reporter: "html", /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ use: { /* Base URL to use in actions like `await page.goto('/')`. */ // baseURL: 'http://127.0.0.1:3000', /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ - trace: 'on-first-retry', + trace: "on-first-retry", }, /* Configure projects for major browsers */ projects: [ { - name: 'chromium', - use: { ...devices['Desktop Chrome'] }, + name: "chromium", + use: { ...devices["Desktop Chrome"] }, }, { - name: 'firefox', - use: { ...devices['Desktop Firefox'] }, + name: "firefox", + use: { ...devices["Desktop Firefox"] }, }, { - name: 'webkit', - use: { ...devices['Desktop Safari'] }, + name: "webkit", + use: { ...devices["Desktop Safari"] }, }, /* Test against mobile viewports. */ diff --git a/postcss.config.js b/postcss.config.js index 33ad091..12a703d 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -3,4 +3,4 @@ module.exports = { tailwindcss: {}, autoprefixer: {}, }, -} +}; diff --git a/store/localSettings.ts b/store/localSettings.ts index 9ef126d..e38bae8 100644 --- a/store/localSettings.ts +++ b/store/localSettings.ts @@ -1,9 +1,9 @@ import { create } from "zustand"; -import {ViewMode} from "@/types/global"; +import { ViewMode } from "@/types/global"; type LocalSettings = { theme?: string; - viewMode?: string + viewMode?: string; }; type LocalSettingsStore = {