Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/create-docusaurus/bin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {logger} from '@docusaurus/logger';
import semver from 'semver';
import {program} from 'commander';

const packageJson = /** @type {import("../package.json")} */ (
const packageJson = /** @type {typeof import("../package.json")} */ (
createRequire(import.meta.url)('../package.json')
);
const requiredVersion = packageJson.engines.node;
Expand Down
2 changes: 1 addition & 1 deletion packages/docusaurus/bin/beforeCli.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import updateNotifier from 'update-notifier';
import boxen from 'boxen';
import {DOCUSAURUS_VERSION} from '@docusaurus/utils';

const packageJson = /** @type {import("../package.json")} */ (
const packageJson = /** @type {typeof import("../package.json")} */ (
createRequire(import.meta.url)('../package.json')
);
/** @type {Record<string, any>} */
Expand Down
1 change: 0 additions & 1 deletion tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
/* Handled by ESLint */
"noUnusedLocals": false,
"noUnusedParameters": false,
"importsNotUsedAsValues": "remove",

/* Module Resolution */
"moduleResolution": "NodeNext",
Expand Down
7 changes: 2 additions & 5 deletions website/docs/typescript-support.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: Docusaurus is written in TypeScript and provides first-class TypeSc

Docusaurus is written in TypeScript and provides first-class TypeScript support.

The minimum required version is **TypeScript 5.1**.
The minimum required version is **TypeScript 6.0**.

## Initialization {/* #initialization */}

Expand All @@ -31,9 +31,7 @@ Then add `tsconfig.json` to your project root with the following content:
```json title="tsconfig.json"
{
"extends": "@docusaurus/tsconfig",
"compilerOptions": {
"baseUrl": "."
}
"compilerOptions": {}
}
```

Expand All @@ -59,7 +57,6 @@ Alternatively, add the package to the `types` compiler option of your `tsconfig.
{
"extends": "@docusaurus/tsconfig",
"compilerOptions": {
"baseUrl": ".",
// highlight-next-line
"types": ["@docusaurus/theme-live-codeblock"]
}
Expand Down
3 changes: 0 additions & 3 deletions website/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
"extends": "@docusaurus/tsconfig",
"compilerOptions": {
"lib": ["DOM", "ESNext"],
"baseUrl": ".",
"ignoreDeprecations": "6.0",
"resolveJsonModule": true,
"allowArbitraryExtensions": true,

Expand All @@ -28,7 +26,6 @@
"useUnknownInCatchVariables": true,
"noUnusedLocals": false,
"noUnusedParameters": false,
"importsNotUsedAsValues": "remove",

// This is important. We run `pnpm tsc` in website so we can catch issues
// with our declaration files (mostly names that are forgotten to be
Expand Down
Loading