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

@ -151,7 +151,7 @@ type CollapsibleElementType = React.ElementType<
Pick<React.HTMLAttributes<unknown>, 'className' | 'onTransitionEnd' | 'style'>
>;
// Prevent hydration layout shift before anims are handled imperatively with JS
// Prevent hydration layout shift before animations are handled imperatively with JS
function getSSRStyle(collapsed: boolean) {
if (ExecutionEnvironment.canUseDOM) {
return undefined;

View file

@ -43,7 +43,7 @@ const useAnnouncementBarContextValue = (): AnnouncementBarAPI => {
const [isClosed, setClosed] = useState(() =>
isBrowser
? // On client navigation: init with localstorage value
? // On client navigation: init with local storage value
isDismissedInStorage()
: // On server/hydration: always visible to prevent layout shifts (will be hidden with css if needed)
false,
@ -68,6 +68,7 @@ const useAnnouncementBarContextValue = (): AnnouncementBarAPI => {
// retrocompatibility due to spelling mistake of default id
// see https://github.com/facebook/docusaurus/issues/3338
// cSpell:ignore annoucement
if (viewedId === 'annoucement-bar') {
viewedId = 'announcement-bar';
}

View file

@ -38,7 +38,7 @@ type DocsPreferredVersionState = Record<
DocsPreferredVersionPluginState
>;
// Initial state is always null as we can't read localstorage from node SSR
// Initial state is always null as we can't read local storage from node SSR
function getInitialState(pluginIds: string[]): DocsPreferredVersionState {
const initialState: DocsPreferredVersionState = {};
pluginIds.forEach((pluginId) => {

View file

@ -104,7 +104,7 @@ export function MobileSecondaryMenuFiller<
const memoizedProps = useShallowMemoizedObject(props);
useEffect(() => {
// @ts-expect-error: context is not 100% typesafe but it's ok
// @ts-expect-error: context is not 100% type-safe but it's ok
setState({component, props: memoizedProps});
}, [setState, component, memoizedProps]);