From 8269569ac7562ad51cf6a76fa32dd076fc523e9e Mon Sep 17 00:00:00 2001 From: SoonIter Date: Thu, 8 Aug 2024 11:51:46 +0800 Subject: [PATCH 1/5] chore: update --- e2e/fixtures/api-docgen/tsconfig.json | 20 +++++++++++++++++++ .../create-rspress/template/tsconfig.json | 13 +++++++++++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 e2e/fixtures/api-docgen/tsconfig.json diff --git a/e2e/fixtures/api-docgen/tsconfig.json b/e2e/fixtures/api-docgen/tsconfig.json new file mode 100644 index 000000000..75ff22b60 --- /dev/null +++ b/e2e/fixtures/api-docgen/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "target": "ES2020", + "lib": ["DOM", "ES2020"], + "module": "ESNext", + "jsx": "react-jsx", + "noEmit": true, + "strict": true, + "skipLibCheck": true, + "isolatedModules": true, + "resolveJsonModule": true, + "moduleResolution": "bundler", + "useDefineForClassFields": true, + "allowImportingTsExtensions": true + }, + "include": ["docs", "src"], + "mdx": { + "checkMdx": true + } +} diff --git a/packages/create-rspress/template/tsconfig.json b/packages/create-rspress/template/tsconfig.json index 8c9ae6a77..75ff22b60 100644 --- a/packages/create-rspress/template/tsconfig.json +++ b/packages/create-rspress/template/tsconfig.json @@ -1,8 +1,19 @@ { "compilerOptions": { + "target": "ES2020", + "lib": ["DOM", "ES2020"], + "module": "ESNext", "jsx": "react-jsx", - "esModuleInterop": true + "noEmit": true, + "strict": true, + "skipLibCheck": true, + "isolatedModules": true, + "resolveJsonModule": true, + "moduleResolution": "bundler", + "useDefineForClassFields": true, + "allowImportingTsExtensions": true }, + "include": ["docs", "src"], "mdx": { "checkMdx": true } From e6a9cf4e2bf7403fe740caadec1649b06634dae1 Mon Sep 17 00:00:00 2001 From: SoonIter Date: Thu, 8 Aug 2024 11:54:23 +0800 Subject: [PATCH 2/5] chore: update --- .../docs/en/guide/start/getting-started.mdx | 18 ++++++++++++++++-- .../docs/zh/guide/start/getting-started.mdx | 18 ++++++++++++++++-- 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/packages/document/docs/en/guide/start/getting-started.mdx b/packages/document/docs/en/guide/start/getting-started.mdx index 39c160f8b..d1cde2a7a 100644 --- a/packages/document/docs/en/guide/start/getting-started.mdx +++ b/packages/document/docs/en/guide/start/getting-started.mdx @@ -57,8 +57,22 @@ And then create `tsconfig.json`, add the following config: ```ts { "compilerOptions": { - "esModuleInterop": true, - "jsx": "react-jsx" + "target": "ES2020", + "lib": ["DOM", "ES2020"], + "module": "ESNext", + "jsx": "react-jsx", + "noEmit": true, + "strict": true, + "skipLibCheck": true, + "isolatedModules": true, + "resolveJsonModule": true, + "moduleResolution": "bundler", + "useDefineForClassFields": true, + "allowImportingTsExtensions": true + }, + "include": ["docs", "src"], + "mdx": { + "checkMdx": true } } ``` diff --git a/packages/document/docs/zh/guide/start/getting-started.mdx b/packages/document/docs/zh/guide/start/getting-started.mdx index df04a4100..ef6f70813 100644 --- a/packages/document/docs/zh/guide/start/getting-started.mdx +++ b/packages/document/docs/zh/guide/start/getting-started.mdx @@ -58,8 +58,22 @@ export default defineConfig({ ```ts { "compilerOptions": { - "esModuleInterop": true, - "jsx": "react-jsx" + "target": "ES2020", + "lib": ["DOM", "ES2020"], + "module": "ESNext", + "jsx": "react-jsx", + "noEmit": true, + "strict": true, + "skipLibCheck": true, + "isolatedModules": true, + "resolveJsonModule": true, + "moduleResolution": "bundler", + "useDefineForClassFields": true, + "allowImportingTsExtensions": true + }, + "include": ["docs", "src"], + "mdx": { + "checkMdx": true } } ``` From 5c252342815b6bedd4b36d0b25f5976c3314cfc4 Mon Sep 17 00:00:00 2001 From: SoonIter Date: Thu, 8 Aug 2024 14:41:16 +0800 Subject: [PATCH 3/5] chore: update --- packages/create-rspress/template/tsconfig.json | 2 +- packages/document/docs/en/guide/start/getting-started.mdx | 2 +- packages/document/docs/zh/guide/start/getting-started.mdx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/create-rspress/template/tsconfig.json b/packages/create-rspress/template/tsconfig.json index 75ff22b60..936218cee 100644 --- a/packages/create-rspress/template/tsconfig.json +++ b/packages/create-rspress/template/tsconfig.json @@ -13,7 +13,7 @@ "useDefineForClassFields": true, "allowImportingTsExtensions": true }, - "include": ["docs", "src"], + "include": ["docs", "theme", "rspress.config.ts"], "mdx": { "checkMdx": true } diff --git a/packages/document/docs/en/guide/start/getting-started.mdx b/packages/document/docs/en/guide/start/getting-started.mdx index d1cde2a7a..d66bfc6c9 100644 --- a/packages/document/docs/en/guide/start/getting-started.mdx +++ b/packages/document/docs/en/guide/start/getting-started.mdx @@ -70,7 +70,7 @@ And then create `tsconfig.json`, add the following config: "useDefineForClassFields": true, "allowImportingTsExtensions": true }, - "include": ["docs", "src"], + "include": ["docs", "theme", "rspress.config.ts"], "mdx": { "checkMdx": true } diff --git a/packages/document/docs/zh/guide/start/getting-started.mdx b/packages/document/docs/zh/guide/start/getting-started.mdx index ef6f70813..b0834fb05 100644 --- a/packages/document/docs/zh/guide/start/getting-started.mdx +++ b/packages/document/docs/zh/guide/start/getting-started.mdx @@ -71,7 +71,7 @@ export default defineConfig({ "useDefineForClassFields": true, "allowImportingTsExtensions": true }, - "include": ["docs", "src"], + "include": ["docs", "theme", "rspress.config.ts"], "mdx": { "checkMdx": true } From 121039a58862a6964fbdab8d05248ee29eb59237 Mon Sep 17 00:00:00 2001 From: SoonIter Date: Thu, 8 Aug 2024 14:45:59 +0800 Subject: [PATCH 4/5] chore: update --- e2e/fixtures/api-docgen/tsconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e/fixtures/api-docgen/tsconfig.json b/e2e/fixtures/api-docgen/tsconfig.json index 75ff22b60..936218cee 100644 --- a/e2e/fixtures/api-docgen/tsconfig.json +++ b/e2e/fixtures/api-docgen/tsconfig.json @@ -13,7 +13,7 @@ "useDefineForClassFields": true, "allowImportingTsExtensions": true }, - "include": ["docs", "src"], + "include": ["docs", "theme", "rspress.config.ts"], "mdx": { "checkMdx": true } From f0baeb4d91e38db64e3169c8c75127b2dde74867 Mon Sep 17 00:00:00 2001 From: SoonIter Date: Thu, 8 Aug 2024 14:47:20 +0800 Subject: [PATCH 5/5] chore: update --- e2e/fixtures/api-docgen/tsconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e/fixtures/api-docgen/tsconfig.json b/e2e/fixtures/api-docgen/tsconfig.json index 936218cee..cd3dd4619 100644 --- a/e2e/fixtures/api-docgen/tsconfig.json +++ b/e2e/fixtures/api-docgen/tsconfig.json @@ -13,7 +13,7 @@ "useDefineForClassFields": true, "allowImportingTsExtensions": true }, - "include": ["docs", "theme", "rspress.config.ts"], + "include": ["docs", "src", "rspress.config.ts"], "mdx": { "checkMdx": true }