Repository navigation
chore: update TypeScript to 6.0 - #222
Merged
Merged
Conversation
- Bump typescript from ~5.9.3 to ~6.0.3. - Override the baseUrl that @docusaurus/tsconfig sets, since TypeScript 6 deprecates it, and declare the @site/* path in our own tsconfig. - Add @types/react as a direct dev dependency; TypeScript 6 no longer finds it as a transitive dependency.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Moves the typecheck from TypeScript 5.9 to 6.0. This is a step toward 7, which still needs Docusaurus to catch up.
Only
pnpm --filter website typecheckusestsc. The site build doesn't, so it isn't affected.Changes
typescript:~5.9.3→~6.0.3.website/tsconfig.json: setsbaseUrltonulland declarespathsfor@site/*itself. TypeScript 6 deprecatesbaseUrland fails withTS5101, and@docusaurus/tsconfig@3.10.2still sets it. With nobaseUrl, an inheritedpathsresolves relative to the Docusaurus package folder, so we need our own. This also works unchanged on TypeScript 7, wherebaseUrlis removed.@types/react: added as a direct dev dependency (^19.3.0). Without it, TypeScript 6 reportsTS7016: Could not find a declaration file for module 'react'.The lockfile changes are the TypeScript version and the peer-dependency entries that reference it.
Checked locally
pnpm --filter website typecheckpasses on TypeScript 6.0.3.pnpm build,pnpm lintandcspellpass.