Joshua Chen
78d84006bb
refactor(theme-classic): completely migrate package to TypeScript ( #5459 )
...
* Migrate
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Migrate prism as well
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Fix
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Fix lock file
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Fix typing
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* refactor a bit CodeBlock
* simplify versionBanner typing => use null instead of "none" (apart plugin options for retrocompatibility)
* Remove return signatures
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-09-01 14:34:26 +02:00
Joshua Chen
462b1cf2bc
style(v2): reduce number of ESLint warnings ( #4993 )
...
* Initial work
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* More fixes
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Update packages/docusaurus-theme-classic/src/theme/ThemedImage/index.tsx
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
* Update packages/docusaurus-theme-bootstrap/src/theme/ThemedImage/index.tsx
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
* Fix
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Replace versionPathPart with function
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Prefer non-null assertions
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Substitute for-of with forEach
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Fill `catch` block with placeholder comment
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Ignore local require
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Revert global require change
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Tighten eslint disable range
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Make eslint ignore examples and more tolerating to templates
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Use reduce to handle doc items sequentially
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
* Revert "Use reduce to handle doc items sequentially"
This reverts commit c7525d463b
.
* Address change requests
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2021-06-24 18:12:48 +02:00
John Knox
2c57f44bd6
fix(v2): fail-safe usage of browser storage (localStorage/sessionStorage) when access is denied ( #4501 )
...
* fix: Fix unsafe uses of localStorage
Puts all uses of localStorage behind an abstraction which doesn't fail
when localStorage isn't available.
* cleanup fail-safe browser storage usage
Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-04-13 12:38:12 +02:00
Sam Zhou
bd9b6618c1
feat(v2): Provide typing to most of the theme-classic components ( #3348 )
...
* feat(v2): Provide typing to most of the theme-classic components
* Expose type to the end users and dogfood it in v2 website
2020-08-28 12:06:37 +02:00
Sam Zhou
5ccd24cc1f
feat(v2): Support swizzling TypeScript components ( #2671 )
...
* feat(v2): Support swizzling TypeScript components
* Add tsc --noEmit to tsc script in theme-classic
Now everything can pass the type checker! (although still a lot of any)
* Add tsconfig and types.d.ts to website
Improve developer experience.
As an example, I converted NotFound to tsx
* Apply type annotation suggestions
* Do not fallback to `getThemePath` if getTypeScriptThemePath is undefined
* Fix tsc
* Add module declaration for @theme-original/*
* Move babel cli to root package.json
2020-06-25 16:07:30 +02:00