From 34ff29378b1073a4880879d0ccd000928bb4a893 Mon Sep 17 00:00:00 2001 From: Nick Z <2420177+nickzelei@users.noreply.github.com> Date: Fri, 3 Nov 2023 22:02:39 +0000 Subject: [PATCH 1/6] prettier --- docs/.prettierignore | 8 + docs/.prettierrc.json | 6 + docs/babel.config.js | 2 +- docs/docs/connections/mysql.mdx | 2 +- docs/docs/connections/postgres.mdx | 2 +- docs/docs/connections/s3.mdx | 2 +- docs/docs/deploy/docker-compose.mdx | 2 +- docs/docs/deploy/introduction.mdx | 2 +- docs/docs/deploy/kubernetes.mdx | 2 +- docs/docs/overview/Introduction.mdx | 68 ++++----- docs/docs/overview/platform.mdx | 4 +- .../docs/overview/use-cases/anonymization.mdx | 2 +- docs/docs/overview/use-cases/replication.mdx | 2 +- docs/docs/overview/use-cases/subsetting.mdx | 2 +- .../overview/use-cases/synthetic-data.mdx | 2 +- docs/docs/transformers/custom.mdx | 2 +- docs/docs/transformers/introduction.mdx | 2 +- docs/docs/transformers/pre-built/email.mdx | 2 +- docs/docs/transformers/pre-built/phone.mdx | 2 +- .../pre-built/physical-address.mdx | 2 +- docs/docs/transformers/pre-built/ssn.mdx | 2 +- docs/docusaurus.config.js | 62 ++++---- docs/package-lock.json | 16 ++ docs/package.json | 5 +- docs/sidebars.js | 140 +++++++++--------- .../HomepageFeatures/CustomCard.tsx | 8 +- .../HomepageFeatures/CustomCardList.tsx | 4 +- .../HomepageFeatures/DocPageHeader.tsx | 2 +- .../components/HomepageFeatures/HeroImage.tsx | 2 +- .../HomepageFeatures/HeroandGrid.tsx | 2 +- .../src/components/HomepageFeatures/index.tsx | 22 +-- docs/src/css/custom.css | 20 +-- docs/src/theme/ColorModeToggle/index.js | 38 ++--- docs/src/theme/DocBreadcrumbs/index.js | 8 +- .../theme/DocSidebarItem/Category/index.js | 42 +++--- docs/src/theme/DocSidebarItem/Html/index.js | 10 +- docs/src/theme/DocSidebarItem/Link/index.js | 84 +++++------ docs/src/theme/EditThisPage/index.js | 8 +- docs/src/theme/Footer/Layout/index.js | 8 +- docs/src/theme/Navbar/Logo/index.js | 4 +- docs/src/theme/NavbarItem/ComponentTypes.js | 6 +- docs/src/theme/NavbarItem/Gitlink.tsx | 4 +- docs/src/theme/PaginatorNavLink/index.js | 10 +- docs/static/sync-dark-mode.js | 8 +- docs/tailwind.config.js | 4 +- 45 files changed, 335 insertions(+), 302 deletions(-) create mode 100644 docs/.prettierignore create mode 100644 docs/.prettierrc.json diff --git a/docs/.prettierignore b/docs/.prettierignore new file mode 100644 index 0000000000..e9c763a6fd --- /dev/null +++ b/docs/.prettierignore @@ -0,0 +1,8 @@ +.prettierrc.json +.vercel +.vscode +neosync-api-client +README.md +tsconfig.json +charts +dev diff --git a/docs/.prettierrc.json b/docs/.prettierrc.json new file mode 100644 index 0000000000..09c42f9ef6 --- /dev/null +++ b/docs/.prettierrc.json @@ -0,0 +1,6 @@ +{ + "trailingComma": "es5", + "tabWidth": 2, + "semi": true, + "singleQuote": true +} diff --git a/docs/babel.config.js b/docs/babel.config.js index bfd75dbdfc..e00595dae7 100644 --- a/docs/babel.config.js +++ b/docs/babel.config.js @@ -1,3 +1,3 @@ module.exports = { - presets: [require.resolve("@docusaurus/core/lib/babel/preset")], + presets: [require.resolve('@docusaurus/core/lib/babel/preset')], }; diff --git a/docs/docs/connections/mysql.mdx b/docs/docs/connections/mysql.mdx index 4fb8c7ae6c..77227163ef 100644 --- a/docs/docs/connections/mysql.mdx +++ b/docs/docs/connections/mysql.mdx @@ -5,7 +5,7 @@ hide_title: true slug: /connections/mysql --- -import { DocPageHeader } from "@site/src/components/HomepageFeatures/DocPageHeader.tsx"; +import { DocPageHeader } from '@site/src/components/HomepageFeatures/DocPageHeader.tsx'; @@ -39,31 +39,31 @@ The best way to learn Neosync is to check out our core concepts and familiarize , }, { - title: "Runs", + title: 'Runs', description: - "Runs are instances of a job that can be started, paused and played back.", - link: "platform#runs", + 'Runs are instances of a job that can be started, paused and played back.', + link: 'platform#runs', icon: , }, { - title: "Connections", + title: 'Connections', description: - "Connections are sources of data or destinations that you sync using Jobs such as databases.", - link: "platform#connections", + 'Connections are sources of data or destinations that you sync using Jobs such as databases.', + link: 'platform#connections', icon: , }, { - title: "Transformers", + title: 'Transformers', description: - "Transformers are data-type specific modules that anonymize or generate data.", - link: "platform#transformers", + 'Transformers are data-type specific modules that anonymize or generate data.', + link: 'platform#transformers', icon: , }, ]} @@ -87,28 +87,28 @@ Neosync can be used in many different ways to support different use-cases. Check , }, { - title: "Synthetic Data", + title: 'Synthetic Data', description: - "Generate high-quality synthetic data from existing data or from scratch.", - link: "overview/use-cases/synthetic-data", + 'Generate high-quality synthetic data from existing data or from scratch.', + link: 'overview/use-cases/synthetic-data', icon: , }, { - title: "Subset Data", - description: "Subset your data to fit local and stage environments.", - link: "overview/use-cases/subsetting", + title: 'Subset Data', + description: 'Subset your data to fit local and stage environments.', + link: 'overview/use-cases/subsetting', icon: , }, { - title: "Replicate data", - description: "Easily replicate source data to multiple environments.", - link: "overview/use-cases/replication", + title: 'Replicate data', + description: 'Easily replicate source data to multiple environments.', + link: 'overview/use-cases/replication', icon: , }, ]} diff --git a/docs/docs/overview/platform.mdx b/docs/docs/overview/platform.mdx index 5bda2a4865..c07b950585 100644 --- a/docs/docs/overview/platform.mdx +++ b/docs/docs/overview/platform.mdx @@ -5,8 +5,8 @@ hide_title: true slug: /platform --- -import { DocPageHeader } from "@site/src/components/HomepageFeatures/DocPageHeader.tsx"; -import { HeroImage } from "@site/src/components/HomepageFeatures/HeroImage.tsx"; +import { DocPageHeader } from '@site/src/components/HomepageFeatures/DocPageHeader.tsx'; +import { HeroImage } from '@site/src/components/HomepageFeatures/HeroImage.tsx'; diff --git a/docs/docs/overview/use-cases/anonymization.mdx b/docs/docs/overview/use-cases/anonymization.mdx index e15d223270..332079b0d4 100644 --- a/docs/docs/overview/use-cases/anonymization.mdx +++ b/docs/docs/overview/use-cases/anonymization.mdx @@ -5,7 +5,7 @@ hide_title: true slug: anonymization --- -import { DocPageHeader } from "@site/src/components/HomepageFeatures/DocPageHeader.tsx"; +import { DocPageHeader } from '@site/src/components/HomepageFeatures/DocPageHeader.tsx'; diff --git a/docs/docs/overview/use-cases/replication.mdx b/docs/docs/overview/use-cases/replication.mdx index a35711ef9d..bbcccd6772 100644 --- a/docs/docs/overview/use-cases/replication.mdx +++ b/docs/docs/overview/use-cases/replication.mdx @@ -5,7 +5,7 @@ hide_title: true slug: replication --- -import { DocPageHeader } from "@site/src/components/HomepageFeatures/DocPageHeader.tsx"; +import { DocPageHeader } from '@site/src/components/HomepageFeatures/DocPageHeader.tsx'; diff --git a/docs/docs/overview/use-cases/subsetting.mdx b/docs/docs/overview/use-cases/subsetting.mdx index fe65bc8336..d6aaf15813 100644 --- a/docs/docs/overview/use-cases/subsetting.mdx +++ b/docs/docs/overview/use-cases/subsetting.mdx @@ -5,7 +5,7 @@ hide_title: true slug: subsetting --- -import { DocPageHeader } from "@site/src/components/HomepageFeatures/DocPageHeader.tsx"; +import { DocPageHeader } from '@site/src/components/HomepageFeatures/DocPageHeader.tsx'; diff --git a/docs/docs/overview/use-cases/synthetic-data.mdx b/docs/docs/overview/use-cases/synthetic-data.mdx index 93f3898f52..2ef4b735ed 100644 --- a/docs/docs/overview/use-cases/synthetic-data.mdx +++ b/docs/docs/overview/use-cases/synthetic-data.mdx @@ -5,7 +5,7 @@ hide_title: true slug: synthetic-data --- -import { DocPageHeader } from "@site/src/components/HomepageFeatures/DocPageHeader.tsx"; +import { DocPageHeader } from '@site/src/components/HomepageFeatures/DocPageHeader.tsx'; diff --git a/docs/docs/transformers/custom.mdx b/docs/docs/transformers/custom.mdx index c2b2dcb698..c8298c58d5 100644 --- a/docs/docs/transformers/custom.mdx +++ b/docs/docs/transformers/custom.mdx @@ -5,7 +5,7 @@ hide_title: true slug: /transformers/custom --- -import { DocPageHeader } from "@site/src/components/HomepageFeatures/DocPageHeader.tsx"; +import { DocPageHeader } from '@site/src/components/HomepageFeatures/DocPageHeader.tsx'; diff --git a/docs/docs/transformers/introduction.mdx b/docs/docs/transformers/introduction.mdx index 41ee1a76b9..d1db2ba97f 100644 --- a/docs/docs/transformers/introduction.mdx +++ b/docs/docs/transformers/introduction.mdx @@ -5,7 +5,7 @@ hide_title: true slug: /transformers/introduction --- -import { DocPageHeader } from "@site/src/components/HomepageFeatures/DocPageHeader.tsx"; +import { DocPageHeader } from '@site/src/components/HomepageFeatures/DocPageHeader.tsx'; diff --git a/docs/docs/transformers/pre-built/email.mdx b/docs/docs/transformers/pre-built/email.mdx index 88288d05f0..e8da41e2e8 100644 --- a/docs/docs/transformers/pre-built/email.mdx +++ b/docs/docs/transformers/pre-built/email.mdx @@ -5,7 +5,7 @@ hide_title: true slug: /transformers/pre-built/email --- -import { DocPageHeader } from "@site/src/components/HomepageFeatures/DocPageHeader.tsx"; +import { DocPageHeader } from '@site/src/components/HomepageFeatures/DocPageHeader.tsx'; diff --git a/docs/docs/transformers/pre-built/phone.mdx b/docs/docs/transformers/pre-built/phone.mdx index 2ed7d6b572..a2f124b46b 100644 --- a/docs/docs/transformers/pre-built/phone.mdx +++ b/docs/docs/transformers/pre-built/phone.mdx @@ -5,7 +5,7 @@ hide_title: true slug: /transformers/pre-built/phone --- -import { DocPageHeader } from "@site/src/components/HomepageFeatures/DocPageHeader.tsx"; +import { DocPageHeader } from '@site/src/components/HomepageFeatures/DocPageHeader.tsx'; diff --git a/docs/docs/transformers/pre-built/physical-address.mdx b/docs/docs/transformers/pre-built/physical-address.mdx index 314b4be1c8..b009bf19c8 100644 --- a/docs/docs/transformers/pre-built/physical-address.mdx +++ b/docs/docs/transformers/pre-built/physical-address.mdx @@ -5,7 +5,7 @@ hide_title: true slug: /transformers/pre-built/physical-address --- -import { DocPageHeader } from "@site/src/components/HomepageFeatures/DocPageHeader.tsx"; +import { DocPageHeader } from '@site/src/components/HomepageFeatures/DocPageHeader.tsx'; diff --git a/docs/docs/transformers/pre-built/ssn.mdx b/docs/docs/transformers/pre-built/ssn.mdx index 4928e27475..50ca32f7b1 100644 --- a/docs/docs/transformers/pre-built/ssn.mdx +++ b/docs/docs/transformers/pre-built/ssn.mdx @@ -5,7 +5,7 @@ hide_title: true slug: /transformers/pre-built/ssn --- -import { DocPageHeader } from "@site/src/components/HomepageFeatures/DocPageHeader.tsx"; +import { DocPageHeader } from '@site/src/components/HomepageFeatures/DocPageHeader.tsx'; diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index 6940287914..4452a56227 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -1,44 +1,44 @@ // @ts-check // Note: type annotations allow type checking and IDEs autocompletion -const lightCodeTheme = require("prism-react-renderer/themes/github"); -const darkCodeTheme = require("prism-react-renderer/themes/dracula"); +const lightCodeTheme = require('prism-react-renderer/themes/github'); +const darkCodeTheme = require('prism-react-renderer/themes/dracula'); /** @type {import('@docusaurus/types').Config} */ const config = { - title: "Neosync", - tagline: "Open source Test Data Management", - favicon: "img/neosync_favicon.png", + title: 'Neosync', + tagline: 'Open source Test Data Management', + favicon: 'img/neosync_favicon.png', // Set the production url of your site here - url: "https://docs.neosync.dev", + url: 'https://docs.neosync.dev', // Set the // pathname under which your site is served // For GitHub pages deployment, it is often '//' - baseUrl: "/", + baseUrl: '/', // GitHub pages deployment config. // If you aren't using GitHub pages, you don't need these. - organizationName: "nucleuscloud", // Usually your GitHub org/user name. - projectName: "neosync", // Usually your repo name. + organizationName: 'nucleuscloud', // Usually your GitHub org/user name. + projectName: 'neosync', // Usually your repo name. - onBrokenLinks: "throw", - onBrokenMarkdownLinks: "warn", //should probably be throw or warn but was causing a known issue in the markdown parsing of readme files from node_modules. https://github.com/facebook/docusaurus/issues/6370 - scripts: ["/sync-dark-mode.js"], + onBrokenLinks: 'throw', + onBrokenMarkdownLinks: 'warn', //should probably be throw or warn but was causing a known issue in the markdown parsing of readme files from node_modules. https://github.com/facebook/docusaurus/issues/6370 + scripts: ['/sync-dark-mode.js'], // Even if you don't use internalization, you can use this field to set useful // metadata like html lang. For example, if your site is Chinese, you may want // to replace "en" with "zh-Hans". i18n: { - defaultLocale: "en", - locales: ["en"], + defaultLocale: 'en', + locales: ['en'], }, plugins: [ async function myPlugin(context, options) { return { - name: "docusaurus-tailwindcss", + name: 'docusaurus-tailwindcss', configurePostCss(postcssOptions) { // Appends TailwindCSS and AutoPrefixer. - postcssOptions.plugins.push(require("tailwindcss")); - postcssOptions.plugins.push(require("autoprefixer")); + postcssOptions.plugins.push(require('tailwindcss')); + postcssOptions.plugins.push(require('autoprefixer')); return postcssOptions; }, }; @@ -47,20 +47,20 @@ const config = { presets: [ [ - "classic", + 'classic', /** @type {import('@docusaurus/preset-classic').Options} */ ({ docs: { - routeBasePath: "/", - sidebarPath: require.resolve("./sidebars.js"), + routeBasePath: '/', + sidebarPath: require.resolve('./sidebars.js'), // Please change this to your repo. // Remove this to remove the "edit this page" links. editUrl: - "https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/", + 'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/', }, blog: false, theme: { - customCss: require.resolve("./src/css/custom.css"), + customCss: require.resolve('./src/css/custom.css'), }, }), ], @@ -69,28 +69,28 @@ const config = { themeConfig: /** @type {import('@docusaurus/preset-classic').ThemeConfig} */ ({ - image: "img/docusaurus-social-card.jpg", + image: 'img/docusaurus-social-card.jpg', colorMode: { - defaultMode: "light", + defaultMode: 'light', disableSwitch: true, respectPrefersColorScheme: false, }, navbar: { - title: "Neosync", + title: 'Neosync', logo: { - alt: "My Site Logo", - srcDark: "img/white-logo.png", - src: "img/neosync_just_logo.png", + alt: 'My Site Logo', + srcDark: 'img/white-logo.png', + src: 'img/neosync_just_logo.png', }, items: [ { - type: "custom-Gitlink", - position: "right", + type: 'custom-Gitlink', + position: 'right', }, ], }, footer: { - style: "dark", + style: 'dark', copyright: `Copyright © Nucleus Cloud Corp ${new Date().getFullYear()}`, }, prism: { diff --git a/docs/package-lock.json b/docs/package-lock.json index 23c6ec5b05..1f84e10ea7 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -23,6 +23,7 @@ "devDependencies": { "@docusaurus/module-type-aliases": "2.4.3", "@tsconfig/docusaurus": "^2.0.2", + "prettier": "^3.0.3", "typescript": "^5.2.2" }, "engines": { @@ -9554,6 +9555,21 @@ "node": ">=4" } }, + "node_modules/prettier": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz", + "integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==", + "dev": true, + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, "node_modules/pretty-error": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/pretty-error/-/pretty-error-4.0.0.tgz", diff --git a/docs/package.json b/docs/package.json index 5867dfc1d0..f01090c89d 100644 --- a/docs/package.json +++ b/docs/package.json @@ -12,7 +12,9 @@ "serve": "docusaurus serve", "write-translations": "docusaurus write-translations", "write-heading-ids": "docusaurus write-heading-ids", - "typecheck": "tsc" + "typecheck": "tsc", + "prettier:check": "prettier --check .", + "prettier:write": "prettier --write ." }, "dependencies": { "@docusaurus/core": "2.4.3", @@ -30,6 +32,7 @@ "devDependencies": { "@docusaurus/module-type-aliases": "2.4.3", "@tsconfig/docusaurus": "^2.0.2", + "prettier": "^3.0.3", "typescript": "^5.2.2" }, "browserslist": { diff --git a/docs/sidebars.js b/docs/sidebars.js index 5cd8c2dd80..0302286f96 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -18,130 +18,130 @@ const sidebars = { mainSideBar: [ { - type: "html", - value: "
Overview
", - className: "sidebarcategory", + type: 'html', + value: '
Overview
', + className: 'sidebarcategory', }, { - type: "doc", - id: "overview/intro", // document ID - label: "Introduction", // sidebar label + type: 'doc', + id: 'overview/intro', // document ID + label: 'Introduction', // sidebar label }, { - type: "doc", - id: "overview/platform", - label: "Platform", + type: 'doc', + id: 'overview/platform', + label: 'Platform', }, { - type: "category", - label: "Use cases", + type: 'category', + label: 'Use cases', collapsible: true, collapsed: true, items: [ { - type: "doc", - id: "overview/use-cases/anonymization", - label: "Anonymize Data", + type: 'doc', + id: 'overview/use-cases/anonymization', + label: 'Anonymize Data', }, { - type: "doc", - id: "overview/use-cases/synthetic-data", - label: "Synthetic Data", + type: 'doc', + id: 'overview/use-cases/synthetic-data', + label: 'Synthetic Data', }, { - type: "doc", - id: "overview/use-cases/subsetting", - label: "Subset Data", + type: 'doc', + id: 'overview/use-cases/subsetting', + label: 'Subset Data', }, { - type: "doc", - id: "overview/use-cases/replication", - label: "Replicate Data", + type: 'doc', + id: 'overview/use-cases/replication', + label: 'Replicate Data', }, ], }, { - type: "html", - value: "
Deploy Neosync
", - className: "sidebarcategory", + type: 'html', + value: '
Deploy Neosync
', + className: 'sidebarcategory', }, { - type: "doc", - id: "deploy/intro", - label: "Introduction", + type: 'doc', + id: 'deploy/intro', + label: 'Introduction', }, { - type: "doc", - id: "deploy/kubernetes", - label: "Kubernetes", + type: 'doc', + id: 'deploy/kubernetes', + label: 'Kubernetes', }, { - type: "doc", - id: "deploy/docker-compose", - label: "Docker Compose", + type: 'doc', + id: 'deploy/docker-compose', + label: 'Docker Compose', }, { - type: "html", - value: "
Connections
", - className: "sidebarcategory", + type: 'html', + value: '
Connections
', + className: 'sidebarcategory', }, { - type: "doc", - id: "connections/postgres", - label: "Postgres", + type: 'doc', + id: 'connections/postgres', + label: 'Postgres', }, { - type: "doc", - id: "connections/mysql", - label: "Mysql", + type: 'doc', + id: 'connections/mysql', + label: 'Mysql', }, { - type: "doc", - id: "connections/s3", - label: "S3", + type: 'doc', + id: 'connections/s3', + label: 'S3', }, { - type: "html", - value: "
Transformers
", - className: "sidebarcategory", + type: 'html', + value: '
Transformers
', + className: 'sidebarcategory', }, { - type: "doc", - id: "transformers/introduction", - label: "Introduction", + type: 'doc', + id: 'transformers/introduction', + label: 'Introduction', }, { - type: "category", - label: "Pre-built", + type: 'category', + label: 'Pre-built', collapsible: true, collapsed: true, items: [ { - type: "doc", - id: "transformers/pre-built/email", - label: "Email", + type: 'doc', + id: 'transformers/pre-built/email', + label: 'Email', }, { - type: "doc", - id: "transformers/pre-built/physical-address", - label: "Physical Address", + type: 'doc', + id: 'transformers/pre-built/physical-address', + label: 'Physical Address', }, { - type: "doc", - id: "transformers/pre-built/phone", - label: "Phone", + type: 'doc', + id: 'transformers/pre-built/phone', + label: 'Phone', }, { - type: "doc", - id: "transformers/pre-built/ssn", - label: "SSN", + type: 'doc', + id: 'transformers/pre-built/ssn', + label: 'SSN', }, ], }, { - type: "doc", - id: "transformers/custom", - label: "Custom", + type: 'doc', + id: 'transformers/custom', + label: 'Custom', }, ], }; diff --git a/docs/src/components/HomepageFeatures/CustomCard.tsx b/docs/src/components/HomepageFeatures/CustomCard.tsx index e2d37b8fd3..04a2115265 100644 --- a/docs/src/components/HomepageFeatures/CustomCard.tsx +++ b/docs/src/components/HomepageFeatures/CustomCard.tsx @@ -1,7 +1,7 @@ -import Link from "@docusaurus/Link"; -import { ArrowRightIcon } from "@radix-ui/react-icons"; -import React, { ReactElement } from "react"; -import { Card } from "./CustomCardList"; +import Link from '@docusaurus/Link'; +import { ArrowRightIcon } from '@radix-ui/react-icons'; +import React, { ReactElement } from 'react'; +import { Card } from './CustomCardList'; export function CustomCard(props: Card): ReactElement { const { title, description, icon, link } = props; diff --git a/docs/src/components/HomepageFeatures/CustomCardList.tsx b/docs/src/components/HomepageFeatures/CustomCardList.tsx index 022d5b4830..a370d2889b 100644 --- a/docs/src/components/HomepageFeatures/CustomCardList.tsx +++ b/docs/src/components/HomepageFeatures/CustomCardList.tsx @@ -1,5 +1,5 @@ -import React, { ReactElement } from "react"; -import { CustomCard } from "./CustomCard"; +import React, { ReactElement } from 'react'; +import { CustomCard } from './CustomCard'; interface Props { cards: Card[]; diff --git a/docs/src/components/HomepageFeatures/DocPageHeader.tsx b/docs/src/components/HomepageFeatures/DocPageHeader.tsx index e79777060a..10fc14fecd 100644 --- a/docs/src/components/HomepageFeatures/DocPageHeader.tsx +++ b/docs/src/components/HomepageFeatures/DocPageHeader.tsx @@ -1,4 +1,4 @@ -import React from "react"; +import React from 'react'; interface Props { title: string; diff --git a/docs/src/components/HomepageFeatures/HeroImage.tsx b/docs/src/components/HomepageFeatures/HeroImage.tsx index 925e8ee698..86dcd844f5 100644 --- a/docs/src/components/HomepageFeatures/HeroImage.tsx +++ b/docs/src/components/HomepageFeatures/HeroImage.tsx @@ -1,4 +1,4 @@ -import React from "react"; +import React from 'react'; export const HeroImage = () => (
diff --git a/docs/src/components/HomepageFeatures/HeroandGrid.tsx b/docs/src/components/HomepageFeatures/HeroandGrid.tsx index b11d8e543d..8a70de7cbb 100644 --- a/docs/src/components/HomepageFeatures/HeroandGrid.tsx +++ b/docs/src/components/HomepageFeatures/HeroandGrid.tsx @@ -1,4 +1,4 @@ -import React from "react"; +import React from 'react'; export const HeroandGrid = () => { return ( diff --git a/docs/src/components/HomepageFeatures/index.tsx b/docs/src/components/HomepageFeatures/index.tsx index 3d18041f71..fac351f1b3 100644 --- a/docs/src/components/HomepageFeatures/index.tsx +++ b/docs/src/components/HomepageFeatures/index.tsx @@ -1,17 +1,17 @@ -import React from "react"; -import clsx from "clsx"; -import styles from "./styles.module.css"; +import React from 'react'; +import clsx from 'clsx'; +import styles from './styles.module.css'; type FeatureItem = { title: string; - Svg: React.ComponentType>; + Svg: React.ComponentType>; description: JSX.Element; }; const FeatureList: FeatureItem[] = [ { - title: "Easy to Use", - Svg: require("@site/static/img/undraw_docusaurus_mountain.svg").default, + title: 'Easy to Use', + Svg: require('@site/static/img/undraw_docusaurus_mountain.svg').default, description: ( <> Docusaurus was designed from the ground up to be easily installed and @@ -20,8 +20,8 @@ const FeatureList: FeatureItem[] = [ ), }, { - title: "Focus on What Matters", - Svg: require("@site/static/img/undraw_docusaurus_tree.svg").default, + title: 'Focus on What Matters', + Svg: require('@site/static/img/undraw_docusaurus_tree.svg').default, description: ( <> Docusaurus lets you focus on your docs, and we'll do the chores. Go @@ -30,8 +30,8 @@ const FeatureList: FeatureItem[] = [ ), }, { - title: "Powered by React", - Svg: require("@site/static/img/undraw_docusaurus_react.svg").default, + title: 'Powered by React', + Svg: require('@site/static/img/undraw_docusaurus_react.svg').default, description: ( <> Extend or customize your website layout by reusing React. Docusaurus can @@ -43,7 +43,7 @@ const FeatureList: FeatureItem[] = [ function Feature({ title, Svg, description }: FeatureItem) { return ( -
+
diff --git a/docs/src/css/custom.css b/docs/src/css/custom.css index 02b2cc1b08..662cc53e4f 100644 --- a/docs/src/css/custom.css +++ b/docs/src/css/custom.css @@ -3,9 +3,9 @@ * bundles Infima by default. Infima is a CSS framework designed to * work well for content-centric websites. */ -@import "tailwindcss/base"; -@import "tailwindcss/components"; -@import "tailwindcss/utilities"; +@import 'tailwindcss/base'; +@import 'tailwindcss/components'; +@import 'tailwindcss/utilities'; /* You can override the default Infima variables here. */ :root { @@ -17,12 +17,12 @@ --ifm-color-primary-lighter: #101010; --ifm-color-primary-lightest: #101010; --ifm-code-font-size: 90%; - --ifm-font-family: "Inter"; + --ifm-font-family: 'Inter'; --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1); } /* For readability concerns, you should choose a lighter palette in dark mode. */ -html[data-theme="dark"] { +html[data-theme='dark'] { --ifm-background-color: #101010; --ifm-background-surface-color: #101010; --ifm-color-primary: #acc7f9; @@ -56,7 +56,7 @@ this is the class for the sidebar categories that section headers @apply py-[16px] mx-[40px] shadow-none border-b border-gray-200; } - [data-theme="dark"] .navbar { + [data-theme='dark'] .navbar { @apply border-gray-800; } /* .menu__link--sublist-caret::after { @@ -67,17 +67,17 @@ this is the class for the sidebar categories that section headers @apply bg-red-300; } - [data-theme="light"] .home-icon { + [data-theme='light'] .home-icon { @apply text-gray-900; } - [data-theme="dark"] .home-icon { + [data-theme='dark'] .home-icon { @apply text-gray-100; } - [data-theme="dark"] .breadcrumb-label { + [data-theme='dark'] .breadcrumb-label { @apply text-gray-100 cursor-pointer text-sm rounded-full; } - [data-theme="light"] .breadcrumb-label { + [data-theme='light'] .breadcrumb-label { @apply text-gray-900 cursor-pointer text-sm rounded-full; } .doc-page-header { diff --git a/docs/src/theme/ColorModeToggle/index.js b/docs/src/theme/ColorModeToggle/index.js index 0259e8fb6a..e466cb6867 100644 --- a/docs/src/theme/ColorModeToggle/index.js +++ b/docs/src/theme/ColorModeToggle/index.js @@ -1,29 +1,29 @@ -import React from "react"; -import clsx from "clsx"; -import useIsBrowser from "@docusaurus/useIsBrowser"; -import { translate } from "@docusaurus/Translate"; -import styles from "./styles.module.css"; -import { MoonIcon, SunIcon } from "@radix-ui/react-icons"; +import React from 'react'; +import clsx from 'clsx'; +import useIsBrowser from '@docusaurus/useIsBrowser'; +import { translate } from '@docusaurus/Translate'; +import styles from './styles.module.css'; +import { MoonIcon, SunIcon } from '@radix-ui/react-icons'; function ColorModeToggle({ className, buttonClassName, value, onChange }) { const isBrowser = useIsBrowser(); const title = translate( { - message: "{mode}", - id: "theme.colorToggle.ariaLabel", - description: "The ARIA label for the navbar color mode toggle", + message: '{mode}', + id: 'theme.colorToggle.ariaLabel', + description: 'The ARIA label for the navbar color mode toggle', }, { mode: - value === "dark" + value === 'dark' ? translate({ - message: "dark mode", - id: "theme.colorToggle.ariaLabel.mode.dark", - description: "The name for the dark color mode", + message: 'dark mode', + id: 'theme.colorToggle.ariaLabel.mode.dark', + description: 'The name for the dark color mode', }) : translate({ - message: "light mode", - id: "theme.colorToggle.ariaLabel.mode.light", - description: "The name for the light color mode", + message: 'light mode', + id: 'theme.colorToggle.ariaLabel.mode.light', + description: 'The name for the light color mode', }), } ); @@ -31,19 +31,19 @@ function ColorModeToggle({ className, buttonClassName, value, onChange }) {
); diff --git a/docs/src/theme/DocBreadcrumbs/index.js b/docs/src/theme/DocBreadcrumbs/index.js index 7bf96ecd9e..6b5af52397 100644 --- a/docs/src/theme/DocBreadcrumbs/index.js +++ b/docs/src/theme/DocBreadcrumbs/index.js @@ -1,10 +1,10 @@ -import Link from "@docusaurus/Link"; +import Link from '@docusaurus/Link'; import { useHomePageRoute, useSidebarBreadcrumbs, -} from "@docusaurus/theme-common/internal"; -import { ChevronRightIcon, HomeIcon } from "@radix-ui/react-icons"; -import React from "react"; +} from '@docusaurus/theme-common/internal'; +import { ChevronRightIcon, HomeIcon } from '@radix-ui/react-icons'; +import React from 'react'; export default function DocBreadcrumbs() { const breadcrumbs = useSidebarBreadcrumbs(); diff --git a/docs/src/theme/DocSidebarItem/Category/index.js b/docs/src/theme/DocSidebarItem/Category/index.js index 8d093bc53b..fffefe9196 100644 --- a/docs/src/theme/DocSidebarItem/Category/index.js +++ b/docs/src/theme/DocSidebarItem/Category/index.js @@ -1,24 +1,24 @@ -import Link from "@docusaurus/Link"; -import { translate } from "@docusaurus/Translate"; +import Link from '@docusaurus/Link'; +import { translate } from '@docusaurus/Translate'; import { Collapsible, ThemeClassNames, useCollapsible, usePrevious, useThemeConfig, -} from "@docusaurus/theme-common"; +} from '@docusaurus/theme-common'; import { findFirstCategoryLink, isActiveSidebarItem, isSamePath, useDocSidebarItemsExpandedState, -} from "@docusaurus/theme-common/internal"; -import useIsBrowser from "@docusaurus/useIsBrowser"; -import { CaretDownIcon, CaretRightIcon } from "@radix-ui/react-icons"; -import DocSidebarItems from "@theme/DocSidebarItems"; -import clsx from "clsx"; -import React, { useEffect, useMemo } from "react"; -import { RenderIcon } from "../Link"; +} from '@docusaurus/theme-common/internal'; +import useIsBrowser from '@docusaurus/useIsBrowser'; +import { CaretDownIcon, CaretRightIcon } from '@radix-ui/react-icons'; +import DocSidebarItems from '@theme/DocSidebarItems'; +import clsx from 'clsx'; +import React, { useEffect, useMemo } from 'react'; +import { RenderIcon } from '../Link'; // If we navigate to a category and it becomes active, it should automatically // expand itself function useAutoExpandActiveCategory({ isActive, collapsed, updateCollapsed }) { @@ -57,10 +57,10 @@ function CollapseButton({ categoryLabel, onClick }) {