chore: add cSpell for spell checking (#6456)

* chore: Add cSpell for spell checking

* chore: exclude map files and remove dups

* chore: exclude more binary files

* chore: remove MD headings

* Update .cspell.json

* fix a few spellings

* fix more

* fix

Signed-off-by: Joshua Chen <sidachen2003@gmail.com>

* fix a few

* oops

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
This commit is contained in:
Nick Schonning 2022-01-24 20:40:02 -05:00 committed by GitHub
parent a41a5c328c
commit 521eb119a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
64 changed files with 852 additions and 142 deletions

View file

@ -21,14 +21,14 @@ import type {NumberPrefixParser} from '@docusaurus/plugin-content-docs';
export default function getSlug({
baseID,
frontmatterSlug,
frontMatterSlug,
source,
sourceDirName,
stripDirNumberPrefixes = true,
numberPrefixParser = DefaultNumberPrefixParser,
}: {
baseID: string;
frontmatterSlug?: string;
frontMatterSlug?: string;
source: DocMetadataBase['slug'];
sourceDirName: DocMetadataBase['sourceDirName'];
stripDirNumberPrefixes?: boolean;
@ -46,14 +46,14 @@ export default function getSlug({
}
function computeSlug(): string {
if (frontmatterSlug?.startsWith('/')) {
return frontmatterSlug;
if (frontMatterSlug?.startsWith('/')) {
return frontMatterSlug;
} else {
const dirNameSlug = getDirNameSlug();
if (!frontmatterSlug && isConventionalDocIndex({source, sourceDirName})) {
if (!frontMatterSlug && isConventionalDocIndex({source, sourceDirName})) {
return dirNameSlug;
}
const baseSlug = frontmatterSlug || baseID;
const baseSlug = frontMatterSlug || baseID;
return resolvePathname(baseSlug, getDirNameSlug());
}
}
@ -63,8 +63,8 @@ export default function getSlug({
throw new Error(
`We couldn't compute a valid slug for document with id "${baseID}" in "${sourceDirName}" directory.
The slug we computed looks invalid: ${slug}.
Maybe your slug frontmatter is incorrect or you use weird chars in the file path?
By using the slug frontmatter, you should be able to fix this error, by using the slug of your choice:
Maybe your slug front matter is incorrect or you use weird chars in the file path?
By using the slug front matter, you should be able to fix this error, by using the slug of your choice:
Example =>
---