diff --git a/admin/new.docusaurus.io/functions/index.ts b/admin/new.docusaurus.io/functions/index.ts index 5ec16343a0..9c380d4295 100644 --- a/admin/new.docusaurus.io/functions/index.ts +++ b/admin/new.docusaurus.io/functions/index.ts @@ -4,6 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ + import {Handler} from '@netlify/functions'; import { diff --git a/examples/classic-typescript/src/components/HomepageFeatures.tsx b/examples/classic-typescript/src/components/HomepageFeatures.tsx index 3897078da1..5c28a9aefb 100644 --- a/examples/classic-typescript/src/components/HomepageFeatures.tsx +++ b/examples/classic-typescript/src/components/HomepageFeatures.tsx @@ -1,9 +1,3 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ import React from 'react'; import clsx from 'clsx'; import styles from './HomepageFeatures.module.css'; diff --git a/packages/create-docusaurus/templates/classic-typescript/src/components/HomepageFeatures.tsx b/packages/create-docusaurus/templates/classic-typescript/src/components/HomepageFeatures.tsx index 3897078da1..5c28a9aefb 100644 --- a/packages/create-docusaurus/templates/classic-typescript/src/components/HomepageFeatures.tsx +++ b/packages/create-docusaurus/templates/classic-typescript/src/components/HomepageFeatures.tsx @@ -1,9 +1,3 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ import React from 'react'; import clsx from 'clsx'; import styles from './HomepageFeatures.module.css'; diff --git a/packages/docusaurus-plugin-client-redirects/src/__tests__/writeRedirectFiles.test.ts b/packages/docusaurus-plugin-client-redirects/src/__tests__/writeRedirectFiles.test.ts index 1fafba797b..f01181d97a 100644 --- a/packages/docusaurus-plugin-client-redirects/src/__tests__/writeRedirectFiles.test.ts +++ b/packages/docusaurus-plugin-client-redirects/src/__tests__/writeRedirectFiles.test.ts @@ -4,6 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ + import fs from 'fs-extra'; import path from 'path'; diff --git a/packages/docusaurus-plugin-content-docs/src/options.ts b/packages/docusaurus-plugin-content-docs/src/options.ts index 8e202cb254..8fd50adec0 100644 --- a/packages/docusaurus-plugin-content-docs/src/options.ts +++ b/packages/docusaurus-plugin-content-docs/src/options.ts @@ -4,6 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ + import type {PluginOptions} from './types'; import { Joi, diff --git a/packages/docusaurus-plugin-content-pages/src/pluginOptionSchema.ts b/packages/docusaurus-plugin-content-pages/src/pluginOptionSchema.ts index 32a5d7ebeb..cf1e03dbb5 100644 --- a/packages/docusaurus-plugin-content-pages/src/pluginOptionSchema.ts +++ b/packages/docusaurus-plugin-content-pages/src/pluginOptionSchema.ts @@ -4,6 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ + import {PluginOptions} from './types'; import { Joi, diff --git a/packages/docusaurus-plugin-ideal-image/src/index.ts b/packages/docusaurus-plugin-ideal-image/src/index.ts index d62ddcb9e8..ee305d4c30 100644 --- a/packages/docusaurus-plugin-ideal-image/src/index.ts +++ b/packages/docusaurus-plugin-ideal-image/src/index.ts @@ -4,6 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ + import {LoadContext, Plugin} from '@docusaurus/types'; import type {PluginOptions} from '@docusaurus/plugin-ideal-image'; import {Configuration} from 'webpack'; diff --git a/packages/docusaurus-plugin-pwa/src/options.ts b/packages/docusaurus-plugin-pwa/src/options.ts index a866b3bc0c..ae5242b0b6 100644 --- a/packages/docusaurus-plugin-pwa/src/options.ts +++ b/packages/docusaurus-plugin-pwa/src/options.ts @@ -4,6 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ + import path from 'path'; import {Joi} from '@docusaurus/utils-validation'; import type { diff --git a/packages/docusaurus-plugin-pwa/src/registerSw.js b/packages/docusaurus-plugin-pwa/src/registerSw.js index 0819564310..d46bf6cdcc 100644 --- a/packages/docusaurus-plugin-pwa/src/registerSw.js +++ b/packages/docusaurus-plugin-pwa/src/registerSw.js @@ -4,6 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ + import {createStorageSlot} from '@docusaurus/theme-common'; // First: read the env variables (provided by Webpack) diff --git a/packages/docusaurus-theme-common/src/utils/docsPreferredVersion/DocsPreferredVersionProvider.tsx b/packages/docusaurus-theme-common/src/utils/docsPreferredVersion/DocsPreferredVersionProvider.tsx index cbabcac6f1..4f1b377e8f 100644 --- a/packages/docusaurus-theme-common/src/utils/docsPreferredVersion/DocsPreferredVersionProvider.tsx +++ b/packages/docusaurus-theme-common/src/utils/docsPreferredVersion/DocsPreferredVersionProvider.tsx @@ -4,6 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ + import React, { createContext, ReactNode, diff --git a/packages/docusaurus-theme-common/src/utils/docsPreferredVersion/useDocsPreferredVersion.ts b/packages/docusaurus-theme-common/src/utils/docsPreferredVersion/useDocsPreferredVersion.ts index ace170eafd..d73b2ac7c3 100644 --- a/packages/docusaurus-theme-common/src/utils/docsPreferredVersion/useDocsPreferredVersion.ts +++ b/packages/docusaurus-theme-common/src/utils/docsPreferredVersion/useDocsPreferredVersion.ts @@ -4,6 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ + import {useCallback} from 'react'; import {useDocsPreferredVersionContext} from './DocsPreferredVersionProvider'; import {useAllDocsData, useDocsData, GlobalVersion} from '@theme/hooks/useDocs'; diff --git a/packages/docusaurus-theme-common/src/utils/generalUtils.ts b/packages/docusaurus-theme-common/src/utils/generalUtils.ts index 240ac444af..055c815170 100644 --- a/packages/docusaurus-theme-common/src/utils/generalUtils.ts +++ b/packages/docusaurus-theme-common/src/utils/generalUtils.ts @@ -4,6 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ + import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; export const useTitleFormatter = (title?: string | undefined): string => { diff --git a/packages/docusaurus-theme-common/src/utils/useContextualSearchFilters.ts b/packages/docusaurus-theme-common/src/utils/useContextualSearchFilters.ts index 2dd1741d1b..b8a6a66f85 100644 --- a/packages/docusaurus-theme-common/src/utils/useContextualSearchFilters.ts +++ b/packages/docusaurus-theme-common/src/utils/useContextualSearchFilters.ts @@ -4,6 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ + import {useAllDocsData, useActivePluginAndVersion} from '@theme/hooks/useDocs'; import {useDocsPreferredVersionByPluginId} from './docsPreferredVersion/useDocsPreferredVersion'; import {docVersionSearchTag, DEFAULT_SEARCH_TAG} from './searchUtils'; diff --git a/packages/docusaurus-theme-common/src/utils/useThemeConfig.ts b/packages/docusaurus-theme-common/src/utils/useThemeConfig.ts index 97bdefc531..d8050e58ee 100644 --- a/packages/docusaurus-theme-common/src/utils/useThemeConfig.ts +++ b/packages/docusaurus-theme-common/src/utils/useThemeConfig.ts @@ -4,6 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ + import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; import {PrismTheme} from 'prism-react-renderer'; import {CSSProperties} from 'react'; diff --git a/packages/docusaurus-theme-translations/src/__tests__/index.test.ts b/packages/docusaurus-theme-translations/src/__tests__/index.test.ts index 9db51b9bc8..4613ab3686 100644 --- a/packages/docusaurus-theme-translations/src/__tests__/index.test.ts +++ b/packages/docusaurus-theme-translations/src/__tests__/index.test.ts @@ -4,6 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ + import path from 'path'; import fs from 'fs-extra'; import { diff --git a/packages/docusaurus-utils-validation/src/validationUtils.ts b/packages/docusaurus-utils-validation/src/validationUtils.ts index d530b165a2..b76f8fc726 100644 --- a/packages/docusaurus-utils-validation/src/validationUtils.ts +++ b/packages/docusaurus-utils-validation/src/validationUtils.ts @@ -4,6 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ + import Joi from './Joi'; import chalk from 'chalk'; import {PluginIdSchema} from './validationSchemas'; diff --git a/packages/docusaurus/src/babel/preset.ts b/packages/docusaurus/src/babel/preset.ts index f9f939bcb5..38ae84695a 100644 --- a/packages/docusaurus/src/babel/preset.ts +++ b/packages/docusaurus/src/babel/preset.ts @@ -4,6 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ + import path from 'path'; import {ConfigAPI, TransformOptions} from '@babel/core'; diff --git a/packages/docusaurus/src/commands/writeTranslations.ts b/packages/docusaurus/src/commands/writeTranslations.ts index ae1fccefb3..8e91ce9505 100644 --- a/packages/docusaurus/src/commands/writeTranslations.ts +++ b/packages/docusaurus/src/commands/writeTranslations.ts @@ -4,6 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ + import {ConfigOptions, InitializedPlugin} from '@docusaurus/types'; import path from 'path'; import {loadContext, loadPluginConfigs} from '../server'; diff --git a/packages/docusaurus/src/server/__tests__/duplicateRoutes.test.ts b/packages/docusaurus/src/server/__tests__/duplicateRoutes.test.ts index f8fc65cd79..e50f2451d8 100644 --- a/packages/docusaurus/src/server/__tests__/duplicateRoutes.test.ts +++ b/packages/docusaurus/src/server/__tests__/duplicateRoutes.test.ts @@ -4,6 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ + import { getAllDuplicateRoutes, getDuplicateRoutesMessage, diff --git a/packages/docusaurus/src/server/__tests__/utils.test.ts b/packages/docusaurus/src/server/__tests__/utils.test.ts index 6f395e7557..bef24a9c1d 100644 --- a/packages/docusaurus/src/server/__tests__/utils.test.ts +++ b/packages/docusaurus/src/server/__tests__/utils.test.ts @@ -4,6 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ + import {RouteConfig} from '@docusaurus/types'; import {getAllFinalRoutes} from '../utils'; diff --git a/packages/docusaurus/src/server/duplicateRoutes.ts b/packages/docusaurus/src/server/duplicateRoutes.ts index 46e10be745..80b907e636 100644 --- a/packages/docusaurus/src/server/duplicateRoutes.ts +++ b/packages/docusaurus/src/server/duplicateRoutes.ts @@ -4,6 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ + import {ReportingSeverity, RouteConfig} from '@docusaurus/types'; import {reportMessage} from '@docusaurus/utils'; import {getAllFinalRoutes} from './utils'; diff --git a/packages/docusaurus/src/server/i18n.ts b/packages/docusaurus/src/server/i18n.ts index a3f9356579..f86fe40038 100644 --- a/packages/docusaurus/src/server/i18n.ts +++ b/packages/docusaurus/src/server/i18n.ts @@ -4,6 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ + import {I18n, DocusaurusConfig, I18nLocaleConfig} from '@docusaurus/types'; import path from 'path'; import {normalizeUrl, NODE_MAJOR_VERSION} from '@docusaurus/utils'; diff --git a/packages/docusaurus/src/server/translations/translations.ts b/packages/docusaurus/src/server/translations/translations.ts index 5b71db74d9..37ebec30a7 100644 --- a/packages/docusaurus/src/server/translations/translations.ts +++ b/packages/docusaurus/src/server/translations/translations.ts @@ -4,6 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ + import path from 'path'; import fs from 'fs-extra'; import {mapValues, difference} from 'lodash'; diff --git a/packages/docusaurus/src/server/translations/translationsExtractor.ts b/packages/docusaurus/src/server/translations/translationsExtractor.ts index 6a110974d4..6ea5efb1f4 100644 --- a/packages/docusaurus/src/server/translations/translationsExtractor.ts +++ b/packages/docusaurus/src/server/translations/translationsExtractor.ts @@ -4,6 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ + import fs from 'fs-extra'; import traverse, {Node} from '@babel/traverse'; import generate from '@babel/generator'; diff --git a/packages/docusaurus/src/webpack/plugins/LogPlugin.ts b/packages/docusaurus/src/webpack/plugins/LogPlugin.ts index d3e4bb6e42..997a67fd95 100644 --- a/packages/docusaurus/src/webpack/plugins/LogPlugin.ts +++ b/packages/docusaurus/src/webpack/plugins/LogPlugin.ts @@ -4,6 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ + import WebpackBar from 'webpackbar'; import {Compiler} from 'webpack'; import formatWebpackMessages from 'react-dev-utils/formatWebpackMessages';