From 02a233a221c96c3fb215f78c2badaeb12d07f43d Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Thu, 13 Jan 2022 01:36:53 -0500 Subject: [PATCH] chore: minor typo cleanup (#6324) * chore: minor typo cleanup * fix tests Co-authored-by: Joshua Chen --- admin/new.docusaurus.io/README.md | 2 +- admin/scripts/generateExamples.mjs | 6 +++--- packages/docusaurus-mdx-loader/src/remark/toc/search.ts | 2 +- .../src/collectRedirects.ts | 2 +- .../docusaurus-plugin-content-blog/src/translations.ts | 6 +++--- .../docusaurus-plugin-content-pages/src/markdownLoader.ts | 2 +- .../src/__tests__/__snapshots__/index.test.ts.snap | 2 +- .../src/__tests__/index.test.ts | 2 +- packages/docusaurus-theme-classic/babel.config.js | 2 +- .../src/components/Details/styles.module.css | 2 +- .../docusaurus/src/server/__tests__/brokenLinks.test.ts | 8 ++++---- website/docs/guides/docs/versioning.md | 2 +- website/src/data/users.tsx | 2 +- .../version-2.0.0-beta.13/api/docusaurus.config.js.md | 2 +- .../version-2.0.0-beta.13/guides/docs/versioning.md | 2 +- .../markdown-features/markdown-features-plugins.mdx | 2 +- .../version-2.0.0-beta.14/api/docusaurus.config.js.md | 2 +- .../version-2.0.0-beta.14/guides/docs/versioning.md | 2 +- .../markdown-features/markdown-features-plugins.mdx | 2 +- 19 files changed, 26 insertions(+), 26 deletions(-) diff --git a/admin/new.docusaurus.io/README.md b/admin/new.docusaurus.io/README.md index 8bd1f39abb..db917a91ac 100644 --- a/admin/new.docusaurus.io/README.md +++ b/admin/new.docusaurus.io/README.md @@ -2,7 +2,7 @@ This is a Netlify deployment to handle the Docusaurus playgrounds shortcuts: -- [docusaurus.new](https://docusaurus.new) (main one, as of today domain is owned by StackBlitz but may be transfered to FB) +- [docusaurus.new](https://docusaurus.new) (main one, as of today domain is owned by StackBlitz but may be transferred to FB) - [new.docusaurus.io](https://new.docusaurus.io) (legacy one) See also the [Playground doc page](https://docusaurus.io/docs/playground) diff --git a/admin/scripts/generateExamples.mjs b/admin/scripts/generateExamples.mjs index 6539ab6835..eabdb6b880 100644 --- a/admin/scripts/generateExamples.mjs +++ b/admin/scripts/generateExamples.mjs @@ -67,7 +67,7 @@ async function generateTemplateExample(template) { ); // create sandbox.config.json file at the root of template - const codeSanboxConfig = { + const codeSandboxConfig = { infiniteLoopProtection: true, hardReloadOnChange: true, view: 'browser', @@ -79,7 +79,7 @@ async function generateTemplateExample(template) { }; await fs.writeFile( `./examples/${template}/sandbox.config.json`, - `${JSON.stringify(codeSanboxConfig, null, 2)}\n`, + `${JSON.stringify(codeSandboxConfig, null, 2)}\n`, ); const stackBlitzConfig = { @@ -185,7 +185,7 @@ console.log(`Will generate examples for templates: ${templates.join(',')}`); for (const template of templates) { await generateTemplateExample(template); } -console.log('Commiting changes'); +console.log('Committing changes'); shell.exec('git add examples'); shell.exec("git commit -am 'update examples' --allow-empty"); diff --git a/packages/docusaurus-mdx-loader/src/remark/toc/search.ts b/packages/docusaurus-mdx-loader/src/remark/toc/search.ts index 8b77d6ffb6..4c87132c1e 100644 --- a/packages/docusaurus-mdx-loader/src/remark/toc/search.ts +++ b/packages/docusaurus-mdx-loader/src/remark/toc/search.ts @@ -46,7 +46,7 @@ export default function search(node: Node): TOCItem[] { }); }); - // Keep track of which previous index would be the current heading's direcy parent. + // Keep track of which previous index would be the current heading's direct parent. // Each entry is the last index of the `headings` array at heading level . // We will modify these indices as we iterate through all headings. // e.g. if an ### H3 was last seen at index 2, then prevIndexForLevel[3] === 2 diff --git a/packages/docusaurus-plugin-client-redirects/src/collectRedirects.ts b/packages/docusaurus-plugin-client-redirects/src/collectRedirects.ts index 0a5c76e85b..6c53e817d8 100644 --- a/packages/docusaurus-plugin-client-redirects/src/collectRedirects.ts +++ b/packages/docusaurus-plugin-client-redirects/src/collectRedirects.ts @@ -143,7 +143,7 @@ function doCollectRedirects(pluginContext: PluginContext): RedirectMetadata[] { function createRedirectsOptionRedirects( redirectsOption: PluginOptions['redirects'], ): RedirectMetadata[] { - // For conveniency, user can use a string or a string[] + // For convenience, user can use a string or a string[] function optionToRedirects(option: RedirectOption): RedirectMetadata[] { if (typeof option.from === 'string') { return [{from: option.from, to: option.to}]; diff --git a/packages/docusaurus-plugin-content-blog/src/translations.ts b/packages/docusaurus-plugin-content-blog/src/translations.ts index b77331c814..09598e59ab 100644 --- a/packages/docusaurus-plugin-content-blog/src/translations.ts +++ b/packages/docusaurus-plugin-content-blog/src/translations.ts @@ -52,13 +52,13 @@ export function translateContent( content: BlogContent, translationFiles: TranslationFiles, ): BlogContent { - const [{content: optonsTranslations}] = translationFiles; + const [{content: optionsTranslations}] = translationFiles; return { ...content, - blogSidebarTitle: optonsTranslations['sidebar.title'].message, + blogSidebarTitle: optionsTranslations['sidebar.title'].message, blogListPaginated: translateListPage( content.blogListPaginated, - optonsTranslations, + optionsTranslations, ), }; } diff --git a/packages/docusaurus-plugin-content-pages/src/markdownLoader.ts b/packages/docusaurus-plugin-content-pages/src/markdownLoader.ts index a5db152822..f6a82dca6c 100644 --- a/packages/docusaurus-plugin-content-pages/src/markdownLoader.ts +++ b/packages/docusaurus-plugin-content-pages/src/markdownLoader.ts @@ -15,7 +15,7 @@ export default function markdownLoader( // const options = this.getOptions(); - // TODO provide additinal md processing here? like interlinking pages? + // TODO provide additional md processing here? like interlinking pages? // fileString = linkify(fileString) return callback && callback(null, fileString); diff --git a/packages/docusaurus-remark-plugin-npm2yarn/src/__tests__/__snapshots__/index.test.ts.snap b/packages/docusaurus-remark-plugin-npm2yarn/src/__tests__/__snapshots__/index.test.ts.snap index 290c9d567c..03e53282c4 100644 --- a/packages/docusaurus-remark-plugin-npm2yarn/src/__tests__/__snapshots__/index.test.ts.snap +++ b/packages/docusaurus-remark-plugin-npm2yarn/src/__tests__/__snapshots__/index.test.ts.snap @@ -71,7 +71,7 @@ import TabItem from '@theme/TabItem'; " `; -exports[`npm2yarn plugin test: language was not setted 1`] = ` +exports[`npm2yarn plugin test: language was not set 1`] = ` "\`\`\`npm2yarn npm install --save docusaurus-plugin-name \`\`\` diff --git a/packages/docusaurus-remark-plugin-npm2yarn/src/__tests__/index.test.ts b/packages/docusaurus-remark-plugin-npm2yarn/src/__tests__/index.test.ts index eea0d0fe01..3fe327238a 100644 --- a/packages/docusaurus-remark-plugin-npm2yarn/src/__tests__/index.test.ts +++ b/packages/docusaurus-remark-plugin-npm2yarn/src/__tests__/index.test.ts @@ -37,7 +37,7 @@ describe('npm2yarn plugin', () => { expect(result).toMatchSnapshot(); }); - test('test: language was not setted', async () => { + test('test: language was not set', async () => { const result = await processFixture('syntax-not-properly-set'); expect(result).toMatchSnapshot(); diff --git a/packages/docusaurus-theme-classic/babel.config.js b/packages/docusaurus-theme-classic/babel.config.js index 9e75cdf748..90c09d806f 100644 --- a/packages/docusaurus-theme-classic/babel.config.js +++ b/packages/docusaurus-theme-classic/babel.config.js @@ -8,7 +8,7 @@ module.exports = { env: { // USED FOR NODE/RUNTIME - // maybe we should differenciate both cases because + // maybe we should differentiate both cases because // we mostly need to transpile some features so that node does not crash... lib: { presets: [ diff --git a/packages/docusaurus-theme-common/src/components/Details/styles.module.css b/packages/docusaurus-theme-common/src/components/Details/styles.module.css index 390354b51c..4f7311b9b6 100644 --- a/packages/docusaurus-theme-common/src/components/Details/styles.module.css +++ b/packages/docusaurus-theme-common/src/components/Details/styles.module.css @@ -6,7 +6,7 @@ */ /* -CSS variables, meant to be overriden by final theme +CSS variables, meant to be overridden by final theme */ .details { --docusaurus-details-summary-arrow-size: 0.38rem; diff --git a/packages/docusaurus/src/server/__tests__/brokenLinks.test.ts b/packages/docusaurus/src/server/__tests__/brokenLinks.test.ts index ae71350efc..a8253d3f41 100644 --- a/packages/docusaurus/src/server/__tests__/brokenLinks.test.ts +++ b/packages/docusaurus/src/server/__tests__/brokenLinks.test.ts @@ -232,8 +232,8 @@ describe('Encoded link', () => { './some%20other%20doc', // good - valid file with percent-20 in its name './weird%20file%20name', - // bad - non-existant file with spaces in name - './some%20other%20non-existant%20doc', + // bad - non-existent file with spaces in name + './some%20other%20non-existent%20doc', // evil - trying to use ../../ but '/' won't get decoded './break%2F..%2F..%2Fout', ], @@ -242,8 +242,8 @@ describe('Encoded link', () => { const expectedBrokenLinks = { '/docs/some doc': [ { - link: './some%20other%20non-existant%20doc', - resolvedLink: '/docs/some%20other%20non-existant%20doc', + link: './some%20other%20non-existent%20doc', + resolvedLink: '/docs/some%20other%20non-existent%20doc', }, { link: './break%2F..%2F..%2Fout', diff --git a/website/docs/guides/docs/versioning.md b/website/docs/guides/docs/versioning.md index e89575fb14..761c9e7fb6 100644 --- a/website/docs/guides/docs/versioning.md +++ b/website/docs/guides/docs/versioning.md @@ -259,7 +259,7 @@ The [@hello](hello.md#paginate) document is great! See the [Tutorial](../getting-started/tutorial.md) for more info. ``` -### Global or versioned colocated assets {#global-or-versioned-colocated-assets} +### Global or versioned collocated assets {#global-or-versioned-collocated-assets} You should decide if assets like images and files are per-version or shared between versions. diff --git a/website/src/data/users.tsx b/website/src/data/users.tsx index 9fbd17167d..a64e914cdc 100644 --- a/website/src/data/users.tsx +++ b/website/src/data/users.tsx @@ -1587,7 +1587,7 @@ const Users: User[] = [ }, { title: 'Unleash', - description: 'A feature managment solution.', + description: 'A feature management solution.', preview: require('./showcase/unleash.png'), website: 'https://docs.getunleash.io/', source: 'https://github.com/Unleash/unleash/', diff --git a/website/versioned_docs/version-2.0.0-beta.13/api/docusaurus.config.js.md b/website/versioned_docs/version-2.0.0-beta.13/api/docusaurus.config.js.md index dcff063ce3..4a8db8d7ef 100644 --- a/website/versioned_docs/version-2.0.0-beta.13/api/docusaurus.config.js.md +++ b/website/versioned_docs/version-2.0.0-beta.13/api/docusaurus.config.js.md @@ -111,7 +111,7 @@ module.exports = { ``` - `label`: the label to use for this locale -- `direction`: `ltr` (default) or `rtl` (for [right-to-left languages](https://developer.mozilla.org/en-US/docs/Glossary/rtl) like Araric, Hebrew, etc.) +- `direction`: `ltr` (default) or `rtl` (for [right-to-left languages](https://developer.mozilla.org/en-US/docs/Glossary/rtl) like Arabic, Hebrew, etc.) ### `noIndex` {#noindex} diff --git a/website/versioned_docs/version-2.0.0-beta.13/guides/docs/versioning.md b/website/versioned_docs/version-2.0.0-beta.13/guides/docs/versioning.md index 167f83fde8..5a60fecef8 100644 --- a/website/versioned_docs/version-2.0.0-beta.13/guides/docs/versioning.md +++ b/website/versioned_docs/version-2.0.0-beta.13/guides/docs/versioning.md @@ -195,7 +195,7 @@ Don't use relative paths import within the docs. Because when we cut a version t + import Foo from '@site/src/components/Foo'; ``` -### Global or versioned colocated assets {#global-or-versioned-colocated-assets} +### Global or versioned collocated assets {#global-or-versioned-collocated-assets} You should decide if assets like images and files are per version or shared between versions diff --git a/website/versioned_docs/version-2.0.0-beta.13/guides/markdown-features/markdown-features-plugins.mdx b/website/versioned_docs/version-2.0.0-beta.13/guides/markdown-features/markdown-features-plugins.mdx index 4cb8fa3783..51c4ec4031 100644 --- a/website/versioned_docs/version-2.0.0-beta.13/guides/markdown-features/markdown-features-plugins.mdx +++ b/website/versioned_docs/version-2.0.0-beta.13/guides/markdown-features/markdown-features-plugins.mdx @@ -14,7 +14,7 @@ Sometimes, you may want to extend or tweak your Markdown syntax. For example: And the answer is: create an MDX plugin! MDX has a built-in [plugin system](https://mdxjs.com/advanced/plugins/) that can be used to customize how the Markdown files will be parsed and transformed to JSX. There are three typical use-cases of MDX plugins: - Using existing [remark plugins](https://github.com/remarkjs/remark/blob/main/doc/plugins.md#list-of-plugins) or [rehype plugins](https://github.com/rehypejs/rehype/blob/main/doc/plugins.md#list-of-plugins); -- Creating remark/rehype plugins to tranform the elements generated by existing MDX syntax; +- Creating remark/rehype plugins to transform the elements generated by existing MDX syntax; - Creating remark/rehype plugins to introduce new syntaxes to MDX. If you play with the [MDX playground](https://mdx-git-renovate-babel-monorepo-mdx.vercel.app/playground), you would notice that the MDX transpilation has two intermediate steps: Markdown AST (MDAST), and Hypertext AST (HAST), before arriving at the final JSX output. MDX plugins also come in two forms: diff --git a/website/versioned_docs/version-2.0.0-beta.14/api/docusaurus.config.js.md b/website/versioned_docs/version-2.0.0-beta.14/api/docusaurus.config.js.md index dcff063ce3..4a8db8d7ef 100644 --- a/website/versioned_docs/version-2.0.0-beta.14/api/docusaurus.config.js.md +++ b/website/versioned_docs/version-2.0.0-beta.14/api/docusaurus.config.js.md @@ -111,7 +111,7 @@ module.exports = { ``` - `label`: the label to use for this locale -- `direction`: `ltr` (default) or `rtl` (for [right-to-left languages](https://developer.mozilla.org/en-US/docs/Glossary/rtl) like Araric, Hebrew, etc.) +- `direction`: `ltr` (default) or `rtl` (for [right-to-left languages](https://developer.mozilla.org/en-US/docs/Glossary/rtl) like Arabic, Hebrew, etc.) ### `noIndex` {#noindex} diff --git a/website/versioned_docs/version-2.0.0-beta.14/guides/docs/versioning.md b/website/versioned_docs/version-2.0.0-beta.14/guides/docs/versioning.md index 451e42d582..67714964f1 100644 --- a/website/versioned_docs/version-2.0.0-beta.14/guides/docs/versioning.md +++ b/website/versioned_docs/version-2.0.0-beta.14/guides/docs/versioning.md @@ -195,7 +195,7 @@ Don't use relative paths import within the docs. Because when we cut a version t + import Foo from '@site/src/components/Foo'; ``` -### Global or versioned colocated assets {#global-or-versioned-colocated-assets} +### Global or versioned collocated assets {#global-or-versioned-collocated-assets} You should decide if assets like images and files are per version or shared between versions diff --git a/website/versioned_docs/version-2.0.0-beta.14/guides/markdown-features/markdown-features-plugins.mdx b/website/versioned_docs/version-2.0.0-beta.14/guides/markdown-features/markdown-features-plugins.mdx index 4cb8fa3783..51c4ec4031 100644 --- a/website/versioned_docs/version-2.0.0-beta.14/guides/markdown-features/markdown-features-plugins.mdx +++ b/website/versioned_docs/version-2.0.0-beta.14/guides/markdown-features/markdown-features-plugins.mdx @@ -14,7 +14,7 @@ Sometimes, you may want to extend or tweak your Markdown syntax. For example: And the answer is: create an MDX plugin! MDX has a built-in [plugin system](https://mdxjs.com/advanced/plugins/) that can be used to customize how the Markdown files will be parsed and transformed to JSX. There are three typical use-cases of MDX plugins: - Using existing [remark plugins](https://github.com/remarkjs/remark/blob/main/doc/plugins.md#list-of-plugins) or [rehype plugins](https://github.com/rehypejs/rehype/blob/main/doc/plugins.md#list-of-plugins); -- Creating remark/rehype plugins to tranform the elements generated by existing MDX syntax; +- Creating remark/rehype plugins to transform the elements generated by existing MDX syntax; - Creating remark/rehype plugins to introduce new syntaxes to MDX. If you play with the [MDX playground](https://mdx-git-renovate-babel-monorepo-mdx.vercel.app/playground), you would notice that the MDX transpilation has two intermediate steps: Markdown AST (MDAST), and Hypertext AST (HAST), before arriving at the final JSX output. MDX plugins also come in two forms: