From aee5b76209baa9db7093524ffcaa0e1412ac29b7 Mon Sep 17 00:00:00 2001 From: psteinroe Date: Fri, 12 Jul 2024 15:00:36 +0200 Subject: [PATCH 1/2] refactor: drop linter and replace prettier with biome formatter --- .github/workflows/ci.yml | 23 +- README.md | 1 - biome.json | 17 + docs/package.json | 19 +- docs/pages/_app.tsx | 2 +- docs/tailwind.config.js | 18 +- examples/react-query/.eslintignore | 5 - examples/react-query/.eslintrc.json | 20 - examples/react-query/.prettierignore | 12 - examples/react-query/README.md | 78 - .../components/contact/contact-cards.tsx | 30 +- .../contact/upsert-contact.modal.tsx | 72 +- .../components/continent/continent-select.tsx | 32 +- examples/react-query/components/icons.tsx | 10 +- examples/react-query/components/layout.tsx | 18 +- examples/react-query/components/main-nav.tsx | 26 +- .../react-query/components/site-header.tsx | 14 +- .../react-query/components/theme-toggle.tsx | 14 +- .../components/typography/code.tsx | 10 +- .../react-query/components/typography/h1.tsx | 10 +- .../react-query/components/typography/h2.tsx | 10 +- .../react-query/components/typography/h3.tsx | 10 +- .../react-query/components/typography/h4.tsx | 10 +- .../react-query/components/typography/p.tsx | 8 +- .../components/typography/small.tsx | 8 +- .../components/typography/subtle.tsx | 8 +- .../react-query/components/ui/accordion.tsx | 32 +- .../components/ui/alert-dialog.tsx | 64 +- .../components/ui/aspect-ratio.tsx | 8 +- examples/react-query/components/ui/avatar.tsx | 26 +- examples/react-query/components/ui/button.tsx | 20 +- .../react-query/components/ui/checkbox.tsx | 18 +- .../react-query/components/ui/collapsible.tsx | 12 +- .../react-query/components/ui/command.tsx | 64 +- .../components/ui/context-menu.tsx | 84 +- examples/react-query/components/ui/dialog.tsx | 54 +- .../components/ui/dropdown-menu.tsx | 84 +- .../react-query/components/ui/hover-card.tsx | 20 +- examples/react-query/components/ui/input.tsx | 16 +- examples/react-query/components/ui/label.tsx | 16 +- .../react-query/components/ui/menubar.tsx | 98 +- .../components/ui/navigation-menu.tsx | 54 +- .../react-query/components/ui/popover.tsx | 20 +- .../react-query/components/ui/progress.tsx | 16 +- .../react-query/components/ui/radio-group.tsx | 26 +- .../react-query/components/ui/scroll-area.tsx | 20 +- examples/react-query/components/ui/select.tsx | 46 +- .../react-query/components/ui/separator.tsx | 20 +- examples/react-query/components/ui/sheet.tsx | 60 +- examples/react-query/components/ui/slider.tsx | 16 +- examples/react-query/components/ui/switch.tsx | 18 +- examples/react-query/components/ui/tabs.tsx | 30 +- .../react-query/components/ui/textarea.tsx | 16 +- examples/react-query/components/ui/toast.tsx | 54 +- .../react-query/components/ui/toaster.tsx | 34 +- examples/react-query/components/ui/toggle.tsx | 20 +- .../react-query/components/ui/tooltip.tsx | 24 +- examples/react-query/config/site.ts | 18 +- examples/react-query/hooks/use-toast.ts | 124 +- examples/react-query/lib/utils.ts | 6 +- examples/react-query/next.config.mjs | 12 +- examples/react-query/package.json | 12 +- examples/react-query/pages/_app.tsx | 28 +- examples/react-query/pages/_document.tsx | 4 +- examples/react-query/pages/index.tsx | 12 +- .../pages/use-infinite-scroll-query.tsx | 2 +- .../pages/use-pagination-query.tsx | 2 +- examples/react-query/pages/use-query.tsx | 56 +- examples/react-query/postcss.config.js | 2 +- examples/react-query/prettier.config.js | 23 - examples/react-query/tailwind.config.js | 60 +- examples/react-query/types/database.ts | 574 +++--- examples/react-query/types/nav.ts | 8 +- examples/swr/.eslintignore | 5 - examples/swr/.eslintrc.json | 20 - examples/swr/.prettierignore | 12 - examples/swr/README.md | 78 - .../swr/components/contact/contact-cards.tsx | 30 +- .../contact/upsert-contact.modal.tsx | 72 +- .../components/continent/continent-select.tsx | 32 +- examples/swr/components/icons.tsx | 10 +- examples/swr/components/layout.tsx | 18 +- examples/swr/components/main-nav.tsx | 26 +- examples/swr/components/site-header.tsx | 14 +- examples/swr/components/theme-toggle.tsx | 14 +- examples/swr/components/typography/code.tsx | 10 +- examples/swr/components/typography/h1.tsx | 10 +- examples/swr/components/typography/h2.tsx | 10 +- examples/swr/components/typography/h3.tsx | 10 +- examples/swr/components/typography/h4.tsx | 10 +- examples/swr/components/typography/p.tsx | 8 +- examples/swr/components/typography/small.tsx | 8 +- examples/swr/components/typography/subtle.tsx | 8 +- examples/swr/components/ui/accordion.tsx | 32 +- examples/swr/components/ui/alert-dialog.tsx | 64 +- examples/swr/components/ui/aspect-ratio.tsx | 8 +- examples/swr/components/ui/avatar.tsx | 26 +- examples/swr/components/ui/button.tsx | 20 +- examples/swr/components/ui/checkbox.tsx | 18 +- examples/swr/components/ui/collapsible.tsx | 12 +- examples/swr/components/ui/command.tsx | 64 +- examples/swr/components/ui/context-menu.tsx | 84 +- examples/swr/components/ui/dialog.tsx | 54 +- examples/swr/components/ui/dropdown-menu.tsx | 84 +- examples/swr/components/ui/hover-card.tsx | 20 +- examples/swr/components/ui/input.tsx | 16 +- examples/swr/components/ui/label.tsx | 16 +- examples/swr/components/ui/menubar.tsx | 98 +- .../swr/components/ui/navigation-menu.tsx | 54 +- examples/swr/components/ui/popover.tsx | 20 +- examples/swr/components/ui/progress.tsx | 16 +- examples/swr/components/ui/radio-group.tsx | 26 +- examples/swr/components/ui/scroll-area.tsx | 20 +- examples/swr/components/ui/select.tsx | 46 +- examples/swr/components/ui/separator.tsx | 20 +- examples/swr/components/ui/sheet.tsx | 60 +- examples/swr/components/ui/slider.tsx | 16 +- examples/swr/components/ui/switch.tsx | 18 +- examples/swr/components/ui/tabs.tsx | 30 +- examples/swr/components/ui/textarea.tsx | 16 +- examples/swr/components/ui/toast.tsx | 54 +- examples/swr/components/ui/toaster.tsx | 34 +- examples/swr/components/ui/toggle.tsx | 20 +- examples/swr/components/ui/tooltip.tsx | 24 +- examples/swr/config/site.ts | 18 +- examples/swr/hooks/use-toast.ts | 124 +- examples/swr/lib/utils.ts | 6 +- examples/swr/next.config.mjs | 46 +- examples/swr/package.json | 12 +- examples/swr/pages/_app.tsx | 26 +- examples/swr/pages/_document.tsx | 4 +- examples/swr/pages/index.tsx | 12 +- .../swr/pages/use-infinite-scroll-query.tsx | 58 +- examples/swr/pages/use-pagination-query.tsx | 58 +- examples/swr/postcss.config.js | 2 +- examples/swr/prettier.config.js | 23 - examples/swr/tailwind.config.js | 60 +- examples/swr/types/database.ts | 574 +++--- examples/swr/types/nav.ts | 8 +- package.json | 15 +- packages/eslint-config-custom/index.js | 3 - packages/eslint-config-custom/package.json | 24 - .../jest-presets/jest/node/jest-preset.js | 34 +- packages/postgrest-core/.eslintrc.json | 4 - .../cursor-pagination-fetcher.spec.ts | 68 +- .../__tests__/database.types.ts | 50 +- .../__tests__/delete-fetcher.spec.ts | 92 +- .../__tests__/delete-item.spec.ts | 176 +- .../build-mutation-fetcher-response.spec.ts | 376 ++-- .../fetch/build-normalized-query.spec.ts | 378 ++-- .../fetch/build-select-statement.spec.ts | 64 +- .../postgrest-core/__tests__/fetcher.spec.ts | 44 +- .../__tests__/filter/denormalize.spec.ts | 178 +- .../postgrest-core/__tests__/index.spec.ts | 6 +- .../__tests__/insert-fetcher.spec.ts | 38 +- .../lib/extract-paths-from-filters.spec.ts | 24 +- .../__tests__/lib/find-filters.spec.ts | 92 +- .../__tests__/lib/find-index-ordered.spec.ts | 26 +- .../__tests__/lib/get-table.spec.ts | 12 +- .../postgrest-core/__tests__/lib/get.spec.ts | 38 +- .../lib/group-paths-recursive.spec.ts | 80 +- .../__tests__/lib/if-date-get-time.spec.ts | 16 +- .../__tests__/lib/operators.spec.ts | 128 +- .../__tests__/lib/parse-order-by-key.spec.ts | 24 +- .../__tests__/lib/parse-select-param.spec.ts | 68 +- .../__tests__/lib/sorted-comparator.spec.ts | 52 +- .../__tests__/mutate-item.spec.ts | 398 ++-- .../mutate/should-revalidate-relation.spec.ts | 38 +- .../mutate/should-revalidate-table.spec.ts | 20 +- .../__tests__/mutate/transformers.spec.ts | 10 +- .../offset-pagination-fetcher.spec.ts | 70 +- .../postgrest-filter.integration.spec.ts | 242 +-- .../__tests__/postgrest-filter.spec.ts | 830 ++++---- .../__tests__/postgrest-parser.spec.ts | 660 +++--- .../__tests__/postgrest-query-parser.spec.ts | 20 +- .../__tests__/update-fetcher.spec.ts | 68 +- .../__tests__/upsert-fetcher.spec.ts | 24 +- .../__tests__/upsert-item.spec.ts | 468 ++--- packages/postgrest-core/__tests__/utils.ts | 6 +- packages/postgrest-core/package.json | 22 +- packages/postgrest-core/prettier.config.cjs | 1 - .../src/cursor-pagination-fetcher.ts | 18 +- packages/postgrest-core/src/delete-fetcher.ts | 32 +- packages/postgrest-core/src/delete-item.ts | 20 +- .../fetch/build-mutation-fetcher-response.ts | 18 +- .../src/fetch/build-normalized-query.ts | 23 +- .../src/fetch/build-select-statement.ts | 10 +- packages/postgrest-core/src/fetch/dedupe.ts | 8 +- packages/postgrest-core/src/fetcher.ts | 4 +- .../postgrest-core/src/filter/denormalize.ts | 20 +- packages/postgrest-core/src/index.ts | 56 +- packages/postgrest-core/src/insert-fetcher.ts | 26 +- .../src/lib/cache-data-types.ts | 4 +- .../postgrest-core/src/lib/encode-object.ts | 4 +- .../src/lib/extract-paths-from-filter.ts | 20 +- .../lib/filter-filter-definitions-by-paths.ts | 4 +- .../postgrest-core/src/lib/find-filters.ts | 18 +- .../src/lib/find-index-ordered.ts | 6 +- packages/postgrest-core/src/lib/get-table.ts | 10 +- packages/postgrest-core/src/lib/get.ts | 6 +- .../src/lib/group-paths-recursive.ts | 12 +- .../src/lib/if-date-get-time.ts | 2 +- .../src/lib/is-iso-date-string.ts | 2 +- packages/postgrest-core/src/lib/is-object.ts | 2 +- .../src/lib/is-postgrest-builder.ts | 4 +- .../src/lib/is-postgrest-transform-builder.ts | 6 +- packages/postgrest-core/src/lib/operators.ts | 22 +- .../src/lib/parse-order-by-key.ts | 14 +- .../src/lib/parse-select-param.ts | 56 +- .../postgrest-core/src/lib/parse-value.ts | 4 +- .../postgrest-core/src/lib/query-types.ts | 30 +- .../src/lib/remove-alias-from-declaration.ts | 6 +- .../src/lib/remove-first-path-element.ts | 10 +- .../postgrest-core/src/lib/response-types.ts | 8 +- .../src/lib/sorted-comparator.ts | 10 +- packages/postgrest-core/src/mutate-item.ts | 36 +- .../src/mutate/should-revalidate-relation.ts | 12 +- .../src/mutate/should-revalidate-table.ts | 4 +- .../postgrest-core/src/mutate/transformers.ts | 4 +- packages/postgrest-core/src/mutate/types.ts | 8 +- .../src/offset-pagination-fetcher.ts | 8 +- .../postgrest-core/src/postgrest-filter.ts | 52 +- .../postgrest-core/src/postgrest-parser.ts | 66 +- .../src/postgrest-query-parser.ts | 48 +- packages/postgrest-core/src/update-fetcher.ts | 28 +- packages/postgrest-core/src/upsert-fetcher.ts | 26 +- packages/postgrest-core/src/upsert-item.ts | 36 +- packages/postgrest-core/tsup.config.ts | 8 +- packages/postgrest-react-query/.eslintrc.json | 4 - .../__tests__/cache/use-mutate-item.spec.tsx | 44 +- .../__tests__/database.types.ts | 66 +- ...-delete-many-mutation.integration.spec.tsx | 60 +- .../use-delete-mutation.integration.spec.tsx | 90 +- .../use-insert-mutation.integration.spec.tsx | 40 +- .../use-update-mutation.integration.spec.tsx | 50 +- .../use-upsert-mutation.integration.spec.tsx | 50 +- .../__tests__/query/fetch.spec.ts | 26 +- .../query/prefetch.integration.spec.ts | 30 +- .../query/use-query.integration.spec.tsx | 108 +- ...se-subscription-query.integration.spec.tsx | 70 +- .../use-subscription.integration.spec.tsx | 66 +- .../postgrest-react-query/__tests__/utils.tsx | 12 +- packages/postgrest-react-query/package.json | 16 +- .../postgrest-react-query/prettier.config.cjs | 1 - .../postgrest-react-query/src/cache/index.ts | 6 +- .../src/cache/use-delete-item.ts | 12 +- .../src/cache/use-mutate-item.ts | 12 +- .../src/cache/use-upsert-item.ts | 12 +- packages/postgrest-react-query/src/index.ts | 12 +- .../postgrest-react-query/src/lib/index.ts | 6 +- packages/postgrest-react-query/src/lib/key.ts | 24 +- .../src/lib/use-postgrest-filter-cache.ts | 10 +- .../src/lib/use-queries-for-table-loader.ts | 10 +- .../src/mutate/get-user-response.ts | 4 +- .../postgrest-react-query/src/mutate/index.ts | 10 +- .../postgrest-react-query/src/mutate/types.ts | 74 +- .../src/mutate/use-delete-many-mutation.ts | 34 +- .../src/mutate/use-delete-mutation.ts | 34 +- .../src/mutate/use-insert-mutation.ts | 36 +- .../src/mutate/use-update-mutation.ts | 34 +- .../src/mutate/use-upsert-mutation.ts | 38 +- .../src/query/build-query-opts.ts | 12 +- .../postgrest-react-query/src/query/fetch.ts | 18 +- .../postgrest-react-query/src/query/index.ts | 8 +- .../src/query/prefetch.ts | 26 +- .../src/query/use-query.ts | 56 +- .../src/subscribe/index.ts | 4 +- .../src/subscribe/use-subscription-query.ts | 62 +- .../src/subscribe/use-subscription.ts | 32 +- packages/postgrest-react-query/tsup.config.ts | 8 +- packages/postgrest-swr/.eslintrc.json | 4 - .../__tests__/cache/use-mutate-item.spec.tsx | 42 +- .../postgrest-swr/__tests__/database.types.ts | 50 +- .../__tests__/lib/get-mutable-keys.spec.ts | 16 +- .../mutate/use-delete-many-mutation.spec.tsx | 108 +- .../use-delete-mutation.integration.spec.tsx | 108 +- .../use-insert-mutation.integration.spec.tsx | 38 +- .../use-update-mutation.integration.spec.tsx | 148 +- .../use-upsert-mutation.integration.spec.tsx | 88 +- .../query/prefetch.integration.spec.ts | 26 +- .../use-cursor-infinite-scroll-query.spec.tsx | 164 +- ...offset-infinite-query.integration.spec.tsx | 54 +- ...infinite-scroll-query.integration.spec.tsx | 72 +- .../use-pagination-query.integration.spec.tsx | 128 +- .../query/use-query.integration.spec.tsx | 112 +- ...se-subscription-query.integration.spec.tsx | 68 +- .../use-subscription.integration.spec.tsx | 64 +- packages/postgrest-swr/__tests__/utils.tsx | 14 +- packages/postgrest-swr/package.json | 23 +- packages/postgrest-swr/prettier.config.cjs | 1 - packages/postgrest-swr/src/cache/index.ts | 6 +- .../src/cache/use-delete-item.ts | 14 +- .../src/cache/use-mutate-item.ts | 14 +- .../src/cache/use-upsert-item.ts | 14 +- .../postgrest-swr/src/index.react-server.ts | 4 +- packages/postgrest-swr/src/index.ts | 12 +- packages/postgrest-swr/src/lib/constants.ts | 10 +- .../src/lib/create-key-getter.ts | 28 +- packages/postgrest-swr/src/lib/decode.ts | 22 +- packages/postgrest-swr/src/lib/encode.ts | 8 +- packages/postgrest-swr/src/lib/index.ts | 16 +- packages/postgrest-swr/src/lib/middleware.ts | 12 +- .../postgrest-swr/src/lib/mutable-keys.ts | 2 +- packages/postgrest-swr/src/lib/types.ts | 2 +- .../src/lib/use-postgrest-filter-cache.ts | 10 +- .../src/lib/use-queries-for-table-loader.ts | 10 +- .../src/mutate/get-user-response.ts | 4 +- packages/postgrest-swr/src/mutate/index.ts | 12 +- packages/postgrest-swr/src/mutate/types.ts | 80 +- .../src/mutate/use-delete-many-mutation.ts | 39 +- .../src/mutate/use-delete-mutation.ts | 39 +- .../src/mutate/use-insert-mutation.ts | 43 +- .../src/mutate/use-random-key.ts | 6 +- .../src/mutate/use-update-mutation.ts | 41 +- .../src/mutate/use-upsert-mutation.ts | 43 +- packages/postgrest-swr/src/query/index.ts | 12 +- packages/postgrest-swr/src/query/prefetch.ts | 22 +- .../query/use-cursor-infinite-scroll-query.ts | 80 +- .../use-infinite-offset-pagination-query.ts | 30 +- .../src/query/use-offset-infinite-query.ts | 30 +- .../query/use-offset-infinite-scroll-query.ts | 32 +- packages/postgrest-swr/src/query/use-query.ts | 54 +- packages/postgrest-swr/src/subscribe/index.ts | 4 +- .../src/subscribe/use-subscription-query.ts | 56 +- .../src/subscribe/use-subscription.ts | 32 +- packages/postgrest-swr/tsup.config.ts | 8 +- packages/prettier-config/package.json | 12 - packages/prettier-config/prettier.config.js | 3 - packages/storage-core/.eslintrc.json | 5 - .../__tests__/directory-fetcher.spec.ts | 32 +- .../__tests__/directory-urls-fetcher.spec.ts | 34 +- packages/storage-core/__tests__/index.spec.ts | 6 +- .../__tests__/mutate-paths.spec.ts | 50 +- .../__tests__/remove-directory.spec.ts | 36 +- .../__tests__/remove-files.spec.ts | 34 +- .../storage-core/__tests__/upload.spec.ts | 46 +- .../__tests__/url-fetcher.spec.ts | 68 +- packages/storage-core/__tests__/utils.ts | 14 +- packages/storage-core/package.json | 21 +- packages/storage-core/prettier.config.cjs | 1 - .../storage-core/src/directory-fetcher.ts | 4 +- .../src/directory-urls-fetcher.ts | 12 +- packages/storage-core/src/index.ts | 16 +- packages/storage-core/src/lib/types.ts | 2 +- packages/storage-core/src/mutate-paths.ts | 4 +- packages/storage-core/src/remove-directory.ts | 8 +- packages/storage-core/src/remove-files.ts | 2 +- packages/storage-core/src/upload.ts | 16 +- packages/storage-core/src/url-fetcher.ts | 14 +- packages/storage-core/tsup.config.ts | 8 +- packages/storage-react-query/.eslintrc.json | 4 - .../__tests__/lib/decode.spec.ts | 8 +- .../__tests__/lib/key.spec.ts | 12 +- .../mutate/use-remove-directory.spec.tsx | 32 +- .../mutate/use-remove-files.spec.tsx | 34 +- .../__tests__/mutate/use-upload.spec.tsx | 30 +- .../query/use-directory-urls.spec.tsx | 28 +- .../__tests__/query/use-directory.spec.tsx | 24 +- .../__tests__/query/use-file-url.spec.tsx | 30 +- .../storage-react-query/__tests__/utils.tsx | 20 +- packages/storage-react-query/package.json | 24 +- .../storage-react-query/prettier.config.cjs | 1 - packages/storage-react-query/src/index.ts | 6 +- .../storage-react-query/src/lib/constants.ts | 4 +- .../storage-react-query/src/lib/decode.ts | 6 +- .../storage-react-query/src/lib/encode.ts | 8 +- .../src/lib/get-bucket-id.ts | 4 +- packages/storage-react-query/src/lib/index.ts | 14 +- packages/storage-react-query/src/lib/key.ts | 10 +- .../storage-react-query/src/lib/truthy.ts | 2 +- packages/storage-react-query/src/lib/types.ts | 4 +- .../storage-react-query/src/mutate/index.ts | 6 +- .../src/mutate/use-remove-directory.ts | 18 +- .../src/mutate/use-remove-files.ts | 18 +- .../src/mutate/use-upload.ts | 22 +- .../storage-react-query/src/query/index.ts | 6 +- .../src/query/use-directory-urls.ts | 24 +- .../src/query/use-directory.ts | 16 +- .../src/query/use-file-url.ts | 20 +- packages/storage-react-query/tsup.config.ts | 8 +- packages/storage-swr/.eslintrc.json | 4 - .../storage-swr/__tests__/lib/decode.spec.ts | 8 +- .../storage-swr/__tests__/lib/key.spec.ts | 12 +- .../mutate/use-remove-directory.spec.tsx | 32 +- .../mutate/use-remove-files.spec.tsx | 34 +- .../__tests__/mutate/use-upload.spec.tsx | 30 +- .../query/use-directory-urls.spec.tsx | 40 +- .../__tests__/query/use-directory.spec.tsx | 34 +- .../__tests__/query/use-file-url.spec.tsx | 42 +- packages/storage-swr/__tests__/utils.tsx | 22 +- packages/storage-swr/package.json | 23 +- packages/storage-swr/prettier.config.cjs | 1 - packages/storage-swr/src/index.ts | 6 +- packages/storage-swr/src/lib/constants.ts | 4 +- packages/storage-swr/src/lib/decode.ts | 8 +- packages/storage-swr/src/lib/encode.ts | 8 +- packages/storage-swr/src/lib/get-bucket-id.ts | 4 +- packages/storage-swr/src/lib/index.ts | 16 +- packages/storage-swr/src/lib/key.ts | 10 +- packages/storage-swr/src/lib/middleware.ts | 6 +- packages/storage-swr/src/lib/truthy.ts | 2 +- packages/storage-swr/src/lib/types.ts | 4 +- packages/storage-swr/src/mutate/index.ts | 6 +- .../storage-swr/src/mutate/use-random-key.ts | 6 +- .../src/mutate/use-remove-directory.ts | 18 +- .../src/mutate/use-remove-files.ts | 18 +- packages/storage-swr/src/mutate/use-upload.ts | 24 +- packages/storage-swr/src/query/index.ts | 6 +- .../src/query/use-directory-urls.ts | 14 +- .../storage-swr/src/query/use-directory.ts | 8 +- .../storage-swr/src/query/use-file-url.ts | 12 +- packages/storage-swr/tsup.config.ts | 8 +- packages/tsconfig/package.json | 6 +- pnpm-lock.yaml | 1806 +++-------------- turbo.json | 18 - 415 files changed, 7909 insertions(+), 9650 deletions(-) create mode 100644 biome.json delete mode 100644 examples/react-query/.eslintignore delete mode 100644 examples/react-query/.eslintrc.json delete mode 100644 examples/react-query/.prettierignore delete mode 100644 examples/react-query/README.md delete mode 100644 examples/react-query/prettier.config.js delete mode 100644 examples/swr/.eslintignore delete mode 100644 examples/swr/.eslintrc.json delete mode 100644 examples/swr/.prettierignore delete mode 100644 examples/swr/README.md delete mode 100644 examples/swr/prettier.config.js delete mode 100644 packages/eslint-config-custom/index.js delete mode 100644 packages/eslint-config-custom/package.json delete mode 100644 packages/postgrest-core/.eslintrc.json delete mode 100644 packages/postgrest-core/prettier.config.cjs delete mode 100644 packages/postgrest-react-query/.eslintrc.json delete mode 100644 packages/postgrest-react-query/prettier.config.cjs delete mode 100644 packages/postgrest-swr/.eslintrc.json delete mode 100644 packages/postgrest-swr/prettier.config.cjs delete mode 100644 packages/prettier-config/package.json delete mode 100644 packages/prettier-config/prettier.config.js delete mode 100644 packages/storage-core/.eslintrc.json delete mode 100644 packages/storage-core/prettier.config.cjs delete mode 100644 packages/storage-react-query/.eslintrc.json delete mode 100644 packages/storage-react-query/prettier.config.cjs delete mode 100644 packages/storage-swr/.eslintrc.json delete mode 100644 packages/storage-swr/prettier.config.cjs diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 33400caf..797aa093 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,26 +44,7 @@ jobs: - name: 🦺 Check Format and Lint id: static - run: pnpm run turbo format:check lint:report - continue-on-error: true - - - name: 💍 Merge lint reports - run: | - shopt -s globstar - jq -s '[.[]]|flatten' ./**/lint-results/*.json &> eslint_report.json - - - name: 👸 Annotate Code Linting Results - uses: ataylorme/eslint-annotate-action@v2 - with: - repo-token: "${{ secrets.GITHUB_TOKEN }}" - report-json: "eslint_report.json" - continue-on-error: true - - - name: ☁️ Upload ESLint report - uses: actions/upload-artifact@v4 - with: - name: eslint_report.json - path: eslint_report.json + run: pnpm run check continue-on-error: true - name: 📦 Build Packages @@ -118,6 +99,6 @@ jobs: flags: storage-react-query fail_ci_if_error: false - - name: ⚠️ Check for error + - name: Check for error if: steps.static.outcome != 'success' || steps.build.outcome != 'success' || steps.test.outcome != 'success' run: exit 1 diff --git a/README.md b/README.md index a827df05..9a734701 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,6 @@ The cache helpers are split up into reusable libraries. These are not meant for direct usage. -- `eslint-config-custom`: `eslint` configurations - `jest-presets`: `jest` presets - `postgrest-core`: shared logic for [postgrest-js](https://github.com/supabase/postgrest-js) - `storage-core`: shared logic for [storage-js](https://github.com/supabase/storage-js) operations diff --git a/biome.json b/biome.json new file mode 100644 index 00000000..4b47be40 --- /dev/null +++ b/biome.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://biomejs.dev/schemas/1.8.3/schema.json", + "organizeImports": { + "enabled": true + }, + "files": { + "ignore": ["**/.next", "node_modules"] + }, + "linter": { + "enabled": false + }, + "formatter": { + "indentStyle": "space", + "indentWidth": 2, + "lineWidth": 80 + } +} diff --git a/docs/package.json b/docs/package.json index 4cf4feca..de41db45 100644 --- a/docs/package.json +++ b/docs/package.json @@ -6,28 +6,23 @@ "dev": "next dev --port 3002", "build": "next build", "start": "next start", - "clean": "rm -rf .turbo && rm -rf lint-results && rm -rf .nyc_output && rm -rf node_modules && rm -rf dist", - "lint": "next lint", - "typecheck": "tsc --pretty --noEmit", - "format:write": "prettier --write \"pages/**/*.{ts,tsx,mdx}\"", - "format:check": "prettier --check \"pages/**/*.{ts,tsx,mdx}\"" + "clean": "rm -rf .turbo && rm -rf .nyc_output && rm -rf node_modules && rm -rf dist", + "typecheck": "tsc --pretty --noEmit" }, "dependencies": { - "@types/node": "^20.0.0", - "@types/react": "18.2.0", - "@types/react-dom": "^18.0.7", "@vercel/analytics": "^1.0.0", - "eslint": "8.54.0", - "eslint-config-next": "14.2.0", "next": "14.2.0", "nextra": "2.13.2", "nextra-theme-docs": "2.13.2", "react": "18.2.0", - "react-dom": "18.2.0", - "typescript": "5.4.2" + "react-dom": "18.2.0" }, "devDependencies": { "autoprefixer": "^10.4.13", + "typescript": "5.4.2", + "@types/node": "^20.0.0", + "@types/react": "18.2.0", + "@types/react-dom": "^18.0.7", "postcss": "^8.4.14", "tailwindcss": "3.4.0" } diff --git a/docs/pages/_app.tsx b/docs/pages/_app.tsx index ea2fc7ac..f8f3d73d 100644 --- a/docs/pages/_app.tsx +++ b/docs/pages/_app.tsx @@ -1,5 +1,5 @@ -import type { AppProps } from "next/app"; import { Analytics } from "@vercel/analytics/react"; +import type { AppProps } from "next/app"; function MyApp({ Component, pageProps }: AppProps) { return ( diff --git a/docs/tailwind.config.js b/docs/tailwind.config.js index 948e5125..c4f8341e 100644 --- a/docs/tailwind.config.js +++ b/docs/tailwind.config.js @@ -1,12 +1,12 @@ /** @type {import('tailwindcss').Config} */ module.exports = { - content: [ - "./app/**/*.{js,ts,jsx,tsx}", - "./pages/**/*.{js,ts,jsx,tsx,md,mdx}", - "./components/**/*.{js,ts,jsx,tsx}", - ], - theme: { - extend: {}, - }, - plugins: [], + content: [ + "./app/**/*.{js,ts,jsx,tsx}", + "./pages/**/*.{js,ts,jsx,tsx,md,mdx}", + "./components/**/*.{js,ts,jsx,tsx}", + ], + theme: { + extend: {}, + }, + plugins: [], }; diff --git a/examples/react-query/.eslintignore b/examples/react-query/.eslintignore deleted file mode 100644 index dc0f9d8b..00000000 --- a/examples/react-query/.eslintignore +++ /dev/null @@ -1,5 +0,0 @@ -dist/* -.cache -public -node_modules -*.esm.js diff --git a/examples/react-query/.eslintrc.json b/examples/react-query/.eslintrc.json deleted file mode 100644 index 45cf7c68..00000000 --- a/examples/react-query/.eslintrc.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "https://json.schemastore.org/eslintrc", - "root": true, - "extends": [ - "next/core-web-vitals", - "prettier", - "plugin:tailwindcss/recommended" - ], - "plugins": ["tailwindcss"], - "rules": { - "@next/next/no-html-link-for-pages": "off", - "react/jsx-key": "off", - "tailwindcss/no-custom-classname": "off" - }, - "settings": { - "tailwindcss": { - "callees": ["cn"] - } - } -} diff --git a/examples/react-query/.prettierignore b/examples/react-query/.prettierignore deleted file mode 100644 index 2f730936..00000000 --- a/examples/react-query/.prettierignore +++ /dev/null @@ -1,12 +0,0 @@ -cache -.cache -package.json -package-lock.json -public -CHANGELOG.md -.yarn -dist -node_modules -.next -build -.contentlayer \ No newline at end of file diff --git a/examples/react-query/README.md b/examples/react-query/README.md deleted file mode 100644 index 34572c26..00000000 --- a/examples/react-query/README.md +++ /dev/null @@ -1,78 +0,0 @@ -# next-template - -A Next.js 13 template for building apps with Radix UI and Tailwind CSS. - -## Features - -- Radix UI Primitives -- Tailwind CSS -- Fonts with `@next/font` -- Icons from [Lucide](https://lucide.dev) -- Dark mode with `next-themes` -- Automatic import sorting with `@ianvs/prettier-plugin-sort-imports` - -## Tailwind CSS Features - -- Class merging with `taiwind-merge` -- Animation with `tailwindcss-animate` -- Conditional classes with `clsx` -- Variants with `class-variance-authority` -- Automatic class sorting with `eslint-plugin-tailwindcss` - -## Import Sort - -The starter comes with `@ianvs/prettier-plugin-sort-imports` for automatically sort your imports. - -### Input - -```tsx -import * as React from "react" -import Link from "next/link" - -import { siteConfig } from "@/config/site" -import { buttonVariants } from "@/components/ui/button" -import "@/styles/globals.css" -import { twMerge } from "tailwind-merge" - -import { NavItem } from "@/types/nav" -import { cn } from "@/lib/utils" -``` - -### Output - -```tsx -import * as React from "react" -// React is always first. -import Link from "next/link" -// Followed by next modules. -import { twMerge } from "tailwind-merge" - -// Followed by third-party modules -// Space -import "@/styles/globals.css" -// styles -import { NavItem } from "@/types/nav" -// types -import { siteConfig } from "@/config/site" -// config -import { cn } from "@/lib/utils" -// lib -import { buttonVariants } from "@/components/ui/button" - -// components -``` - -### Class Merging - -The `cn` util handles conditional classes and class merging. - -### Input - -```ts -cn("px-2 bg-slate-100 py-2 bg-slate-200") -// Outputs `p-2 bg-slate-200` -``` - -## License - -Licensed under the [MIT license](https://github.com/shadcn/ui/blob/main/LICENSE.md). diff --git a/examples/react-query/components/contact/contact-cards.tsx b/examples/react-query/components/contact/contact-cards.tsx index bbd60eea..54d8ada0 100644 --- a/examples/react-query/components/contact/contact-cards.tsx +++ b/examples/react-query/components/contact/contact-cards.tsx @@ -1,30 +1,32 @@ -import { FC, PropsWithChildren } from "react" -import { useFileUrl } from "@supabase-cache-helpers/storage-react-query" -import { useSupabaseClient } from "@supabase/auth-helpers-react" +import { useFileUrl } from "@supabase-cache-helpers/storage-react-query"; +import { useSupabaseClient } from "@supabase/auth-helpers-react"; +import type { FC, PropsWithChildren } from "react"; -import { Database } from "@/types/database" -import { Avatar, AvatarFallback, AvatarImage } from "../ui/avatar" +import type { Database } from "@/types/database"; +import { Avatar, AvatarFallback, AvatarImage } from "../ui/avatar"; export const ContactCards: FC = ({ children }) => (
{children}
-) +); export type ContactCardProps = { contact: Pick< Database["public"]["Tables"]["contact"]["Row"], "id" | "username" | "continent" - > - onClick: () => void -} + >; + onClick: () => void; +}; export const ContactCard: FC = ({ contact, onClick }) => { - const supabase = useSupabaseClient() + const supabase = useSupabaseClient(); const { data: avatarUrl } = useFileUrl( supabase.storage.from("contact_avatars"), contact.id, "public", - { ensureExistence: true } - ) + { + ensureExistence: true, + }, + ); return (
@@ -44,5 +46,5 @@ export const ContactCard: FC = ({ contact, onClick }) => {
- ) -} + ); +}; diff --git a/examples/react-query/components/contact/upsert-contact.modal.tsx b/examples/react-query/components/contact/upsert-contact.modal.tsx index 058c14c1..203a9c3a 100644 --- a/examples/react-query/components/contact/upsert-contact.modal.tsx +++ b/examples/react-query/components/contact/upsert-contact.modal.tsx @@ -1,14 +1,14 @@ -import { FC, FormEventHandler, useCallback, useEffect } from "react" -import { useUpsertMutation } from "@supabase-cache-helpers/postgrest-react-query" -import { useSupabaseClient } from "@supabase/auth-helpers-react" -import { Loader2 } from "lucide-react" -import { Controller, useForm } from "react-hook-form" -import { v4 as uuid } from "uuid" -import { z } from "zod" +import { useUpsertMutation } from "@supabase-cache-helpers/postgrest-react-query"; +import { useSupabaseClient } from "@supabase/auth-helpers-react"; +import { Loader2 } from "lucide-react"; +import { type FC, type FormEventHandler, useCallback, useEffect } from "react"; +import { Controller, useForm } from "react-hook-form"; +import { v4 as uuid } from "uuid"; +import { z } from "zod"; -import { Database } from "@/types/database" -import { ContinentSelect } from "../continent/continent-select" -import { Button } from "../ui/button" +import type { Database } from "@/types/database"; +import { ContinentSelect } from "../continent/continent-select"; +import { Button } from "../ui/button"; import { Dialog, DialogContent, @@ -16,9 +16,9 @@ import { DialogFooter, DialogHeader, DialogTitle, -} from "../ui/dialog" -import { Input } from "../ui/input" -import { Label } from "../ui/label" +} from "../ui/dialog"; +import { Input } from "../ui/input"; +import { Label } from "../ui/label"; export const continentEnumSchema = z.enum([ "AF", @@ -28,60 +28,62 @@ export const continentEnumSchema = z.enum([ "SA", "OC", "AN", -]) +]); const upsertContactSchema = z.object({ id: z.string().optional(), username: z.string(), continent: continentEnumSchema, -}) +}); -export type UpsertContactFormData = z.infer +export type UpsertContactFormData = z.infer; export type UpsertContactModalProps = { - contact?: UpsertContactFormData | null - open: boolean - onClose: () => void -} + contact?: UpsertContactFormData | null; + open: boolean; + onClose: () => void; +}; export const UpsertContactModal: FC = ({ contact, open, onClose, }) => { - const supabase = useSupabaseClient() + const supabase = useSupabaseClient(); const { mutateAsync: upsert, isPending } = useUpsertMutation( supabase.from("contact"), ["id"], null, - { onSuccess: onClose } - ) + { + onSuccess: onClose, + }, + ); const { register, handleSubmit, control, reset } = useForm({ defaultValues: { id: undefined, username: "@psteinroe", continent: "EU" }, - }) + }); useEffect(() => { - if (contact) reset(contact) - }, [contact, reset]) + if (contact) reset(contact); + }, [contact, reset]); const onSubmitHandler = useCallback>( (e) => { handleSubmit(async (data) => { - await upsert([{ ...data, id: data.id ?? uuid() }]) - })(e) + await upsert([{ ...data, id: data.id ?? uuid() }]); + })(e); }, - [handleSubmit, upsert] - ) + [handleSubmit, upsert], + ); const onOpenChangeHandler = useCallback( (open: boolean) => { - if (open === false) onClose() + if (open === false) onClose(); }, - [onClose] - ) + [onClose], + ); return ( @@ -134,5 +136,5 @@ export const UpsertContactModal: FC = ({ - ) -} + ); +}; diff --git a/examples/react-query/components/continent/continent-select.tsx b/examples/react-query/components/continent/continent-select.tsx index 00f88360..e1027711 100644 --- a/examples/react-query/components/continent/continent-select.tsx +++ b/examples/react-query/components/continent/continent-select.tsx @@ -1,33 +1,33 @@ -import { FC } from "react" -import * as SelectPrimitive from "@radix-ui/react-select" -import { useQuery } from "@supabase-cache-helpers/postgrest-react-query" -import { useSupabaseClient } from "@supabase/auth-helpers-react" +import type * as SelectPrimitive from "@radix-ui/react-select"; +import { useQuery } from "@supabase-cache-helpers/postgrest-react-query"; +import { useSupabaseClient } from "@supabase/auth-helpers-react"; +import type { FC } from "react"; -import { Database } from "@/types/database" -import { cn } from "@/lib/utils" import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, -} from "@/components/ui/select" +} from "@/components/ui/select"; +import { cn } from "@/lib/utils"; +import type { Database } from "@/types/database"; export type ContinentSelectProps = { - containerProps?: SelectPrimitive.SelectProps - triggerProps?: SelectPrimitive.SelectTriggerProps -} + containerProps?: SelectPrimitive.SelectProps; + triggerProps?: SelectPrimitive.SelectTriggerProps; +}; export const ContinentSelect: FC = ({ containerProps, triggerProps, }) => { - const supabase = useSupabaseClient() + const supabase = useSupabaseClient(); const { data, isLoading } = useQuery( - supabase.from("continent").select("code,name") - ) + supabase.from("continent").select("code,name"), + ); - const { disabled, ...props } = containerProps + const { disabled, ...props } = containerProps; return ( - ) -} + ); +}; diff --git a/examples/react-query/components/icons.tsx b/examples/react-query/components/icons.tsx index 3096c11c..8723ac08 100644 --- a/examples/react-query/components/icons.tsx +++ b/examples/react-query/components/icons.tsx @@ -1,13 +1,13 @@ import { Laptop, - LucideProps, + type Icon as LucideIcon, + type LucideProps, Moon, SunMedium, Twitter, - type Icon as LucideIcon, -} from "lucide-react" +} from "lucide-react"; -export type Icon = LucideIcon +export type Icon = LucideIcon; export const Icons = { sun: SunMedium, @@ -30,4 +30,4 @@ export const Icons = { > ), -} +}; diff --git a/examples/react-query/components/layout.tsx b/examples/react-query/components/layout.tsx index 8e4c3d6c..40c66ee1 100644 --- a/examples/react-query/components/layout.tsx +++ b/examples/react-query/components/layout.tsx @@ -1,27 +1,27 @@ -import { useSubscriptionQuery } from "@supabase-cache-helpers/postgrest-react-query" -import { useSupabaseClient } from "@supabase/auth-helpers-react" +import { useSubscriptionQuery } from "@supabase-cache-helpers/postgrest-react-query"; +import { useSupabaseClient } from "@supabase/auth-helpers-react"; -import { Database } from "@/types/database" -import { SiteHeader } from "@/components/site-header" +import { SiteHeader } from "@/components/site-header"; +import type { Database } from "@/types/database"; interface LayoutProps { - children: React.ReactNode + children: React.ReactNode; } export function Layout({ children }: LayoutProps) { - const supabase = useSupabaseClient() + const supabase = useSupabaseClient(); useSubscriptionQuery( supabase, "contacts", { event: "*", table: "contact", schema: "public" }, - ["id"] - ) + ["id"], + ); return ( <>
{children}
- ) + ); } diff --git a/examples/react-query/components/main-nav.tsx b/examples/react-query/components/main-nav.tsx index 42263b9b..e051782a 100644 --- a/examples/react-query/components/main-nav.tsx +++ b/examples/react-query/components/main-nav.tsx @@ -1,11 +1,8 @@ -import * as React from "react" -import Link from "next/link" +import Link from "next/link"; +import * as React from "react"; -import { NavItem } from "@/types/nav" -import { siteConfig } from "@/config/site" -import { cn } from "@/lib/utils" -import { Icons } from "@/components/icons" -import { Button } from "@/components/ui/button" +import { Icons } from "@/components/icons"; +import { Button } from "@/components/ui/button"; import { DropdownMenu, DropdownMenuContent, @@ -13,10 +10,13 @@ import { DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, -} from "@/components/ui/dropdown-menu" +} from "@/components/ui/dropdown-menu"; +import { siteConfig } from "@/config/site"; +import { cn } from "@/lib/utils"; +import type { NavItem } from "@/types/nav"; interface MainNavProps { - items?: NavItem[] + items?: NavItem[]; } export function MainNav({ items }: MainNavProps) { @@ -37,12 +37,12 @@ export function MainNav({ items }: MainNavProps) { href={item.href} className={cn( "flex items-center text-lg font-semibold text-slate-600 hover:text-slate-900 dark:text-slate-100 sm:text-sm", - item.disabled && "cursor-not-allowed opacity-80" + item.disabled && "cursor-not-allowed opacity-80", )} > {item.title} - ) + ), )} ) : null} @@ -73,10 +73,10 @@ export function MainNav({ items }: MainNavProps) { {item.title} - ) + ), )} - ) + ); } diff --git a/examples/react-query/components/site-header.tsx b/examples/react-query/components/site-header.tsx index 5469b004..1e7ee7b7 100644 --- a/examples/react-query/components/site-header.tsx +++ b/examples/react-query/components/site-header.tsx @@ -1,10 +1,10 @@ -import Link from "next/link" +import Link from "next/link"; -import { siteConfig } from "@/config/site" -import { Icons } from "@/components/icons" -import { MainNav } from "@/components/main-nav" -import { ThemeToggle } from "@/components/theme-toggle" -import { buttonVariants } from "@/components/ui/button" +import { Icons } from "@/components/icons"; +import { MainNav } from "@/components/main-nav"; +import { ThemeToggle } from "@/components/theme-toggle"; +import { buttonVariants } from "@/components/ui/button"; +import { siteConfig } from "@/config/site"; export function SiteHeader() { return ( @@ -50,5 +50,5 @@ export function SiteHeader() { - ) + ); } diff --git a/examples/react-query/components/theme-toggle.tsx b/examples/react-query/components/theme-toggle.tsx index 9c5ae634..ae88308c 100644 --- a/examples/react-query/components/theme-toggle.tsx +++ b/examples/react-query/components/theme-toggle.tsx @@ -1,17 +1,17 @@ -import * as React from "react" -import { useTheme } from "next-themes" +import { useTheme } from "next-themes"; +import * as React from "react"; -import { Icons } from "@/components/icons" -import { Button } from "@/components/ui/button" +import { Icons } from "@/components/icons"; +import { Button } from "@/components/ui/button"; import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, -} from "@/components/ui/dropdown-menu" +} from "@/components/ui/dropdown-menu"; export function ThemeToggle() { - const { setTheme } = useTheme() + const { setTheme } = useTheme(); return ( @@ -37,5 +37,5 @@ export function ThemeToggle() { - ) + ); } diff --git a/examples/react-query/components/typography/code.tsx b/examples/react-query/components/typography/code.tsx index 2c4953cf..c15f4605 100644 --- a/examples/react-query/components/typography/code.tsx +++ b/examples/react-query/components/typography/code.tsx @@ -1,6 +1,6 @@ -import { DetailedHTMLProps, FC, HTMLAttributes } from "react" +import type { DetailedHTMLProps, FC, HTMLAttributes } from "react"; -import { cn } from "@/lib/utils" +import { cn } from "@/lib/utils"; export const Code: FC< DetailedHTMLProps, HTMLElement> @@ -9,11 +9,11 @@ export const Code: FC< {children} - ) -} + ); +}; diff --git a/examples/react-query/components/typography/h1.tsx b/examples/react-query/components/typography/h1.tsx index 2ab1ceef..ee9fb543 100644 --- a/examples/react-query/components/typography/h1.tsx +++ b/examples/react-query/components/typography/h1.tsx @@ -1,6 +1,6 @@ -import { DetailedHTMLProps, FC, HTMLAttributes } from "react" +import type { DetailedHTMLProps, FC, HTMLAttributes } from "react"; -import { cn } from "@/lib/utils" +import { cn } from "@/lib/utils"; export const H1: FC< DetailedHTMLProps, HTMLHeadingElement> @@ -9,11 +9,11 @@ export const H1: FC<

{children}

- ) -} + ); +}; diff --git a/examples/react-query/components/typography/h2.tsx b/examples/react-query/components/typography/h2.tsx index 543d0782..f653731a 100644 --- a/examples/react-query/components/typography/h2.tsx +++ b/examples/react-query/components/typography/h2.tsx @@ -1,6 +1,6 @@ -import { DetailedHTMLProps, FC, HTMLAttributes } from "react" +import type { DetailedHTMLProps, FC, HTMLAttributes } from "react"; -import { cn } from "@/lib/utils" +import { cn } from "@/lib/utils"; export const H2: FC< DetailedHTMLProps, HTMLHeadingElement> @@ -9,11 +9,11 @@ export const H2: FC<

{children}

- ) -} + ); +}; diff --git a/examples/react-query/components/typography/h3.tsx b/examples/react-query/components/typography/h3.tsx index ed751703..d4b53414 100644 --- a/examples/react-query/components/typography/h3.tsx +++ b/examples/react-query/components/typography/h3.tsx @@ -1,6 +1,6 @@ -import { DetailedHTMLProps, FC, HTMLAttributes } from "react" +import type { DetailedHTMLProps, FC, HTMLAttributes } from "react"; -import { cn } from "@/lib/utils" +import { cn } from "@/lib/utils"; export const H3: FC< DetailedHTMLProps, HTMLHeadingElement> @@ -9,11 +9,11 @@ export const H3: FC<

{children}

- ) -} + ); +}; diff --git a/examples/react-query/components/typography/h4.tsx b/examples/react-query/components/typography/h4.tsx index 54d94307..10033768 100644 --- a/examples/react-query/components/typography/h4.tsx +++ b/examples/react-query/components/typography/h4.tsx @@ -1,6 +1,6 @@ -import { DetailedHTMLProps, FC, HTMLAttributes } from "react" +import type { DetailedHTMLProps, FC, HTMLAttributes } from "react"; -import { cn } from "@/lib/utils" +import { cn } from "@/lib/utils"; export const H4: FC< DetailedHTMLProps, HTMLHeadingElement> @@ -9,11 +9,11 @@ export const H4: FC<

{children}

- ) -} + ); +}; diff --git a/examples/react-query/components/typography/p.tsx b/examples/react-query/components/typography/p.tsx index a6cd70c2..3857b73b 100644 --- a/examples/react-query/components/typography/p.tsx +++ b/examples/react-query/components/typography/p.tsx @@ -1,6 +1,6 @@ -import { DetailedHTMLProps, FC, HTMLAttributes } from "react" +import type { DetailedHTMLProps, FC, HTMLAttributes } from "react"; -import { cn } from "@/lib/utils" +import { cn } from "@/lib/utils"; export const P: FC< DetailedHTMLProps, HTMLParagraphElement> @@ -12,5 +12,5 @@ export const P: FC< > {children}

- ) -} + ); +}; diff --git a/examples/react-query/components/typography/small.tsx b/examples/react-query/components/typography/small.tsx index b21e0046..261cbba9 100644 --- a/examples/react-query/components/typography/small.tsx +++ b/examples/react-query/components/typography/small.tsx @@ -1,6 +1,6 @@ -import { DetailedHTMLProps, FC, HTMLAttributes } from "react" +import type { DetailedHTMLProps, FC, HTMLAttributes } from "react"; -import { cn } from "@/lib/utils" +import { cn } from "@/lib/utils"; export const Small: FC< DetailedHTMLProps, HTMLElement> @@ -12,5 +12,5 @@ export const Small: FC< > {children} - ) -} + ); +}; diff --git a/examples/react-query/components/typography/subtle.tsx b/examples/react-query/components/typography/subtle.tsx index 17455843..2d5ccc7b 100644 --- a/examples/react-query/components/typography/subtle.tsx +++ b/examples/react-query/components/typography/subtle.tsx @@ -1,6 +1,6 @@ -import { DetailedHTMLProps, FC, HTMLAttributes } from "react" +import type { DetailedHTMLProps, FC, HTMLAttributes } from "react"; -import { cn } from "@/lib/utils" +import { cn } from "@/lib/utils"; export const Subtle: FC< DetailedHTMLProps, HTMLParagraphElement> @@ -12,5 +12,5 @@ export const Subtle: FC< > {children}

- ) -} + ); +}; diff --git a/examples/react-query/components/ui/accordion.tsx b/examples/react-query/components/ui/accordion.tsx index 80c278bb..eac8235e 100644 --- a/examples/react-query/components/ui/accordion.tsx +++ b/examples/react-query/components/ui/accordion.tsx @@ -1,12 +1,12 @@ -"use client" +"use client"; -import * as React from "react" -import * as AccordionPrimitive from "@radix-ui/react-accordion" -import { ChevronDown } from "lucide-react" +import * as AccordionPrimitive from "@radix-ui/react-accordion"; +import { ChevronDown } from "lucide-react"; +import * as React from "react"; -import { cn } from "@/lib/utils" +import { cn } from "@/lib/utils"; -const Accordion = AccordionPrimitive.Root +const Accordion = AccordionPrimitive.Root; const AccordionItem = React.forwardRef< React.ElementRef, @@ -16,12 +16,12 @@ const AccordionItem = React.forwardRef< ref={ref} className={cn( "border-b border-b-slate-200 dark:border-b-slate-700", - className + className, )} {...props} /> -)) -AccordionItem.displayName = "AccordionItem" +)); +AccordionItem.displayName = "AccordionItem"; const AccordionTrigger = React.forwardRef< React.ElementRef, @@ -32,7 +32,7 @@ const AccordionTrigger = React.forwardRef< ref={ref} className={cn( "flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180", - className + className, )} {...props} > @@ -40,8 +40,8 @@ const AccordionTrigger = React.forwardRef< -)) -AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName +)); +AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName; const AccordionContent = React.forwardRef< React.ElementRef, @@ -51,13 +51,13 @@ const AccordionContent = React.forwardRef< ref={ref} className={cn( "overflow-hidden text-sm transition-all data-[state=open]:animate-accordion-down data-[state=closed]:animate-accordion-up", - className + className, )} {...props} >
{children}
-)) -AccordionContent.displayName = AccordionPrimitive.Content.displayName +)); +AccordionContent.displayName = AccordionPrimitive.Content.displayName; -export { Accordion, AccordionItem, AccordionTrigger, AccordionContent } +export { Accordion, AccordionItem, AccordionTrigger, AccordionContent }; diff --git a/examples/react-query/components/ui/alert-dialog.tsx b/examples/react-query/components/ui/alert-dialog.tsx index 909dd744..fe10ed2a 100644 --- a/examples/react-query/components/ui/alert-dialog.tsx +++ b/examples/react-query/components/ui/alert-dialog.tsx @@ -1,13 +1,13 @@ -"use client" +"use client"; -import * as React from "react" -import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog" +import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog"; +import * as React from "react"; -import { cn } from "@/lib/utils" +import { cn } from "@/lib/utils"; -const AlertDialog = AlertDialogPrimitive.Root +const AlertDialog = AlertDialogPrimitive.Root; -const AlertDialogTrigger = AlertDialogPrimitive.Trigger +const AlertDialogTrigger = AlertDialogPrimitive.Trigger; const AlertDialogPortal = ({ className, @@ -19,8 +19,8 @@ const AlertDialogPortal = ({ {children} -) -AlertDialogPortal.displayName = AlertDialogPrimitive.Portal.displayName +); +AlertDialogPortal.displayName = AlertDialogPrimitive.Portal.displayName; const AlertDialogOverlay = React.forwardRef< React.ElementRef, @@ -29,13 +29,13 @@ const AlertDialogOverlay = React.forwardRef< -)) -AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName +)); +AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName; const AlertDialogContent = React.forwardRef< React.ElementRef, @@ -48,13 +48,13 @@ const AlertDialogContent = React.forwardRef< className={cn( "fixed z-50 grid w-full max-w-lg scale-100 gap-4 bg-white p-6 opacity-100 animate-in fade-in-90 slide-in-from-bottom-10 sm:rounded-lg sm:zoom-in-90 sm:slide-in-from-bottom-0 md:w-full", "dark:bg-slate-900", - className + className, )} {...props} /> -)) -AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName +)); +AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName; const AlertDialogHeader = ({ className, @@ -63,12 +63,12 @@ const AlertDialogHeader = ({
-) -AlertDialogHeader.displayName = "AlertDialogHeader" +); +AlertDialogHeader.displayName = "AlertDialogHeader"; const AlertDialogFooter = ({ className, @@ -77,12 +77,12 @@ const AlertDialogFooter = ({
-) -AlertDialogFooter.displayName = "AlertDialogFooter" +); +AlertDialogFooter.displayName = "AlertDialogFooter"; const AlertDialogTitle = React.forwardRef< React.ElementRef, @@ -93,12 +93,12 @@ const AlertDialogTitle = React.forwardRef< className={cn( "text-lg font-semibold text-slate-900", "dark:text-slate-50", - className + className, )} {...props} /> -)) -AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName +)); +AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName; const AlertDialogDescription = React.forwardRef< React.ElementRef, @@ -109,9 +109,9 @@ const AlertDialogDescription = React.forwardRef< className={cn("text-sm text-slate-500", "dark:text-slate-400", className)} {...props} /> -)) +)); AlertDialogDescription.displayName = - AlertDialogPrimitive.Description.displayName + AlertDialogPrimitive.Description.displayName; const AlertDialogAction = React.forwardRef< React.ElementRef, @@ -121,12 +121,12 @@ const AlertDialogAction = React.forwardRef< ref={ref} className={cn( "inline-flex h-10 items-center justify-center rounded-md bg-slate-900 py-2 px-4 text-sm font-semibold text-white transition-colors hover:bg-slate-700 focus:outline-none focus:ring-2 focus:ring-slate-400 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 dark:bg-slate-100 dark:text-slate-900 dark:hover:bg-slate-200 dark:focus:ring-slate-400 dark:focus:ring-offset-slate-900", - className + className, )} {...props} /> -)) -AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName +)); +AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName; const AlertDialogCancel = React.forwardRef< React.ElementRef, @@ -136,12 +136,12 @@ const AlertDialogCancel = React.forwardRef< ref={ref} className={cn( "mt-2 inline-flex h-10 items-center justify-center rounded-md border border-slate-200 bg-transparent py-2 px-4 text-sm font-semibold text-slate-900 transition-colors hover:bg-slate-100 focus:outline-none focus:ring-2 focus:ring-slate-400 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 dark:border-slate-700 dark:text-slate-100 dark:hover:bg-slate-700 dark:focus:ring-slate-400 dark:focus:ring-offset-slate-900 sm:mt-0", - className + className, )} {...props} /> -)) -AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName +)); +AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName; export { AlertDialog, @@ -153,4 +153,4 @@ export { AlertDialogDescription, AlertDialogAction, AlertDialogCancel, -} +}; diff --git a/examples/react-query/components/ui/aspect-ratio.tsx b/examples/react-query/components/ui/aspect-ratio.tsx index d6a5226f..359bc940 100644 --- a/examples/react-query/components/ui/aspect-ratio.tsx +++ b/examples/react-query/components/ui/aspect-ratio.tsx @@ -1,7 +1,7 @@ -"use client" +"use client"; -import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio" +import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio"; -const AspectRatio = AspectRatioPrimitive.Root +const AspectRatio = AspectRatioPrimitive.Root; -export { AspectRatio } +export { AspectRatio }; diff --git a/examples/react-query/components/ui/avatar.tsx b/examples/react-query/components/ui/avatar.tsx index f06eb326..7f516163 100644 --- a/examples/react-query/components/ui/avatar.tsx +++ b/examples/react-query/components/ui/avatar.tsx @@ -1,9 +1,9 @@ -"use client" +"use client"; -import * as React from "react" -import * as AvatarPrimitive from "@radix-ui/react-avatar" +import * as AvatarPrimitive from "@radix-ui/react-avatar"; +import * as React from "react"; -import { cn } from "@/lib/utils" +import { cn } from "@/lib/utils"; const Avatar = React.forwardRef< React.ElementRef, @@ -13,12 +13,12 @@ const Avatar = React.forwardRef< ref={ref} className={cn( "relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full", - className + className, )} {...props} /> -)) -Avatar.displayName = AvatarPrimitive.Root.displayName +)); +Avatar.displayName = AvatarPrimitive.Root.displayName; const AvatarImage = React.forwardRef< React.ElementRef, @@ -29,8 +29,8 @@ const AvatarImage = React.forwardRef< className={cn("aspect-square h-full w-full", className)} {...props} /> -)) -AvatarImage.displayName = AvatarPrimitive.Image.displayName +)); +AvatarImage.displayName = AvatarPrimitive.Image.displayName; const AvatarFallback = React.forwardRef< React.ElementRef, @@ -40,11 +40,11 @@ const AvatarFallback = React.forwardRef< ref={ref} className={cn( "flex h-full w-full items-center justify-center rounded-full bg-slate-100 dark:bg-slate-700", - className + className, )} {...props} /> -)) -AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName +)); +AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName; -export { Avatar, AvatarImage, AvatarFallback } +export { Avatar, AvatarImage, AvatarFallback }; diff --git a/examples/react-query/components/ui/button.tsx b/examples/react-query/components/ui/button.tsx index 69e03618..1e199580 100644 --- a/examples/react-query/components/ui/button.tsx +++ b/examples/react-query/components/ui/button.tsx @@ -1,7 +1,7 @@ -import * as React from "react" -import { cva, VariantProps } from "class-variance-authority" +import { type VariantProps, cva } from "class-variance-authority"; +import * as React from "react"; -import { cn } from "@/lib/utils" +import { cn } from "@/lib/utils"; const buttonVariants = cva( "active:scale-95 inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-slate-400 focus:ring-offset-2 dark:hover:bg-slate-800 dark:hover:text-slate-100 disabled:opacity-50 dark:focus:ring-slate-400 disabled:pointer-events-none dark:focus:ring-offset-slate-900 data-[state=open]:bg-slate-100 dark:data-[state=open]:bg-slate-800", @@ -30,8 +30,8 @@ const buttonVariants = cva( variant: "default", size: "default", }, - } -) + }, +); export interface ButtonProps extends React.ButtonHTMLAttributes, @@ -45,9 +45,9 @@ const Button = React.forwardRef( ref={ref} {...props} /> - ) - } -) -Button.displayName = "Button" + ); + }, +); +Button.displayName = "Button"; -export { Button, buttonVariants } +export { Button, buttonVariants }; diff --git a/examples/react-query/components/ui/checkbox.tsx b/examples/react-query/components/ui/checkbox.tsx index 3d395ea7..849fc69d 100644 --- a/examples/react-query/components/ui/checkbox.tsx +++ b/examples/react-query/components/ui/checkbox.tsx @@ -1,10 +1,10 @@ -"use client" +"use client"; -import * as React from "react" -import * as CheckboxPrimitive from "@radix-ui/react-checkbox" -import { Check } from "lucide-react" +import * as CheckboxPrimitive from "@radix-ui/react-checkbox"; +import { Check } from "lucide-react"; +import * as React from "react"; -import { cn } from "@/lib/utils" +import { cn } from "@/lib/utils"; const Checkbox = React.forwardRef< React.ElementRef, @@ -14,7 +14,7 @@ const Checkbox = React.forwardRef< ref={ref} className={cn( "peer h-4 w-4 shrink-0 rounded-sm border border-slate-300 focus:outline-none focus:ring-2 focus:ring-slate-400 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 dark:border-slate-700 dark:text-slate-50 dark:focus:ring-slate-400 dark:focus:ring-offset-slate-900", - className + className, )} {...props} > @@ -24,7 +24,7 @@ const Checkbox = React.forwardRef< -)) -Checkbox.displayName = CheckboxPrimitive.Root.displayName +)); +Checkbox.displayName = CheckboxPrimitive.Root.displayName; -export { Checkbox } +export { Checkbox }; diff --git a/examples/react-query/components/ui/collapsible.tsx b/examples/react-query/components/ui/collapsible.tsx index 9fa48946..cb003d17 100644 --- a/examples/react-query/components/ui/collapsible.tsx +++ b/examples/react-query/components/ui/collapsible.tsx @@ -1,11 +1,11 @@ -"use client" +"use client"; -import * as CollapsiblePrimitive from "@radix-ui/react-collapsible" +import * as CollapsiblePrimitive from "@radix-ui/react-collapsible"; -const Collapsible = CollapsiblePrimitive.Root +const Collapsible = CollapsiblePrimitive.Root; -const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger +const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger; -const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent +const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent; -export { Collapsible, CollapsibleTrigger, CollapsibleContent } +export { Collapsible, CollapsibleTrigger, CollapsibleContent }; diff --git a/examples/react-query/components/ui/command.tsx b/examples/react-query/components/ui/command.tsx index fc6a1040..26d5e92b 100644 --- a/examples/react-query/components/ui/command.tsx +++ b/examples/react-query/components/ui/command.tsx @@ -1,12 +1,12 @@ -"use client" +"use client"; -import * as React from "react" -import { DialogProps } from "@radix-ui/react-dialog" -import { Command as CommandPrimitive, useCommandState } from "cmdk" -import { ChevronsUpDown, Search } from "lucide-react" +import type { DialogProps } from "@radix-ui/react-dialog"; +import { Command as CommandPrimitive, useCommandState } from "cmdk"; +import { ChevronsUpDown, Search } from "lucide-react"; +import * as React from "react"; -import { cn } from "@/lib/utils" -import { Dialog, DialogContent } from "@/components/ui/dialog" +import { Dialog, DialogContent } from "@/components/ui/dialog"; +import { cn } from "@/lib/utils"; const Command = React.forwardRef< React.ElementRef, @@ -16,12 +16,12 @@ const Command = React.forwardRef< ref={ref} className={cn( "flex h-full w-full flex-col overflow-hidden rounded-lg bg-white dark:bg-slate-800", - className + className, )} {...props} /> -)) -Command.displayName = CommandPrimitive.displayName +)); +Command.displayName = CommandPrimitive.displayName; interface CommandDialogProps extends DialogProps {} @@ -34,8 +34,8 @@ const CommandDialog = ({ children, ...props }: CommandDialogProps) => { - ) -} + ); +}; const CommandInput = React.forwardRef< React.ElementRef, @@ -50,14 +50,14 @@ const CommandInput = React.forwardRef< ref={ref} className={cn( "flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-slate-400 disabled:cursor-not-allowed disabled:opacity-50 dark:text-slate-50", - className + className, )} {...props} />
-)) +)); -CommandInput.displayName = CommandPrimitive.Input.displayName +CommandInput.displayName = CommandPrimitive.Input.displayName; const CommandList = React.forwardRef< React.ElementRef, @@ -68,9 +68,9 @@ const CommandList = React.forwardRef< className={cn("max-h-[300px] overflow-y-auto overflow-x-hidden", className)} {...props} /> -)) +)); -CommandList.displayName = CommandPrimitive.List.displayName +CommandList.displayName = CommandPrimitive.List.displayName; const CommandEmpty = React.forwardRef< React.ElementRef, @@ -81,9 +81,9 @@ const CommandEmpty = React.forwardRef< className="py-6 text-center text-sm" {...props} /> -)) +)); -CommandEmpty.displayName = CommandPrimitive.Empty.displayName +CommandEmpty.displayName = CommandPrimitive.Empty.displayName; const CommandGroup = React.forwardRef< React.ElementRef, @@ -93,13 +93,13 @@ const CommandGroup = React.forwardRef< ref={ref} className={cn( "overflow-hidden py-3 px-2 text-slate-700 dark:text-slate-400 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:pb-1.5 [&_[cmdk-group-heading]]:text-sm [&_[cmdk-group-heading]]:font-semibold [&_[cmdk-group-heading]]:text-slate-900 [&_[cmdk-group-heading]]:dark:text-slate-300", - className + className, )} {...props} /> -)) +)); -CommandGroup.displayName = CommandPrimitive.Group.displayName +CommandGroup.displayName = CommandPrimitive.Group.displayName; const CommandSeparator = React.forwardRef< React.ElementRef, @@ -110,8 +110,8 @@ const CommandSeparator = React.forwardRef< className={cn("-mx-1 h-px bg-slate-100 dark:bg-slate-700", className)} {...props} /> -)) -CommandSeparator.displayName = CommandPrimitive.Separator.displayName +)); +CommandSeparator.displayName = CommandPrimitive.Separator.displayName; const CommandItem = React.forwardRef< React.ElementRef, @@ -121,13 +121,13 @@ const CommandItem = React.forwardRef< ref={ref} className={cn( "relative flex cursor-default select-none items-center rounded-md py-1.5 px-2 text-sm font-medium outline-none aria-selected:bg-slate-100 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:aria-selected:bg-slate-700", - className + className, )} {...props} /> -)) +)); -CommandItem.displayName = CommandPrimitive.Item.displayName +CommandItem.displayName = CommandPrimitive.Item.displayName; const CommandShortcut = ({ className, @@ -137,13 +137,13 @@ const CommandShortcut = ({ - ) -} -CommandShortcut.displayName = "CommandShortcut" + ); +}; +CommandShortcut.displayName = "CommandShortcut"; export { Command, @@ -155,4 +155,4 @@ export { CommandItem, CommandShortcut, CommandSeparator, -} +}; diff --git a/examples/react-query/components/ui/context-menu.tsx b/examples/react-query/components/ui/context-menu.tsx index e20fbb3d..5f91186e 100644 --- a/examples/react-query/components/ui/context-menu.tsx +++ b/examples/react-query/components/ui/context-menu.tsx @@ -1,27 +1,27 @@ -"use client" +"use client"; -import * as React from "react" -import * as ContextMenuPrimitive from "@radix-ui/react-context-menu" -import { Check, ChevronRight, Circle } from "lucide-react" +import * as ContextMenuPrimitive from "@radix-ui/react-context-menu"; +import { Check, ChevronRight, Circle } from "lucide-react"; +import * as React from "react"; -import { cn } from "@/lib/utils" +import { cn } from "@/lib/utils"; -const ContextMenu = ContextMenuPrimitive.Root +const ContextMenu = ContextMenuPrimitive.Root; -const ContextMenuTrigger = ContextMenuPrimitive.Trigger +const ContextMenuTrigger = ContextMenuPrimitive.Trigger; -const ContextMenuGroup = ContextMenuPrimitive.Group +const ContextMenuGroup = ContextMenuPrimitive.Group; -const ContextMenuPortal = ContextMenuPrimitive.Portal +const ContextMenuPortal = ContextMenuPrimitive.Portal; -const ContextMenuSub = ContextMenuPrimitive.Sub +const ContextMenuSub = ContextMenuPrimitive.Sub; -const ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup +const ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup; const ContextMenuSubTrigger = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef & { - inset?: boolean + inset?: boolean; } >(({ className, inset, children, ...props }, ref) => ( {children} -)) -ContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName +)); +ContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName; const ContextMenuSubContent = React.forwardRef< React.ElementRef, @@ -47,12 +47,12 @@ const ContextMenuSubContent = React.forwardRef< ref={ref} className={cn( "z-50 min-w-[8rem] overflow-hidden rounded-md border border-slate-100 bg-white p-1 shadow-md animate-in slide-in-from-left-1 dark:border-slate-700 dark:bg-slate-800", - className + className, )} {...props} /> -)) -ContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName +)); +ContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName; const ContextMenuContent = React.forwardRef< React.ElementRef, @@ -63,18 +63,18 @@ const ContextMenuContent = React.forwardRef< ref={ref} className={cn( "z-50 min-w-[8rem] overflow-hidden rounded-md border border-slate-100 bg-white p-1 text-slate-700 shadow-md animate-in fade-in-80 dark:border-slate-800 dark:bg-slate-800 dark:text-slate-400", - className + className, )} {...props} /> -)) -ContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName +)); +ContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName; const ContextMenuItem = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef & { - inset?: boolean + inset?: boolean; } >(({ className, inset, ...props }, ref) => ( -)) -ContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName +)); +ContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName; const ContextMenuCheckboxItem = React.forwardRef< React.ElementRef, @@ -97,7 +97,7 @@ const ContextMenuCheckboxItem = React.forwardRef< ref={ref} className={cn( "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm font-medium outline-none focus:bg-slate-100 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-slate-700", - className + className, )} checked={checked} {...props} @@ -109,9 +109,9 @@ const ContextMenuCheckboxItem = React.forwardRef< {children} -)) +)); ContextMenuCheckboxItem.displayName = - ContextMenuPrimitive.CheckboxItem.displayName + ContextMenuPrimitive.CheckboxItem.displayName; const ContextMenuRadioItem = React.forwardRef< React.ElementRef, @@ -121,7 +121,7 @@ const ContextMenuRadioItem = React.forwardRef< ref={ref} className={cn( "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm font-medium outline-none focus:bg-slate-100 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-slate-700", - className + className, )} {...props} > @@ -132,13 +132,13 @@ const ContextMenuRadioItem = React.forwardRef< {children} -)) -ContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName +)); +ContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName; const ContextMenuLabel = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef & { - inset?: boolean + inset?: boolean; } >(({ className, inset, ...props }, ref) => ( -)) -ContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName +)); +ContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName; const ContextMenuSeparator = React.forwardRef< React.ElementRef, @@ -162,8 +162,8 @@ const ContextMenuSeparator = React.forwardRef< className={cn("-mx-1 my-1 h-px bg-slate-100 dark:bg-slate-700", className)} {...props} /> -)) -ContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName +)); +ContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName; const ContextMenuShortcut = ({ className, @@ -173,13 +173,13 @@ const ContextMenuShortcut = ({ - ) -} -ContextMenuShortcut.displayName = "ContextMenuShortcut" + ); +}; +ContextMenuShortcut.displayName = "ContextMenuShortcut"; export { ContextMenu, @@ -197,4 +197,4 @@ export { ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuRadioGroup, -} +}; diff --git a/examples/react-query/components/ui/dialog.tsx b/examples/react-query/components/ui/dialog.tsx index 89047e5f..9570cfdf 100644 --- a/examples/react-query/components/ui/dialog.tsx +++ b/examples/react-query/components/ui/dialog.tsx @@ -1,14 +1,14 @@ -"use client" +"use client"; -import * as React from "react" -import * as DialogPrimitive from "@radix-ui/react-dialog" -import { X } from "lucide-react" +import * as DialogPrimitive from "@radix-ui/react-dialog"; +import { X } from "lucide-react"; +import * as React from "react"; -import { cn } from "@/lib/utils" +import { cn } from "@/lib/utils"; -const Dialog = DialogPrimitive.Root +const Dialog = DialogPrimitive.Root; -const DialogTrigger = DialogPrimitive.Trigger +const DialogTrigger = DialogPrimitive.Trigger; const DialogPortal = ({ className, @@ -20,8 +20,8 @@ const DialogPortal = ({ {children}
-) -DialogPortal.displayName = DialogPrimitive.Portal.displayName +); +DialogPortal.displayName = DialogPrimitive.Portal.displayName; const DialogOverlay = React.forwardRef< React.ElementRef, @@ -30,13 +30,13 @@ const DialogOverlay = React.forwardRef< -)) -DialogOverlay.displayName = DialogPrimitive.Overlay.displayName +)); +DialogOverlay.displayName = DialogPrimitive.Overlay.displayName; const DialogContent = React.forwardRef< React.ElementRef, @@ -49,7 +49,7 @@ const DialogContent = React.forwardRef< className={cn( "fixed z-50 grid w-full gap-4 rounded-b-lg bg-white p-6 animate-in data-[state=open]:fade-in-90 data-[state=open]:slide-in-from-bottom-10 sm:max-w-lg sm:rounded-lg sm:zoom-in-90 data-[state=open]:sm:slide-in-from-bottom-0", "dark:bg-slate-900", - className + className, )} {...props} > @@ -60,8 +60,8 @@ const DialogContent = React.forwardRef< -)) -DialogContent.displayName = DialogPrimitive.Content.displayName +)); +DialogContent.displayName = DialogPrimitive.Content.displayName; const DialogHeader = ({ className, @@ -70,12 +70,12 @@ const DialogHeader = ({
-) -DialogHeader.displayName = "DialogHeader" +); +DialogHeader.displayName = "DialogHeader"; const DialogFooter = ({ className, @@ -84,12 +84,12 @@ const DialogFooter = ({
-) -DialogFooter.displayName = "DialogFooter" +); +DialogFooter.displayName = "DialogFooter"; const DialogTitle = React.forwardRef< React.ElementRef, @@ -100,12 +100,12 @@ const DialogTitle = React.forwardRef< className={cn( "text-lg font-semibold text-slate-900", "dark:text-slate-50", - className + className, )} {...props} /> -)) -DialogTitle.displayName = DialogPrimitive.Title.displayName +)); +DialogTitle.displayName = DialogPrimitive.Title.displayName; const DialogDescription = React.forwardRef< React.ElementRef, @@ -116,8 +116,8 @@ const DialogDescription = React.forwardRef< className={cn("text-sm text-slate-500", "dark:text-slate-400", className)} {...props} /> -)) -DialogDescription.displayName = DialogPrimitive.Description.displayName +)); +DialogDescription.displayName = DialogPrimitive.Description.displayName; export { Dialog, @@ -127,4 +127,4 @@ export { DialogFooter, DialogTitle, DialogDescription, -} +}; diff --git a/examples/react-query/components/ui/dropdown-menu.tsx b/examples/react-query/components/ui/dropdown-menu.tsx index 03cba5d8..711e1db5 100644 --- a/examples/react-query/components/ui/dropdown-menu.tsx +++ b/examples/react-query/components/ui/dropdown-menu.tsx @@ -1,27 +1,27 @@ -"use client" +"use client"; -import * as React from "react" -import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu" -import { Check, ChevronRight, Circle } from "lucide-react" +import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu"; +import { Check, ChevronRight, Circle } from "lucide-react"; +import * as React from "react"; -import { cn } from "@/lib/utils" +import { cn } from "@/lib/utils"; -const DropdownMenu = DropdownMenuPrimitive.Root +const DropdownMenu = DropdownMenuPrimitive.Root; -const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger +const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger; -const DropdownMenuGroup = DropdownMenuPrimitive.Group +const DropdownMenuGroup = DropdownMenuPrimitive.Group; -const DropdownMenuPortal = DropdownMenuPrimitive.Portal +const DropdownMenuPortal = DropdownMenuPrimitive.Portal; -const DropdownMenuSub = DropdownMenuPrimitive.Sub +const DropdownMenuSub = DropdownMenuPrimitive.Sub; -const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup +const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup; const DropdownMenuSubTrigger = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef & { - inset?: boolean + inset?: boolean; } >(({ className, inset, children, ...props }, ref) => ( {children} -)) +)); DropdownMenuSubTrigger.displayName = - DropdownMenuPrimitive.SubTrigger.displayName + DropdownMenuPrimitive.SubTrigger.displayName; const DropdownMenuSubContent = React.forwardRef< React.ElementRef, @@ -48,13 +48,13 @@ const DropdownMenuSubContent = React.forwardRef< ref={ref} className={cn( "z-50 min-w-[8rem] overflow-hidden rounded-md border border-slate-100 bg-white p-1 text-slate-700 shadow-md animate-in slide-in-from-left-1 dark:border-slate-800 dark:bg-slate-800 dark:text-slate-400", - className + className, )} {...props} /> -)) +)); DropdownMenuSubContent.displayName = - DropdownMenuPrimitive.SubContent.displayName + DropdownMenuPrimitive.SubContent.displayName; const DropdownMenuContent = React.forwardRef< React.ElementRef, @@ -66,18 +66,18 @@ const DropdownMenuContent = React.forwardRef< sideOffset={sideOffset} className={cn( "z-50 min-w-[8rem] overflow-hidden rounded-md border border-slate-100 bg-white p-1 text-slate-700 shadow-md animate-in data-[side=right]:slide-in-from-left-2 data-[side=left]:slide-in-from-right-2 data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2 dark:border-slate-800 dark:bg-slate-800 dark:text-slate-400", - className + className, )} {...props} /> -)) -DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName +)); +DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName; const DropdownMenuItem = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef & { - inset?: boolean + inset?: boolean; } >(({ className, inset, ...props }, ref) => ( -)) -DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName +)); +DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName; const DropdownMenuCheckboxItem = React.forwardRef< React.ElementRef, @@ -100,7 +100,7 @@ const DropdownMenuCheckboxItem = React.forwardRef< ref={ref} className={cn( "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm font-medium outline-none focus:bg-slate-100 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-slate-700", - className + className, )} checked={checked} {...props} @@ -112,9 +112,9 @@ const DropdownMenuCheckboxItem = React.forwardRef< {children} -)) +)); DropdownMenuCheckboxItem.displayName = - DropdownMenuPrimitive.CheckboxItem.displayName + DropdownMenuPrimitive.CheckboxItem.displayName; const DropdownMenuRadioItem = React.forwardRef< React.ElementRef, @@ -124,7 +124,7 @@ const DropdownMenuRadioItem = React.forwardRef< ref={ref} className={cn( "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm font-medium outline-none focus:bg-slate-100 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-slate-700", - className + className, )} {...props} > @@ -135,13 +135,13 @@ const DropdownMenuRadioItem = React.forwardRef< {children} -)) -DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName +)); +DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName; const DropdownMenuLabel = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef & { - inset?: boolean + inset?: boolean; } >(({ className, inset, ...props }, ref) => ( -)) -DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName +)); +DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName; const DropdownMenuSeparator = React.forwardRef< React.ElementRef, @@ -165,8 +165,8 @@ const DropdownMenuSeparator = React.forwardRef< className={cn("-mx-1 my-1 h-px bg-slate-100 dark:bg-slate-700", className)} {...props} /> -)) -DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName +)); +DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName; const DropdownMenuShortcut = ({ className, @@ -176,13 +176,13 @@ const DropdownMenuShortcut = ({ - ) -} -DropdownMenuShortcut.displayName = "DropdownMenuShortcut" + ); +}; +DropdownMenuShortcut.displayName = "DropdownMenuShortcut"; export { DropdownMenu, @@ -200,4 +200,4 @@ export { DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup, -} +}; diff --git a/examples/react-query/components/ui/hover-card.tsx b/examples/react-query/components/ui/hover-card.tsx index 5086a533..80bb2dc7 100644 --- a/examples/react-query/components/ui/hover-card.tsx +++ b/examples/react-query/components/ui/hover-card.tsx @@ -1,13 +1,13 @@ -"use client" +"use client"; -import * as React from "react" -import * as HoverCardPrimitive from "@radix-ui/react-hover-card" +import * as HoverCardPrimitive from "@radix-ui/react-hover-card"; +import * as React from "react"; -import { cn } from "@/lib/utils" +import { cn } from "@/lib/utils"; -const HoverCard = HoverCardPrimitive.Root +const HoverCard = HoverCardPrimitive.Root; -const HoverCardTrigger = HoverCardPrimitive.Trigger +const HoverCardTrigger = HoverCardPrimitive.Trigger; const HoverCardContent = React.forwardRef< React.ElementRef, @@ -19,11 +19,11 @@ const HoverCardContent = React.forwardRef< sideOffset={sideOffset} className={cn( "z-50 w-64 rounded-md border border-slate-100 bg-white p-4 shadow-md outline-none animate-in zoom-in-90 dark:border-slate-800 dark:bg-slate-800", - className + className, )} {...props} /> -)) -HoverCardContent.displayName = HoverCardPrimitive.Content.displayName +)); +HoverCardContent.displayName = HoverCardPrimitive.Content.displayName; -export { HoverCard, HoverCardTrigger, HoverCardContent } +export { HoverCard, HoverCardTrigger, HoverCardContent }; diff --git a/examples/react-query/components/ui/input.tsx b/examples/react-query/components/ui/input.tsx index c574137e..b5687ffd 100644 --- a/examples/react-query/components/ui/input.tsx +++ b/examples/react-query/components/ui/input.tsx @@ -1,6 +1,6 @@ -import * as React from "react" +import * as React from "react"; -import { cn } from "@/lib/utils" +import { cn } from "@/lib/utils"; export interface InputProps extends React.InputHTMLAttributes {} @@ -11,14 +11,14 @@ const Input = React.forwardRef( - ) - } -) -Input.displayName = "Input" + ); + }, +); +Input.displayName = "Input"; -export { Input } +export { Input }; diff --git a/examples/react-query/components/ui/label.tsx b/examples/react-query/components/ui/label.tsx index 5ee146d9..71469755 100644 --- a/examples/react-query/components/ui/label.tsx +++ b/examples/react-query/components/ui/label.tsx @@ -1,9 +1,9 @@ -"use client" +"use client"; -import * as React from "react" -import * as LabelPrimitive from "@radix-ui/react-label" +import * as LabelPrimitive from "@radix-ui/react-label"; +import * as React from "react"; -import { cn } from "@/lib/utils" +import { cn } from "@/lib/utils"; const Label = React.forwardRef< React.ElementRef, @@ -13,11 +13,11 @@ const Label = React.forwardRef< ref={ref} className={cn( "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", - className + className, )} {...props} /> -)) -Label.displayName = LabelPrimitive.Root.displayName +)); +Label.displayName = LabelPrimitive.Root.displayName; -export { Label } +export { Label }; diff --git a/examples/react-query/components/ui/menubar.tsx b/examples/react-query/components/ui/menubar.tsx index 1a828bf6..657f264e 100644 --- a/examples/react-query/components/ui/menubar.tsx +++ b/examples/react-query/components/ui/menubar.tsx @@ -1,20 +1,20 @@ -"use client" +"use client"; -import * as React from "react" -import * as MenubarPrimitive from "@radix-ui/react-menubar" -import { Check, ChevronRight, Circle } from "lucide-react" +import * as MenubarPrimitive from "@radix-ui/react-menubar"; +import { Check, ChevronRight, Circle } from "lucide-react"; +import * as React from "react"; -import { cn } from "@/lib/utils" +import { cn } from "@/lib/utils"; -const MenubarMenu = MenubarPrimitive.Menu +const MenubarMenu = MenubarPrimitive.Menu; -const MenubarGroup = MenubarPrimitive.Group +const MenubarGroup = MenubarPrimitive.Group; -const MenubarPortal = MenubarPrimitive.Portal +const MenubarPortal = MenubarPrimitive.Portal; -const MenubarSub = MenubarPrimitive.Sub +const MenubarSub = MenubarPrimitive.Sub; -const MenubarRadioGroup = MenubarPrimitive.RadioGroup +const MenubarRadioGroup = MenubarPrimitive.RadioGroup; const Menubar = React.forwardRef< React.ElementRef, @@ -24,12 +24,12 @@ const Menubar = React.forwardRef< ref={ref} className={cn( "flex h-10 items-center space-x-1 rounded-md border border-slate-300 bg-white p-1 dark:border-slate-700 dark:bg-slate-800", - className + className, )} {...props} /> -)) -Menubar.displayName = MenubarPrimitive.Root.displayName +)); +Menubar.displayName = MenubarPrimitive.Root.displayName; const MenubarTrigger = React.forwardRef< React.ElementRef, @@ -39,17 +39,17 @@ const MenubarTrigger = React.forwardRef< ref={ref} className={cn( "flex cursor-default select-none items-center rounded-[0.2rem] py-1.5 px-3 text-sm font-medium outline-none focus:bg-slate-100 data-[state=open]:bg-slate-100 dark:focus:bg-slate-700 dark:data-[state=open]:bg-slate-700", - className + className, )} {...props} /> -)) -MenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName +)); +MenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName; const MenubarSubTrigger = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef & { - inset?: boolean + inset?: boolean; } >(({ className, inset, children, ...props }, ref) => ( {children} -)) -MenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName +)); +MenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName; const MenubarSubContent = React.forwardRef< React.ElementRef, @@ -75,12 +75,12 @@ const MenubarSubContent = React.forwardRef< ref={ref} className={cn( "z-50 min-w-[8rem] overflow-hidden rounded-md border border-slate-100 bg-white p-1 shadow-md animate-in slide-in-from-left-1 dark:border-slate-700 dark:bg-slate-800", - className + className, )} {...props} /> -)) -MenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName +)); +MenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName; const MenubarContent = React.forwardRef< React.ElementRef, @@ -88,7 +88,7 @@ const MenubarContent = React.forwardRef< >( ( { className, align = "start", alignOffset = -4, sideOffset = 8, ...props }, - ref + ref, ) => ( - ) -) -MenubarContent.displayName = MenubarPrimitive.Content.displayName + ), +); +MenubarContent.displayName = MenubarPrimitive.Content.displayName; const MenubarItem = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef & { - inset?: boolean + inset?: boolean; } >(({ className, inset, ...props }, ref) => ( -)) -MenubarItem.displayName = MenubarPrimitive.Item.displayName +)); +MenubarItem.displayName = MenubarPrimitive.Item.displayName; const MenubarCheckboxItem = React.forwardRef< React.ElementRef, @@ -133,7 +133,7 @@ const MenubarCheckboxItem = React.forwardRef< ref={ref} className={cn( "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm font-medium outline-none focus:bg-slate-100 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-slate-700", - className + className, )} checked={checked} {...props} @@ -145,8 +145,8 @@ const MenubarCheckboxItem = React.forwardRef< {children} -)) -MenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName +)); +MenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName; const MenubarRadioItem = React.forwardRef< React.ElementRef, @@ -156,7 +156,7 @@ const MenubarRadioItem = React.forwardRef< ref={ref} className={cn( "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm font-medium outline-none focus:bg-slate-100 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-slate-700", - className + className, )} {...props} > @@ -167,13 +167,13 @@ const MenubarRadioItem = React.forwardRef< {children} -)) -MenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName +)); +MenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName; const MenubarLabel = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef & { - inset?: boolean + inset?: boolean; } >(({ className, inset, ...props }, ref) => ( -)) -MenubarLabel.displayName = MenubarPrimitive.Label.displayName +)); +MenubarLabel.displayName = MenubarPrimitive.Label.displayName; const MenubarSeparator = React.forwardRef< React.ElementRef, @@ -197,8 +197,8 @@ const MenubarSeparator = React.forwardRef< className={cn("-mx-1 my-1 h-px bg-slate-100 dark:bg-slate-700", className)} {...props} /> -)) -MenubarSeparator.displayName = MenubarPrimitive.Separator.displayName +)); +MenubarSeparator.displayName = MenubarPrimitive.Separator.displayName; const MenubarShortcut = ({ className, @@ -208,13 +208,13 @@ const MenubarShortcut = ({ - ) -} -MenubarShortcut.displayname = "MenubarShortcut" + ); +}; +MenubarShortcut.displayname = "MenubarShortcut"; export { Menubar, @@ -233,4 +233,4 @@ export { MenubarGroup, MenubarSub, MenubarShortcut, -} +}; diff --git a/examples/react-query/components/ui/navigation-menu.tsx b/examples/react-query/components/ui/navigation-menu.tsx index d72885be..bb554118 100644 --- a/examples/react-query/components/ui/navigation-menu.tsx +++ b/examples/react-query/components/ui/navigation-menu.tsx @@ -1,9 +1,9 @@ -import * as React from "react" -import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu" -import { cva } from "class-variance-authority" -import { ChevronDown } from "lucide-react" +import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu"; +import { cva } from "class-variance-authority"; +import { ChevronDown } from "lucide-react"; +import * as React from "react"; -import { cn } from "@/lib/utils" +import { cn } from "@/lib/utils"; const NavigationMenu = React.forwardRef< React.ElementRef, @@ -13,15 +13,15 @@ const NavigationMenu = React.forwardRef< ref={ref} className={cn( "relative z-10 flex flex-1 items-center justify-center", - className + className, )} {...props} > {children} -)) -NavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName +)); +NavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName; const NavigationMenuList = React.forwardRef< React.ElementRef, @@ -31,18 +31,18 @@ const NavigationMenuList = React.forwardRef< ref={ref} className={cn( "group flex flex-1 list-none items-center justify-center", - className + className, )} {...props} /> -)) -NavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName +)); +NavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName; -const NavigationMenuItem = NavigationMenuPrimitive.Item +const NavigationMenuItem = NavigationMenuPrimitive.Item; const navigationMenuTriggerStyle = cva( - "inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus:outline-none focus:bg-slate-100 disabled:opacity-50 dark:focus:bg-slate-800 disabled:pointer-events-none bg-transparent hover:bg-slate-100 dark:hover:bg-slate-800 dark:text-slate-100 dark:hover:text-slate-100 data-[state=open]:bg-slate-50 dark:data-[state=open]:bg-slate-800 data-[active]:bg-slate-50 dark:data-[active]:bg-slate-800 h-10 py-2 px-4 group w-max" -) + "inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus:outline-none focus:bg-slate-100 disabled:opacity-50 dark:focus:bg-slate-800 disabled:pointer-events-none bg-transparent hover:bg-slate-100 dark:hover:bg-slate-800 dark:text-slate-100 dark:hover:text-slate-100 data-[state=open]:bg-slate-50 dark:data-[state=open]:bg-slate-800 data-[active]:bg-slate-50 dark:data-[active]:bg-slate-800 h-10 py-2 px-4 group w-max", +); const NavigationMenuTrigger = React.forwardRef< React.ElementRef, @@ -59,8 +59,8 @@ const NavigationMenuTrigger = React.forwardRef< aria-hidden="true" /> -)) -NavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName +)); +NavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName; const NavigationMenuContent = React.forwardRef< React.ElementRef, @@ -70,14 +70,14 @@ const NavigationMenuContent = React.forwardRef< ref={ref} className={cn( "top-0 left-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=to-start]:slide-out-to-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=from-end]:slide-in-from-right-52 md:absolute md:w-auto ", - className + className, )} {...props} /> -)) -NavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName +)); +NavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName; -const NavigationMenuLink = NavigationMenuPrimitive.Link +const NavigationMenuLink = NavigationMenuPrimitive.Link; const NavigationMenuViewport = React.forwardRef< React.ElementRef, @@ -87,15 +87,15 @@ const NavigationMenuViewport = React.forwardRef<
-)) +)); NavigationMenuViewport.displayName = - NavigationMenuPrimitive.Viewport.displayName + NavigationMenuPrimitive.Viewport.displayName; const NavigationMenuIndicator = React.forwardRef< React.ElementRef, @@ -105,15 +105,15 @@ const NavigationMenuIndicator = React.forwardRef< ref={ref} className={cn( "top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=visible]:fade-in data-[state=hidden]:fade-out", - className + className, )} {...props} >
-)) +)); NavigationMenuIndicator.displayName = - NavigationMenuPrimitive.Indicator.displayName + NavigationMenuPrimitive.Indicator.displayName; export { navigationMenuTriggerStyle, @@ -125,4 +125,4 @@ export { NavigationMenuLink, NavigationMenuIndicator, NavigationMenuViewport, -} +}; diff --git a/examples/react-query/components/ui/popover.tsx b/examples/react-query/components/ui/popover.tsx index e1f1328b..dc3e0bae 100644 --- a/examples/react-query/components/ui/popover.tsx +++ b/examples/react-query/components/ui/popover.tsx @@ -1,13 +1,13 @@ -"use client" +"use client"; -import * as React from "react" -import * as PopoverPrimitive from "@radix-ui/react-popover" +import * as PopoverPrimitive from "@radix-ui/react-popover"; +import * as React from "react"; -import { cn } from "@/lib/utils" +import { cn } from "@/lib/utils"; -const Popover = PopoverPrimitive.Root +const Popover = PopoverPrimitive.Root; -const PopoverTrigger = PopoverPrimitive.Trigger +const PopoverTrigger = PopoverPrimitive.Trigger; const PopoverContent = React.forwardRef< React.ElementRef, @@ -20,12 +20,12 @@ const PopoverContent = React.forwardRef< sideOffset={sideOffset} className={cn( "z-50 w-72 rounded-md border border-slate-100 bg-white p-4 shadow-md outline-none animate-in data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2 data-[side=right]:slide-in-from-left-2 data-[side=left]:slide-in-from-right-2 dark:border-slate-800 dark:bg-slate-800", - className + className, )} {...props} /> -)) -PopoverContent.displayName = PopoverPrimitive.Content.displayName +)); +PopoverContent.displayName = PopoverPrimitive.Content.displayName; -export { Popover, PopoverTrigger, PopoverContent } +export { Popover, PopoverTrigger, PopoverContent }; diff --git a/examples/react-query/components/ui/progress.tsx b/examples/react-query/components/ui/progress.tsx index 9edfb4b7..b5df153a 100644 --- a/examples/react-query/components/ui/progress.tsx +++ b/examples/react-query/components/ui/progress.tsx @@ -1,9 +1,9 @@ -"use client" +"use client"; -import * as React from "react" -import * as ProgressPrimitive from "@radix-ui/react-progress" +import * as ProgressPrimitive from "@radix-ui/react-progress"; +import * as React from "react"; -import { cn } from "@/lib/utils" +import { cn } from "@/lib/utils"; const Progress = React.forwardRef< React.ElementRef, @@ -13,7 +13,7 @@ const Progress = React.forwardRef< ref={ref} className={cn( "relative h-4 w-full overflow-hidden rounded-full bg-slate-200 dark:bg-slate-800", - className + className, )} {...props} > @@ -22,7 +22,7 @@ const Progress = React.forwardRef< style={{ transform: `translateX(-${100 - (value || 0)}%)` }} /> -)) -Progress.displayName = ProgressPrimitive.Root.displayName +)); +Progress.displayName = ProgressPrimitive.Root.displayName; -export { Progress } +export { Progress }; diff --git a/examples/react-query/components/ui/radio-group.tsx b/examples/react-query/components/ui/radio-group.tsx index 6c15b1fc..b906f575 100644 --- a/examples/react-query/components/ui/radio-group.tsx +++ b/examples/react-query/components/ui/radio-group.tsx @@ -1,10 +1,10 @@ -"use client" +"use client"; -import * as React from "react" -import * as RadioGroupPrimitive from "@radix-ui/react-radio-group" -import { Circle } from "lucide-react" +import * as RadioGroupPrimitive from "@radix-ui/react-radio-group"; +import { Circle } from "lucide-react"; +import * as React from "react"; -import { cn } from "@/lib/utils" +import { cn } from "@/lib/utils"; const RadioGroup = React.forwardRef< React.ElementRef, @@ -16,9 +16,9 @@ const RadioGroup = React.forwardRef< {...props} ref={ref} /> - ) -}) -RadioGroup.displayName = RadioGroupPrimitive.Root.displayName + ); +}); +RadioGroup.displayName = RadioGroupPrimitive.Root.displayName; const RadioGroupItem = React.forwardRef< React.ElementRef, @@ -29,7 +29,7 @@ const RadioGroupItem = React.forwardRef< ref={ref} className={cn( "text:fill-slate-50 h-4 w-4 rounded-full border border-slate-300 text-slate-900 hover:border-slate-400 focus:outline-none focus:ring-2 focus:ring-slate-400 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 dark:border-slate-700 dark:text-slate-100 dark:hover:text-slate-900 dark:focus:ring-slate-400 dark:focus:ring-offset-slate-900", - className + className, )} {...props} > @@ -37,8 +37,8 @@ const RadioGroupItem = React.forwardRef< - ) -}) -RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName + ); +}); +RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName; -export { RadioGroup, RadioGroupItem } +export { RadioGroup, RadioGroupItem }; diff --git a/examples/react-query/components/ui/scroll-area.tsx b/examples/react-query/components/ui/scroll-area.tsx index 9e926115..9b72d1f4 100644 --- a/examples/react-query/components/ui/scroll-area.tsx +++ b/examples/react-query/components/ui/scroll-area.tsx @@ -1,9 +1,9 @@ -"use client" +"use client"; -import * as React from "react" -import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area" +import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area"; +import * as React from "react"; -import { cn } from "@/lib/utils" +import { cn } from "@/lib/utils"; const ScrollArea = React.forwardRef< React.ElementRef, @@ -20,8 +20,8 @@ const ScrollArea = React.forwardRef< -)) -ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName +)); +ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName; const ScrollBar = React.forwardRef< React.ElementRef, @@ -36,13 +36,13 @@ const ScrollBar = React.forwardRef< "h-full w-2.5 border-l border-l-transparent p-[1px]", orientation === "horizontal" && "h-2.5 border-t border-t-transparent p-[1px]", - className + className, )} {...props} > -)) -ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName +)); +ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName; -export { ScrollArea, ScrollBar } +export { ScrollArea, ScrollBar }; diff --git a/examples/react-query/components/ui/select.tsx b/examples/react-query/components/ui/select.tsx index d41fea3a..c828afa7 100644 --- a/examples/react-query/components/ui/select.tsx +++ b/examples/react-query/components/ui/select.tsx @@ -1,16 +1,16 @@ -"use client" +"use client"; -import * as React from "react" -import * as SelectPrimitive from "@radix-ui/react-select" -import { Check, ChevronDown } from "lucide-react" +import * as SelectPrimitive from "@radix-ui/react-select"; +import { Check, ChevronDown } from "lucide-react"; +import * as React from "react"; -import { cn } from "@/lib/utils" +import { cn } from "@/lib/utils"; -const Select = SelectPrimitive.Root +const Select = SelectPrimitive.Root; -const SelectGroup = SelectPrimitive.Group +const SelectGroup = SelectPrimitive.Group; -const SelectValue = SelectPrimitive.Value +const SelectValue = SelectPrimitive.Value; const SelectTrigger = React.forwardRef< React.ElementRef, @@ -20,15 +20,15 @@ const SelectTrigger = React.forwardRef< ref={ref} className={cn( "flex h-10 w-full items-center justify-between rounded-md border border-slate-300 bg-transparent py-2 px-3 text-sm placeholder:text-slate-400 focus:outline-none focus:ring-2 focus:ring-slate-400 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 dark:border-slate-700 dark:text-slate-50 dark:focus:ring-slate-400 dark:focus:ring-offset-slate-900", - className + className, )} {...props} > {children} -)) -SelectTrigger.displayName = SelectPrimitive.Trigger.displayName +)); +SelectTrigger.displayName = SelectPrimitive.Trigger.displayName; const SelectContent = React.forwardRef< React.ElementRef, @@ -39,7 +39,7 @@ const SelectContent = React.forwardRef< ref={ref} className={cn( "relative z-50 min-w-[8rem] overflow-hidden rounded-md border border-slate-100 bg-white text-slate-700 shadow-md animate-in fade-in-80 dark:border-slate-800 dark:bg-slate-800 dark:text-slate-400", - className + className, )} {...props} > @@ -48,8 +48,8 @@ const SelectContent = React.forwardRef< -)) -SelectContent.displayName = SelectPrimitive.Content.displayName +)); +SelectContent.displayName = SelectPrimitive.Content.displayName; const SelectLabel = React.forwardRef< React.ElementRef, @@ -59,12 +59,12 @@ const SelectLabel = React.forwardRef< ref={ref} className={cn( "py-1.5 pr-2 pl-8 text-sm font-semibold text-slate-900 dark:text-slate-300", - className + className, )} {...props} /> -)) -SelectLabel.displayName = SelectPrimitive.Label.displayName +)); +SelectLabel.displayName = SelectPrimitive.Label.displayName; const SelectItem = React.forwardRef< React.ElementRef, @@ -74,7 +74,7 @@ const SelectItem = React.forwardRef< ref={ref} className={cn( "relative flex cursor-default select-none items-center rounded-sm py-1.5 pr-2 pl-8 text-sm font-medium outline-none focus:bg-slate-100 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-slate-700", - className + className, )} {...props} > @@ -86,8 +86,8 @@ const SelectItem = React.forwardRef< {children} -)) -SelectItem.displayName = SelectPrimitive.Item.displayName +)); +SelectItem.displayName = SelectPrimitive.Item.displayName; const SelectSeparator = React.forwardRef< React.ElementRef, @@ -98,8 +98,8 @@ const SelectSeparator = React.forwardRef< className={cn("-mx-1 my-1 h-px bg-slate-100 dark:bg-slate-700", className)} {...props} /> -)) -SelectSeparator.displayName = SelectPrimitive.Separator.displayName +)); +SelectSeparator.displayName = SelectPrimitive.Separator.displayName; export { Select, @@ -110,4 +110,4 @@ export { SelectLabel, SelectItem, SelectSeparator, -} +}; diff --git a/examples/react-query/components/ui/separator.tsx b/examples/react-query/components/ui/separator.tsx index 0ae7e3d4..49955c76 100644 --- a/examples/react-query/components/ui/separator.tsx +++ b/examples/react-query/components/ui/separator.tsx @@ -1,9 +1,9 @@ -"use client" +"use client"; -import * as React from "react" -import * as SeparatorPrimitive from "@radix-ui/react-separator" +import * as SeparatorPrimitive from "@radix-ui/react-separator"; +import * as React from "react"; -import { cn } from "@/lib/utils" +import { cn } from "@/lib/utils"; const Separator = React.forwardRef< React.ElementRef, @@ -11,7 +11,7 @@ const Separator = React.forwardRef< >( ( { className, orientation = "horizontal", decorative = true, ...props }, - ref + ref, ) => ( - ) -) -Separator.displayName = SeparatorPrimitive.Root.displayName + ), +); +Separator.displayName = SeparatorPrimitive.Root.displayName; -export { Separator } +export { Separator }; diff --git a/examples/react-query/components/ui/sheet.tsx b/examples/react-query/components/ui/sheet.tsx index 72136e48..e80824f0 100644 --- a/examples/react-query/components/ui/sheet.tsx +++ b/examples/react-query/components/ui/sheet.tsx @@ -1,15 +1,15 @@ -"use client" +"use client"; -import * as React from "react" -import * as SheetPrimitive from "@radix-ui/react-dialog" -import { cva, VariantProps } from "class-variance-authority" -import { X } from "lucide-react" +import * as SheetPrimitive from "@radix-ui/react-dialog"; +import { type VariantProps, cva } from "class-variance-authority"; +import { X } from "lucide-react"; +import * as React from "react"; -import { cn } from "@/lib/utils" +import { cn } from "@/lib/utils"; -const Sheet = SheetPrimitive.Root +const Sheet = SheetPrimitive.Root; -const SheetTrigger = SheetPrimitive.Trigger +const SheetTrigger = SheetPrimitive.Trigger; const portalVariants = cva("fixed inset-0 z-50 flex", { variants: { @@ -21,7 +21,7 @@ const portalVariants = cva("fixed inset-0 z-50 flex", { }, }, defaultVariants: { position: "right" }, -}) +}); interface SheetPortalProps extends SheetPrimitive.DialogPortalProps, @@ -36,8 +36,8 @@ const SheetPortal = ({
{children}
-) -SheetPortal.displayName = SheetPrimitive.Portal.displayName +); +SheetPortal.displayName = SheetPrimitive.Portal.displayName; const SheetOverlay = React.forwardRef< React.ElementRef, @@ -46,13 +46,13 @@ const SheetOverlay = React.forwardRef< -)) -SheetOverlay.displayName = SheetPrimitive.Overlay.displayName +)); +SheetOverlay.displayName = SheetPrimitive.Overlay.displayName; const sheetVariants = cva( "fixed z-50 scale-100 gap-4 bg-white p-6 opacity-100 dark:bg-slate-900", @@ -139,8 +139,8 @@ const sheetVariants = cva( position: "right", size: "default", }, - } -) + }, +); export interface DialogContentProps extends React.ComponentPropsWithoutRef, @@ -164,8 +164,8 @@ const SheetContent = React.forwardRef< -)) -SheetContent.displayName = SheetPrimitive.Content.displayName +)); +SheetContent.displayName = SheetPrimitive.Content.displayName; const SheetHeader = ({ className, @@ -174,12 +174,12 @@ const SheetHeader = ({
-) -SheetHeader.displayName = "SheetHeader" +); +SheetHeader.displayName = "SheetHeader"; const SheetFooter = ({ className, @@ -188,12 +188,12 @@ const SheetFooter = ({
-) -SheetFooter.displayName = "SheetFooter" +); +SheetFooter.displayName = "SheetFooter"; const SheetTitle = React.forwardRef< React.ElementRef, @@ -204,12 +204,12 @@ const SheetTitle = React.forwardRef< className={cn( "text-lg font-semibold text-slate-900", "dark:text-slate-50", - className + className, )} {...props} /> -)) -SheetTitle.displayName = SheetPrimitive.Title.displayName +)); +SheetTitle.displayName = SheetPrimitive.Title.displayName; const SheetDescription = React.forwardRef< React.ElementRef, @@ -220,8 +220,8 @@ const SheetDescription = React.forwardRef< className={cn("text-sm text-slate-500", "dark:text-slate-400", className)} {...props} /> -)) -SheetDescription.displayName = SheetPrimitive.Description.displayName +)); +SheetDescription.displayName = SheetPrimitive.Description.displayName; export { Sheet, @@ -231,4 +231,4 @@ export { SheetFooter, SheetTitle, SheetDescription, -} +}; diff --git a/examples/react-query/components/ui/slider.tsx b/examples/react-query/components/ui/slider.tsx index d80363bf..e1c9bb2c 100644 --- a/examples/react-query/components/ui/slider.tsx +++ b/examples/react-query/components/ui/slider.tsx @@ -1,9 +1,9 @@ -"use client" +"use client"; -import * as React from "react" -import * as SliderPrimitive from "@radix-ui/react-slider" +import * as SliderPrimitive from "@radix-ui/react-slider"; +import * as React from "react"; -import { cn } from "@/lib/utils" +import { cn } from "@/lib/utils"; const Slider = React.forwardRef< React.ElementRef, @@ -13,7 +13,7 @@ const Slider = React.forwardRef< ref={ref} className={cn( "relative flex w-full touch-none select-none items-center", - className + className, )} {...props} > @@ -22,7 +22,7 @@ const Slider = React.forwardRef< -)) -Slider.displayName = SliderPrimitive.Root.displayName +)); +Slider.displayName = SliderPrimitive.Root.displayName; -export { Slider } +export { Slider }; diff --git a/examples/react-query/components/ui/switch.tsx b/examples/react-query/components/ui/switch.tsx index 3191c441..f146a7ff 100644 --- a/examples/react-query/components/ui/switch.tsx +++ b/examples/react-query/components/ui/switch.tsx @@ -1,9 +1,9 @@ -"use client" +"use client"; -import * as React from "react" -import * as SwitchPrimitives from "@radix-ui/react-switch" +import * as SwitchPrimitives from "@radix-ui/react-switch"; +import * as React from "react"; -import { cn } from "@/lib/utils" +import { cn } from "@/lib/utils"; const Switch = React.forwardRef< React.ElementRef, @@ -12,18 +12,18 @@ const Switch = React.forwardRef< -)) -Switch.displayName = SwitchPrimitives.Root.displayName +)); +Switch.displayName = SwitchPrimitives.Root.displayName; -export { Switch } +export { Switch }; diff --git a/examples/react-query/components/ui/tabs.tsx b/examples/react-query/components/ui/tabs.tsx index cc8f7e5e..3b0d94cd 100644 --- a/examples/react-query/components/ui/tabs.tsx +++ b/examples/react-query/components/ui/tabs.tsx @@ -1,11 +1,11 @@ -"use client" +"use client"; -import * as React from "react" -import * as TabsPrimitive from "@radix-ui/react-tabs" +import * as TabsPrimitive from "@radix-ui/react-tabs"; +import * as React from "react"; -import { cn } from "@/lib/utils" +import { cn } from "@/lib/utils"; -const Tabs = TabsPrimitive.Root +const Tabs = TabsPrimitive.Root; const TabsList = React.forwardRef< React.ElementRef, @@ -15,12 +15,12 @@ const TabsList = React.forwardRef< ref={ref} className={cn( "inline-flex items-center justify-center rounded-md bg-slate-100 p-1 dark:bg-slate-800", - className + className, )} {...props} /> -)) -TabsList.displayName = TabsPrimitive.List.displayName +)); +TabsList.displayName = TabsPrimitive.List.displayName; const TabsTrigger = React.forwardRef< React.ElementRef, @@ -29,13 +29,13 @@ const TabsTrigger = React.forwardRef< -)) -TabsTrigger.displayName = TabsPrimitive.Trigger.displayName +)); +TabsTrigger.displayName = TabsPrimitive.Trigger.displayName; const TabsContent = React.forwardRef< React.ElementRef, @@ -44,12 +44,12 @@ const TabsContent = React.forwardRef< -)) -TabsContent.displayName = TabsPrimitive.Content.displayName +)); +TabsContent.displayName = TabsPrimitive.Content.displayName; -export { Tabs, TabsList, TabsTrigger, TabsContent } +export { Tabs, TabsList, TabsTrigger, TabsContent }; diff --git a/examples/react-query/components/ui/textarea.tsx b/examples/react-query/components/ui/textarea.tsx index da25dcf3..b93e2fc6 100644 --- a/examples/react-query/components/ui/textarea.tsx +++ b/examples/react-query/components/ui/textarea.tsx @@ -1,6 +1,6 @@ -import * as React from "react" +import * as React from "react"; -import { cn } from "@/lib/utils" +import { cn } from "@/lib/utils"; export interface TextareaProps extends React.TextareaHTMLAttributes {} @@ -11,14 +11,14 @@ const Textarea = React.forwardRef(